From b14cc07ab5bf6a9170361aa43d7d617eb82815de Mon Sep 17 00:00:00 2001 From: F16Gaming Date: Sun, 8 Apr 2012 03:58:56 +0200 Subject: [PATCH] Fixed issue where localestring was nil when player setting "Locale" was not set. --- LocaleManager.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LocaleManager.lua b/LocaleManager.lua index ce20134..c03035e 100644 --- a/LocaleManager.lua +++ b/LocaleManager.lua @@ -49,9 +49,9 @@ end local s_meta = { __call = function(self, arg1, arg2, isPlr) - if not arg1 then return nil end + if not arg1 and not arg2 then return nil end if arg2 then -- (locale, key) - return self:GetLocale(tostring(arg1), isPlr)[tostring(arg2):upper()] + return self:GetLocale(arg1, isPlr)[tostring(arg2):upper()] end arg1 = tostring(arg1):upper() return self:GetActive()[arg1] @@ -111,7 +111,7 @@ end -- ^NOTE^ Above should not happen, under any circumstance what-so-ever unless Locales table is modified. function LM:GetLocale(locale, isPlr) if isPlr and not self.Settings.PLAYER_INDEPENDENT then - locale = self.Active + locale = self.Settings.LOCALE end locale = locale or self.Settings.LOCALE locale = locale:lower() -- 1.7.9.5