@narando/lint-i18n
v0.36.0
Published
Lint your locale files
Downloads
31
Keywords
Readme
@narando/lint-i18n
A script to parse language locales and find not matching translation keys. This can be used to test your locale files at your cli tool
Usage
You need to have nodejs
and npm
installed.
$ npm -g i @narando/lint-i18n
Commands
-V, --version output the version number
-d, --dir [directory] specify locales folder [./app/locales] (default: "./app/locales")
-h, --help output usage information
Example
This example is made with the fixtures which are used at the tests.
Commandline:
$ lint-i18n --dir ./tests/fixtures/locales/notEqualLocales
Output:
Found 3 missing translation keys for language en_US:
ns2:text5
ns2:text6
ns2:text7
Commandline:
$ lint-i18n --dir ./tests/fixtures/locales/equalLocales
Output:
Yeahy! No keys are missing!