[ACS-12385] Fix en-AU collision (#5330)

* [ACS-12385] Fix en-AU collision

* [ACS-12385] remove comments

* [ACS-12385] Diff by SHA instead of a remote-tracking branch name
This commit is contained in:
Shivangi Shree
2026-08-05 15:34:27 +05:30
committed by GitHub
parent 2517f90b1f
commit 84f3a639e8
3 changed files with 52 additions and 22 deletions
+24
View File
@@ -79,6 +79,30 @@ jobs:
echo "only-e2e-changes=true" >> $GITHUB_OUTPUT
fi
protect-en-source:
name: 'Validate / Protect English source (en.json)'
if: ${{ github.event_name == 'pull_request' && github.head_ref == 'automated-translations-update' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Fail if automated Crowdin PR modifies en.json
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
git fetch --no-tags --depth=1 origin "$BASE_SHA"
CHANGED_EN=$(git diff --name-only "$BASE_SHA"...HEAD | grep -E '(^|/)i18n/en\.json$' || true)
if [ -n "$CHANGED_EN" ]; then
echo "::error::Automated Crowdin PR must not modify the English source (en.json). Offending file(s):"
echo "$CHANGED_EN"
echo "This usually means a Crowdin target language (e.g. en-AU) collides with the 'en' two_letters_code. Fix crowdin.yml languages_mapping instead of merging this change."
exit 1
fi
echo "OK: no en.json source file modified by the automated Crowdin PR."
build:
name: 'build'
runs-on: ubuntu-latest