Locale Validate CLI
locales:validate
apps/web/scripts/locales/validate/index.ts
Validates locale JSON integrity (parses all apps/web/locales/*.json) and reports literal translation key paths used in apps/web/src/** that are not present as string leaves in en.json (so you can add them manually).
From apps/web:
pnpm locales:validate
locales:validate:quality
apps/web/scripts/locales/validate/quality.ts
Read-only parity + quality report (replaces the old pnpm locales:sync:parity / sync --strict diagnostics):
- Per non-English locale: missing vs
en.json, extra vsen.json(key-shape drift). - English-identical string paths (same rules as sync +
scripts/locales/shared/preserve.ts), grouped once per key with the list of locale files that still match English. Comparisons use each leaf’svaluewhen the locale file uses structured leaves.
For review metadata only (status, confidence, needsReview, …), use pnpm locales:review — see review.md.
Commands:
pnpm locales:validate:qualitypnpm locales:validate:quality -- --strict— exit with non-zero status if any English-identical translatable paths remain
locales:ci
apps/web/scripts/locales/ci/index.ts
Runs: valid JSON → missing literal keys vs en.json → quality report. Fails on invalid JSON, missing keys in source, or locale key-shape drift. English-identical strings are reported as warnings unless you pass --strict or set LOCALES_CI_STRICT_IDENTICAL=1.
See ci.md for purpose and CI integration.
pnpm locales:ci