Added a work-around for the French localization of the Runeforging "profession" not being conformant with GetSpellInfo(). Hopefully fixes ticket #990.
James D. Callahan III [07-07-10 - 09:34]
Added a work-around for the French localization of the Runeforging "profession" not being conformant with GetSpellInfo(). Hopefully fixes ticket #990.
diff --git a/ARL.lua b/ARL.lua
index da9a5e6..b3c1481 100644
--- a/ARL.lua
+++ b/ARL.lua
@@ -484,7 +484,7 @@ function addon:OnInitialize()
PROFESSION_INITS[GetSpellInfo(51309)] = addon.InitTailoring
PROFESSION_INITS[GetSpellInfo(51311)] = addon.InitJewelcrafting
PROFESSION_INITS[GetSpellInfo(45363)] = addon.InitInscription
- PROFESSION_INITS[GetSpellInfo(53428)] = addon.InitRuneforging
+ PROFESSION_INITS[private.runeforging_name] = addon.InitRuneforging
-------------------------------------------------------------------------------
-- Hook GameTooltip so we can show information on mobs that drop/sell/train
@@ -642,7 +642,7 @@ function addon:OnEnable()
[GetSpellInfo(51309)] = false, -- Tailoring
[GetSpellInfo(51311)] = false, -- Jewelcrafting
[GetSpellInfo(45363)] = false, -- Inscription
- [GetSpellInfo(53428)] = false, -- Runeforging
+ [private.runeforging_name] = false, -- Runeforging
}
Player:SetProfessions()
diff --git a/Constants.lua b/Constants.lua
index d208553..78a7c70 100644
--- a/Constants.lua
+++ b/Constants.lua
@@ -30,6 +30,12 @@ local private = select(2, ...)
-------------------------------------------------------------------------------
-- Profession data.
-------------------------------------------------------------------------------
+-- Needed for Smelting kludge.
+private.mining_name = GetSpellInfo(32606)
+
+-- This is needed because the French translation is non-conformant.
+private.runeforging_name = GetLocale() == "frFR" and "Runeforger" or GetSpellInfo(53428)
+
private.professions = {
["Alchemy"] = GetSpellInfo(51304),
["Blacksmithing"] = GetSpellInfo(51300),
@@ -40,13 +46,11 @@ private.professions = {
["Inscription"] = GetSpellInfo(45363),
["Jewelcrafting"] = GetSpellInfo(51311),
["Leatherworking"] = GetSpellInfo(51302),
- ["Runeforging"] = GetSpellInfo(53428),
+ ["Runeforging"] = private.runeforging_name,
["Smelting"] = GetSpellInfo(2656),
["Tailoring"] = GetSpellInfo(51309),
}
-private.mining_name = GetSpellInfo(32606)
-
private.ordered_professions = {
private.professions.Alchemy, -- 1
private.professions.Blacksmithing, -- 2
diff --git a/Scanner.lua b/Scanner.lua
index 0774aed..13d9b8f 100644
--- a/Scanner.lua
+++ b/Scanner.lua
@@ -1370,7 +1370,7 @@ do
local recipe_link = GetSpellLink(recipe.spell_id)
if not recipe_link then
- if recipe.profession ~= GetSpellInfo(53428) then -- Lets hide this output for runeforging.
+ if recipe.profession ~= private.runeforging_name then -- Lets hide this output for runeforging.
self:Printf("Missing spell_link for ID %d (%s).", spell_id, recipe_name)
end
return