From d4d1514ecb13f8039798b9cc23e205a67c7f56b7 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Thu, 15 May 2025 17:19:29 +0100 Subject: [PATCH] Internationalisation: Move some config to crowdin.yml to upload multiple files (#105480) * move some config to crowdin.yml to upload multiple files * explicitly add the type * different dest for plugins * better dest --- .github/workflows/i18n-crowdin-upload.yml | 4 +--- crowdin.yml | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/i18n-crowdin-upload.yml b/.github/workflows/i18n-crowdin-upload.yml index 6099e323196..998829921cd 100644 --- a/.github/workflows/i18n-crowdin-upload.yml +++ b/.github/workflows/i18n-crowdin-upload.yml @@ -5,6 +5,7 @@ on: push: paths: - 'public/locales/en-US/grafana.json' + - 'public/app/plugins/datasource/azuremonitor/locales/en-US/grafana-azure-monitor-datasource.json' branches: - main @@ -35,14 +36,11 @@ jobs: uses: crowdin/github-action@b8012bd5491b8aa8578b73ab5b5f5e7c94aaa6e2 with: upload_sources: true - upload_sources_args: '--dest=public/locales/en-US/grafana.json' upload_translations: false download_translations: false create_pull_request: false base_url: 'https://grafana.api.crowdin.com' config: 'crowdin.yml' - source: 'public/locales/en-US/grafana.json' - translation: 'public/locales/%locale%/%original_file_name%' env: CROWDIN_PROJECT_ID: 5 CROWDIN_PERSONAL_TOKEN: ${{ env.CROWDIN_TOKEN }} diff --git a/crowdin.yml b/crowdin.yml index 0d1bab25f7c..e27a7887138 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,5 +1,18 @@ -files: - - type: i18next_json # The following are pulled from env variables project_id_env: CROWDIN_PROJECT_ID api_token_env: CROWDIN_PERSONAL_TOKEN + +preserve_hierarchy: true +files: [ + { + "source": "public/locales/en-US/grafana.json", + "translation": "public/locales/%locale%/%original_file_name%", + "type": "i18next_json", + }, + { + "source": "public/app/plugins/datasource/azuremonitor/locales/en-US/grafana-azure-monitor-datasource.json", + "translation": "public/app/plugins/datasource/azuremonitor/locales/%locale%/%original_file_name%", + "type": "i18next_json", + "dest": "plugins/azuremonitor/en-US/%original_file_name%" + }, +]