Skip to content

fix(i18n): quote identifier keys in the locale catalogs (GH #470) - #471

Merged
stefan-ernst merged 1 commit into
mainfrom
fix/gh-470-locale-key-quoting
Nov 9, 2026
Merged

stefan-ernst merged 1 commit into
mainfrom
fix/gh-470-locale-key-quoting

Conversation

@stefan-ernst

Copy link
Copy Markdown
Contributor

Summary

The machine-translated catalogs quote every object key, but a handful of identifier keys were left unquoted:

  • the portal language keys in the ar, de, es, pt-BR, and zh-CN supplemental.js catalogs
  • the portal language keys in ko/channels.js
  • the email-template translation keys in ko/admin.js

Quote them so each catalog is internally consistent.

check-i18n.js now fails when a catalog that quotes identifier keys also contains bare identifier keys. The guard lives in frontend/scripts/locale-key-quoting.js so it can be unit tested.

Closes #470.

Tests

  • node frontend/scripts/check-i18n.js — all checks pass, new "Locale key quoting" section green
  • frontend pre-commit checks — biome, shortcut/i18n/hardcoded/silent-error/design-token/HMR/OpenUI guards, svelte-check
  • core-tests: run-overlay-script.sh . scripts/run-frontend-tests.sh scripts/locale-key-quoting.test.js
  • core-tests: run-overlay-script.sh . scripts/run-frontend-tests.sh scripts/ src/lib/locales/ — 139 tests pass

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.
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Size Change: 0 B 🆕

Total Size: 0 B

compressed-size-action

@stefan-ernst
stefan-ernst merged commit d014346 into main Nov 9, 2026
20 of 21 checks passed
@stefan-ernst
stefan-ernst deleted the fix/gh-470-locale-key-quoting branch November 9, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Q] Unquoted object key

1 participant