From 86e1df4400c9e66a3e24800a0449234f43d00a9a Mon Sep 17 00:00:00 2001 From: Sjoerd-Bo3 Date: Mon, 27 May 2024 21:21:23 +0200 Subject: [PATCH 1/3] Create crowdin.yml Template only, needs to be configured --- .github/workflows/crowdin.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/crowdin.yml diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml new file mode 100644 index 000000000..b3aeeedd5 --- /dev/null +++ b/.github/workflows/crowdin.yml @@ -0,0 +1,29 @@ +name: Crowdin Action + +on: + push: + branches: [ dev ] + +jobs: + synchronize-with-crowdin: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: crowdin-action + uses: crowdin/github-action@v1.20.4 + with: + upload_sources: true + upload_translations: false + download_translations: true + localization_branch_name: l10n_crowdin_translations + create_pull_request: true + pull_request_title: 'New Crowdin Translations' + pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)' + pull_request_base_branch_name: 'main' + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} From 4f90017970b9dfcdfd871902ef00b50b19c044b7 Mon Sep 17 00:00:00 2001 From: Sjoerd-Bo3 Date: Tue, 28 May 2024 09:34:05 +0200 Subject: [PATCH 2/3] feat(crowdin-action): changed branch names --- .github/workflows/crowdin.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index b3aeeedd5..f75f92a87 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -16,13 +16,13 @@ jobs: uses: crowdin/github-action@v1.20.4 with: upload_sources: true - upload_translations: false + upload_translations: true download_translations: true - localization_branch_name: l10n_crowdin_translations + localization_branch_name: crowdin-i18n create_pull_request: true pull_request_title: 'New Crowdin Translations' pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)' - pull_request_base_branch_name: 'main' + pull_request_base_branch_name: 'dev' env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} From afe0af28e4e7f05b9ac185b51e7a386359011c37 Mon Sep 17 00:00:00 2001 From: Sjoerd-Bo3 Date: Tue, 28 May 2024 20:26:28 +0200 Subject: [PATCH 3/3] fix(crowdin): needed to specify the token and id for cli twice --- .github/workflows/crowdin.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index f75f92a87..e2351abce 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -23,6 +23,9 @@ jobs: pull_request_title: 'New Crowdin Translations' pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)' pull_request_base_branch_name: 'dev' + token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} + project_id: ${{ secrets.CROWDIN_PROJECT_ID }} + env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}