Opened 7 years ago

Closed 7 years ago

#15480 closed defect (invalid)

dojo.i18n.getLocalization not always load resources synchroniously

Reported by: Rophy Tsai Owned by: Adam Peller
Priority: undecided Milestone: tbd
Component: Internationalization Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

dojo.i18n.getLocalization() is supposed to be a synchronize call, according to http://dojotoolkit.org/reference-guide/1.7/dojox/mobile/internationalization.html

But in Dojo 1.7.2 dojo.i18n.getLocalization() works asynchronously when resource bundle is on different host than the active page.

Below is the problematic code:

thisModule.getLocalization= function(moduleName, bundleName, locale){

var result,

l10nName= getL10nName(moduleName, bundleName, locale).substring(10);

load(l10nName, (1 && !require.isXdUrl(require.toUrl(l10nName + ".js")) ? syncRequire : require), function(result_){ result= result_; }); return result;

};

The side effect is, dojox.mobile.i18n also failed to work, since it rely on dojo.i18n.getLocalization().

Change History (3)

comment:1 Changed 7 years ago by Adam Peller

Could you please give a test case for what is failing?

comment:2 Changed 7 years ago by Rophy Tsai

Please cancel this bug, I missed to add the resource bundle to list of require() modules.

Sorry for causing the confusion.

comment:3 Changed 7 years ago by Adam Peller

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.