Opened 7 years ago

Closed 6 years ago

#18497 closed defect (fixed)

en-au locale not used for dates when not included in build

Reported by: Yasir Assam Owned by: Adam Peller
Priority: undecided Milestone: 1.8.11
Component: Internationalization Version: 1.10.4
Keywords: Cc: Clement Mathieu
Blocked By: Blocking:


Set the locale to "en-au" (Australian English) by setting it in dojoConfig:

dojoConfig.locale = "en-au";

In Australia, short dates are formatted dd/mm/yy. If I set the locale to en-au, dijit/form/DateTextBox correctly formats dates.

However, if I use a build, short dates turn into the US English format, mm/dd/yy.

If I add "en-au" to the localeList option when I create a build, it works, but I would have expected it to work even if en-au wasn't in localeList in the build.

This might be a duplicate of #18483

Change History (5)

comment:1 Changed 7 years ago by cjolif

Cc: Clement Mathieu added

comment:2 Changed 7 years ago by Clement Mathieu

The root of the issue lie here:

contextRequire(requiredBundles, function(){
	for(var i = 0; i < requiredBundles.length; i++){
		bundle = lang.mixin(lang.clone(bundle), arguments[i]);
		cache[cacheIds[i]] = bundle;
	// this is the best possible (maybe a perfect match, maybe not), accept it
	cache[cacheId(bundlePath, bundleName, locale, require)] = lang.clone(bundle);

Here the "requiredBundle" array contains the locales from the most specific to the less specific locale (for example: ["en-au", "en"]) so the mixin of the bundles should start with the last locale in the array instead of the first one.

comment:3 Changed 7 years ago by Clement Mathieu

I have submitted a PR with a fix for this issue.

comment:4 Changed 7 years ago by dylan

Milestone: tbd1.8.11

Closed via f6b42a1ab3a65053fed2935fdfef93fe197dd323 (master), 12aae7902a64ea5b45fdfdc333a4e468002ea53e (1.10), d317e0aa5b124d15423cc980d8faf11ca3ee142b (1.9), and 2872e601c6a204576e0076aec5c1f18789b11c23 (1.8).

comment:5 Changed 6 years ago by dylan

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