[Pkg-javascript-commits] [dojo] 14/41: Fixes #18497, Reverse the order of locales merging during layer preload.

David Prévot taffit at moszumanska.debian.org
Thu Mar 24 04:28:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 1.9.8
in repository dojo.

commit d317e0aa5b124d15423cc980d8faf11ca3ee142b
Author: Clément Mathieu <clement.mathieu at outlook.com>
Date:   Sun Jul 12 06:52:08 2015 -0700

    Fixes #18497, Reverse the order of locales merging during layer preload.
    
    (cherry picked from commit f6b42a1ab3a65053fed2935fdfef93fe197dd323)
---
 i18n.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/i18n.js b/i18n.js
index 57a7f1c..2292cde 100644
--- a/i18n.js
+++ b/i18n.js
@@ -423,7 +423,10 @@ define(["./_base/kernel", "require", "./has", "./_base/array", "./_base/config",
 												if(requiredBundles.length){
 													preloadingAddLock();
 													contextRequire(requiredBundles, function(){
-														for(var i = 0; i < requiredBundles.length; i++){
+														// requiredBundles was constructed by forEachLocale so it contains locales from 
+														// less specific to most specific. 
+														// the loop starts with the most specific locale, the last one.
+														for(var i = requiredBundles.length - 1; i >= 0 ; i--){
 															bundle = lang.mixin(lang.clone(bundle), arguments[i]);
 															cache[cacheIds[i]] = bundle;
 														}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list