-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Localizations not getting applied #5
Comments
Any update regarding this matter? |
I'm trying to figure out how to make work this plugin with webpack encore and although everything seems to run/build without even warnings I'm facing the same problem. It outputs multiple js per localization file but it always show the English message id... 😞 Did you figured out something @chocolatkey ? |
Hi @chocolatkey! this plugin is an experimental one. As an alternative, you can setup the localization process with babel-plugin-ttag. Here is an example of how this can be done - https://ttag.js.org/blog/2018/09/05/hardcore-webpack-setup.html. As for your example seems like tag literals are transformed before babel-plugin-ttag parses the sources. Need to figure out how to fix that. One thing that came to my mind while looking at your webpack config is that you are using ts-loader - https://github.com/chocolatkey/xbreader/blob/master/webpack.prod.js#L38, so all tagged literals are transpiled before babel-plugin-ttag encounters the file. |
I believe I have set up things properly according to the online documentation, however the translations are not getting applied to the built javascript files. Is there something I'm doing that's obviously wrong?
Configuration is here: https://github.com/chocolatkey/xbreader/blob/master/webpack.prod.js#L133
Example built file is here: https://unpkg.com/[email protected]/dist/xbreader-fr.js which should have French. But I can see it's still English
Object(s.__makeTemplateObject)(["Settings saved!"],["Settings saved!"]))
The text was updated successfully, but these errors were encountered: