]> source.dussan.org Git - archiva.git/commitdiff
not 2 calls if lang en as has been loaded before
authorOlivier Lamy <olamy@apache.org>
Fri, 6 Jan 2012 08:56:15 +0000 (08:56 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 6 Jan 2012 08:56:15 +0000 (08:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1228023 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/i18nload.js

index 0eb93543329f432821db925da025e18628b5a8b0..b32097f0750482c4f3a110c4a31498c3dc799130 100644 (file)
@@ -29,7 +29,7 @@ $(function() {
   // -- archiva
   // load default
   loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources", {cache:false, mode: 'map',encoding:'utf-8'});
-  // load browser locale
-  var browserLang = $.i18n.browserLang();
-  loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources?locale="+browserLang, {cache:false, mode: 'map',encoding:'utf-8'});
+  if (browserLang!='en'){
+    loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources?locale="+browserLang, {cache:false, mode: 'map',encoding:'utf-8'});
+  }
 });
\ No newline at end of file