Fix locale loading
This commit is contained in:
@@ -69,10 +69,6 @@ function initGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] All GUI created successfully!`);
|
||||
|
||||
loadLocaleConfig();
|
||||
loadAllLocaleStrings();
|
||||
|
||||
resetGUIStrings();
|
||||
resetLocaleChooserOptions();
|
||||
|
||||
sendNetworkEventToServer("agrp.guiReady", true);
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -58,6 +63,4 @@ function setLocale(tempLocaleId) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Locale] Setting locale to ${tempLocaleId} (${getServerData().localeOptions[tempLocaleId].englishName})`);
|
||||
localLocaleId = tempLocaleId;
|
||||
resetGUIStrings();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
}
|
||||
Reference in New Issue
Block a user