Opened 7 years ago

Closed 7 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:


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

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

Attachments (1) (26.3 KB) - added by Clement Mathieu 7 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 7 years ago by cjolif

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

comment:2 Changed 7 years ago by Clement Mathieu

I made a PR with a potential fix for this issue:

PS: I forgot to add the test-case when I created this issue. I am adding it now.

Version 0, edited 7 years ago by Clement Mathieu (next)

Changed 7 years ago by Clement Mathieu

Attachment: added

comment:3 Changed 7 years ago by cjolif

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