Open mphasize opened 10 years ago
That should be simple to add, so kick me pull request if you have a minute. Otherwise, if you don't mind waiting a week or so, I'll throw that in.
Hi Max, I went through the code and saw that it actually is already possible to pass the options around.
options: {
keyword: [ 'gettext', '__' ], // multiple keywords
"join-existing": true
}
This block in the config of the grunt tasks passes the "join-existing" over to jsxgettext. There is however another issue: With the option join-existing set, jsxgettext expects the options "output-dir" and "output" (i.e. file) to be given and fails otherwise.
(See https://github.com/zaach/jsxgettext/blob/master/lib/jsxgettext.js Line:83)
The grunt task meanwhile is configured with files
and dest
settings and technically dest is the same as output-dir and output combined, but it's not fed into the jsxgettext options.
The easy workaround is to set the output again in the options block and a possible fix would be to translate the dest setting to output-dir and output.
Cheers! M
Hi,
would it be possible to support all of the command line options for jsxgettext? I'm especially looking for the --join-existing setting. That way, we could generate the .po files directly with the grunt task.
Cheers! Marcus
https://github.com/zaach/jsxgettext
Options: