Move app-specific location of language files
The core directory should only contain core API code that isn't specific to an application.
This commit is contained in:
parent
e3ded092e2
commit
a93cda3a36
|
@ -27,9 +27,10 @@ var UI;
|
||||||
/* [begin skip-as-module] */
|
/* [begin skip-as-module] */
|
||||||
// Load supporting scripts
|
// Load supporting scripts
|
||||||
WebUtil.load_scripts(
|
WebUtil.load_scripts(
|
||||||
{'core': [Util.Localisation.getLanguageFileLocation(), "base64.js", "websock.js", "des.js", "input/keysymdef.js",
|
{'core': [WebUtil.getLanguageFileLocation(), "base64.js", "websock.js",
|
||||||
"input/xtscancodes.js", "input/util.js", "input/devices.js",
|
"des.js", "input/keysymdef.js", "input/xtscancodes.js",
|
||||||
"display.js", "inflator.js", "rfb.js", "input/keysym.js"]});
|
"input/util.js", "input/devices.js", "display.js",
|
||||||
|
"inflator.js", "rfb.js", "input/keysym.js"]});
|
||||||
|
|
||||||
window.onscriptsload = function () { UI.load(); };
|
window.onscriptsload = function () { UI.load(); };
|
||||||
/* [end skip-as-module] */
|
/* [end skip-as-module] */
|
||||||
|
|
|
@ -371,6 +371,12 @@ WebUtil.releaseCapture = function () {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Get language file location
|
||||||
|
WebUtil.getLanguageFileLocation = function () {
|
||||||
|
return '../app/locale/locale-'+Util.Localisation.getLanguageCode()+'.js';
|
||||||
|
};
|
||||||
|
|
||||||
// Dynamically load scripts without using document.write()
|
// Dynamically load scripts without using document.write()
|
||||||
// Reference: http://unixpapa.com/js/dyna.html
|
// Reference: http://unixpapa.com/js/dyna.html
|
||||||
//
|
//
|
||||||
|
|
|
@ -385,11 +385,6 @@ Util.Localisation = {
|
||||||
'de-DE': 'de-DE'
|
'de-DE': 'de-DE'
|
||||||
},
|
},
|
||||||
|
|
||||||
// Get language file location
|
|
||||||
getLanguageFileLocation: function () {
|
|
||||||
return '../app/locale/locale-'+Util.Localisation.getLanguageCode()+'.js';
|
|
||||||
},
|
|
||||||
|
|
||||||
// Get language code from browser and verify it
|
// Get language code from browser and verify it
|
||||||
getLanguageCode: function () {
|
getLanguageCode: function () {
|
||||||
var languageCode = Util.Localisation.getUserPreferredLanguage();
|
var languageCode = Util.Localisation.getUserPreferredLanguage();
|
||||||
|
|
Loading…
Reference in New Issue