Support root as a locale bundle
Georgegriff opened this issue · 3 comments
Georgegriff commented
My legacy code base (migrating from RequireJS) has its "root" bundle, as per the examples on Requirejs (http://requirejs.org/docs/api.html#i18n) for i18n files configured as such:
//my/nls/colors.js contents:
define({
"root": true,
"fr-fr": true,
"fr-fr-paris": true
});
//Contents of my/nls/root/colors.js
define({
"red": "red",
"blue": "blue",
"green": "green"
});
When using amdi18n it does not appear to pick up the values from my "colors.js" under /root/, is it possible to use the loader in this way? I am unable to modify our resource files because i cannot touch the code base as we have legacy integrations to support.
Cheers
TooBug commented
Thanks for your reporting. I’ve investigated at i18n plugin docs for require.js, and confirmed amdi18n-loader missed the usage at the very bottom:
If you prefer to not include the root bundle in the top level module, you can define it like a normal locale bundle.
I’ll update get amdi18n-loader supporting this kind of usage ASAP.
TooBug commented
available in 0.6.0
Georgegriff commented
Excellent :) thanks