From 1057d390da729d7e004f03b9624536353500400c Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Fri, 10 Nov 2023 09:49:55 +0100 Subject: [PATCH] feat(ci): add update translations ci workflow --- .github/workflows/update-translations.yml | 31 +++++++++++++++++++++++ crowdin.yml | 6 +++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/update-translations.yml diff --git a/.github/workflows/update-translations.yml b/.github/workflows/update-translations.yml new file mode 100644 index 00000000..8d85de21 --- /dev/null +++ b/.github/workflows/update-translations.yml @@ -0,0 +1,31 @@ +name: Update Translations + +on: + push: + branches: + - v4 + +jobs: + update-translations: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: crowdin action + uses: crowdin/github-action@v1 + with: + upload_sources: true + create_pull_request: true + upload_translations: false + download_translations: true + localization_branch_name: l10n + pull_request_base_branch_name: "v4" + pull_request_title: "New Translations" + pull_request_body: "There have been new translations added to the project. Please review and merge the changes made on Crowdin to help keep them in sync." + + env: + GITHUB_TOKEN: ${{ github.token }} + CROWDIN_PROJECT_ID: "503410" + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_TOKEN }} diff --git a/crowdin.yml b/crowdin.yml index eb2d8364..901d2c22 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,3 +1,9 @@ +base_path: . +project_id: "503410" +preserve_hierarchy: false +base_url: "https://api.crowdin.com" +api_token_env: CROWDIN_PERSONAL_TOKEN + files: - source: /apps/client/src/locales/en-US/messages.po translation: /apps/client/src/locales/%locale%/messages.po