mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user