mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-25 09:01:29 +02:00
English (en) is the source of truth for UI translation keys; the other
nine locales rely on runtime English fallback for any missing key, so a
gap never surfaces in CI. Add a dependency-free Node check that fails
when any locale declared in _index.json does not carry the exact same
key set as en (missing or orphaned keys), wired into a dedicated
UI Translations workflow that runs on locale changes.
Also close the one existing gap the check found: ja was missing
daemon.outdated.download ("Download Latest").
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: UI Translations
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "client/ui/i18n/locales/**"
|
|
- "client/ui/i18n/check-translations.mjs"
|
|
- ".github/workflows/ui-translations.yml"
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "client/ui/i18n/locales/**"
|
|
- "client/ui/i18n/check-translations.mjs"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.actor_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check-translations:
|
|
name: Check translation key parity
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
|
|
# English (en) is the source of truth for translation keys; every other
|
|
# locale declared in _index.json must carry the exact same key set.
|
|
- name: Check translation key parity
|
|
run: node client/ui/i18n/check-translations.mjs
|