diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml new file mode 100644 index 000000000..8ef59218a --- /dev/null +++ b/.github/workflows/translations.yml @@ -0,0 +1,28 @@ +name: Crowdin Action + +on: + push: + branches: [translations] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + synchronize-with-crowdin: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Crowdin action + uses: crowdin/github-action@v1 + with: + upload_sources: true + download_translations: true + localization_branch_name: translations + config: crowdin.yml + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 000000000..5fc07d741 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,10 @@ +'pull_request_title': 'Translations update: %two_letters_code%' +'pull_request_labels': ['crowdin', 'l10n'] +'commit_message': 'Updated translations for %two_letters_code%' + +files: + - source: web/i18n/*.json + translation: web/i18n/%original_file_name% + +project_id_env: CROWDIN_PROJECT_ID +api_token_env: CROWDIN_PERSONAL_TOKEN diff --git a/web/crowdin.yml b/web/crowdin.yml deleted file mode 100644 index fe5938fb3..000000000 --- a/web/crowdin.yml +++ /dev/null @@ -1,3 +0,0 @@ -files: - - source: /translations/locales/en-us.po - translation: /translations/locales/%locale%.po