chore(locales): sync locale files with source strings - #151
Conversation
Removes two stale keys from flashing.json in all 11 locales ("Flash"
and "Flash this radio via Bootloader and UF2") — both were dropped
from source in the UF2 flashing PR (#133) without pruning the locale
entries. Note this discards their existing translations, including a
hand-written Chinese one; if the strings ever return to source they
will need re-translating.
Adds three missing keys to backup.json in 10 locales (zh already had
them translated) that were introduced by the backup feature (#134)
but only partially propagated.
Output of `yarn extract-locales`, verified idempotent.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #151 +/- ##
=======================================
Coverage 34.95% 34.95%
=======================================
Files 115 115
Lines 4288 4288
Branches 1033 1033
=======================================
Hits 1499 1499
Misses 2585 2585
Partials 204 204 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
EdgeTX Buddy has been automatically deployed to Cloudflare. |
No content change (identical keys and values) — resorts three keys added at the file tail by #140 into canonical positions and replaces the "—" JSON escape with a literal em dash, so running `yarn extract-locales` is now a complete no-op across all locale files.
bdb2417 to
e44cad3
Compare
Added in #134 but doubly unused: the extractor excludes en from its locales list (English lives in the t() source strings via useKeysAsDefaultValue), and the runtime i18n loader short-circuits en with an empty resource object, so the file was never read. It had already drifted to carry 21 keys that no longer exist in source.
Summary
Pure locale-JSON sync produced by
yarn extract-locales(no source changes). The drift had two causes:t(Flash)(replaced byFlash firmware) and dropped the UF2-only tooltipt(Flash this radio via Bootloader and UF2)from source, but the old keys were left behind inflashing.json. This PR removes both from all 11 locales. Note this discards their existing translations (including a hand-written Chinese one from chore: translated all the texts to Simplified Chinese #140); if the strings ever return to source they'll need re-translating.Radio settings — will be overwritten…,labels.yml is always included…,Select an SD Card to enable restore) that were only propagated tozh/backup.json(via chore: translated all the texts to Simplified Chinese #140). This PR adds them to the other 10 locales as untranslated English fallbacks, ready for translators.zh/backup.jsonneeded no key changes (it already had all three keys with real translations from #140), but is normalized to canonical extractor output in a follow-up commit — three keys resorted into sorted positions and a\u2014escape replaced with a literal em dash — so thatyarn extract-localesis now a complete no-op across every locale file.Verification
src/ande2e/(all otherFlash …keys survive)t()call sites exactly (namespacebackup)yarn vitest run src/renderer— 152/152 tests passyarn test:types— no errorsyarn extract-localesis a no-op on these 21 files (sync is idempotent)Also deleted: orphaned
locales/en/backup.jsonThis file (added in #134) was doubly unused:
i18next-parser.config.jsfiltersenout of the extractor's locales list (languages.filter((lang) => lang !== "en")) because English is the built-in default —useKeysAsDefaultValue: truemakes thet()source strings themselves the English text — and the runtime loader (LazyImportPlugin.ts) short-circuitsenwith an empty resource object, so no English JSON is ever loaded. Nothing read it, nothing maintained it, and it had already drifted to carry 21 keys that no longer exist in source. Verified no references anywhere insrc/,e2e/,webpack/, or Storybook config before deleting.Heads-up: this touches lines adjacent to changes in #150, so whichever merges second may hit a trivial conflict in
flashing.json.🤖 Generated with Claude Code