diff options
author | Denys Konovalov <kontakt@denyskon.de> | 2024-03-30 19:11:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-30 18:11:50 +0000 |
commit | f32ce753f6518caa815d7b6bc44bc03806e8d049 (patch) | |
tree | 4b16dc85b79c25d636de6d0efd23628fcb5a2bf7 /.github/workflows/cron-translations.yml | |
parent | b535c6ca7b9e8c4bcf5637091ee5ad6d9c807c31 (diff) | |
download | gitea-f32ce753f6518caa815d7b6bc44bc03806e8d049.tar.gz gitea-f32ce753f6518caa815d7b6bc44bc03806e8d049.zip |
Use Crowdin action for translation sync (#30054)
Switch from the old self-built action to the official one.
We get:
- config managed inside the repo
- automatic upload when source file changes
- automatic invalidation if source string changes (tested)
- automatic download of new translation files
Tested both upload and download.
Diffstat (limited to '.github/workflows/cron-translations.yml')
-rw-r--r-- | .github/workflows/cron-translations.yml | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/.github/workflows/cron-translations.yml b/.github/workflows/cron-translations.yml index 390aae7c07..f1b51debf1 100644 --- a/.github/workflows/cron-translations.yml +++ b/.github/workflows/cron-translations.yml @@ -11,14 +11,19 @@ jobs: if: github.repository == 'go-gitea/gitea' steps: - uses: actions/checkout@v4 - - name: download from crowdin - uses: docker://jonasfranz/crowdin + - uses: crowdin/github-action@v1 + with: + upload_sources: true + upload_translations: false + download_sources: false + download_translations: true + push_translations: false + push_sources: false + create_pull_request: false + config: crowdin.yml env: + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }} - PLUGIN_DOWNLOAD: true - PLUGIN_EXPORT_DIR: options/locale/ - PLUGIN_IGNORE_BRANCH: true - PLUGIN_PROJECT_IDENTIFIER: gitea - name: update locales run: ./build/update-locales.sh - name: push translations to repo @@ -31,19 +36,3 @@ jobs: commit_message: "[skip ci] Updated translations via Crowdin" remote: "git@github.com:go-gitea/gitea.git" ssh_key: ${{ secrets.DEPLOY_KEY }} - crowdin-push: - runs-on: ubuntu-latest - if: github.repository == 'go-gitea/gitea' - steps: - - uses: actions/checkout@v4 - - name: push translations to crowdin - uses: docker://jonasfranz/crowdin - env: - CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }} - PLUGIN_UPLOAD: true - PLUGIN_EXPORT_DIR: options/locale/ - PLUGIN_IGNORE_BRANCH: true - PLUGIN_PROJECT_IDENTIFIER: gitea - PLUGIN_FILES: | - locale_en-US.ini: options/locale/locale_en-US.ini - PLUGIN_BRANCH: main |