Opened 5 years ago
Closed 5 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)
Change History (4)
comment:1 Changed 5 years ago by
Cc: | cjolif added |
---|---|
Owner: | changed from Adam Peller to Clement Mathieu |
Status: | new → assigned |
Changed 5 years ago by
Attachment: | 1.6nlsTestCase.zip added |
---|
comment:3 Changed 5 years ago by
Milestone: | tbd → 1.7.9 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Version: | 1.10.3 → 1.7.6 |
merged in https://github.com/dojo/dojo/commit/207202b487a9c673a77cb29e14f773ec5ad483e7 and upwards to master.
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.