rxaviers / react-globalize-webpack-plugin

react-globalize webpack plugin
Other
3 stars 8 forks source link

Phrase extraction produces the wrong key from formatMessage calls #3

Closed alunny closed 9 years ago

alunny commented 9 years ago

Currently react-globalize-webpack-plugin incorrectly extracts calls to formatMessage, so calls like this:

Globalize.formatMessage('Search Twitter')

result in the key 'Search Twitter' instead of Search Twitter. This is possibly due to calling JSON.stringify on a string somewhere, or of a bug in the AST traversal.

I had a look at the code but it's not clear to me yet in which module this is happening - react-globalize-webpack-plugin, globalize-webpack-plugin, react-globalize-compiler, or globalize-compiler.

rxaviers commented 9 years ago

Confirmed! Working on a fix at https://github.com/rxaviers/react-globalize-compiler/issues/1

rxaviers commented 9 years ago

Fixed by react-globalize-compiler 0.0.3, npm update should do it for you. Please, just let me know on any problems.

alunny commented 9 years ago

Thanks Rafael!