From a05801369f06a43f7fdead1adf3e59a540f1ceaf Mon Sep 17 00:00:00 2001 From: Jamie Schembri Date: Thu, 6 Feb 2014 19:48:03 +0100 Subject: [PATCH] Localization check --- core.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core.lua b/core.lua index c764380..9d6fb83 100644 --- a/core.lua +++ b/core.lua @@ -8,9 +8,13 @@ local L = { } GameTooltip:HookScript("OnShow", function() - local tooltipText = GameTooltipTextLeft1 + local localized = L[GetLocale()] + + -- don't do anything if we don't have a string for this locale + if not localized then return end - if tooltipText and tooltipText:GetText() == L[GetLocale()] then + local tooltipText = GameTooltipTextLeft1 + if tooltipText and tooltipText:GetText() == localized then GameTooltip:Hide() end end) -- 1.7.9.5