Skip to content
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

dojo/i18n plugin - doesn't resolve against locale before returning result? #6

Open
RoystonS opened this issue Aug 24, 2016 · 1 comment

Comments

@RoystonS
Copy link

Not sure whether I'm missing something, but it looks like references to 'dojo/i18n!some_module' always return the root values for some_module rather than something related to the current locale.

I can see in the generated file for a root NLS file that it injects all of the specified languages (as, say, lang_fr, lang_en, variables etc.) but they don't appear to be used anywhere in the generated module.

(For more context, this is the code that generates those variables:

           module.inject.dependencies.push({
               dep: "./" + lang + "/" + path.basename(module.resourcePath, ".js"),
               name: "lang_" + lang.replace(/-/g, "_")
           });

Is this something that's meant to work at the moment, or is it still in progress?

Thanks!

@slimeygecko
Copy link

slimeygecko commented Nov 8, 2016

I found that the dojo-webpack-loader wasn't correctly loading my dojo/text modules (with the raw-loader) until I used this in my webpack config:

resolveLoader: { alias: { "dojo/text": 'raw-loader' } }

This aliases dojo/text directly instead of the dojo-webpack-loader to load these files. Maybe this is related to the problem you were having?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants