From bb54a7108a37b461e2646f3c1c1e6be07022f425 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Mon, 1 Nov 2010 13:45:12 +0000 Subject: [PATCH] Allow for string = true in localization files --- AddonCore.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/AddonCore.lua b/AddonCore.lua index 41ce831..25165ca 100644 --- a/AddonCore.lua +++ b/AddonCore.lua @@ -105,7 +105,13 @@ addon.L = addon.L or setmetatable({}, { function addon:RegisterLocale(locale, tbl) if locale == "enUS" or locale == GetLocale() then for k,v in pairs(tbl) do - self.L[k] = v + if v == true then + self.L[k] = k + elseif type(v) == "string" then + self.L[k] = v + else + self.L[k] = k + end end end end -- 1.7.9.5