From fe24d15d8daf575d9b6d7e8412d70d4a8ad4c30d Mon Sep 17 00:00:00 2001 From: Yamil Medina Date: Mon, 9 Oct 2023 09:44:45 -0300 Subject: [PATCH] chore: source updated from crowdin (#2305) --- .github/workflows/crowdin-source-updater.yml | 59 +++++++++++++++++++ ...r.yml => crowdin-translations-updater.yml} | 0 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/crowdin-source-updater.yml rename .github/workflows/{localization-crowdin-updater.yml => crowdin-translations-updater.yml} (100%) diff --git a/.github/workflows/crowdin-source-updater.yml b/.github/workflows/crowdin-source-updater.yml new file mode 100644 index 0000000000..65efa34778 --- /dev/null +++ b/.github/workflows/crowdin-source-updater.yml @@ -0,0 +1,59 @@ +name: "Crowdin Action" + +# **What it does**: Download new source from crowdin project. +# **Why we have it**: We want to be able to pull-update base (EN) translations to the project. +# **Who does it impact**: Everyone collaborating on the project, and the translators. +# For more info: https://github.com/crowdin/github-action/blob/master/action.yml + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + synchronize-with-crowdin: + runs-on: ubuntu-latest + + env: + GITHUB_USER: "AndroidBob" + GITHUB_TOKEN: ${{ secrets.ANDROID_BOB_GH_TOKEN }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: "Exit if the branch is not default 'develop'" + run: | + if [[ "${{ github.ref }}" != "refs/heads/develop" ]]; then + echo "Branch is not develop, exiting." + exit 0 + fi + + - name: Crowdin action + uses: crowdin/github-action@v1 + with: + project_id: ${{ secrets.CROWDIN_PROJECT_ID }} + token: ${{ secrets.CROWDIN_API_TOKEN }} + + download_sources: true + push_sources: true + upload_sources: false + download_translations: true + upload_translations: false + + create_pull_request: true + localization_branch_name: chore/sync-and-update-localization-source + commit_message: "chore: update localization sources from Crowdin" + pull_request_title: "chore: update localization sources from Crowdin" + pull_request_body: "This PR pulls in the latest localization **source** from Crowdin." + github_user_name: "AndroidBob" + github_user_email: "AndroidBob@users.noreply.github.com" + + pull_request_labels: "l10n, crowdin" + pull_request_assignees: "AndroidBob" + pull_request_team_reviewers: "wireapp/android" + pull_request_base_branch_name: ${{env.BASE_BRANCH}} + + config: "crowdin.yml" diff --git a/.github/workflows/localization-crowdin-updater.yml b/.github/workflows/crowdin-translations-updater.yml similarity index 100% rename from .github/workflows/localization-crowdin-updater.yml rename to .github/workflows/crowdin-translations-updater.yml