From: Olivier Lamy Date: Fri, 6 Jan 2012 08:56:15 +0000 (+0000) Subject: not 2 calls if lang en as has been loaded before X-Git-Tag: archiva-1.4-M3~1635 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=515d54e810c4cce432f38e87770da291fe7bac24;p=archiva.git not 2 calls if lang en as has been loaded before git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1228023 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/i18nload.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/i18nload.js index 0eb935433..b32097f07 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/i18nload.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/i18nload.js @@ -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