Free JSON Locale Checker CLI for i18n Projects
What the CLI does @json-translate/check compares translated JSON locale files against a source locale. It is designed for the last step after translation: the point where a developer wants to know whether a translated file can safely enter a build. It fails when a target file cannot be parsed as JSON. It reports keys that exist in the source but are missing from the translation. It reports extra…
The JSON Locale Checker CLI is a tool specifically designed for internationalization (i18n) projects. It compares translated JSON locale files against a source locale to ensure safety for the build process. The CLI is run after translation and fails if the target file cannot be parsed as JSON, reports missing keys from the source, and identifies extra keys in the translated file.
It also compares placeholder tokens like {name}, {{count}}, ${value}, and %s. The tool can be executed using npx without requiring a project dependency. An example failure scenario includes a French locale losing a key, adding an obsolete key, and dropping a placeholder. The CLI is best used in the best first workflow, where it is integrated into the continuous integration (CI) process for every locale file that the application loads at runtime, turning missing keys and broken placeholders into pull-request failures rather than customer-facing bugs.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.