#18929 closed defect (fixed)
dojo/i18n: if preload api is disabled, module still attempts to load preload from cache in a build
Reported by: | mssskhalsa | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.9.10 |
Component: | Internationalization | Version: | 1.12.0-rc2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
If a build is done with a codebase that includes nls resources, then the build cache includes a preload of the form:
'*now':function(r){r(['dojo/i18n!*preload*dojo/nls/dojo*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]']);}
If a consumer of this build disables dojo-preload-i18n-Api
in the Dojo config, then the dojo/i18n
loader plugin disables preload logic, but still attempts to process the cached preload, which is not a valid module id, so it makes an invalid XHR.
dojo/i18n
should probably have a guard against this scenario.
Change History (7)
comment:1 Changed 4 years ago by
comment:3 Changed 4 years ago by
Owner: | set to Dylan Schiemann <[email protected]…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In 598c215/dojo:
comment:7 Changed 4 years ago by
Milestone: | tbd → 1.9.10 |
---|---|
Priority: | undecided → high |
We are testing a patch for this that seems to work well and will submit a PR if we don't encounter issues.
i18n.js
var split = id.split("*"),preloadDemand = split[1] == "preload";