We are not accepting external contributions at this point in time.
To work correctly this package requires a gettext
installation.
$ npm i @mojang/i18n-scripts
Adds english default translation using keys in pot
file as base translation.
example
$ add-missing-en
Helper function around gettext msgmerge
.
example
$ merge-translations
Generates json files from po
files that can be consumed by Jed.
flag | action |
---|---|
--o (optional) | When set, sets output file |
--lowercase (optional) | When set, produces lowercase filename |
--escape-percentage (optional) | When set, appends extra percentage sign |
--filenamesMap (optional) | When set, reads file name maps from a json file |
example
$ generate-json --lowercase --escape-percentage --filenamesMap ./i18n-map.json
example i18n-map.json
{
"zh-CN": ["zh-cn", "zh-hans"],
"zh-TW": ["zh-tw", "zh-hant"]
}