Repository navigation
fix(i18n): quote identifier keys in the locale catalogs (GH #470) - #471
Merged
Merged
Conversation
The machine-translated catalogs quote every object key, but the portal language keys in ar, de, es, pt-BR, and zh-CN and the Korean email template keys were left unquoted. Quote them and add a check-i18n guard so a quoted-key catalog cannot silently mix key styles again.
|
Size Change: 0 B 🆕 Total Size: 0 B |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The machine-translated catalogs quote every object key, but a handful of identifier keys were left unquoted:
ar,de,es,pt-BR, andzh-CNsupplemental.jscatalogsko/channels.jsko/admin.jsQuote them so each catalog is internally consistent.
check-i18n.jsnow fails when a catalog that quotes identifier keys also contains bare identifier keys. The guard lives infrontend/scripts/locale-key-quoting.jsso it can be unit tested.Closes #470.
Tests
node frontend/scripts/check-i18n.js— all checks pass, new "Locale key quoting" section greenfrontendpre-commit checks — biome, shortcut/i18n/hardcoded/silent-error/design-token/HMR/OpenUI guards,svelte-checkcore-tests:run-overlay-script.sh . scripts/run-frontend-tests.sh scripts/locale-key-quoting.test.jscore-tests:run-overlay-script.sh . scripts/run-frontend-tests.sh scripts/ src/lib/locales/— 139 tests pass