Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17398 closed defect (fixed)

the i18n module fails to fallback and consume a 1.6 _ROOT flattened bundle

Reported by: Patrick Ruzand Owned by: Colin Snover <github.com@…>
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)

testcase.html (1.1 KB) - added by Patrick Ruzand 6 years ago.
minimal testcase

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by Patrick Ruzand

Attachment: testcase.html added

minimal testcase

comment:1 Changed 6 years ago by Colin Snover <github.com@…>

Owner: set to Colin Snover <github.com@…>
Resolution: fixed
Status: newclosed

In 2e59e88d38a047c70a10f9594ecc7b875a38fa3d/dojo:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:2 Changed 6 years ago by Colin Snover <github.com@…>

In ac7ab78962e3b7d2de338bb0620681f62c538a71/dojo:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:3 Changed 6 years ago by Colin Snover <github.com@…>

In f3cbbaf41de5d1ec4e9772384bb14d51b3514e20/dojo:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:4 Changed 6 years ago by Colin Snover <github.com@…>

In 09208222f3d5d17fbaf8621a63c720055bf3e3ef/dojo:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:5 Changed 6 years ago by Colin Snover

Milestone: tbd1.7.6
Priority: undecidedlow
Version: 1.9.11.7.5
Note: See TracTickets for help on using tickets.