From da36279312c8f257a332c628ab1abe32a468b1ca Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Thu, 15 May 2025 18:12:39 +0100 Subject: [PATCH] Chore: Modify i18n-download action to work with mulitple sources (#105492) modify i18n-download action to work with multiple sources --- .github/workflows/i18n-crowdin-download.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/i18n-crowdin-download.yml b/.github/workflows/i18n-crowdin-download.yml index 6aeddc560fb..0e9f8c4514d 100644 --- a/.github/workflows/i18n-crowdin-download.yml +++ b/.github/workflows/i18n-crowdin-download.yml @@ -62,8 +62,6 @@ jobs: pull_request_base_branch_name: 'main' base_url: 'https://grafana.api.crowdin.com' config: 'crowdin.yml' - source: 'public/locales/en-US/grafana.json' - translation: 'public/locales/%locale%/%original_file_name%' # Magic details of the github-actions bot user, to pass CLA checks github_user_name: "github-actions[bot]" github_user_email: "41898282+github-actions[bot]@users.noreply.github.com" @@ -150,16 +148,17 @@ jobs: # Only approve if: # - the PR does not modify files other than json files under the public/locales/ directory # - the PR does not modify the en-US locale + # TODO make these paths inputs to the workflow when we move this to a shared repo run: | filesChanged="$(gh pr diff --name-only "$PR_URL")" - if [[ $(echo "$filesChanged" | grep -cv 'public/locales/[a-zA-Z\-]*/grafana.json') -ne 0 ]]; then + if [[ $(echo "$filesChanged" | grep -cv -e 'public/locales/[a-zA-Z\-]*/grafana.json' -e 'public/app/plugins/datasource/azuremonitor/locales/[a-zA-Z\-]*/grafana-azure-monitor-datasource.json') -ne 0 ]]; then echo "Non-i18n changes detected, not approving" exit 1 fi - if [[ $(echo "$filesChanged" | grep -c "public/locales/en-US") -ne 0 ]]; then - echo "public/locales/en-US changes detected, not approving" + if [[ $(echo "$filesChanged" | grep -c -e "public/locales/en-US" -e "public/app/plugins/datasource/azuremonitor/locales/en-US") -ne 0 ]]; then + echo "en-US changes detected, not approving" exit 1 fi