Reverted language code changes thruout the mod

- Added EID.DefaultLanguageCode
This commit is contained in:
Wofsauge committed 2025-06-24 00:36:32 +02:00
1 parent 6e15cc3414
commit d44fa187b7
44 files changed
+157 -154

No files matched your search

+16 -16
View File
@@ -62,7 +62,7 @@ def addUpdatedTables(languageCode, dlc):
updatedTables += ["abyssSynergies", "horsepills", "tarotClothBuffs", "bookOfVirtuesWisps", "goldenTrinketEffects"]
# korean uses some additional addititve tables
if languageCode == "ko":
if languageCode == "ko_kr":
if dlc == "rep":
updatedTables += ["dice", "MCM"]
else:
@@ -109,19 +109,19 @@ def compare_tables(table1, table2, prev_key):
languageProgress = {}
en_entries = {}
english_entries = {}
for dlc in dlcs:
lua.execute('REPENTOGON = true; EID = {}; EID.descriptions = {}; function EID:updateDescriptionsViaTable(changeTable, tableToUpdate) for k,v in pairs(changeTable) do if v == "" then tableToUpdate[k] = nil else tableToUpdate[k] = v end end end')
g = lua.globals()
addUpdatedTables("en", dlc)
addUpdatedTables("en_us", dlc)
# Read English language files first
englishFile = glob.glob(SOURCE_MOD_DIRECTORY+"/**/"+dlc+"/en.lua", recursive=True)[0]
englishFile = glob.glob(SOURCE_MOD_DIRECTORY+"/**/"+dlc+"/en_us.lua", recursive=True)[0]
print("reading:", englishFile)
lua.execute(open(englishFile, "r", encoding="UTF-8").read())
en_entries[dlc] = count_entries(g.EID['descriptions']['en'])
print("English "+dlc+" entries:", en_entries[dlc])
english_entries[dlc] = count_entries(g.EID['descriptions']['en_us'])
print("English "+dlc+" entries:", english_entries[dlc])
langFiles = []
@@ -131,7 +131,7 @@ for dlc in dlcs:
langFiles += glob.glob(SOURCE_MOD_DIRECTORY+"/**/"+dlc+"/*.lua", recursive=True)
# Read other language files
for file in langFiles:
if "en" not in file and "transformations" not in file:
if "en_us" not in file and "transformations" not in file:
languageCode = os.path.basename(file).replace(".lua","")
print("reading:",file)
addUpdatedTables(languageCode, dlc)
@@ -141,16 +141,16 @@ for dlc in dlcs:
# Evaluate language for completeness
print(f"Evaluating language '{languageCode}'..")
errorCount = compare_tables(g.EID['descriptions']["en"], g.EID['descriptions'][languageCode], languageCode+"("+dlc+")")
percentage = (en_entries[dlc] - errorCount) / en_entries[dlc] * 100
errorCount = compare_tables(g.EID['descriptions']["en_us"], g.EID['descriptions'][languageCode], languageCode+"("+dlc+")")
percentage = (english_entries[dlc] - errorCount) / english_entries[dlc] * 100
languageProgress[languageCode][dlc] = [percentage, errorCount]
print(f"{Red}Errors found: {errorCount} / {en_entries[dlc]}{Color_Off}\n\n")
print(f"{Red}Errors found: {errorCount} / {english_entries[dlc]}{Color_Off}\n\n")
# Calculate total english entries
total_en_entries = 0
for entries in en_entries.values():
total_en_entries += entries
total_english_entries = 0
for entries in english_entries.values():
total_english_entries += entries
# Write git Workflow summary
gitWorkflowSummary = "### Translation progress\n| Language | Completion (AB+) |Completion (REP) |Completion (REP+) |Completion (Total) |\n|---|---|---|---|---|\n"
@@ -169,12 +169,12 @@ for lang in languageProgress.keys():
else:
print(
f"\t{BWhite}{lang}({dlc}){Color_Off}\t\t{Red}DLC translation missing!{Color_Off}")
gitCompletionMessage = f"0% ({en_entries[dlc]} left)"
totalMissing += en_entries[dlc]
gitCompletionMessage = f"0% ({english_entries[dlc]} left)"
totalMissing += english_entries[dlc]
gitWorkflowSummary += f"| {gitCompletionMessage} "
totalPercent = round((total_en_entries - totalMissing) / total_en_entries * 100, 2)
totalPercent = round((total_english_entries - totalMissing) / total_english_entries * 100, 2)
gitWorkflowSummary += f"|{totalPercent}% ({totalMissing}) "
gitWorkflowSummary += "|\n"
@@ -8,16 +8,16 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | ! = Warning | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "bg"
local languageCode = "bul"
-- init Bulgarian table
EID.descriptions[languageCode] = {}
EID.descriptions[languageCode].custom = {} -- table for custom entity descriptions
EID.descriptions[languageCode].languageName = "Bulgarian (WIP) (AB+)"
EID.descriptions[languageCode].alternativeLanguageCodes = {"bulgarian", "bul"}
EID.descriptions[languageCode].alternativeLanguageCodes = {"bulgarian", "bg"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = EID.descriptions["en"].fonts
EID.descriptions[languageCode].fonts = EID.descriptions["en_us"].fonts
---------- Collectibles ----------
EID.descriptions[languageCode].collectibles={
@@ -8,16 +8,16 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | ! = Warning | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "cs"
local languageCode = "cs_cz"
-- init Czech table
EID.descriptions[languageCode] = {}
EID.descriptions[languageCode].custom = {} -- table for custom entity descriptions
EID.descriptions[languageCode].languageName = "Czech"
EID.descriptions[languageCode].alternativeLanguageCodes = {"czech", "cs_cz"}
EID.descriptions[languageCode].alternativeLanguageCodes = {"czech", "cs"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = EID.descriptions["en"].fonts
EID.descriptions[languageCode].fonts = EID.descriptions["en_us"].fonts
---------- Collectibles ----------
EID.descriptions[languageCode].collectibles={
+1 -1
View File
@@ -17,7 +17,7 @@ EID.descriptions[languageCode].languageName = "German (WIP)"
EID.descriptions[languageCode].alternativeLanguageCodes = {"german"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = EID.descriptions["en"].fonts
EID.descriptions[languageCode].fonts = EID.descriptions["en_us"].fonts
---------- Collectibles ----------
@@ -13,13 +13,13 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | ! = Warning | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "el"
local languageCode = "el_gr"
-- init Greek table
EID.descriptions[languageCode] = {}
EID.descriptions[languageCode].custom = {} -- table for custom entity descriptions
EID.descriptions[languageCode].languageName = "Greek (WIP) (AB+)"
EID.descriptions[languageCode].alternativeLanguageCodes = {"greek", "el_gr"}
EID.descriptions[languageCode].alternativeLanguageCodes = {"greek", "el"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = {{name="default"}, {name="inverted"}, {name="borderless"}}
@@ -8,13 +8,13 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "en"
local languageCode = "en_us"
-- init english tables
EID.descriptions[languageCode] = {}
EID.descriptions[languageCode].custom = {} -- table for custom entity descriptions
EID.descriptions[languageCode].languageName = "English"
EID.descriptions[languageCode].alternativeLanguageCodes = {"english", "en_us"}
EID.descriptions[languageCode].alternativeLanguageCodes = {"english", "en"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = {{name="default"}, {name="inverted"}, {name="borderless"}}
+1 -1
View File
@@ -17,7 +17,7 @@ EID.descriptions[languageCode].languageName = "Italian"
EID.descriptions[languageCode].alternativeLanguageCodes = {"italian"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = EID.descriptions["en"].fonts
EID.descriptions[languageCode].fonts = EID.descriptions["en_us"].fonts
---------- Collectibles ----------
@@ -8,13 +8,13 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | ! = Warning | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "ja"
local languageCode = "ja_jp"
-- init Japanese table
EID.descriptions[languageCode] = {}
EID.descriptions[languageCode].custom = {} -- table for custom entity descriptions
EID.descriptions[languageCode].languageName = "Japanese"
EID.descriptions[languageCode].alternativeLanguageCodes = {"japanese", "jp", "ja_jp"}
EID.descriptions[languageCode].alternativeLanguageCodes = {"japanese", "jp", "ja"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = {{name="default", lineHeight= 12}, {name="inverted", lineHeight = 12}, {name="borderless", lineHeight= 12}}
@@ -12,13 +12,13 @@
-- 스탯 순서: 체력 - 빨간하트 - 블랙하트 - 소울하트 - 공격력 - 연사 - 사거리 - 이동속도 - 탄속 - 행운 - 효과
local languageCode = "ko"
local languageCode = "ko_kr"
-- init Korean table
EID.descriptions[languageCode] = {}
EID.descriptions[languageCode].custom = {} -- table for custom entity descriptions
EID.descriptions[languageCode].languageName = "Korean"
EID.descriptions[languageCode].alternativeLanguageCodes = {"koreana", "kr", "ko_kr"}
EID.descriptions[languageCode].alternativeLanguageCodes = {"koreana", "kr", "ko"}
-- Fonts to be used with this languagepack
--[[
@@ -8,13 +8,13 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | ! = Warning | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "nl"
local languageCode = "nl_nl"
-- init Dutch table
EID.descriptions[languageCode] = {}
EID.descriptions[languageCode].custom = {} -- table for custom entity descriptions
EID.descriptions[languageCode].languageName = "Dutch (WIP) (AB+)"
EID.descriptions[languageCode].alternativeLanguageCodes = {"dutch", "nl_nl"}
EID.descriptions[languageCode].alternativeLanguageCodes = {"dutch", "nl"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = {{name="default"}, {name="inverted"}, {name="borderless"}}
+1 -1
View File
@@ -17,7 +17,7 @@ EID.descriptions[languageCode].languageName = "Polish (WIP)"
EID.descriptions[languageCode].alternativeLanguageCodes = {"polish"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = EID.descriptions["en"].fonts
EID.descriptions[languageCode].fonts = EID.descriptions["en_us"].fonts
---------- Collectibles ----------
EID.descriptions[languageCode].collectibles={
+1 -1
View File
@@ -19,7 +19,7 @@ EID.descriptions[languageCode].languageName = "Portuguese (WIP) (AB+)"
EID.descriptions[languageCode].alternativeLanguageCodes = {"portuguese"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = EID.descriptions["en"].fonts
EID.descriptions[languageCode].fonts = EID.descriptions["en_us"].fonts
---------- Collectibles ----------
EID.descriptions[languageCode].collectibles={
+1 -1
View File
@@ -19,7 +19,7 @@ EID.descriptions[languageCode].languageName = "Brazilian Portuguese (WIP)"
EID.descriptions[languageCode].alternativeLanguageCodes = {"pt-BR", "brazilian"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = EID.descriptions["en"].fonts
EID.descriptions[languageCode].fonts = EID.descriptions["en_us"].fonts
---------- Collectibles ----------
EID.descriptions[languageCode].collectibles={
@@ -8,13 +8,13 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "ro"
local languageCode = "ro_ro"
-- init Romanian table
EID.descriptions[languageCode] = {}
EID.descriptions[languageCode].custom = {} -- table for custom entity descriptions
EID.descriptions[languageCode].languageName = "Romanian"
EID.descriptions[languageCode].alternativeLanguageCodes = {"romanian", "ro_ro"}
EID.descriptions[languageCode].alternativeLanguageCodes = {"romanian", "ro"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = {{name="default"}, {name="inverted"}, {name="borderless"}}
+1 -1
View File
@@ -17,7 +17,7 @@ EID.descriptions[languageCode].languageName = "Russian (WIP)"
EID.descriptions[languageCode].alternativeLanguageCodes = {"russian"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = EID.descriptions["en"].fonts
EID.descriptions[languageCode].fonts = EID.descriptions["en_us"].fonts
---------- Collectibles ----------
EID.descriptions[languageCode].collectibles={
@@ -8,16 +8,16 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line | ! = Warning
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "es"
local languageCode = "spa"
-- init Spanish table
EID.descriptions[languageCode] = {}
EID.descriptions[languageCode].custom = {} -- table for custom entity descriptions
EID.descriptions[languageCode].languageName = "Spanish"
EID.descriptions[languageCode].alternativeLanguageCodes = {"spanish", "spa"}
EID.descriptions[languageCode].alternativeLanguageCodes = {"spanish", "es"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = EID.descriptions["en"].fonts
EID.descriptions[languageCode].fonts = EID.descriptions["en_us"].fonts
---------- Collectibles ----------
@@ -8,16 +8,16 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | ! = Warning | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "tr"
local languageCode = "tr_tr"
-- init Turkish table
EID.descriptions[languageCode] = {}
EID.descriptions[languageCode].custom = {} -- table for custom entity descriptions
EID.descriptions[languageCode].languageName = "Turkish (WIP)"
EID.descriptions[languageCode].alternativeLanguageCodes = {"turkish", "tr_tr"}
EID.descriptions[languageCode].alternativeLanguageCodes = {"turkish", "tr"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = EID.descriptions["en"].fonts
EID.descriptions[languageCode].fonts = EID.descriptions["en_us"].fonts
---------- Collectibles ----------
EID.descriptions[languageCode].collectibles={
@@ -8,13 +8,13 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | ! = Warning | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "uk"
local languageCode = "uk_ua"
-- init Ukrainian table
EID.descriptions[languageCode] = {}
EID.descriptions[languageCode].custom = {} -- table for custom entity descriptions
EID.descriptions[languageCode].languageName = "Ukrainian (WIP)"
EID.descriptions[languageCode].alternativeLanguageCodes = {"ukrainian", "uk_ua"}
EID.descriptions[languageCode].alternativeLanguageCodes = {"ukrainian", "uk"}
-- Fonts to be used with this language pack
EID.descriptions[languageCode].fonts = {{name="default"}, {name="inverted"}, {name="borderless"}}
@@ -8,7 +8,7 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "cs"
local languageCode = "cs_cz"
---------- Collectibles ----------
@@ -8,7 +8,7 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "en"
local languageCode = "en_us"
---------- Collectibles ----------
@@ -8,7 +8,7 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "ja"
local languageCode = "ja_jp"
---------- Collectibles ----------
@@ -8,7 +8,7 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "ko"
local languageCode = "ko_kr"
-- 1.7.9.11 Conditional todos
-- T.??? + Bombs are Key
@@ -8,7 +8,7 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "ro"
local languageCode = "ro_ro"
---------- Collectibles ----------
@@ -8,7 +8,7 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line | ! = Warning
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "es"
local languageCode = "spa"
---------- Collectibles ----------
@@ -4,7 +4,7 @@
-- Last Sync with English version: 29.11.2024
local languageCode = "uk"
local languageCode = "uk_ua"
---------- Collectibles ----------
@@ -9,7 +9,7 @@
-- Special character markup:
-- ↑ = Up Arrow | ↓ = Down Arrow | ! = Warning
local languageCode = "cs"
local languageCode = "cs_cz"
local repCollectibles={
[2] = {"2", "Vnitřní Oko", "Trojitý výstřel#↓ {{Tears}} -49% Méně Slz"},
@@ -8,7 +8,7 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "en"
local languageCode = "en_us"
---------- Collectibles ----------
@@ -8,7 +8,7 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "ja"
local languageCode = "ja_jp"
---------- Collectibles ----------
@@ -1,4 +1,4 @@
local languageCode = "ko"
local languageCode = "ko_kr"
-- Last Sync with English or update: 2024-11-18
@@ -8,7 +8,7 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "ro"
local languageCode = "ro_ro"
---------- Collectibles ----------
@@ -8,7 +8,7 @@
-- ↑ = Up Arrow | ↓ = Down Arrow | # = Starts a new line | ! = Warning
-- More can be found here: https://github.com/wofsauge/External-Item-Descriptions/wiki/Markup
local languageCode = "es"
local languageCode = "spa"
---------- Collectibles ----------
@@ -11,7 +11,7 @@
-- Special character markup:
-- ↑ = Up Arrow | ↓ = Down Arrow | ! = Warning
local languageCode = "tr"
local languageCode = "tr_tr"
local repCollectibles={
[5] = {"5", "Yansımam", "Bumerang efekti verır#↑ +1.5 Menzil#↑ +60% ekstra Menzil#↑ +0.6 Gözyaşı hızı#↑ +1 Gözyaşı yüksekliği"}, -- My Reflection
@@ -9,7 +9,7 @@
-- Special character markup:
-- ↑ = Up Arrow | ↓ = Down Arrow | !!! = Warning
local languageCode = "uk"
local languageCode = "uk_ua"
local repCollectibles={
[2] = {"2", "Внутрiшнє Око", "Потрiйний пострiл#↓ {{Tears}} -49% Скорострільність знижено"},
+10 -10
View File
@@ -2,24 +2,24 @@ EID.UserConfig = {
-------GENERAL---------
-- Change the language of the mod
-- Currently Supported: automatic = "auto" (Default) Chooses the mod language based on your game's language settings(Rep), or defaults to English for ab+ users.
-- Bulgarian = "bg" SPECIAL THANKS TO Gothika_47
-- Bulgarian = "bul" SPECIAL THANKS TO Gothika_47
-- Chinese (Simplified) = "zh_cn" SPECIAL THANKS TO Xheepey87, frto027
-- Czech = "cs" SPECIAL THANKS TO domcizzz
-- Dutch = "nl" SPECIAL THANKS TO SomethingMax
-- English = "en" SPECIAL THANKS TO everyone!
-- Czech = "cs_cz" SPECIAL THANKS TO domcizzz
-- Dutch = "nl_nl" SPECIAL THANKS TO SomethingMax
-- English = "en_us" SPECIAL THANKS TO everyone!
-- French = "fr" SPECIAL THANKS TO biobak
-- German = "de" SPECIAL THANKS TO Jake
-- Greek = "el" SPECIAL THANKS TO vanillarat
-- Greek = "el_gr" SPECIAL THANKS TO vanillarat
-- Italian = "it" SPECIAL THANKS TO Denkishi, 2G
-- Japanese = "ja" SPECIAL THANKS TO prefab
-- Korean = "ko" SPECIAL THANKS TO Blackcreamtea, 리셰(kohashiwakaba)
-- Japanese = "ja_jp" SPECIAL THANKS TO prefab
-- Korean = "ko_kr" SPECIAL THANKS TO Blackcreamtea, 리셰(kohashiwakaba)
-- Polish = "pl" SPECIAL THANKS TO Rickyy
-- Portuguese = "pt" SPECIAL THANKS TO Marcelino Cruz
-- Brazilian Portuguese = "pt_br" SPECIAL THANKS TO Marcelino Cruz
-- Russian = "ru" SPECIAL THANKS TO hell2pay, fly_6
-- Spanish = "es" SPECIAL THANKS TO Lidia Arroyo Purroy
-- Turkish = "tr" SPECIAL THANKS TO Mert Dutal
-- Ukrainian = "uk" SPECIAL THANKS TO x3xto
-- Spanish = "spa" SPECIAL THANKS TO Lidia Arroyo Purroy
-- Turkish = "tr_tr" SPECIAL THANKS TO Mert Dutal
-- Ukrainian = "uk_ua" SPECIAL THANKS TO x3xto
--
-- If you want to make a translation, please contact me :) (wofsauge)
--
+35 -35
View File
@@ -122,10 +122,10 @@ local dynamicSpriteCache = {} -- used to store sprite objects of collectible ico
---@param id CollectibleType
---@param description string
---@param itemName string?
---@param language EID_LanguageCode? @Default: "en"
---@param language EID_LanguageCode? @Default: "en_us"
function EID:addCollectible(id, description, itemName, language)
itemName = itemName or nil
language = language or "en"
language = language or EID.DefaultLanguageCode
if id == -1 then
EID:WriteErrorMsg("Trying to add collectible description to id = -1, which is not allowed! (Name: "..tostring(itemName).."; Description: "..tostring(description)..")")
return
@@ -141,10 +141,10 @@ end
---@param id TrinketType
---@param description string
---@param itemName? string
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
function EID:addTrinket(id, description, itemName, language)
itemName = itemName or nil
language = language or "en"
language = language or EID.DefaultLanguageCode
if id == -1 then
EID:WriteErrorMsg("Trying to add trinket description to id = -1, which is not allowed! (Name: "..tostring(itemName).."; Description: "..tostring(description)..")")
return
@@ -157,10 +157,10 @@ end
---@param characterId PlayerType
---@param description string
---@param playerName? string @Default: "Modded Character"
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
function EID:addCharacterInfo(characterId, description, playerName, language)
playerName = playerName or "Modded Character"
language = language or "en"
language = language or EID.DefaultLanguageCode
if characterId == -1 then
EID:WriteErrorMsg("Trying to add character description to id = -1, which is not allowed! (Name: "..tostring(playerName).."; Description: "..tostring(description)..")")
return
@@ -173,14 +173,14 @@ end
---@param appendText? string | string[] @Text to be appended onto the description. Can be one string, or a table of two strings; one for doubling and one for tripling
---@param numbersToMultiply? number | number[] @The number inside the text that should be multiplied. can be one number, or a table of numbers
---@param maxMultiplier? number @Is what tripling (Golden+Mom's Box) should multiply the numbers by, normally 3. If it's less than 2, it also applies to doubling
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
-- Example: My modded trinket gives +0.5 range and when tripled, adds homing instead of tripling the range boost:
--- ```lua
--- EID:addGoldenTrinketMetadata(Isaac.GetTrinketIdByName("Cool Trinket"), {"", "Homing tears"}, 0.5, 2)
--- ```
function EID:addGoldenTrinketMetadata(id, appendText, numbersToMultiply, maxMultiplier, language)
maxMultiplier = maxMultiplier or 3
language = language or "en"
language = language or EID.DefaultLanguageCode
if appendText == "" then appendText = nil
elseif type(appendText) == "string" then appendText = {appendText} end
@@ -199,13 +199,13 @@ end
---@param appendText? string | string[] @Text to be appended onto the description. Can be one string, or a table of two strings; one for doubling and one for tripling
---@param numbersToChange? number | number[] @The number inside the text that gets added towards. can be one number, or a table of numbers
---@param additiveValues? number @Table of values that should be added to the number, if its doubled, tripled, or quadrupled
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
-- Example: My modded trinket gives +5 range and when tripled, adds homing instead of tripling the range boost:
--- ```lua
--- EID:addGoldenTrinketMetadataAdditive(Isaac.GetTrinketIdByName("Cool Trinket"), {"", "Homing tears"}, 5, {1,2,3})
--- ```
function EID:addGoldenTrinketMetadataAdditive(id, appendText, numbersToChange, additiveValues, language)
language = language or "en"
language = language or EID.DefaultLanguageCode
if appendText == "" then appendText = nil
elseif type(appendText) == "string" then appendText = {appendText} end
@@ -235,10 +235,10 @@ end
---@param id Card
---@param description string
---@param itemName? string
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
function EID:addCard(id, description, itemName, language)
itemName = itemName or nil
language = language or "en"
language = language or EID.DefaultLanguageCode
if id == -1 then
EID:WriteErrorMsg("Trying to add card description to id = -1, which is not allowed! (Name: "..tostring(itemName).."; Description: "..tostring(description)..")")
return
@@ -257,10 +257,10 @@ end
---@param id PillEffect
---@param description string
---@param itemName? string
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
function EID:addPill(id, description, itemName, language)
itemName = itemName or nil
language = language or "en"
language = language or EID.DefaultLanguageCode
if id == -1 then
EID:WriteErrorMsg("Trying to add pill description to id = -1, which is not allowed! (Name: "..tostring(itemName).."; Description: "..tostring(description)..")")
return
@@ -278,11 +278,11 @@ end
---@param id PillEffect
---@param description string
---@param itemName? string
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
function EID:addHorsePill(id, description, itemName, language)
if not EID.isRepentance then return end
itemName = itemName or nil
language = language or "en"
language = language or EID.DefaultLanguageCode
if id == -1 then
EID:WriteErrorMsg("Trying to add horsepill description to id = -1, which is not allowed! (Name: "..tostring(itemName).."; Description: "..tostring(description)..")")
return
@@ -306,10 +306,10 @@ end
---@param characterId PlayerType
---@param description string
---@param playerName? string
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
function EID:addBirthright(characterId, description, playerName, language)
playerName = playerName or nil
language = language or "en"
language = language or EID.DefaultLanguageCode
if characterId == -1 then
EID:WriteErrorMsg("Trying to add Birthright description to id = -1, which is not allowed! (Name: "..tostring(characterId).."; Description: "..tostring(description)..")")
return
@@ -321,9 +321,9 @@ end
---Creates a new transformation with a given unique name and a display name
---@param uniqueName string
---@param displayName string
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
function EID:createTransformation(uniqueName, displayName, language)
language = language or "en"
language = language or EID.DefaultLanguageCode
if EID.CustomTransformations[uniqueName] == nil then
EID.CustomTransformations[uniqueName] = {}
end
@@ -436,10 +436,10 @@ end
---@param subtype? integer @If `nil` or `-1`, it will affect all subtypes of that entity
---@param entityName string
---@param description string
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
function EID:addEntity(id, variant, subtype, entityName, description, language)
subtype = subtype or -1
language = language or "en"
language = language or EID.DefaultLanguageCode
if id == EntityType.ENTITY_EFFECT then
EID.effectList[variant] = true
end
@@ -470,13 +470,13 @@ end
---This spell should be added with the "Custom Poop API" library to actually appear in-game.
---Example:
---```lua
---EID:addCustomPoopSpell("MYPOOP", "I Made This Poop", "{{PoopSpell1}}", "Can be throwed to deal damage", "en")
---EID:addCustomPoopSpell("MYPOOP", "I Made This Poop", "{{PoopSpell1}}", "Can be throwed to deal damage", "en_us")
---```
---@param token string @The name of the spell in the Custom Poop API code
---@param name string @The name of the spell as it should appear in the description
---@param icon string @Markup icon of the poop
---@param description string
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
function EID:addCustomPoopSpell(token, name, icon, description, language)
EID.descriptions[language]["poopSpells"][token] = {icon, name, description, EID._currentMod}
end
@@ -764,12 +764,12 @@ end
function EID:getDescriptionEntry(objTable, objIdentifier, noFallback)
if not objIdentifier then
if noFallback then return EID.descriptions[EID:getLanguage()][objTable]
else return EID.descriptions[EID:getLanguage()][objTable] or EID.descriptions["en"][objTable] end
else return EID.descriptions[EID:getLanguage()][objTable] or EID.descriptions[EID.DefaultLanguageCode][objTable] end
else
local translatedTable = EID.descriptions[EID:getLanguage()][objTable]
local description
if noFallback then description = translatedTable and translatedTable[objIdentifier]
else description = (translatedTable and translatedTable[objIdentifier]) or (EID.descriptions["en"][objTable] and EID.descriptions["en"][objTable][objIdentifier]) end
else description = (translatedTable and translatedTable[objIdentifier]) or (EID.descriptions[EID.DefaultLanguageCode][objTable] and EID.descriptions[EID.DefaultLanguageCode][objTable][objIdentifier]) end
--Try looking for a -1 that would encompass all subtypes of the variant
-- Safety check for if the identifier contains "."(dot) 1-2 times and only contains numbers
local strNoDots, numDots = string.gsub(objIdentifier, "%.","")
@@ -796,9 +796,9 @@ end
---@return string
function EID:getDescriptionEntryEnglish(objTable, objID)
if not objID then
return EID.descriptions["en"][objTable]
return EID.descriptions[EID.DefaultLanguageCode][objTable]
else
return EID.descriptions["en"][objTable] and EID.descriptions["en"][objTable][objID]
return EID.descriptions[EID.DefaultLanguageCode][objTable] and EID.descriptions[EID.DefaultLanguageCode][objTable][objID]
end
end
@@ -892,7 +892,7 @@ function EID:getTransformationName(id)
-- get translated custom name
local customTransform = EID.CustomTransformations[id]
if customTransform ~= nil then
return customTransform[EID:getLanguage()] or customTransform["en"] or id
return customTransform[EID:getLanguage()] or customTransform[EID.DefaultLanguageCode] or id
end
return id
end
@@ -909,7 +909,7 @@ function EID:getObjectName(Type, Variant, SubType)
local tableEntry = EID:getDescriptionData(Type, Variant, SubType)
local name = nil
if tableEntry ~= nil then
if tableEntry[2] ~= nil and tableEntry[2] ~= "" and tableEntry[2] ~= EID.descriptions["en"][tableName][SubType] then
if tableEntry[2] ~= nil and tableEntry[2] ~= "" and tableEntry[2] ~= EID.descriptions[EID.DefaultLanguageCode][tableName][SubType] then
name = tableEntry[2]
end
end
@@ -917,18 +917,18 @@ function EID:getObjectName(Type, Variant, SubType)
if tableName == "collectibles" then
if EID.itemConfig:GetCollectible(SubType) == nil then return fallbackName end
local vanillaName = EID.itemConfig:GetCollectible(SubType).Name
local englishName = EID.descriptions["en"][tableName][SubType] and EID.descriptions["en"][tableName][SubType][2]
local englishName = EID.descriptions[EID.DefaultLanguageCode][tableName][SubType] and EID.descriptions[EID.DefaultLanguageCode][tableName][SubType][2]
return name or (not string.find(vanillaName, "^#") and vanillaName) or englishName or vanillaName
elseif tableName == "trinkets" then
local adjustedSubtype = EID:getAdjustedSubtype(Type, Variant, SubType)
if EID.itemConfig:GetTrinket(adjustedSubtype) == nil then return fallbackName end
local vanillaName = EID.itemConfig:GetTrinket(adjustedSubtype).Name
local englishName = EID.descriptions["en"][tableName][adjustedSubtype] and EID.descriptions["en"][tableName][adjustedSubtype][2]
local englishName = EID.descriptions[EID.DefaultLanguageCode][tableName][adjustedSubtype] and EID.descriptions[EID.DefaultLanguageCode][tableName][adjustedSubtype][2]
return name or (not string.find(vanillaName, "^#") and vanillaName) or englishName or vanillaName
elseif tableName == "cards" then
if EID.itemConfig:GetCard(SubType) == nil then return fallbackName end
local vanillaName = EID.itemConfig:GetCard(SubType).Name
local englishName = EID.descriptions["en"][tableName][SubType] and EID.descriptions["en"][tableName][SubType][2]
local englishName = EID.descriptions[EID.DefaultLanguageCode][tableName][SubType] and EID.descriptions[EID.DefaultLanguageCode][tableName][SubType][2]
return name or (not string.find(vanillaName, "^#") and vanillaName) or englishName or vanillaName
elseif tableName == "pills" or tableName == "horsepills" then
local adjustedSubtype = EID:getAdjustedSubtype(Type, Variant, SubType)
@@ -981,7 +981,7 @@ function EID:getPillName(pillID, isHorsepill)
else
vanillaName = EID.itemConfig:GetPillEffect(pillID - 1).Name
end
name = name and name[2] or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions["en"][tableName][pillID][2] or vanillaName
name = name and name[2] or (not string.find(vanillaName, "^#") and vanillaName) or EID.descriptions[EID.DefaultLanguageCode][tableName][pillID][2] or vanillaName
name = string.gsub(name,"I'm Excited!!!","I'm Excited!!") -- prevent markup trigger
return name
end
@@ -1239,7 +1239,7 @@ function EID:getTransformationIcon(str)
return EID.InlineIcons["ERROR"]
end
if tonumber(str) ~= nil then
str = EID.descriptions["en"].transformations[tonumber(str + 1)]
str = EID.descriptions[EID.DefaultLanguageCode].transformations[tonumber(str + 1)]
end
local transformSprite = EID:getIcon(str:gsub(" ", ""))
if transformSprite[1] == "ERROR" then
+1 -1
View File
@@ -1150,7 +1150,7 @@ function EID:handleBagOfCraftingRendering(ignoreRefreshRate)
-- Nothing in our recipe list passed the test; try checking English names as a backup
if #IDsToCheck == 0 then
local curLang = EID:getLanguage()
EID.Config["Language"] = "en"
EID.Config["Language"] = EID.DefaultLanguageCode
for _,id in ipairs(sortedIDs) do
local searchValid = EID:BoCSCheckItemName(EID:getObjectName(5, 100, id))
if (searchValid) then table.insert(IDsToCheck, id) end
+1 -1
View File
@@ -57,7 +57,7 @@ end
EID:AddCallback("EIDCallbacks.SEARCH_NAME_CONVERSION", function(_, searchString)
-- TODO : make english search inside ko_kr language setting (priotity low though)
if EID:getLanguage() == "ko" then
if EID:getLanguage() == "ko_kr" then
return EID.engKeystrokeToKor(searchString)
end
end)
+6 -6
View File
@@ -20,7 +20,7 @@ end
-- Optional parameters: replaceText, language, extraTable
-- Example usage: EID:addCondition(myDevilishItemID, EID.IsGreedMode, "{{GreedMode}} Reduces shop prices by 1 for each optional Nightmare wave completed")
function EID:addCondition(ID, ownedID, text, replaceText, language, extraTable)
language = language or "en"
language = language or EID.DefaultLanguageCode
if replaceText then text = {text, replaceText} end
local modifierText = newModdedCondition(text, language)
if type(ownedID) ~= "function" then
@@ -37,7 +37,7 @@ end
-- Optional parameters: text2, language, extraTable
-- Example usage: EID:addSynergyCondition(myHappyLittleItemID, {CollectibleType.COLLECTIBLE_BRIMSTONE, CollectibleType.COLLECTIBLE_SULFUR}, "Turns your laser into a smiley face that charms enemies")
function EID:addSynergyCondition(ID1, ID2, text1, text2, language, extraTable)
language = language or "en"
language = language or EID.DefaultLanguageCode
local modifierText1 = newModdedCondition(text1, language)
local modifierText2 = newModdedCondition(text2, language)
EID:AddSynergyConditional(ID1, ID2, modifierText1, modifierText2, extraTable)
@@ -49,7 +49,7 @@ end
-- Optional parameters: replaceText, language, extraTable, includeTainted
-- Example usage: EID:addPlayerCondition(myAngstyItemID, PlayerType.PLAYER_EVE, "Gives Eve extra mascara (2x Damage multiplier)")
function EID:addPlayerCondition(ID, playerID, text, replaceText, language, extraTable, includeTainted)
language = language or "en"
language = language or EID.DefaultLanguageCode
if replaceText then text = {text, replaceText} end
local modifierText = newModdedCondition(text, language)
EID:AddPlayerConditional(ID, playerID, modifierText, extraTable, includeTainted)
@@ -61,7 +61,7 @@ end
-- or, if you provide newNumber, it changes numberToDouble to that (technically, it's just a find/replace pair, any strings work)
-- Example usage: EID:addToGeneralCondition(myVeryHealthyItemID, "bingeEaterBuffs", "↑ {{Speed}} +0.15 Speed#↓ {{Tears}} -0.5 Tears#↓ {{Damage}} -0.5 Damage")
function EID:addToGeneralCondition(ID, locTable, text, numberToDouble, newNumber, language)
language = language or "en"
language = language or EID.DefaultLanguageCode
if numberToDouble then
newNumber = newNumber or numberToDouble * 2
text = { numberToDouble, newNumber, text }
@@ -103,7 +103,7 @@ end
-- Shortcut function for adding BFFS conditions; this is slightly more complex since it supports trinkets
-- Example usage: EID:addBFFSCondition(myBasicFamiliarID, nil, 3.5)
function EID:addBFFSCondition(ID, text, numberToDouble, newNumber, language)
language = language or "en"
language = language or EID.DefaultLanguageCode
if numberToDouble then
newNumber = newNumber or numberToDouble * 2
text = { numberToDouble, newNumber, text }
@@ -119,7 +119,7 @@ end
-- Shortcut function for adding Hive Mind conditions; by default, it will show with BFFS too, unless you pass in allowBFFS as false
function EID:addHiveMindCondition(ID, text, numberToDouble, newNumber, language, allowBFFS)
language = language or "en"
language = language or EID.DefaultLanguageCode
if allowBFFS == nil then allowBFFS = true end
EID.HiveMindFamiliars[ID] = true
if not allowBFFS then EID.BFFSIgnore[ID] = true end
+3 -3
View File
@@ -4,7 +4,7 @@ local showDebugChars = false
-- check integrity of language files
local languageFilesToCheck = {"fr"} -- EID.Languages -- single file check example {"ko"}
local languageFilesToCheck = {"fr"} -- EID.Languages -- single file check example {"ko_kr"}
-- count English entries for stats
local count = 0
@@ -16,7 +16,7 @@ function EID:countEntries(t)
end
end
end
EID:countEntries(EID.descriptions["en"])
EID:countEntries(EID.descriptions[EID.DefaultLanguageCode])
local enUSEntries = count
EID:WriteDebugMsg("English entries: "..enUSEntries)
@@ -84,7 +84,7 @@ for _, lang in ipairs(languageFilesToCheck) do
end
local progress = { 0, 0 }
EID:compareTables(EID.descriptions["en"], EID.descriptions[lang], lang, progress)
EID:compareTables(EID.descriptions[EID.DefaultLanguageCode], EID.descriptions[lang], lang, progress)
local errors = (enUSEntries - progress[1])-progress[2]
EID:WriteDebugMsg("Errors found: "..errors .." / "..enUSEntries)
+4 -4
View File
@@ -22,10 +22,10 @@ EID.GridEntityWhitelist = setmetatable({}, {
---@param variant integer
---@param name string
---@param description string
---@param language? EID_LanguageCode @Default: "en"
---@param language? EID_LanguageCode @Default: "en_us"
function EID:addGridEntity(type, variant, name, description, language)
variant = variant or 0
language = language or "en"
language = language or EID.DefaultLanguageCode
EID:CreateDescriptionTableIfMissing("custom", language)
EID.descriptions[language].custom["-999." .. type .. "." .. variant] = {
@@ -96,10 +96,10 @@ local function SacrificeRoomCondition(_)
end
local function SacrificeRoomCallback(descObj)
descObj.ObjSubType = math.min(#EID.descriptions["en"].sacrifice, descObj.Entity.VarData + 1)
descObj.ObjSubType = math.min(#EID.descriptions[EID.DefaultLanguageCode].sacrifice, descObj.Entity.VarData + 1)
-- Get sacrifice name by subtype
descObj.Name = EID:getDescriptionEntry("sacrificeHeader") ..
" (" .. descObj.ObjSubType .. "/" .. #EID.descriptions["en"].sacrifice .. ")"
" (" .. descObj.ObjSubType .. "/" .. #EID.descriptions[EID.DefaultLanguageCode].sacrifice .. ")"
descObj.Description = EID:getDescriptionEntry("sacrifice", descObj.ObjSubType)[3]
local curCounter = descObj.ObjSubType or 1
+1 -1
View File
@@ -625,7 +625,7 @@ function EID:ItemReminderHandlePoopSpells(player)
local ignoreExisting = false
if customPoop == nil then --If the poop still doesn't exist, use the unkown one instead
customPoop = EID:getDescriptionEntry("poopSpells")["Unknown"] or EID.descriptions["en"]["poopSpells"]["Unknown"]
customPoop = EID:getDescriptionEntry("poopSpells")["Unknown"] or EID.descriptions[EID.DefaultLanguageCode]["poopSpells"]["Unknown"]
ignoreExisting = true
end
+30 -27
View File
@@ -1,24 +1,27 @@
-- Variable that contains the default language code of the mod (English)
EID.DefaultLanguageCode = "en_us"
-- List of all valid languages
EID.Languages = {
"en", -- English
"en_us", -- English
"fr", -- French
"pt", -- Portuguese
"pt_br", -- Brazilian Portuguese
"ru", -- Russian
"es", -- Spanish
"spa", -- Spanish
"it", -- Italian
"bg", -- Bulgarian
"bul", -- Bulgarian
"pl", -- Polish
"de", -- German
"tr", -- Turkish
"ko", -- Korean
"tr_tr", -- Turkish
"ko_kr", -- Korean
"zh_cn", -- Simplified Chinese
"ja", -- Japanese
"cs", -- Czech
"nl", -- Dutch
"uk", -- Ukrainian
"el", -- Greek
"ro", -- Romanian
"ja_jp", -- Japanese
"cs_cz", -- Czech
"nl_nl", -- Dutch
"uk_ua", -- Ukrainian
"el_gr", -- Greek
"ro_ro", -- Romanian
"vi" -- Vietnamese
}
@@ -29,36 +32,36 @@ EID.BreakUtf8CharsLanguage = {
--#region Luadoc definitions
---@alias EID_LanguageCode
---| "bg" @Bulgarian
---| "cs" @Czech
---| "bul" @Bulgarian
---| "cs_cz" @Czech
---| "de" @German
---| "el" @Greek
---| "en" @English
---| "es" @Spanish
---| "el_gr" @Greek
---| "en_us" @English
---| "spa" @Spanish
---| "fr" @French
---| "it" @Italian
---| "ja" @Japanese
---| "ko" @Korean
---| "nl" @Dutch
---| "ja_jp" @Japanese
---| "ko_kr" @Korean
---| "nl_nl" @Dutch
---| "pl" @Polish
---| "pt_br" @Brasilian Portuguese
---| "pt" @Portuguese
---| "ro" @Romanian
---| "ro_ro" @Romanian
---| "ru" @Russian
---| "tr" @Turkish
---| "uk" @Ukrainian
---| "tr_tr" @Turkish
---| "uk_ua" @Ukrainian
---| "vi" @Vietnamese
---| "zh_cn" @Simplified Chinese
--#endregion
-- Map the game's built-in language option strings to EID's
EID.LanguageMap = {
["jp"] = "ja",
["es"] = "es",
["jp"] = "ja_jp",
["es"] = "spa",
["de"] = "de",
["fr"] = "fr",
["ru"] = "ru",
["kr"] = "ko",
["kr"] = "ko_kr",
["zh"] = "zh_cn",
}
@@ -72,7 +75,7 @@ function EID:getLanguage()
lang = "auto"
end
if lang == "auto" then
local langToReturn = Options and EID.LanguageMap[Options.Language] or "en" -- Use game language, if available.
local langToReturn = Options and EID.LanguageMap[Options.Language] or EID.DefaultLanguageCode -- Use game language, if available.
-- don't do any updating if on a Repentance version before v1.7.9b
if Isaac.RunCallback ~= nil then
for _, callbackData in pairs(Isaac.GetCallbacks("EID_EVALUATE_AUTO_LANG")) do
@@ -92,7 +95,7 @@ end
function EID:LoadLanguagePacks(gameVersion)
--transformation infos
local _, _ = pcall(require, "descriptions." .. gameVersion .. ".transformations")
--languages
--load languages
for _, languageCode in ipairs(EID.Languages) do
local wasSuccessful, err = pcall(require, "descriptions." .. gameVersion .. "." .. languageCode)
if not wasSuccessful and not string.find(err, "not found") then
+1 -1
View File
@@ -198,5 +198,5 @@ end
-- this made more sense when this file was only executed when --luadebug was present
-- https://www.youtube.com/watch?v=msDuNZyYAIQ
if (debug and os.date("%m/%d") == "04/01") then
EID.descriptions["en"].sacrifice[1][3] = "{{Coin}} 50% chance of winning 1 coin at Sacrifice#75% chance if you're a genetic freak#!!! If you add Kurt Angle to the mix, your chances of winning drastically go down"
EID.descriptions[EID.DefaultLanguageCode].sacrifice[1][3] = "{{Coin}} 50% chance of winning 1 coin at Sacrifice#75% chance if you're a genetic freak#!!! If you add Kurt Angle to the mix, your chances of winning drastically go down"
end
+2 -2
View File
@@ -631,8 +631,8 @@ function EID:printDescription(desc, cachedID)
curName = desc.Name
if EID.Config["TranslateItemName"] ~= 2 then
local curLanguage = EID.Config["Language"]
if EID:getLanguage() ~= "en" then
EID.Config["Language"] = "en"
if EID:getLanguage() ~= EID.DefaultLanguageCode then
EID.Config["Language"] = EID.DefaultLanguageCode
local englishName = desc.PermanentTextEnglish or EID:getObjectName(desc.ObjType, desc.ObjVariant, desc.ObjSubType)
EID.Config["Language"] = curLanguage
if EID.Config["TranslateItemName"] == 1 then