Closed gerotakke closed 8 years ago
I'd just submit a PR and make sure it has new tests to verify the behavior (and also not break any old tests).
Until me or someone else has time to implement proper parsing/AST based extraction for languages other than JavaScript, I don't think we can do much better.
I just noticed that strings inside of mixins aren't extracted as well, also after the changes in PR. Will look into it as soon as I have the time. -- edit: Forget that, the texts were actually in another mixin and I tested with the unpatched version. Sorry!
Thank you!
On Thu, Jan 7, 2016, 14:32 gerotakke notifications@github.com wrote:
I just noticed that strings inside of mixins aren't extracted as well, also after the changes in PR. Will look into it as soon as I have the time.
— Reply to this email directly or view it on GitHub https://github.com/zaach/jsxgettext/issues/99#issuecomment-169649859.
Guessing this is closed by #100?
Yep, thanks!
As the title says, extraction doesn't work when the translated string is a parameter of a mixin. I've hacked around a bit and found that there's a token type "call" that isn't handled in parsers/jade.js. I got it to work by simply adding this:
My tests look very promising but it seems a bit too straightforward. Should I submit a PR? Anything else I can do?