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) {
|
require(['order!domReady','order!jquery','order!i18n','order!startup'], function (domReady) {
|
||||||
domReady.withResources(function () {
|
domReady.withResources(
|
||||||
|
loadi18n(function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(),
|
url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(),
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
|
@ -142,6 +143,7 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -30,5 +30,5 @@ function() {
|
||||||
cache: false,//!window.archivaDevMode
|
cache: false,//!window.archivaDevMode
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
});
|
});
|
||||||
loadi18n();
|
|
||||||
});
|
});
|
|
@ -19,14 +19,15 @@
|
||||||
|
|
||||||
define("utils",["jquery","i18n","jquery.tmpl"], function() {
|
define("utils",["jquery","i18n","jquery.tmpl"], function() {
|
||||||
|
|
||||||
loadi18n=function(){
|
loadi18n=function(loadCallback){
|
||||||
var browserLang = usedLang();
|
var browserLang = usedLang();
|
||||||
$.log("use browserLang:"+browserLang);
|
$.log("use browserLang:"+browserLang);
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
cache:false,
|
cache:false,
|
||||||
mode: 'map',
|
mode: 'map',
|
||||||
encoding:'utf-8'
|
encoding:'utf-8',
|
||||||
|
callback: loadCallback
|
||||||
};
|
};
|
||||||
loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources?locale="+browserLang,options );
|
loadAndParseFile("restServices/archivaServices/commonServices/getAllI18nResources?locale="+browserLang,options );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue