Opened 4 years ago

Closed 4 years ago

#18448 closed defect (fixed)

Consuming v1.6 nls layers with dojo 1.7+ causes unnecessary downloads or 404s.

Reported by: Clement Mathieu Owned by: Clement Mathieu
Priority: undecided Milestone: 1.7.9
Component: Internationalization Version: 1.7.6
Keywords: Cc: cjolif
Blocked By: Blocking:

Description

This bug appears when a nonexistent locale is required. So let's say the user is requesting "en-ca" when only "en" is available (both as a layer and as a loose nls module).

In this case, the layer is loaded as expected, but the i18n plugin does not found the preloaded module for "en". Therefore the loose "en" nls module is requested, which is either inefficient (if the loose nls modules were deployed) or harmful (if the loose nls modules were not deployed, this will cause a 404 and the plugin will fail).

This only happens when the nls layer is loaded with dojo 1.7+ (this is working correctly if loaded with dojo 1.6).

This bug was probably introduced during the implementation of https://bugs.dojotoolkit.org/ticket/14092.

I have attached a test-case to demonstrate this issue.

Attachments (1)

1.6nlsTestCase.zip (26.3 KB) - added by Clement Mathieu 4 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 4 years ago by cjolif

Cc: cjolif added
Owner: changed from Adam Peller to Clement Mathieu
Status: newassigned

comment:2 Changed 4 years ago by Clement Mathieu

I made a PR with a potential fix for this issue: https://github.com/dojo/dojo/pull/135.

PS: I forgot to add the test-case when I created this issue. I am adding it now. To make it work the dojo release should be in dtk.

Last edited 4 years ago by Clement Mathieu (previous) (diff)

Changed 4 years ago by Clement Mathieu

Attachment: 1.6nlsTestCase.zip added

comment:3 Changed 4 years ago by cjolif

Milestone: tbd1.7.9
Resolution: fixed
Status: assignedclosed
Version: 1.10.31.7.6
Note: See TracTickets for help on using tickets.