Added automatic adjustment of language code config values
Check Localization / Check Localization process (push) Canceled after 0s
Check Localization / Check Localization process (push) Canceled after 0s
Fixed CI
This commit is contained in:
1 parent
f49457211d
commit
a4a3a14a8b
3 files changed
+28
-1
No files matched your search
@@ -59,7 +59,7 @@ def addUpdatedTables(languageCode, dlc):
|
||||
if dlc == "rep":
|
||||
updatedTables += ["pills", "carBattery", "BFFSSynergies", "CharacterInfo", "ConditionalDescs", "VoidNames", "custom"]
|
||||
if dlc == "rep+":
|
||||
updatedTables += ["abyssSynergies", "horsepills", "tarotClothBuffs", "bookOfVirtuesWisps"]
|
||||
updatedTables += ["abyssSynergies", "horsepills", "tarotClothBuffs", "bookOfVirtuesWisps", "goldenTrinketEffects"]
|
||||
|
||||
# korean uses some additional addititve tables
|
||||
if languageCode == "ko":
|
||||
|
||||
@@ -91,6 +91,32 @@ function EID:LoadLanguagePacks(gameVersion)
|
||||
end
|
||||
end
|
||||
|
||||
--- Initializes handling of alternative language codes for all languages
|
||||
function EID:AdjustLanguageConfigSetting()
|
||||
if EID.Config["Language"] == "auto" then
|
||||
-- If the language is set to "auto", we will not adjust the language codes
|
||||
return
|
||||
end
|
||||
|
||||
for _, languageCode in ipairs(EID.Languages) do
|
||||
if languageCode == EID.Config["Language"] then
|
||||
-- If the language is set to a valid language code, we will not adjust it
|
||||
return
|
||||
end
|
||||
-- If the language is not set to a valid language code, we will adjust it
|
||||
if EID.descriptions[languageCode] then
|
||||
for _, altLanguageCode in ipairs(EID.descriptions[languageCode].alternativeLanguageCodes or {}) do
|
||||
if altLanguageCode == EID.Config["Language"] then
|
||||
EID.Config["Language"] = languageCode
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
EID:WriteErrorMsg("No valid language code found for '"..EID.Config["Language"].."', resetting to 'auto'")
|
||||
EID.Config["Language"] = "auto"
|
||||
end
|
||||
|
||||
--- Initializes handling of alternative language codes for all languages
|
||||
function EID:InitAltLanguageCodes()
|
||||
for _, languageCode in ipairs(EID.Languages) do
|
||||
|
||||
@@ -1874,6 +1874,7 @@ function EID:OnGameStart(isSave)
|
||||
EID.Scale = EID.Config["Size"]
|
||||
EID.ItemReminderSelectedCategory = EID.Config["ItemReminderDisplayMode"] == "NoOverview" and 1 or 0
|
||||
|
||||
EID:AdjustLanguageConfigSetting()
|
||||
EID:fixDefinedFont()
|
||||
EID:loadFont(EID.modPath .. "resources/font/eid_"..EID.Config["FontType"]..".fnt")
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user