react-gettext-parser
react-gettext-parser copied to clipboard
Extracts translatable strings from JS(X) source code to POT files
Using react-gettext-parser 1.16.0 Snippet form my gulpfile.js ``` process.chdir(`${localesDir}templates/LC_MESSAGES/`); gulp.src(paths.scripts.src.map((path) => { return `../../../${path}`; })) .pipe(reactGettextParser({ output: 'messages.pot', funcArgumentsMap: { gettextSub: ['msgid', 'comment'], gettextSubComponent: ['msgid'], gettext: ['msgid'], dgettext: [null, 'msgid'],...
Fixes #89
So when dealing with things like gendered translations, the recommended approach is to leverage translation contexts. It might look something like this (using lioness) ``` { person.gender === "male" ?...
Adds ability to override context parsed from code with a list of overrides. This is useful for the common case of languages that have variations based on gender where the...
The point of this extractor is to suck out static strings from your code and into a .pot file, so that you don't have to define a huge object of...