Repository navigation
fix: nest settings translation keys for language packs - #28251
Conversation
Move misplaced catalog entries into their existing nested settings paths without changing translation values. Extend catalog verification to reject dotted keys and cover the real bundled settings labels with the language-pack parser and strict nested lookups. Co-authored-by: Evgenii <kumiro@me.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
|
@nwparker Thanks for picking this up. I compared this branch ( |
ELI5
A language pack could be rejected because some settings labels were stored under one long name instead of inside their folders. Those labels now use the same nested structure as the rest of the translation file. The words on screen stay the same.
What Changed
The eleven agent settings labels move into the existing
settings.agentsobject in English, Spanish, French, Japanese, Korean, and Chinese. English's duplicate chat title is removed; its identical nested entry already exists. The existing catalog check now reports keys containing dots in their names, including nested mistakes, before an English--fixcan rewrite the file.Why
The app's translation library accepted both shapes, hiding the mismatch with the language-pack parser. Nesting the entries preserves every translation lookup and keeps the parser's existing safety rules intact. The verifier reports ambiguous entries for review rather than automatically choosing which value to keep.
Linked Issue
Fixes #28017
Visual Proof
N/A. No layout, text, or interaction changes. Every translation path and value is identical across all six locales.
Parser proof using the actual English settings translations:
catalog key settings.appearance.chat.title is not safeThe parser proof uses the settings translations, including the formerly misplaced labels. Whole bundled catalogs also contain text restricted by other plugin safety limits; those limits remain enforced.
Testing
Reproduced rejection before editing, then verified all six settings subtrees with the actual parser and their eleven labels with flat-key fallback disabled. Compared every flattened translation path/value against the original commit: zero differences. The new verifier tests failed against the original implementation and pass after the fix.
pnpm test config/scripts/verify-localization-catalog.test.mjs config/scripts/verify-localization-catalogs.test.mjs src/renderer/src/i18n/catalog-nested-settings.test.ts src/shared/plugins/plugin-language-pack-artifact.test.ts --maxWorkers=2: 54 tests in four suites pass withORCA_BACKGROUND_LAUNCH=1and--maxWorkers=2. Main and renderer typechecks, changed-code quality, catalog/runtime verification under Node and Bun, localization extraction, and localization coverage pass. No app windows were launched. Validation ran on macOS; the data and verification script are platform independent.Final platform verification: tested together with the other reviewed fixes in 59 selected suites. macOS: 748 passed. Linux: 748 passed. Windows: 725 passed, 13 platform skips (including the Bash-only suite). Core typecheck, changed-code quality (zero new findings), and the production Electron bundle build passed. UI screenshots are hidden macOS renderers; fixture and live-host limits are described above.
All CI checks passed on the final head
951a33a43bdb22427f8657ed67e67dd4d55d833dbefore merge.Review
Independent review found no remaining issues and confirmed identical translation paths and values across all six locales. Cross-referenced community PR #28018 after reproducing the bug and designing the fix. Evgenii (@smwbev) receives co-author credit. This change preserves all Chinese values as well; the community PR's additional wording changes are outside this structural repair.
Agent skill upstream boundary
Notes
Low merge risk; no known negative user-facing tradeoffs. No runtime parser, permission, wire, workspace, path, or shortcut changes. Nested language-pack keys are already supported by older hosts.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)