diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index 25540bf..c8ceb16 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -1,32 +1,37 @@ -name: Crowdin Sync +name: Crowdin Action + on: push: branches: [ main ] paths: - 'module/webui/locales/strings/*.xml' + schedule: + - cron: '0 0 * * *' workflow_dispatch: jobs: - sync-translations: + synchronize-with-crowdin: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: crowdin/github-action@v1 - with: - upload_sources: true - upload_translations: true - download_translations: true - skip_untranslated_files: true + - name: Checkout + uses: actions/checkout@v4 - create_pull_request: true - localization_branch_name: crowdin_branch - pull_request_labels: 'enhancement, documentation' - pull_request_title: '[Translation] Update translation from Crowdin' + - name: Crowdin Action + uses: crowdin/github-action@v1 + with: + upload_sources: true + upload_translations: true + download_translations: true + skip_untranslated_files: true - config: 'crowdin.yml' - crowdin_branch_name: main + create_pull_request: true + localization_branch_name: crowdin_branch + pull_request_labels: 'enhancement, documentation' + pull_request_title: '[Translation] Update translation from Crowdin' - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} - CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }} + config: 'crowdin.yml' + crowdin_branch_name: main + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }} diff --git a/crowdin.yml b/crowdin.yml index 6ec39ea..35318f9 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,24 +1,6 @@ project_id_env: CROWDIN_PROJECT_ID api_token_env: CROWDIN_API_TOKEN -preserve_hierarchy: true - +preserve_hierarchy: 1 files: - source: /module/webui/locales/strings/en.xml translation: /module/webui/locales/strings/%locale%.xml - languages_mapping: - locale: - ar: ar - az: az - es-ES: es - fr: fr - id: id - it: it - ja: ja - pl: pl - pt-BR: pt - ru: ru - tl: tl - tr: tr - uk: uk - zh-CN: zh-CN - zh-TW: zh-TW diff --git a/module/webui/locales/strings/es.xml b/module/webui/locales/strings/es-ES.xml similarity index 100% rename from module/webui/locales/strings/es.xml rename to module/webui/locales/strings/es-ES.xml diff --git a/module/webui/locales/strings/pt.xml b/module/webui/locales/strings/pt-BR.xml similarity index 100% rename from module/webui/locales/strings/pt.xml rename to module/webui/locales/strings/pt-BR.xml