[Pkg-javascript-commits] [dojo] 04/07: fix locale and dojo/i18n issues on node, fixes #16663

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 17:39:50 UTC 2014


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

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

commit 5fe0f69ba1a1a3baf96343418ad395fde4a81f5d
Author: Bill Keese <bill at dojotoolkit.org>
Date:   Mon May 20 10:02:40 2013 +0900

    fix locale and dojo/i18n issues on node, fixes #16663
    
    - avoid exception in dojo/_base/config when navigator isn't defined
    - make dojo/i18n handle case when dojo.locale is undefined
---
 _base/config.js | 2 +-
 i18n.js         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/_base/config.js b/_base/config.js
index aa55c66..d94d9c8 100644
--- a/_base/config.js
+++ b/_base/config.js
@@ -183,7 +183,7 @@ return {
 		adviseHas(result.has, "", 1);
 	}
 
-	if(!result.locale){
+	if(!result.locale && typeof navigator != "undefined"){
 		// Default locale for browsers.
 		result.locale = (navigator.language || navigator.userLanguage).toLowerCase();
 	}
diff --git a/i18n.js b/i18n.js
index 2694c7a..2cb04e4 100644
--- a/i18n.js
+++ b/i18n.js
@@ -265,7 +265,7 @@ define(["./_base/kernel", "require", "./has", "./_base/array", "./_base/config",
 				bundleName = match[5] || match[4],
 				bundlePathAndName = bundlePath + bundleName,
 				localeSpecified = (match[5] && match[4]),
-				targetLocale =	localeSpecified || dojo.locale,
+				targetLocale =	localeSpecified || dojo.locale || "",
 				loadTarget = bundlePathAndName + "/" + targetLocale,
 				loadList = localeSpecified ? [targetLocale] : getLocalesToLoad(targetLocale),
 				remaining = loadList.length,

-- 
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