#17398 closed defect (fixed)
the i18n module fails to fallback and consume a 1.6 _ROOT flattened bundle
Reported by: | Patrick Ruzand | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.7.6 |
Component: | Loader | Version: | 1.7.5 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The context is an app with layers built with 1.6 with corresponding flattened bundles, but run against Dojo 1.9.
In this context, when there are no flattened bundles corresponding to the current locale, the i18n falls back to load the _ROOT bundle of the layer being loaded. The problem is the i18n 1.7+ impl. expects a 'root' property on the nls module, while the 1.6 build generates a 'ROOT' property.
For example, a 1.6 _ROOT flattened bundle looks like:
dojo.provide("dojo.nls.myapp_ROOT"); dojo.provide("myapp.nls.greetings"); myapp.nls.greetings._built = true; dojo.provide("myapp.nls.greetings.ROOT"); myapp.nls.greetings.ROOT = {"PAGE_TITLE": "God bless America", "GREETING": "What’s up", "GREETING_SENTENCE": "${greeting} ${personTitle}", "PERSON": "dude"};
When the i18n module tries to load the root bundle, it does:
doLoad = function(require, bundlePathAndName, bundlePath, bundleName, locale, load){ // summary: // get the root bundle which instructs which other bundles are required to construct the localized bundle require([bundlePathAndName], function(root){ var current = lang.clone(root.root), [...]
but here, root.root is undefined (as it is root.ROOT).
Attachments (1)
Change History (6)
Changed 8 years ago by
Attachment: | testcase.html added |
---|
comment:1 Changed 8 years ago by
Owner: | set to Colin Snover <[email protected]…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:5 Changed 8 years ago by
Milestone: | tbd → 1.7.6 |
---|---|
Priority: | undecided → low |
Version: | 1.9.1 → 1.7.5 |
Note: See
TracTickets for help on using
tickets.
minimal testcase