mirror of https://github.com/apache/archiva.git
really ensure we load i18n before loading ui
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1308308 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f2b03e81f1
commit
9071e5a4ca
|
@ -121,7 +121,8 @@
|
|||
|
||||
|
||||
require(['order!domReady','order!jquery','order!i18n','order!startup'], function (domReady) {
|
||||
domReady.withResources(function () {
|
||||
domReady.withResources(
|
||||
loadi18n(function () {
|
||||
$.ajax({
|
||||
url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(),
|
||||
dataType: 'json',
|
||||
|
@ -140,8 +141,9 @@
|
|||
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
);
|
||||
});
|
||||
}
|
||||
})
|
||||
|
|
|
@ -30,5 +30,5 @@ function() {
|
|||
cache: false,//!window.archivaDevMode
|
||||
dataType: 'json'
|
||||
});
|
||||
loadi18n();
|
||||
|
||||
});
|
|
@ -19,14 +19,15 @@
|
|||
|
||||
define("utils",["jquery","i18n","jquery.tmpl"], function() {
|
||||
|
||||
loadi18n=function(){
|
||||
loadi18n=function(loadCallback){
|
||||
var browserLang = usedLang();
|
||||
$.log("use browserLang:"+browserLang);
|
||||
|
||||
var options = {
|
||||
cache:false,
|
||||
mode: 'map',
|
||||
encoding:'utf-8'
|
||||
encoding:'utf-8',
|
||||
callback: loadCallback
|
||||
};
|
||||
loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources?locale="+browserLang,options );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue