Quantcast

Changed ww_slotDisplayNames to use localized values as keys

Kevin Lyles [01-23-11 - 21:28]
Changed ww_slotDisplayNames to use localized values as keys
Filename
Locales/enUS/slots.lua
WeightsWatcher.lua
diff --git a/Locales/enUS/slots.lua b/Locales/enUS/slots.lua
index a214e64..95219d4 100644
--- a/Locales/enUS/slots.lua
+++ b/Locales/enUS/slots.lua
@@ -58,51 +58,51 @@ for k, v in pairs(ww_localizedSlotNames) do
 end

 ww_slotDisplayNames = {
-	["axe"] = "Axe",
-	["mace"] = "Mace",
-	["sword"] = "Sword",
-	["head"] = "Head",
-	["shoulder"] = "Shoulder",
-	["chest"] = "Chest",
-	["wrist"] = "Wrist",
-	["hands"] = "Hands",
-	["waist"] = "Waist",
-	["legs"] = "Legs",
-	["feet"] = "Feet",
-	["main hand"] = "Main Hand",
-	["off hand"] = "Off Hand",
-	["one-hand"] = "One-Hand",
-	["two-hand"] = "Two-Hand",
-	["relic"] = "Relic",
-	["ranged"] = "Ranged",
-	["thrown"] = "Thrown",
-	["projectile"] = "Projectile",
-	["neck"] = "Neck",
-	["back"] = "Back",
-	["shirt"] = "Shirt",
-	["tabard"] = "Tabard",
-	["finger"] = "Finger",
-	["trinket"] = "Trinket",
-	["held in off-hand"] = "Held In Off-hand",
-	["cloth"] = "Cloth",
-	["leather"] = "Leather",
-	["mail"] = "Mail",
-	["plate"] = "Plate",
+	[ww_localizedSlotNames["axe"]] = "Axe",
+	[ww_localizedSlotNames["mace"]] = "Mace",
+	[ww_localizedSlotNames["sword"]] = "Sword",
+	[ww_localizedSlotNames["head"]] = "Head",
+	[ww_localizedSlotNames["shoulder"]] = "Shoulder",
+	[ww_localizedSlotNames["chest"]] = "Chest",
+	[ww_localizedSlotNames["wrist"]] = "Wrist",
+	[ww_localizedSlotNames["hands"]] = "Hands",
+	[ww_localizedSlotNames["waist"]] = "Waist",
+	[ww_localizedSlotNames["legs"]] = "Legs",
+	[ww_localizedSlotNames["feet"]] = "Feet",
+	[ww_localizedSlotNames["main hand"]] = "Main Hand",
+	[ww_localizedSlotNames["off hand"]] = "Off Hand",
+	[ww_localizedSlotNames["one-hand"]] = "One-Hand",
+	[ww_localizedSlotNames["two-hand"]] = "Two-Hand",
+	[ww_localizedSlotNames["relic"]] = "Relic",
+	[ww_localizedSlotNames["ranged"]] = "Ranged",
+	[ww_localizedSlotNames["thrown"]] = "Thrown",
+	[ww_localizedSlotNames["projectile"]] = "Projectile",
+	[ww_localizedSlotNames["neck"]] = "Neck",
+	[ww_localizedSlotNames["back"]] = "Back",
+	[ww_localizedSlotNames["shirt"]] = "Shirt",
+	[ww_localizedSlotNames["tabard"]] = "Tabard",
+	[ww_localizedSlotNames["finger"]] = "Finger",
+	[ww_localizedSlotNames["trinket"]] = "Trinket",
+	[ww_localizedSlotNames["held in off-hand"]] = "Held In Off-hand",
+	[ww_localizedSlotNames["cloth"]] = "Cloth",
+	[ww_localizedSlotNames["leather"]] = "Leather",
+	[ww_localizedSlotNames["mail"]] = "Mail",
+	[ww_localizedSlotNames["plate"]] = "Plate",

-	["arrow"] = "Arrow",
-	["bow"] = "Bow",
-	["bullet"] = "Bullet",
-	["crossbow"] = "Crossbow",
-	["dagger"] = "Dagger",
-	["fishing pole"] = "Fishing Pole",
-	["fist weapon"] = "Fist Weapon",
-	["gun"] = "Gun",
-	["idol"] = "Idol",
-	["libram"] = "Libram",
-	["polearm"] = "Polearm",
-	["shield"] = "Shield",
-	["sigil"] = "Sigil",
-	["staff"] = "Staff",
-	["totem"] = "Totem",
-	["wand"] = "Wand",
+	[ww_localizedSlotNames["arrow"]] = "Arrow",
+	[ww_localizedSlotNames["bow"]] = "Bow",
+	[ww_localizedSlotNames["bullet"]] = "Bullet",
+	[ww_localizedSlotNames["crossbow"]] = "Crossbow",
+	[ww_localizedSlotNames["dagger"]] = "Dagger",
+	[ww_localizedSlotNames["fishing pole"]] = "Fishing Pole",
+	[ww_localizedSlotNames["fist weapon"]] = "Fist Weapon",
+	[ww_localizedSlotNames["gun"]] = "Gun",
+	[ww_localizedSlotNames["idol"]] = "Idol",
+	[ww_localizedSlotNames["libram"]] = "Libram",
+	[ww_localizedSlotNames["polearm"]] = "Polearm",
+	[ww_localizedSlotNames["shield"]] = "Shield",
+	[ww_localizedSlotNames["sigil"]] = "Sigil",
+	[ww_localizedSlotNames["staff"]] = "Staff",
+	[ww_localizedSlotNames["totem"]] = "Totem",
+	[ww_localizedSlotNames["wand"]] = "Wand",
 }
diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua
index 4cd26c7..d6df50a 100644
--- a/WeightsWatcher.lua
+++ b/WeightsWatcher.lua
@@ -591,7 +591,7 @@ function WeightsWatcher.displayItemStats(tooltip, ttname)
 					tooltip:AddLine(name)
 				else
 					if name == "slot" or name == "subslot" then
-						tooltip:AddDoubleLine(name, ww_slotDisplayNames[ww_englishSlotNames[value]])
+						tooltip:AddDoubleLine(name, ww_slotDisplayNames[value])
 					else
 						tooltip:AddDoubleLine(name, value)
 					end
@@ -1069,7 +1069,7 @@ function WeightsWatcher.parseLine(textL, textR, link)
 	end
 	if stats.info then
 		for name, value in pairs(stats.info) do
-			if (name == "slot" or name == "subslot") and not ww_slotDisplayNames[ww_englishSlotNames[value]] then
+			if (name == "slot" or name == "subslot") and not ww_slotDisplayNames[value] then
 				return
 			end
 		end