From c9822341a384ee32782b983914f659344ff94f41 Mon Sep 17 00:00:00 2001 From: sansx <646924078@qq.com> Date: Wed, 24 Apr 2024 17:15:29 +0800 Subject: [PATCH] update standard config --- .github/workflows/sync-i18n.yml | 29 +++++++++++++++++++++++++++++ crowdin.yml | 11 +++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/sync-i18n.yml create mode 100644 crowdin.yml diff --git a/.github/workflows/sync-i18n.yml b/.github/workflows/sync-i18n.yml new file mode 100644 index 00000000000..046a9e93f3f --- /dev/null +++ b/.github/workflows/sync-i18n.yml @@ -0,0 +1,29 @@ +name: Crowdin Action + +on: + push: + branches: [sync-crowdin] + +jobs: + synchronize-with-crowdin: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: crowdin action + uses: crowdin/github-action@v1 + with: + upload_sources: true + upload_translations: false + download_translations: true + localization_branch_name: ton_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.GITHUB_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 00000000000..9fff7e8b424 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,11 @@ +project_id: '' +api_token: CROWDIN_PERSONAL_TOKEN +api_token_env: CROWDIN_PERSONAL_TOKEN +preserve_hierarchy: true +files: + # JSON translation files + - source: /i18n/en/**/* + translation: /i18n/%two_letters_code%/**/%original_file_name% + # Docs Markdown files + - source: /docs/**/* + translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%