Fix locale loading

This commit is contained in:
Vortrex
2022-07-30 08:15:20 -05:00
parent 0fd711dc0b
commit a1e9ad0b42
2 changed files with 6 additions and 7 deletions

View File

@@ -69,10 +69,6 @@ function initGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] All GUI created successfully!`);
loadLocaleConfig();
loadAllLocaleStrings();
resetGUIStrings();
resetLocaleChooserOptions();
sendNetworkEventToServer("agrp.guiReady", true);
};

View File

@@ -37,6 +37,9 @@ function getAvailableLocaleOptions() {
function loadLocaleConfig() {
let configFile = loadTextFile("config/client/locale.json");
getServerData().localeOptions = JSON.parse(configFile);
resetLocaleChooserOptions();
loadAllLocaleStrings();
}
// ===========================================================================
@@ -50,6 +53,8 @@ function loadAllLocaleStrings() {
getServerData().localeStrings[i] = localeData;
}
resetGUIStrings();
}
// ===========================================================================
@@ -59,5 +64,3 @@ function setLocale(tempLocaleId) {
localLocaleId = tempLocaleId;
resetGUIStrings();
}
// ===========================================================================