From 90d486e70f78b4a359e1c9c62b703c4a4dae99d3 Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Thu, 30 Aug 2012 21:28:32 -0500 Subject: [PATCH] Fixed an issue with unlocalized gem names and empty sockets --- Locales/enUS/gems.lua | 1 + WeightsWatcher.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Locales/enUS/gems.lua b/Locales/enUS/gems.lua index ad9154b..92851a9 100644 --- a/Locales/enUS/gems.lua +++ b/Locales/enUS/gems.lua @@ -267,6 +267,7 @@ ww_gemDisplayNames = { ["Nimble Eye of Zul"] = "Nimble Eye of Zul", ["Nimble Forest Emerald"] = "Nimble Forest Emerald", ["Nimble Jasper"] = "Nimble Jasper", + ["None"] = "None", ["Perfect Accurate Nightstone"] = "Perfect Accurate Nightstone", ["Perfect Accurate Shadow Crystal"] = "Perfect Accurate Shadow Crystal", ["Perfect Adept Hessonite"] = "Perfect Adept Hessonite", diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua index f716a82..2173320 100644 --- a/WeightsWatcher.lua +++ b/WeightsWatcher.lua @@ -797,7 +797,7 @@ local function addDebugInfo(tooltip, bareItemInfo, link) tooltip:AddLine(L["Gem Stats:"]) for _, gems in pairs(itemInfo.gemStats) do for _, gem in ipairs(gems) do - tooltip:AddLine(string.format(L["GEM_NAME_COLOR_FORMAT"], ww_gemDisplayNames[gem[2]], ww_gemColorDisplayNames[gem[1]])) + tooltip:AddLine(string.format(L["GEM_NAME_COLOR_FORMAT"], ww_gemDisplayNames[gem[2]] or "Unlocalized gem: " .. gem[2], ww_gemColorDisplayNames[gem[1]])) for stat, value in pairs(gem[3]) do tooltip:AddDoubleLine(string.format(L["DOUBLY_INDENTED_STRING_FORMAT"], ww_statDisplayNames[stat]), ww_formatNum(value)) end -- 1.7.9.5