i18next-parser
i18next-parser copied to clipboard
Warn about any missing / empty translations
🚀 Feature Proposal
Add an execution flag to report any missing / empty translations. Like this:
i18next -w
...
Warning: Missing 123 translation keys:
Warning: Missing translation key: "common:foo.bar.note"
...etc
Motivation
Should be useful for CI needs, to prevent untranslated builds.
Example
- I got some new keys translated to Hindi, but forgot to add them also to Suahili strings
- I open a PR, build starts
- I see warnings about missing Suahili locale keys
- I finish all the unfinished stuff
- Build is ok 😎
It sounds like a good idea to me. You are welcome to open a PR and I will review it.
For a quick local test, I used https://github.com/andreyvit/json-diff that did the job for me:
npx json-diff a.json b.json --keys-only