Hi all,
I am confused.
Is it really possible that the blizzard codes save the affixes names of the runs in m+ in the LOCALE language and not in a code or in a GLOBAL string ?!
I try to explain better.
Lua Code:
local mapIDs = {
[165] = { "GROUND", "Shadowmoon Burial Grounds" },
[200] = { "HoV", "Halls of Valor" },
[210] = { "COURT", "Court of Stars" },
[2] = { "JADE", "Temple of the Jade Serpent" },
[399] = { "RUBY", "Ruby Life Pools" },
[400] = { "NOKH", "The Nokhud Offensive" },
[401] = { "AZURE", "The Azure Vault" },
[402] = { "ALGE", "Algeth'ar Academy" },
}
for mapID in pairs(mapIDs) do
local affix, score = C_MythicPlus.GetSeasonBestAffixScoreInfoForMap(mapID)
if score then
for i,t in ipairs(affix) do
print(C_ChallengeMode.GetMapUIInfo(mapID) .. " | " .. t.name .. " | score=" .. t.score)
end
end
end
This simple code runs and prints the best run (score) with current affix.
This is the first week of the season and it is a Fortified week so I got something like:
The problem is Fortified appear because my LOCALE is enUS but if I switch language on itIT I get:
"Fortified" = "Potenziamento"
and if I have to make some choice in my addon on the fact the record are Fortified or Tyrannical I am in big trouble if I dont have the right locale at least for one of them ...
In example If I want to create 2 columns for Fortified or Tyrannical runs and I try to check them using something like:
Lua Code:
if t.name == L["Fortified"] then localpos = 3 else localpos = 4 end
and it fails if I dont have the right LOCALE somewhere defined.
I.e, the runs are all Fortified but not having the LOCALE for deDE the if fails and they are put in the Tyrannical column :
I have fixed a little bit installed all the languages and then run the game once for locale and get the translation of Fortified for the configured language.
Lua Code:
if LOCALE == "enUS" then
-- The EU English game client also
-- uses the US English locale code.
return end
if LOCALE == "esES" or LOCALE == "esMX" then
L["Fortified"] = "Reforzado"
return end
if LOCALE == "ptBR" then
L["Fortified"] = "Fortificada"
return end
if LOCALE == "frFR" then
L["Fortified"] = "Fortifié"
return end
if LOCALE == "deDE" then
L["Fortified"] = "Verstärkt"
return end
if LOCALE == "itIT" then
L["Fortified"]
... etc etc
Now I'd like to ask if there is here some one that know if there is a better solution to solve this iussue in a more elegant way because I really didnt find it :/
Thanks all ...