Pontoon/Mozilla accounts CMS: Update Frisian (fy-NL) #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Copy Locales | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'locales/es-ES/cms.ftl' | |
| - 'locales/fy-NL/cms.ftl' | |
| - 'locales/hi-IN/cms.ftl' | |
| - 'locales/pt-PT/cms.ftl' | |
| - 'locales/sv-SE/cms.ftl' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| copy_locale: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Mirror region → base | |
| run: | | |
| pairs="es:es-ES fy:fy-NL hi:hi-IN pt:pt-PT sv:sv-SE" | |
| changed=0 | |
| for pair in $pairs; do | |
| base="${pair%%:*}"; src="${pair##*:}" | |
| srcp="locales/$src/cms.ftl"; dstp="locales/$base/cms.ftl" | |
| [ -f "$srcp" ] || continue | |
| mkdir -p "locales/$base" | |
| if ! cmp -s "$srcp" "$dstp"; then | |
| cp "$srcp" "$dstp" | |
| git add "$dstp" | |
| changed=1 | |
| fi | |
| done | |
| if [ "$changed" -eq 1 ]; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git commit -m "Automation: mirror region locales to base locales" | |
| git push | |
| else | |
| echo "No changes found." | |
| fi |