🌉 fix: Preserve Missing Locize Translations (#14917)

This commit is contained in:
Danny Avila 2026-08-17 02:20:25 -04:00 committed by GitHub
parent 57ea1137f6
commit c77e6a5ad2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 100 additions and 3 deletions

View file

@ -2,11 +2,12 @@ name: Sync Locize Translations & Create Translation PR
on:
push:
branches: [main]
branches: [dev]
paths:
- 'client/src/locales/en/**'
repository_dispatch:
types: [locize/versionPublished]
workflow_dispatch:
concurrency:
group: locize-i18n-sync
@ -51,7 +52,7 @@ jobs:
create-pull-request:
name: Create Translation PR on Version Published
if: ${{ github.event_name == 'repository_dispatch' }}
if: ${{ github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
needs: sync-translations
permissions:
@ -61,6 +62,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v5
with:
ref: dev
persist-credentials: false
# Keep a baseline so generated changes can be checked before opening a PR.
@ -75,6 +77,12 @@ jobs:
path: "client/src/locales"
version: latest
- name: Preserve Repository Translations Missing from locize
run: |
node scripts/merge-locize-download.mjs \
--base-dir "$RUNNER_TEMP/locize-locale-baseline" \
--current-dir client/src/locales
- name: Validate Downloaded Translations
run: |
node scripts/validate-locize-download.mjs \
@ -91,7 +99,7 @@ jobs:
add-paths: |
client/src/locales/**
commit-message: "🌍 i18n: Update translation.json with latest translations"
base: main
base: dev
branch: i18n/locize-translation-update
title: "🌍 i18n: Update translation.json with latest translations"
body: |