From e9bf6d7171de84ec92b8fa5c97c1586cecd5d58a Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 7 May 2024 11:10:09 +0530 Subject: [PATCH] Add a new action --- .github/workflows/web-crowdin-update.yml | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/web-crowdin-update.yml diff --git a/.github/workflows/web-crowdin-update.yml b/.github/workflows/web-crowdin-update.yml new file mode 100644 index 000000000..63a643cfc --- /dev/null +++ b/.github/workflows/web-crowdin-update.yml @@ -0,0 +1,39 @@ +name: "Update Crowdin translations (web)" + +# This is a variant of web-crowdin.yml that also uploads the translated strings +# (in addition to the source strings). This allows us to change the strings in +# our source code for an automated refactoring (e.g. renaming a key), and then +# run this workflow to update the data in Crowdin taking our source code as the +# source of truth. + +on: + # Only allow running manually. + workflow_dispatch: + +jobs: + synchronize-with-crowdin: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Crowdin's action + uses: crowdin/github-action@v1 + with: + base_path: "web/" + config: "web/crowdin.yml" + upload_sources: true + # This is what differs from web-crowdin.yml + upload_translations: true + download_translations: true + localization_branch_name: translations/web + create_pull_request: true + skip_untranslated_strings: true + pull_request_title: "[web] Updated translations" + pull_request_body: "Updated translations from [Crowdin](https://crowdin.com/project/ente-photos-web)" + pull_request_base_branch_name: "main" + project_id: 569613 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}