From 29586e70823b7e83c0216c505d230a380d3798e3 Mon Sep 17 00:00:00 2001 From: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Date: Tue, 16 Feb 2021 19:11:42 -0700 Subject: [PATCH] fix: create separate steps for chinese and spanish downloads (#41143) --- .../crowdin-i18n-client-ui-download.yml | 47 +++++++++++++++--- .../crowdin-i18n-curriculum-download.yml | 48 ++++++++++++++++--- .../workflows/crowdin-i18n-docs-download..yml | 2 +- 3 files changed, 82 insertions(+), 15 deletions(-) diff --git a/.github/workflows/crowdin-i18n-client-ui-download.yml b/.github/workflows/crowdin-i18n-client-ui-download.yml index bef15dd2ea..08019b3503 100644 --- a/.github/workflows/crowdin-i18n-client-ui-download.yml +++ b/.github/workflows/crowdin-i18n-client-ui-download.yml @@ -11,7 +11,8 @@ jobs: - name: Checkout Source Files uses: actions/checkout@v2 - - name: Crowdin Download + ##### Download Chinese ##### + - name: Crowdin Download Chinese Translations uses: crowdin/github-action@master # options: https://github.com/crowdin/github-action/blob/master/action.yml with: @@ -23,18 +24,50 @@ jobs: # downloads download_translations: true - skip_untranslated_strings: false + download_language: zh-CN skip_untranslated_files: false export_only_approved: true - commit_message: 'chore(i8n,client): processed translations' + push_translations: false + + # pull-request + create_pull_request: false + + # global options + config: './config/crowdin/client/crowdin.yml' + base_url: ${{ secrets.CROWDIN_BASE_URL_FCC }} + + # Uncomment below to debug + # dryrun_action: true + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_CLIENT }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }} + + ##### Download Espanol ##### + - name: Crowdin Download Espanol Translations + uses: crowdin/github-action@master + # options: https://github.com/crowdin/github-action/blob/master/action.yml + with: + # uploads + upload_sources: false + upload_translations: false + auto_approve_imported: false + import_eq_suggestions: false + + # downloads + download_translations: true + download_language: es-EM + skip_untranslated_files: false + export_only_approved: true + + commit_message: 'chore(i8n,client): processed translations' + localization_branch_name: i18n-sync-client + push_translations: true # pull-request - localization_branch_name: i18n-sync-client create_pull_request: false - pull_request_title: 'chore(i18n,client): Processed translations from crowdin' - pull_request_body: '' - pull_request_labels: 'scope: i18n, platform: client, crowdin-sync' # global options config: './config/crowdin/client/crowdin.yml' diff --git a/.github/workflows/crowdin-i18n-curriculum-download.yml b/.github/workflows/crowdin-i18n-curriculum-download.yml index cd387bdaa2..c76820c469 100644 --- a/.github/workflows/crowdin-i18n-curriculum-download.yml +++ b/.github/workflows/crowdin-i18n-curriculum-download.yml @@ -11,8 +11,8 @@ jobs: - name: Checkout Source Files uses: actions/checkout@v2 - ##### Download ##### - - name: Crowdin Download for Translations + ##### Download Chinese ##### + - name: Crowdin Download Chinese Translations uses: crowdin/github-action@master # options: https://github.com/crowdin/github-action/blob/master/action.yml with: @@ -24,17 +24,51 @@ jobs: # downloads download_translations: true + download_language: zh-CN skip_untranslated_files: true export_only_approved: true - commit_message: 'chore(i8n,learn): processed translations' + push_translations: false + + # pull-request + create_pull_request: false + + # global options + config: './config/crowdin/curriculum/crowdin.yml' + base_url: ${{ secrets.CROWDIN_BASE_URL_FCC }} + + # Uncomment below to debug + # dryrun_action: true + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_CURRICULUM }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }} + + ##### Download Espanol ##### + - name: Crowdin Download Espanol Translations + uses: crowdin/github-action@master + # options: https://github.com/crowdin/github-action/blob/master/action.yml + with: + # uploads + upload_sources: false + upload_translations: false + auto_approve_imported: false + import_eq_suggestions: false + + # downloads + download_translations: true + download_language: es-EM + skip_untranslated_files: true + export_only_approved: true + + + commit_message: 'chore(i8n,learn): processed translations' + localization_branch_name: i18n-sync-learn + push_translations: true # pull-request - localization_branch_name: i18n-sync-learn create_pull_request: false - pull_request_title: 'chore(i18n,learn): Processed translations from Crowdin' - pull_request_body: '' - pull_request_labels: 'scope: i18n, scope: learn, crowdin-sync' # global options config: './config/crowdin/curriculum/crowdin.yml' diff --git a/.github/workflows/crowdin-i18n-docs-download..yml b/.github/workflows/crowdin-i18n-docs-download..yml index 6da2a0c635..491814a206 100644 --- a/.github/workflows/crowdin-i18n-docs-download..yml +++ b/.github/workflows/crowdin-i18n-docs-download..yml @@ -79,4 +79,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_DOCS }} - CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }} \ No newline at end of file + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }}