ItemVersion: Missing entry for 'World of Warcraft' .. Again .. And again ..
Hollicsh opened this issue ยท 4 comments
What is your client flavor? (Retail, Wrath, or Classic)
Retail (10.0.2.46879)
What version of ItemVersion do you have installed?
2022.48.1
What platform are you playing on? (Windows, Mac, or Linux)
Windows
What is the bug? And, what should happen instead?
Missing entry for 'World of Warcraft'
Steps To Reproduce
- I go into the game world.
- Immediately I see this error.
Additional context
1x AceLocale-3.0-6: ItemVersion: Missing entry for 'World of Warcraft'
[string "@ItemVersion/Tooltip.lua"]:57: in function <ItemVersion/Tooltip.lua:42>
[string "=(tail call)"]: ?
[string "@ItemVersion/Options.lua"]:25: in function <ItemVersion/Options.lua:9>
[string "@ItemVersion/Options.lua"]:239: in function <ItemVersion/Options.lua:68>
[string "@ItemVersion/Options.lua"]:258: in function New' [string "@ItemVersion/Init.lua"]:13: in function <ItemVersion/Init.lua:7> [string "=[C]"]: ? [string "@ElvUI_Libraries/Core/Ace3/AceAddon-3.0-13/AceAddon-3.0.lua"]:66: in function <...UI_Libraries/Core/Ace3/AceAddon-3.0/AceAddon-3.0.lua:61> [string "@ElvUI_Libraries/Core/Ace3/AceAddon-3.0-13/AceAddon-3.0.lua"]:494: in function
InitializeAddon'
[string "@ElvUI_Libraries/Core/Ace3/AceAddon-3.0-13/AceAddon-3.0.lua"]:619: in function <...UI_Libraries/Core/Ace3/AceAddon-3.0/AceAddon-3.0.lua:611>
Hey !
Old addon files or the game itself ?
If addon, then I completely deleted all folders and partitions and installed the addon from scratch.
Ah, ok, I understand what's happening. Sorry!
Bug
The bug is that the code on these lines is erroneously performing two translations/locale lookups.
On those lines, we say:
expacName = L[expac.shortName]
But, expac.shortName
is already translated:
[1] = { canonName = L["Classic"], shortName = L["Classic"] },
[2] = { canonName = L["The Burning Crusade"], shortName = L["TBC"] },
[3] = { canonName = L["Wrath of the Lich King"], shortName = L["WotLK"] },
-- and so on ...
And, for some of the expac's, we use a translation like:
L["Classic"] = EXPANSION_NAME0
L["The Burning Crusade"] = EXPANSION_NAME1
L["Wrath of the Lich King"] = EXPANSION_NAME2
(The uppercased constants come from the GlobalStrings files, and offer translations for every locale. For example, here's English's and Russian's).
This boils down to, for example:
-- as in code
L[expac.shortName]
-- but, this is actually a double translate
L[L["Classic"]]
-- which is the same as
L[EXPANSION_NAME0]
-- which, for Russian, is the same as
L["World of Warcraft"]
This fails because we have not written a translation for the already-translated string, "World of Warcraft".
Fix
All we need to do is not double translate:
- expacName = L[expac.shortName]
+ expacName = expac.shortName
I will fix this now and cut a new release within an hour.
Try this release: https://www.curseforge.com/wow/addons/itemversion/files/4166697