@panthus/elm-xgettext
v1.0.2
Published
A tool similar to [GNU xgettext](https://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html) that parses Elm source files to get the translatable strings and generate a PO template file. This PO template file can then be used by tools
Downloads
250
Readme
elm-xgettext
A tool similar to GNU xgettext that parses Elm source files to get the translatable strings and generate a PO template file. This PO template file can then be used by tools like POEdit to create the PO files for each language to translate your application into. It also includes a tool similar to GNU msgfmt that converts PO files into MO files.
This tool only works for translations specified by the panthus/elm-gettext library.
Usage
Install with:
npm i --save-dev elm-xgettextCreate a POT file like this:
npx elm-xgettext src/**/*.elm -o locale/FE.potConvert PO files to MO files, it puts each MO file next to its original PO file:
npx elm-xgettext locale/**/*.po