Closed unindented closed 8 years ago
I believe so, it requires transforms similar to these ones: https://github.com/rxaviers/react-globalize-compiler/tree/master/lib/extract-transforms.
The ideal solution would not be using these transforms and instead keeping a table of variables (per scope) dynamically generated from require("globalize")
, or define(["globalize"...) calls, or
import` declaration. But, that is much more complex. The transforms are not great, but easier and gets the job done.
Do you want to implement that? Basically, you need to observe the output generated from TypeScript and check which variables are created, are they always the same. Just let me know if you have any questions.
I fell back to using globalize
and globalize-compiler
, as I don't have the time to contribute those transforms right now. I'll try to revisit in the future.
Ok, thanks. I'm closing it for now then. We could reopen it anytime.
It looks like
react-globalize-compiler
is not able to extract messages from files compiled with TypeScript instead of Babel. Do you think it'd be possible to support TypeScript?