xgettext-js-more-better
Extract gettext strings from Javascript source code, but more better than existing extractors
Install
Install with npm.
npm install --save xgettext-js-more-better
Example
var xgettext = ; ;
API
xgettext-js-more-better
exports a single function, extract
, that takes
the following parameters:
source
A string of Javascript containing translatable to extract
gettextOptions
Optional object containing options used by xgettext-js-more-better
.
These options are passed to gettext-catalog.
The most important option passed here is filename
, which is used for
generating references.
For example,
;
espreeOptions
Optional object containing options passed to espree (by way of falafel-espree). Use this to customize Javascript parsing behavior. For example, to customize supported ES6 features:
;
License
MIT