From 35398ebf383b75060328e0086c53cefca38dd4d0 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Sun, 26 Jan 2025 17:43:43 +0100 Subject: [PATCH] Rework locale --- Heimdall.lua | 31 ++++- Modules/Config.lua | 284 ++++++++++++++++++++++----------------------- _L.lua | 118 +++++++++---------- 3 files changed, 226 insertions(+), 207 deletions(-) diff --git a/Heimdall.lua b/Heimdall.lua index 8f3f870..9648a45 100644 --- a/Heimdall.lua +++ b/Heimdall.lua @@ -23,7 +23,8 @@ local function init() ---@field network HeimdallNetworkData ---@field networkMessenger HeimdallNetworkMessengerData ---@field stinkyCache HeimdallStinkyCacheData - ---@field _L Localization + ---@field _L fun(key: string, locale: string): string + ---@field _Locale Localization ---@field VERSION string ---@field dumpTable fun(table: any, depth?: number): nil ---@field utf8len fun(input: string): number @@ -32,6 +33,7 @@ local function init() ---@field Split fun(input: string, deliminer: string): string[] ---@field IsStinky fun(name: string): boolean ---@field Memoize fun(f: function): function + ---@field GetLocaleForChannel fun(channel: string): string ---@field WhoQueryService WhoQueryService ---@field Whoer InitTable ---@field Messenger InitTable @@ -635,6 +637,33 @@ local function init() end end + ---@param channel string + ---@return string + shared.GetLocaleForChannel = function(channel) + return Heimdall_Data.config.channelLocale[channel] or "en" + end + + ---@param key string + ---@param locale string + ---@return string + shared._L = function(key, locale) + local locale = shared._Locale[locale] + if not locale then + if Heimdall_Data.config.debug then + print(string.format("[Heimdall] Locale %s not found", tostring(locale))) + end + return key + end + local value = locale[key] + if not value then + if Heimdall_Data.config.debug then + print(string.format("[Heimdall] Key %s not found in locale %s", tostring(key), tostring(locale))) + end + return key + end + return value + end + shared.Messenger.Init() shared.StinkyTracker.Init() shared.AgentTracker.Init() diff --git a/Modules/Config.lua b/Modules/Config.lua index e7edffb..3d49eb3 100644 --- a/Modules/Config.lua +++ b/Modules/Config.lua @@ -552,11 +552,11 @@ function shared.Config.Init() end) configFrame:Add(scale, 2, 2) local title = configFrame.frame:CreateFontString(nil, "ARTWORK", "GameFontNormal") - title:SetText(string.format("%s - v%s", shared.L[Heimdall_Data.config.locale].config.heimdallConfig, shared.VERSION)) + title:SetText(string.format("%s - v%s", shared._L("heimdallConfig", Heimdall_Data.config.locale), shared.VERSION)) configFrame:Add(title, 2, 7) local debug = CreateBasicButton("HeimdallConfigDebug", configFrame.frame, - shared.L[Heimdall_Data.config.locale].config.debug, function() + shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.debug = not Heimdall_Data.config.debug return Heimdall_Data.config.debug end) @@ -564,13 +564,13 @@ function shared.Config.Init() configFrame:Add(debug, 2, 1) local russian = nil - local english = CreateBasicButton("HeimdallConfigEnglish", configFrame.frame, shared.L.en.config.english, function() + local english = CreateBasicButton("HeimdallConfigEnglish", configFrame.frame, shared._L("english", Heimdall_Data.config.locale), function() Heimdall_Data.config.locale = "en" russian:UpdateColor(false) return Heimdall_Data.config.locale == "en" end) english:UpdateColor(Heimdall_Data.config.locale == "en") - russian = CreateBasicButton("HeimdallConfigRussian", configFrame.frame, shared.L.ru.config.russian, function() + russian = CreateBasicButton("HeimdallConfigRussian", configFrame.frame, shared._L("russian", Heimdall_Data.config.locale), function() Heimdall_Data.config.locale = "ru" english:UpdateColor(false) return Heimdall_Data.config.locale == "ru" @@ -588,10 +588,10 @@ function shared.Config.Init() configFrame:Add(spotterConfigFrame, 9, 3) local title = CreateFancyText("HeimdallSpotterConfigTitle", spotterConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.spotter, { r, g, b, a }) + shared._L("spotter", Heimdall_Data.config.locale), { r, g, b, a }) spotterConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallSpotterConfigDebugButton", - spotterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + spotterConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.spotter.debug = not Heimdall_Data.config.spotter.debug return Heimdall_Data.config.spotter.debug end) @@ -599,7 +599,7 @@ function shared.Config.Init() spotterConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallSpotterConfigEnableButton", - spotterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + spotterConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.spotter.enabled = not Heimdall_Data.config.spotter.enabled return Heimdall_Data.config.spotter.enabled end) @@ -607,7 +607,7 @@ function shared.Config.Init() spotterConfigFrame:Add(enableButton, 1, 6) local everyoneButton = CreateBasicButton("HeimdallSpotterConfigEveryoneButton", - spotterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.everyone, function() + spotterConfigFrame.frame, shared._L("everyone", Heimdall_Data.config.locale), function() Heimdall_Data.config.spotter.everyone = not Heimdall_Data.config.spotter.everyone return Heimdall_Data.config.spotter.everyone end) @@ -615,7 +615,7 @@ function shared.Config.Init() spotterConfigFrame:Add(everyoneButton, 1, 6) local hostileButton = CreateBasicButton("HeimdallSpotterConfigHostileButton", - spotterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.hostile, function() + spotterConfigFrame.frame, shared._L("hostile", Heimdall_Data.config.locale), function() Heimdall_Data.config.spotter.hostile = not Heimdall_Data.config.spotter.hostile return Heimdall_Data.config.spotter.hostile end) @@ -623,7 +623,7 @@ function shared.Config.Init() spotterConfigFrame:Add(hostileButton, 1, 4) local allianceButton = CreateBasicButton("HeimdallSpotterConfigAllianceButton", - spotterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.alliance, function() + spotterConfigFrame.frame, shared._L("alliance", Heimdall_Data.config.locale), function() Heimdall_Data.config.spotter.alliance = not Heimdall_Data.config.spotter.alliance return Heimdall_Data.config.spotter.alliance end) @@ -631,7 +631,7 @@ function shared.Config.Init() spotterConfigFrame:Add(allianceButton, 1, 4) local stinkyButton = CreateBasicButton("HeimdallSpotterConfigStinkyButton", - spotterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.stinky, function() + spotterConfigFrame.frame, shared._L("stinky", Heimdall_Data.config.locale), function() Heimdall_Data.config.spotter.stinky = not Heimdall_Data.config.spotter.stinky return Heimdall_Data.config.spotter.stinky end) @@ -639,7 +639,7 @@ function shared.Config.Init() spotterConfigFrame:Add(stinkyButton, 1, 4) local channels = CreateBasicSmallEditBox("HeimdallSpotterConfigChannels", - spotterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + spotterConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.spotter.channels or {}, ","), function(self) local text = self:GetText() @@ -650,7 +650,7 @@ function shared.Config.Init() spotterConfigFrame:Add(channels, 2, 4) local zoneOverride = CreateBasicSmallEditBox("HeimdallSpotterConfigZoneOverride", - spotterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.zoneOverride, + spotterConfigFrame.frame, shared._L("zoneOverride", Heimdall_Data.config.locale), Heimdall_Data.config.spotter.zoneOverride, function(self) local text = self:GetText() @@ -665,7 +665,7 @@ function shared.Config.Init() spotterConfigFrame:Add(zoneOverride, 2, 4) local throttleTime = CreateBasicSmallEditBox("HeimdallSpotterConfigThrottleTime", - spotterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.throttle, + spotterConfigFrame.frame, shared._L("throttle", Heimdall_Data.config.locale), Heimdall_Data.config.spotter.throttleTime, function(self) local text = self:GetText() @@ -688,10 +688,10 @@ function shared.Config.Init() configFrame:Add(whoerConfigFrame, 30, 6) local title = CreateFancyText("HeimdallWhoerConfigTitle", whoerConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.whoer, { r, g, b, a }) + shared._L("whoer", Heimdall_Data.config.locale), { r, g, b, a }) whoerConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallWhoerConfigDebugButton", - whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + whoerConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.who.debug = not Heimdall_Data.config.who.debug return Heimdall_Data.config.who.debug end) @@ -699,7 +699,7 @@ function shared.Config.Init() whoerConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallWhoerConfigEnableButton", - whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + whoerConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.who.enabled = not Heimdall_Data.config.who.enabled return Heimdall_Data.config.who.enabled end) @@ -707,7 +707,7 @@ function shared.Config.Init() whoerConfigFrame:Add(enableButton, 2, 3) local doWhisperButton = CreateBasicButton("HeimdallWhoerConfigDoWhisperButton", - whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.doWhisper, function() + whoerConfigFrame.frame, shared._L("doWhisper", Heimdall_Data.config.locale), function() Heimdall_Data.config.who.doWhisper = not Heimdall_Data.config.who.doWhisper return Heimdall_Data.config.who.doWhisper end) @@ -715,7 +715,7 @@ function shared.Config.Init() whoerConfigFrame:Add(doWhisperButton, 2, 3) local channels = CreateBasicSmallEditBox("HeimdallWhoerConfigChannels", - whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + whoerConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.who.channels or {}, ","), function(self) local text = self:GetText() @@ -726,7 +726,7 @@ function shared.Config.Init() whoerConfigFrame:Add(channels, 2, 3) local ttl = CreateBasicSmallEditBox("HeimdallWhoerConfigTTL", - whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.ttl, + whoerConfigFrame.frame, shared._L("ttl", Heimdall_Data.config.locale), Heimdall_Data.config.who.ttl, function(self) local text = self:GetText() @@ -741,7 +741,7 @@ function shared.Config.Init() whoerConfigFrame:Add(ttl, 2, 3) local ignored = CreateBasicBigEditBox("HeimdallWhoerConfigIgnored", - whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.ignored, + whoerConfigFrame.frame, shared._L("ignored", Heimdall_Data.config.locale), MapKeyToString(Heimdall_Data.config.who.ignored or {}, ","), function(self) local ignored = StringToMap(self:GetText(), ",") @@ -750,7 +750,7 @@ function shared.Config.Init() whoerConfigFrame:Add(ignored, 4, 6) local zoneNotifyFor = CreateBasicBigEditBox("HeimdallWhoerConfigZoneNotifyFor", - whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.zoneNotifyFor, + whoerConfigFrame.frame, shared._L("zoneNotifyFor", Heimdall_Data.config.locale), MapKeyToString(Heimdall_Data.config.who.zoneNotifyFor or {}, "\n"), function(self) local zoneNotifyFor = StringToMap(self:GetText(), "\n") @@ -759,7 +759,7 @@ function shared.Config.Init() whoerConfigFrame:Add(zoneNotifyFor, 4, 6) local whoQueries = CreateBasicBigEditBox("HeimdallWhoerConfigQueries", - whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.queries, + whoerConfigFrame.frame, shared._L("queries", Heimdall_Data.config.locale), shared.WhoQueryService.WhoQueriesToString(shared.WhoQueryService.queries or {}), function(self) Heimdall_Data.config.who.queries = self:GetText() @@ -777,11 +777,11 @@ function shared.Config.Init() configFrame:Add(messengerConfigFrame, 6, 3) local title = CreateFancyText("HeimdallMessengerConfigTitle", messengerConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.messenger, + shared._L("messenger", Heimdall_Data.config.locale), { r, g, b, a }) messengerConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallMessengerConfigDebugButton", - messengerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + messengerConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.messenger.debug = not Heimdall_Data.config.messenger.debug return Heimdall_Data.config.messenger.debug end) @@ -789,7 +789,7 @@ function shared.Config.Init() messengerConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallMessengerConfigEnableButton", - messengerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + messengerConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.messenger.enabled = not Heimdall_Data.config.messenger.enabled return Heimdall_Data.config.messenger.enabled end) @@ -797,7 +797,7 @@ function shared.Config.Init() messengerConfigFrame:Add(enableButton, 2, 3) local echoToRussian = CreateBasicButton("HeimdallMessengerConfigEchoToRussianButton", - messengerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.echoToRussian, function() + messengerConfigFrame.frame, shared._L("echoToRussian", Heimdall_Data.config.locale), function() Heimdall_Data.config.echoToRussian = not Heimdall_Data.config.echoToRussian return Heimdall_Data.config.echoToRussian end) @@ -805,7 +805,7 @@ function shared.Config.Init() messengerConfigFrame:Add(echoToRussian, 2, 3) local interval = CreateBasicSmallEditBox("HeimdallMessengerConfigInterval", - messengerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.interval, + messengerConfigFrame.frame, shared._L("interval", Heimdall_Data.config.locale), Heimdall_Data.config.messenger.interval, function(self) local text = self:GetText() @@ -829,11 +829,11 @@ function shared.Config.Init() configFrame:Add(deathReporterConfigFrame, 10, 3) local title = CreateFancyText("HeimdallDeathReporterConfigTitle", deathReporterConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.deathReporter, + shared._L("deathReporter", Heimdall_Data.config.locale), { r, g, b, a }) deathReporterConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallDeathReporterConfigDebugButton", - deathReporterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + deathReporterConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.deathReporter.debug = not Heimdall_Data.config.deathReporter.debug return Heimdall_Data.config.deathReporter.debug end) @@ -841,7 +841,7 @@ function shared.Config.Init() deathReporterConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallDeathReporterConfigEnableButton", - deathReporterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + deathReporterConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.deathReporter.enabled = not Heimdall_Data.config.deathReporter.enabled return Heimdall_Data.config.deathReporter.enabled end) @@ -849,7 +849,7 @@ function shared.Config.Init() deathReporterConfigFrame:Add(enableButton, 1, 6) local doWhisperButton = CreateBasicButton("HeimdallDeathReporterConfigDoWhisperButton", - deathReporterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.doWhisper, function() + deathReporterConfigFrame.frame, shared._L("doWhisper", Heimdall_Data.config.locale), function() Heimdall_Data.config.deathReporter.doWhisper = not Heimdall_Data.config.deathReporter.doWhisper return Heimdall_Data.config.deathReporter.doWhisper end) @@ -857,7 +857,7 @@ function shared.Config.Init() deathReporterConfigFrame:Add(doWhisperButton, 1, 6) local throttleTime = CreateBasicSmallEditBox("HeimdallDeathReporterConfigThrottleTime", - deathReporterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.throttle, + deathReporterConfigFrame.frame, shared._L("throttle", Heimdall_Data.config.locale), Heimdall_Data.config.deathReporter.throttle, function(self) local text = self:GetText() @@ -872,7 +872,7 @@ function shared.Config.Init() deathReporterConfigFrame:Add(throttleTime, 2, 6) local duelThrottle = CreateBasicSmallEditBox("HeimdallDeathReporterConfigDuelThrottle", - deathReporterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.duelThrottle, + deathReporterConfigFrame.frame, shared._L("duelThrottle", Heimdall_Data.config.locale), Heimdall_Data.config.deathReporter.duelThrottle, function(self) local text = self:GetText() @@ -887,7 +887,7 @@ function shared.Config.Init() deathReporterConfigFrame:Add(duelThrottle, 2, 6) local channels = CreateBasicSmallEditBox("HeimdallDeathReporterConfigChannels", - deathReporterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + deathReporterConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.deathReporter.channels or {}, ","), function(self) local text = self:GetText() @@ -898,7 +898,7 @@ function shared.Config.Init() deathReporterConfigFrame:Add(channels, 2, 6) local zoneOverride = CreateBasicSmallEditBox("HeimdallDeathReporterConfigZoneOverride", - deathReporterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.zoneOverride, + deathReporterConfigFrame.frame, shared._L("zoneOverride", Heimdall_Data.config.locale), Heimdall_Data.config.deathReporter.zoneOverride, function(self) local text = self:GetText() @@ -922,10 +922,10 @@ function shared.Config.Init() configFrame:Add(inviterConfigFrame, 13, 3) local title = CreateFancyText("HeimdallInviterConfigTitle", inviterConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.inviter, { r, g, b, a }) + shared._L("inviter", Heimdall_Data.config.locale), { r, g, b, a }) inviterConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallInviterConfigDebugButton", - inviterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + inviterConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.inviter.debug = not Heimdall_Data.config.inviter.debug return Heimdall_Data.config.inviter.debug end) @@ -933,7 +933,7 @@ function shared.Config.Init() inviterConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallInviterConfigEnableButton", - inviterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + inviterConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.inviter.enabled = not Heimdall_Data.config.inviter.enabled return Heimdall_Data.config.inviter.enabled end) @@ -941,7 +941,7 @@ function shared.Config.Init() inviterConfigFrame:Add(enableButton, 1, 3) local allAssistButton = CreateBasicButton("HeimdallInviterConfigAllAssistButton", - inviterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.allAssist, function() + inviterConfigFrame.frame, shared._L("allAssist", Heimdall_Data.config.locale), function() Heimdall_Data.config.inviter.allAssist = not Heimdall_Data.config.inviter.allAssist return Heimdall_Data.config.inviter.allAssist end) @@ -949,7 +949,7 @@ function shared.Config.Init() inviterConfigFrame:Add(allAssistButton, 1, 3) local agentsAssist = CreateBasicButton("HeimdallInviterConfigAgentsAssistButton", - inviterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.agentsAssist, function() + inviterConfigFrame.frame, shared._L("agentsAssist", Heimdall_Data.config.locale), function() Heimdall_Data.config.inviter.agentsAssist = not Heimdall_Data.config.inviter.agentsAssist return Heimdall_Data.config.inviter.agentsAssist end) @@ -957,7 +957,7 @@ function shared.Config.Init() inviterConfigFrame:Add(agentsAssist, 1, 3) local kickOffline = CreateBasicButton("HeimdallInviterConfigKickOfflineButton", - inviterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.kickOffline, function() + inviterConfigFrame.frame, shared._L("kickOffline", Heimdall_Data.config.locale), function() Heimdall_Data.config.inviter.kickOffline = not Heimdall_Data.config.inviter.kickOffline return Heimdall_Data.config.inviter.kickOffline end) @@ -965,7 +965,7 @@ function shared.Config.Init() inviterConfigFrame:Add(kickOffline, 1, 3) local throttle = CreateBasicSmallEditBox("HeimdallInviterConfigThrottle", - inviterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.throttle, + inviterConfigFrame.frame, shared._L("throttle", Heimdall_Data.config.locale), Heimdall_Data.config.inviter.throttle, function(self) local text = self:GetText() @@ -980,7 +980,7 @@ function shared.Config.Init() inviterConfigFrame:Add(throttle, 2, 6) local channels = CreateBasicSmallEditBox("HeimdallInviterConfigChannels", - inviterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + inviterConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.inviter.channels or {}, ","), function(self) local text = self:GetText() @@ -991,7 +991,7 @@ function shared.Config.Init() inviterConfigFrame:Add(channels, 2, 6) local keyword = CreateBasicSmallEditBox("HeimdallInviterConfigKeywords", - inviterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.keyword, + inviterConfigFrame.frame, shared._L("keyword", Heimdall_Data.config.locale), Heimdall_Data.config.inviter.keyword, function(self) local text = self:GetText() @@ -1006,7 +1006,7 @@ function shared.Config.Init() inviterConfigFrame:Add(keyword, 2, 6) local cleanupInterval = CreateBasicSmallEditBox("HeimdallInviterConfigCleanupInterval", - inviterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.cleanupInterval, + inviterConfigFrame.frame, shared._L("cleanupInterval", Heimdall_Data.config.locale), Heimdall_Data.config.inviter.cleanupInterval, function(self) local text = self:GetText() @@ -1021,7 +1021,7 @@ function shared.Config.Init() inviterConfigFrame:Add(cleanupInterval, 2, 6) local afkThreshold = CreateBasicSmallEditBox("HeimdallInviterConfigAfkThreshold", - inviterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.afkThreshold, + inviterConfigFrame.frame, shared._L("afkThreshold", Heimdall_Data.config.locale), Heimdall_Data.config.inviter.afkThreshold, function(self) local text = self:GetText() @@ -1042,10 +1042,10 @@ function shared.Config.Init() configFrame:Add(duelerConfigFrame, 4, 3) local title = CreateFancyText("HeimdallDuelerConfigTitle", duelerConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.dueler, { r, g, b, a }) + shared._L("dueler", Heimdall_Data.config.locale), { r, g, b, a }) duelerConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallDuelerConfigDebugButton", - duelerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + duelerConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.dueler.debug = not Heimdall_Data.config.dueler.debug return Heimdall_Data.config.dueler.debug end) @@ -1053,7 +1053,7 @@ function shared.Config.Init() duelerConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallInviterConfigEnableButton", - duelerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + duelerConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.dueler.enabled = not Heimdall_Data.config.dueler.enabled return Heimdall_Data.config.dueler.enabled end) @@ -1061,7 +1061,7 @@ function shared.Config.Init() duelerConfigFrame:Add(enableButton, 1, 6) local declineOther = CreateBasicButton("HeimdallDuelerConfigDeclineOtherButton", - duelerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.declineOther, function() + duelerConfigFrame.frame, shared._L("declineOther", Heimdall_Data.config.locale), function() Heimdall_Data.config.dueler.declineOther = not Heimdall_Data.config.dueler.declineOther return Heimdall_Data.config.dueler.declineOther end) @@ -1078,11 +1078,11 @@ function shared.Config.Init() configFrame:Add(agentTrackerConfigFrame, 5, 3) local title = CreateFancyText("HeimdallAgentTrackerConfigTitle", agentTrackerConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.agentTracker, + shared._L("agentTracker", Heimdall_Data.config.locale), { r, g, b, a }) agentTrackerConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallAgentTrackerConfigDebugButton", - agentTrackerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + agentTrackerConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.agentTracker.debug = not Heimdall_Data.config.agentTracker.debug return Heimdall_Data.config.agentTracker.debug end) @@ -1091,7 +1091,7 @@ function shared.Config.Init() local enableButton = CreateBasicButton("HeimdallAgentTrackerConfigEnableButton", - agentTrackerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + agentTrackerConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.agentTracker.enabled = not Heimdall_Data.config.agentTracker.enabled return Heimdall_Data.config.agentTracker.enabled end) @@ -1099,7 +1099,7 @@ function shared.Config.Init() agentTrackerConfigFrame:Add(enableButton, 2, 6) local channels = CreateBasicSmallEditBox("HeimdallAgentTrackerConfigChannels", - agentTrackerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + agentTrackerConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.agentTracker.channels or {}, ","), function(self) local text = self:GetText() @@ -1119,10 +1119,10 @@ function shared.Config.Init() configFrame:Add(stinkyTrackerConfigFrame, 5, 3) local title = CreateFancyText("HeimdallStinkyTrackerConfigTitle", stinkyTrackerConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.stinkyTracker, { r, g, b, a }) + shared._L("stinkyTracker", Heimdall_Data.config.locale), { r, g, b, a }) stinkyTrackerConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallStinkyTrackerConfigDebugButton", - stinkyTrackerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + stinkyTrackerConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.stinkyTracker.debug = not Heimdall_Data.config.stinkyTracker.debug return Heimdall_Data.config.stinkyTracker.debug end) @@ -1130,7 +1130,7 @@ function shared.Config.Init() stinkyTrackerConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallStinkyTrackerConfigEnableButton", - stinkyTrackerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + stinkyTrackerConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.stinkyTracker.enabled = not Heimdall_Data.config.stinkyTracker.enabled return Heimdall_Data.config.stinkyTracker.enabled end) @@ -1138,7 +1138,7 @@ function shared.Config.Init() stinkyTrackerConfigFrame:Add(enableButton, 2, 6) local channels = CreateBasicSmallEditBox("HeimdallStinkyTrackerConfigChannels", - stinkyTrackerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + stinkyTrackerConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.stinkyTracker.channels or {}, ","), function(self) local text = self:GetText() @@ -1158,11 +1158,11 @@ function shared.Config.Init() configFrame:Add(emoterConfigFrame, 7, 3) local title = CreateFancyText("HeimdallEmoterConfigTitle", emoterConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.emoter, + shared._L("emoter", Heimdall_Data.config.locale), { r, g, b, a }) emoterConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallEmoterConfigDebugButton", - emoterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + emoterConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.emoter.debug = not Heimdall_Data.config.emoter.debug return Heimdall_Data.config.emoter.debug end) @@ -1170,7 +1170,7 @@ function shared.Config.Init() emoterConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallEmoterConfigEnableButton", - emoterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + emoterConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.emoter.enabled = not Heimdall_Data.config.emoter.enabled return Heimdall_Data.config.emoter.enabled end) @@ -1178,7 +1178,7 @@ function shared.Config.Init() emoterConfigFrame:Add(enableButton, 1, 12) local channels = CreateBasicSmallEditBox("HeimdallEmoterConfigChannels", - emoterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + emoterConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.emoter.channels or {}, ","), function(self) local text = self:GetText() @@ -1189,7 +1189,7 @@ function shared.Config.Init() emoterConfigFrame:Add(channels, 2, 6) local prefix = CreateBasicSmallEditBox("HeimdallEmoterConfigPrefix", - emoterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.prefix, + emoterConfigFrame.frame, shared._L("prefix", Heimdall_Data.config.locale), Heimdall_Data.config.emoter.prefix, function(self) local text = self:GetText() @@ -1213,11 +1213,11 @@ function shared.Config.Init() configFrame:Add(echoerConfigFrame, 7, 3) local title = CreateFancyText("HeimdallEchoerConfigTitle", echoerConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.echoer, + shared._L("echoer", Heimdall_Data.config.locale), { r, g, b, a }) echoerConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallEchoerConfigDebugButton", - echoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + echoerConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.echoer.debug = not Heimdall_Data.config.echoer.debug return Heimdall_Data.config.echoer.debug end) @@ -1225,7 +1225,7 @@ function shared.Config.Init() echoerConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallEmoterConfigEnableButton", - echoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + echoerConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.echoer.enabled = not Heimdall_Data.config.echoer.enabled return Heimdall_Data.config.echoer.enabled end) @@ -1233,7 +1233,7 @@ function shared.Config.Init() echoerConfigFrame:Add(enableButton, 1, 12) local channels = CreateBasicSmallEditBox("HeimdallEmoterConfigChannels", - echoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + echoerConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.echoer.channels or {}, ","), function(self) local text = self:GetText() @@ -1244,7 +1244,7 @@ function shared.Config.Init() echoerConfigFrame:Add(channels, 2, 6) local prefix = CreateBasicSmallEditBox("HeimdallEmoterConfigPrefix", - echoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.prefix, + echoerConfigFrame.frame, shared._L("prefix", Heimdall_Data.config.locale), Heimdall_Data.config.echoer.prefix, function(self) local text = self:GetText() @@ -1268,11 +1268,11 @@ function shared.Config.Init() configFrame:Add(commanderConfigFrame, 10, 3) local title = CreateFancyText("HeimdallCommanderConfigTitle", commanderConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.commander, + shared._L("commander", Heimdall_Data.config.locale), { r, g, b, a }) commanderConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallCommanderConfigDebugButton", - commanderConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + commanderConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.commander.debug = not Heimdall_Data.config.commander.debug return Heimdall_Data.config.commander.debug end) @@ -1280,7 +1280,7 @@ function shared.Config.Init() commanderConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallCommanderConfigEnableButton", - commanderConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + commanderConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.commander.enabled = not Heimdall_Data.config.commander.enabled return Heimdall_Data.config.commander.enabled end) @@ -1288,7 +1288,7 @@ function shared.Config.Init() commanderConfigFrame:Add(enableButton, 1, 12) local channels = CreateBasicSmallEditBox("HeimdallCommanderConfigChannels", - commanderConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + commanderConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.commander.channels or {}, ","), function(self) local text = self:GetText() @@ -1299,7 +1299,7 @@ function shared.Config.Init() commanderConfigFrame:Add(channels, 2, 6) local commander = CreateBasicSmallEditBox("HeimdallCommanderConfigCommander", - commanderConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.commander, + commanderConfigFrame.frame, shared._L("commander", Heimdall_Data.config.locale), Heimdall_Data.config.commander.commander, function(self) local text = self:GetText() @@ -1314,7 +1314,7 @@ function shared.Config.Init() commanderConfigFrame:Add(commander, 2, 6) local commands = CreateBasicSmallEditBox("HeimdallCommanderConfigCommands", - commanderConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.commands, + commanderConfigFrame.frame, shared._L("commands", Heimdall_Data.config.locale), MapKeyToString(Heimdall_Data.config.commander.commands, ", "), function(self) local text = self:GetText() @@ -1332,11 +1332,11 @@ function shared.Config.Init() configFrame:Add(macroerConfigFrame, 6, 3) local title = CreateFancyText("HeimdallMacroerConfigTitle", macroerConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.macroer, + shared._L("macroer", Heimdall_Data.config.locale), { r, g, b, a }) macroerConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallMacroerConfigDebugButton", - macroerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + macroerConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.macroer.debug = not Heimdall_Data.config.macroer.debug return Heimdall_Data.config.macroer.debug end) @@ -1344,7 +1344,7 @@ function shared.Config.Init() macroerConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallCommanderConfigEnableButton", - macroerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + macroerConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.macroer.enabled = not Heimdall_Data.config.macroer.enabled return Heimdall_Data.config.macroer.enabled end) @@ -1352,7 +1352,7 @@ function shared.Config.Init() macroerConfigFrame:Add(enableButton, 1, 12) local priority = CreateBasicSmallEditBox("HeimdallMacroerConfigPriority", - macroerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.priority, + macroerConfigFrame.frame, shared._L("priority", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.macroer.priority, ", "), function(self) local text = self:GetText() @@ -1370,11 +1370,11 @@ function shared.Config.Init() configFrame:Add(combatAlerterConfigFrame, 5, 3) local title = CreateFancyText("HeimdallCombatAlerterConfigTitle", combatAlerterConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.combatAlerter, + shared._L("combatAlerter", Heimdall_Data.config.locale), { r, g, b, a }) combatAlerterConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallCombatAlerterConfigDebugButton", - combatAlerterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + combatAlerterConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.combatAlerter.debug = not Heimdall_Data.config.combatAlerter.debug return Heimdall_Data.config.combatAlerter.debug end) @@ -1382,7 +1382,7 @@ function shared.Config.Init() combatAlerterConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallCombatAlerterConfigEnableButton", - combatAlerterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + combatAlerterConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.combatAlerter.enabled = not Heimdall_Data.config.combatAlerter.enabled return Heimdall_Data.config.combatAlerter.enabled end) @@ -1390,7 +1390,7 @@ function shared.Config.Init() combatAlerterConfigFrame:Add(enableButton, 2, 6) local channels = CreateBasicSmallEditBox("HeimdallCombatAlerterConfigChannels", - combatAlerterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + combatAlerterConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.combatAlerter.channels or {}, ","), function(self) local text = self:GetText() @@ -1410,11 +1410,11 @@ function shared.Config.Init() configFrame:Add(snifferConfigFrame, 8, 3) local title = CreateFancyText("HeimdallSnifferConfigTitle", snifferConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.sniffer, + shared._L("sniffer", Heimdall_Data.config.locale), { r, g, b, a }) snifferConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallSnifferConfigDebugButton", - snifferConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + snifferConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.sniffer.debug = not Heimdall_Data.config.sniffer.debug return Heimdall_Data.config.sniffer.debug end) @@ -1422,7 +1422,7 @@ function shared.Config.Init() snifferConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallSnifferConfigEnableButton", - snifferConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + snifferConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.sniffer.enabled = not Heimdall_Data.config.sniffer.enabled return Heimdall_Data.config.sniffer.enabled end) @@ -1430,7 +1430,7 @@ function shared.Config.Init() snifferConfigFrame:Add(enableButton, 2, 3) local stinkyButton = CreateBasicButton("HeimdallSnifferConfigStinkyButton", - snifferConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.stinky, function() + snifferConfigFrame.frame, shared._L("stinky", Heimdall_Data.config.locale), function() Heimdall_Data.config.sniffer.stinky = not Heimdall_Data.config.sniffer.stinky return Heimdall_Data.config.sniffer.stinky end) @@ -1438,7 +1438,7 @@ function shared.Config.Init() snifferConfigFrame:Add(stinkyButton, 2, 3) local channels = CreateBasicSmallEditBox("HeimdallSnifferConfigChannels", - snifferConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + snifferConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.sniffer.channels or {}, ","), function(self) local text = self:GetText() @@ -1449,7 +1449,7 @@ function shared.Config.Init() snifferConfigFrame:Add(channels, 2, 6) local throttle = CreateBasicSmallEditBox("HeimdallSnifferConfigThrottle", - snifferConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.throttle, + snifferConfigFrame.frame, shared._L("throttle", Heimdall_Data.config.locale), Heimdall_Data.config.sniffer.throttle, function(self) local text = self:GetText() @@ -1464,7 +1464,7 @@ function shared.Config.Init() snifferConfigFrame:Add(throttle, 2, 6) local zoneOverride = CreateBasicSmallEditBox("HeimdallSnifferConfigZoneOverride", - snifferConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.zoneOverride, + snifferConfigFrame.frame, shared._L("zoneOverride", Heimdall_Data.config.locale), Heimdall_Data.config.sniffer.zoneOverride, function(self) local text = self:GetText() @@ -1488,12 +1488,12 @@ function shared.Config.Init() configFrame:Add(bonkDetectorConfigFrame, 7, 3) local title = CreateFancyText("HeimdallBonkDetectorConfigTitle", bonkDetectorConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.bonkDetector, + shared._L("bonkDetector", Heimdall_Data.config.locale), { r, g, b, a }) bonkDetectorConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallBonkDetectorConfigDebugButton", - bonkDetectorConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + bonkDetectorConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.bonkDetector.debug = not Heimdall_Data.config.bonkDetector.debug return Heimdall_Data.config.bonkDetector.debug end) @@ -1501,7 +1501,7 @@ function shared.Config.Init() bonkDetectorConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallBonkDetectorConfigEnableButton", - bonkDetectorConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + bonkDetectorConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.bonkDetector.enabled = not Heimdall_Data.config.bonkDetector.enabled return Heimdall_Data.config.bonkDetector.enabled end) @@ -1509,7 +1509,7 @@ function shared.Config.Init() bonkDetectorConfigFrame:Add(enableButton, 1, 12) local channels = CreateBasicSmallEditBox("HeimdallBonkDetectorConfigChannels", - bonkDetectorConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + bonkDetectorConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.bonkDetector.channels or {}, ","), function(self) local text = self:GetText() @@ -1520,7 +1520,7 @@ function shared.Config.Init() bonkDetectorConfigFrame:Add(channels, 2, 6) local throttle = CreateBasicSmallEditBox("HeimdallBonkDetectorConfigThrottle", - bonkDetectorConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.throttle, + bonkDetectorConfigFrame.frame, shared._L("throttle", Heimdall_Data.config.locale), Heimdall_Data.config.bonkDetector.throttle, function(self) local text = self:GetText() @@ -1544,11 +1544,11 @@ function shared.Config.Init() configFrame:Add(minimapTaggerConfigFrame, 18, 6) local title = CreateFancyText("HeimdallMinimapTaggerConfigTitle", minimapTaggerConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.minimapTagger, + shared._L("minimapTagger", Heimdall_Data.config.locale), { r, g, b, a }) minimapTaggerConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallMinimapTaggerConfigDebugButton", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + minimapTaggerConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.minimapTagger.debug = not Heimdall_Data.config.minimapTagger.debug return Heimdall_Data.config.minimapTagger.debug end) @@ -1556,7 +1556,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallMinimapTaggerConfigEnableButton", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + minimapTaggerConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.minimapTagger.enabled = not Heimdall_Data.config.minimapTagger.enabled return Heimdall_Data.config.minimapTagger.enabled end) @@ -1564,7 +1564,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(enableButton, 2, 6) local channels = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigChannels", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + minimapTaggerConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.minimapTagger.channels or {}, ","), function(self) local text = self:GetText() @@ -1575,7 +1575,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(channels, 2, 3) local scale = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigScale", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.scale, + minimapTaggerConfigFrame.frame, shared._L("scale", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.scale, function(self) local text = self:GetText() @@ -1588,7 +1588,7 @@ function shared.Config.Init() --region Tag local tagSound = CreateBasicButton("HeimdallMinimapTaggerConfigTagSound", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.tagSound, function() + minimapTaggerConfigFrame.frame, shared._L("tagSound", Heimdall_Data.config.locale), function() Heimdall_Data.config.minimapTagger.tagSound = not Heimdall_Data.config.minimapTagger.tagSound return Heimdall_Data.config.minimapTagger.tagSound end) @@ -1596,7 +1596,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(tagSound, 2, 1) local tagTTL = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigTagTTL", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.ttl, + minimapTaggerConfigFrame.frame, shared._L("ttl", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.tagTTL, function(self) local text = self:GetText() @@ -1611,7 +1611,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(tagTTL, 2, 1) local tagSoundThrottle = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigTagSoundThrottle", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.soundThrottle, + minimapTaggerConfigFrame.frame, shared._L("soundThrottle", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.tagSoundThrottle, function(self) local text = self:GetText() @@ -1626,7 +1626,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(tagSoundThrottle, 2, 2) local tagSoundFile = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigTagSoundFile", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.soundFile, + minimapTaggerConfigFrame.frame, shared._L("soundFile", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.tagSoundFile, function(self) local text = self:GetText() @@ -1641,7 +1641,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(tagSoundFile, 2, 4) local tagTexture = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigTagTexture", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.textureFile, + minimapTaggerConfigFrame.frame, shared._L("textureFile", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.tagTextureFile, function(self) local text = self:GetText() @@ -1654,7 +1654,7 @@ function shared.Config.Init() --endregion --region Alert local alertSound = CreateBasicButton("HeimdallMinimapTaggerConfigAlertSound", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.alertSound, function() + minimapTaggerConfigFrame.frame, shared._L("alertSound", Heimdall_Data.config.locale), function() Heimdall_Data.config.minimapTagger.alertSound = not Heimdall_Data.config.minimapTagger.alertSound return Heimdall_Data.config.minimapTagger.alertSound end) @@ -1662,7 +1662,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(alertSound, 2, 1) local alertTTL = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigAlertTTL", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.ttl, + minimapTaggerConfigFrame.frame, shared._L("ttl", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.alertTTL, function(self) local text = self:GetText() @@ -1674,7 +1674,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(alertTTL, 2, 1) local alertSoundThrottle = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigAlertSoundThrottle", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.soundThrottle, + minimapTaggerConfigFrame.frame, shared._L("soundThrottle", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.alertSoundThrottle, function(self) local text = self:GetText() @@ -1686,7 +1686,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(alertSoundThrottle, 2, 2) local alertSoundFile = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigAlertSoundFile", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.soundFile, + minimapTaggerConfigFrame.frame, shared._L("soundFile", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.alertSoundFile, function(self) local text = self:GetText() @@ -1698,7 +1698,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(alertSoundFile, 2, 4) local alertTexture = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigAlertTexture", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.textureFile, + minimapTaggerConfigFrame.frame, shared._L("textureFile", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.alertTextureFile, function(self) local text = self:GetText() @@ -1711,7 +1711,7 @@ function shared.Config.Init() --endregion --region Combat local combatSound = CreateBasicButton("HeimdallMinimapTaggerConfigCombatSound", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.combatSound, function() + minimapTaggerConfigFrame.frame, shared._L("combatSound", Heimdall_Data.config.locale), function() Heimdall_Data.config.minimapTagger.combatSound = not Heimdall_Data.config.minimapTagger.combatSound return Heimdall_Data.config.minimapTagger.combatSound end) @@ -1719,7 +1719,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(combatSound, 2, 1) local combatTTL = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigCombatTTL", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.ttl, + minimapTaggerConfigFrame.frame, shared._L("ttl", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.combatTTL, function(self) local text = self:GetText() @@ -1731,7 +1731,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(combatTTL, 2, 1) local combatSoundThrottle = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigCombatSoundThrottle", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.soundThrottle, + minimapTaggerConfigFrame.frame, shared._L("soundThrottle", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.combatSoundThrottle, function(self) local text = self:GetText() @@ -1744,7 +1744,7 @@ function shared.Config.Init() local combatSoundFile = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigCombatSoundFile", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.soundFile, + minimapTaggerConfigFrame.frame, shared._L("soundFile", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.combatSoundFile, function(self) local text = self:GetText() @@ -1755,7 +1755,7 @@ function shared.Config.Init() end) minimapTaggerConfigFrame:Add(combatSoundFile, 2, 4) local combatTexture = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigCombatTexture", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.textureFile, + minimapTaggerConfigFrame.frame, shared._L("textureFile", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.combatTextureFile, function(self) local text = self:GetText() @@ -1768,7 +1768,7 @@ function shared.Config.Init() --endregion --region Help local helpSound = CreateBasicButton("HeimdallMinimapTaggerConfigHelpSound", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.helpSound, function() + minimapTaggerConfigFrame.frame, shared._L("helpSound", Heimdall_Data.config.locale), function() Heimdall_Data.config.minimapTagger.helpSound = not Heimdall_Data.config.minimapTagger.helpSound return Heimdall_Data.config.minimapTagger.helpSound end) @@ -1776,7 +1776,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(helpSound, 2, 1) local helpTTL = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigHelpTTL", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.ttl, + minimapTaggerConfigFrame.frame, shared._L("ttl", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.helpTTL, function(self) local text = self:GetText() @@ -1788,7 +1788,7 @@ function shared.Config.Init() minimapTaggerConfigFrame:Add(helpTTL, 2, 1) local helpSoundThrottle = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigHelpSoundThrottle", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.soundThrottle, + minimapTaggerConfigFrame.frame, shared._L("soundThrottle", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.helpSoundThrottle, function(self) local text = self:GetText() @@ -1801,7 +1801,7 @@ function shared.Config.Init() local helpSoundFile = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigHelpSoundFile", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.soundFile, + minimapTaggerConfigFrame.frame, shared._L("soundFile", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.helpSoundFile, function(self) local text = self:GetText() @@ -1812,7 +1812,7 @@ function shared.Config.Init() end) minimapTaggerConfigFrame:Add(helpSoundFile, 2, 4) local helpTexture = CreateBasicSmallEditBox("HeimdallMinimapTaggerConfigHelpTexture", - minimapTaggerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.textureFile, + minimapTaggerConfigFrame.frame, shared._L("textureFile", Heimdall_Data.config.locale), Heimdall_Data.config.minimapTagger.helpTextureFile, function(self) local text = self:GetText() @@ -1834,12 +1834,12 @@ function shared.Config.Init() configFrame:Add(noterConfigFrame, 7, 3) local title = CreateFancyText("HeimdallNoterConfigTitle", noterConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.noter, + shared._L("noter", Heimdall_Data.config.locale), { r, g, b, a }) noterConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallNoterConfigDebugButton", - noterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + noterConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.noter.debug = not Heimdall_Data.config.noter.debug return Heimdall_Data.config.noter.debug end) @@ -1847,7 +1847,7 @@ function shared.Config.Init() noterConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallNoterConfigEnableButton", - noterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + noterConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.noter.enabled = not Heimdall_Data.config.noter.enabled return Heimdall_Data.config.noter.enabled end) @@ -1855,7 +1855,7 @@ function shared.Config.Init() noterConfigFrame:Add(enableButton, 1, 12) local channels = CreateBasicSmallEditBox("HeimdallNoterConfigChannels", - noterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channels, + noterConfigFrame.frame, shared._L("channels", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.noter.channels or {}, ","), function(self) local text = self:GetText() @@ -1866,7 +1866,7 @@ function shared.Config.Init() noterConfigFrame:Add(channels, 2, 6) local lastNotes = CreateBasicSmallEditBox("HeimdallNoterConfigLastNotes", - noterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.lastNotes, + noterConfigFrame.frame, shared._L("lastNotes", Heimdall_Data.config.locale), tostring(Heimdall_Data.config.noter.lastNotes), function(self) local text = self:GetText() @@ -1891,12 +1891,12 @@ function shared.Config.Init() configFrame:Add(networkConfigFrame, 11, 3) local title = CreateFancyText("HeimdallNetworkConfigTitle", networkConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.network, + shared._L("network", Heimdall_Data.config.locale), { r, g, b, a }) networkConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallNetworkConfigDebugButton", - networkConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + networkConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.network.debug = not Heimdall_Data.config.network.debug return Heimdall_Data.config.network.debug end) @@ -1904,7 +1904,7 @@ function shared.Config.Init() networkConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallNetworkConfigEnableButton", - networkConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + networkConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.network.enabled = not Heimdall_Data.config.network.enabled return Heimdall_Data.config.network.enabled end) @@ -1912,7 +1912,7 @@ function shared.Config.Init() networkConfigFrame:Add(enableButton, 1, 12) local members = CreateBasicBigEditBox("HeimdallNetworkConfigMembers", - networkConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.members, + networkConfigFrame.frame, shared._L("members", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.network.members, ","), function(self) local text = self:GetText() @@ -1923,7 +1923,7 @@ function shared.Config.Init() networkConfigFrame:Add(members, 5, 6) local updateInterval = CreateBasicSmallEditBox("HeimdallNetworkConfigUpdateInterval", - networkConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.updateInterval, + networkConfigFrame.frame, shared._L("updateInterval", Heimdall_Data.config.locale), tostring(Heimdall_Data.config.network.updateInterval), function(self) local text = self:GetText() @@ -1947,12 +1947,12 @@ function shared.Config.Init() configFrame:Add(networkMessengerConfigFrame, 5, 3) local title = CreateFancyText("HeimdallNetworkMessengerConfigTitle", networkMessengerConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.networkMessenger, + shared._L("networkMessenger", Heimdall_Data.config.locale), { r, g, b, a }) networkMessengerConfigFrame:Add(title, 1, 8) local debugButton = CreateBasicButton("HeimdallNetworkMessengerConfigDebugButton", - networkMessengerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function() + networkMessengerConfigFrame.frame, shared._L("debug", Heimdall_Data.config.locale), function() Heimdall_Data.config.networkMessenger.debug = not Heimdall_Data.config.networkMessenger.debug return Heimdall_Data.config.networkMessenger.debug end) @@ -1960,7 +1960,7 @@ function shared.Config.Init() networkMessengerConfigFrame:Add(debugButton, 1, 4) local enableButton = CreateBasicButton("HeimdallNetworkMessengerConfigEnableButton", - networkMessengerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function() + networkMessengerConfigFrame.frame, shared._L("enabled", Heimdall_Data.config.locale), function() Heimdall_Data.config.networkMessenger.enabled = not Heimdall_Data.config.networkMessenger.enabled return Heimdall_Data.config.networkMessenger.enabled end) @@ -1968,7 +1968,7 @@ function shared.Config.Init() networkMessengerConfigFrame:Add(enableButton, 2, 6) local interval = CreateBasicSmallEditBox("HeimdallNetworkMessengerConfigInterval", - networkMessengerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.interval, + networkMessengerConfigFrame.frame, shared._L("interval", Heimdall_Data.config.locale), tostring(Heimdall_Data.config.networkMessenger.interval), function(self) local text = self:GetText() @@ -1992,12 +1992,12 @@ function shared.Config.Init() configFrame:Add(addonPrefixConfigFrame, 5, 1) local title = CreateFancyText("HeimdallAddonPrefixConfigTitle", addonPrefixConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.addonPrefix, + shared._L("addonPrefix", Heimdall_Data.config.locale), { r, g, b, a }) addonPrefixConfigFrame:Add(title, 1, 12) local addonPrefix = CreateBasicSmallEditBox("HeimdallAddonPrefixConfigAddonPrefix", - addonPrefixConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.addonPrefix, + addonPrefixConfigFrame.frame, shared._L("addonPrefix", Heimdall_Data.config.locale), Heimdall_Data.config.addonPrefix, function(self) local text = self:GetText() @@ -2015,12 +2015,12 @@ function shared.Config.Init() configFrame:Add(whisperNotifyConfigFrame, 14, 1) local title = CreateFancyText("HeimdallWhisperNotifyConfigTitle", whisperNotifyConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.whisperNotify, + shared._L("whisperNotify", Heimdall_Data.config.locale), { r, g, b, a }) whisperNotifyConfigFrame:Add(title, 1, 12) local whisperNotify = CreateBasicBigEditBox("HeimdallWhisperNotifyConfigWhisperNotify", - whisperNotifyConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.whisperNotify, + whisperNotifyConfigFrame.frame, shared._L("whisperNotify", Heimdall_Data.config.locale), table.concat(Heimdall_Data.config.whisperNotify, "\n"), function(self) local text = self:GetText() @@ -2040,12 +2040,12 @@ function shared.Config.Init() -- I don't know, at this point I can't be fucked to fix it, the display is minimally functional local title = CreateFancyText("HeimdallStinkiesConfigTitle", stinkiesConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.stinkies, + shared._L("stinkies", Heimdall_Data.config.locale), { r, g, b, a }) stinkiesConfigFrame:Add(title, 1, 12) local stinkies = CreateBasicBigEditBox("HeimdallStinkiesConfigStinkies", - stinkiesConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.stinkies, + stinkiesConfigFrame.frame, shared._L("stinkies", Heimdall_Data.config.locale), MapKeyToString(Heimdall_Data.config.stinkies, ","), function(self) local text = self:GetText() @@ -2063,12 +2063,12 @@ function shared.Config.Init() configFrame:Add(channelLocaleConfigFrame, 14, 1) local title = CreateFancyText("HeimdallChannelLocaleConfigTitle", channelLocaleConfigFrame.frame, - shared.L[Heimdall_Data.config.locale].config.channelLocale, + shared._L("channelLocale", Heimdall_Data.config.locale), { r, g, b, a }) channelLocaleConfigFrame:Add(title, 1, 12) local channelLocale = CreateBasicBigEditBox("HeimdallChannelLocaleConfigChannelLocale", - channelLocaleConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.channelLocale, + channelLocaleConfigFrame.frame, shared._L("channelLocale", Heimdall_Data.config.locale), MapToString(Heimdall_Data.config.channelLocale, ":", "\n"), function(self) local text = self:GetText() diff --git a/_L.lua b/_L.lua index 2e24cb9..c1f7999 100644 --- a/_L.lua +++ b/_L.lua @@ -5,23 +5,23 @@ local _, shared = ... ---@field ru table ---@type Localization -shared.L = { +shared._Locale = { en = { bonkDetected = "%s hit %s (%s)", combatAlerterInCombat = "I am in combat with %s at %s (%s) at [%s](%2.2f, %2.2f)", snifferStinky = "I smell a stinky %s", - spotterSpotted = "I see (%s) %s/%s %s of race %s (%s) with pvp %s and health %s/%s at %s [%s](%2.2f, %2.2f)", + spotterSpotted = "I see (%s) %s/%s %s of race %s (%s) with pvp %s and health %s/%s at %s (%s) [%s](%2.2f, %2.2f)", + english = "English", + russian = "Russian", whoerNew = "%s %s c:%s r:%s (%s) g:%s - %s", whoerMoved = "%s c:%s (%s - %s) g:%s moved to %s", whoerGone = "%s c:%s g:%s left %s", killed = "%s killed %s with %s in %s at [%s](%2.2f, %2.2f)", - tidbits = { - hostile = "hostile", - friendly = "friendly", - unknown = "unknown", - pvpOn = "ON", - pvpOff = "OFF", - }, + hostile = "hostile", + friendly = "friendly", + unknown = "unknown", + pvpOn = "ON", + pvpOff = "OFF", config = { afkThreshold = "Afk Threshold", agentTracker = "Agent Tracker", @@ -101,15 +101,13 @@ shared.L = { whoerMoved = "%s класса %s (%s - %s) и гильдии %s переместился в %s", whoerGone = "%s класса %s и гильдии %s покинул %s", killed = "%s убил %s с %s в %s на [%s](%2.2f, %2.2f)", - -- A lot of this shit I get straight from the API in english (my locale) - -- So there is no need to translate it from english to english - tidbits = { - hostile = "враждебный", - friendly = "дружественный", - unknown = "неизвестный", - pvpOn = "вкл", - pvpOff = "выкл", - }, + hostile = "враждебный", + friendly = "дружественный", + unknown = "неизвестный", + english = "Английский", + russian = "Русский", + pvpOn = "вкл", + pvpOff = "выкл", config = { alertSound = "Звук Оповещения", tagSound = "Звук Тега", @@ -178,55 +176,47 @@ shared.L = { networkMessenger = "Сетевой Мессенджер", queries = "Запросы Who", }, - zones = { - ["Orgrimmar"] = "Оргриммар", - ["Valley of Strength"] = "Долина Силы", - ["Valley of Trials"] = "Долина Испытаний", - ["Durotar"] = "Дуротар", - ["Echo Isles"] = "Острова Эхо", - }, - classes = { - ["Hunter"] = "Охотник", - ["Warrior"] = "Воин", - ["Mage"] = "Маг", - ["Priest"] = "Жрец", - ["Paladin"] = "Паладин", - ["Shaman"] = "Шаман", - ["Rogue"] = "Разбойник", - ["Warlock"] = "Чернокнижник", - ["Druid"] = "Друид", - ["Death Knight"] = "Рыцарь Смерти", - ["Monk"] = "Монах", - ["Demon Hunter"] = "Демон Хламер", - ["Evoker"] = "Эвокер", - }, - races = { - ["Human"] = "Человек", - ["Orc"] = "Орк", - ["Dwarf"] = "Дворф", - ["Night Elf"] = "Ночной Эльф", - ["Tauren"] = "Таурен", - ["Gnome"] = "Гном", - ["Troll"] = "Тролль", - ["Goblin"] = "Гоблин", - ["Blood Elf"] = "Кровавый Эльф", - ["Draenei"] = "Дреней", - ["Worgen"] = "Ворген", - ["Pandaren"] = "Пандарен", - ["Zandalari"] = "Зандалари", - ["Mechagnome"] = "Механом", - ["Vulpera"] = "Вульперы", - ["Undead"] = "Нежить", - }, - factions = { - ["Alliance"] = "Альянс", - ["Horde"] = "Орда", - }, + ["Orgrimmar"] = "Оргриммар", + ["Valley of Strength"] = "Долина Силы", + ["Valley of Trials"] = "Долина Испытаний", + ["Durotar"] = "Дуротар", + ["Echo Isles"] = "Острова Эхо", + ["Hunter"] = "Охотник", + ["Warrior"] = "Воин", + ["Mage"] = "Маг", + ["Priest"] = "Жрец", + ["Paladin"] = "Паладин", + ["Shaman"] = "Шаман", + ["Rogue"] = "Разбойник", + ["Warlock"] = "Чернокнижник", + ["Druid"] = "Друид", + ["Death Knight"] = "Рыцарь Смерти", + ["Monk"] = "Монах", + ["Demon Hunter"] = "Демон Хламер", + ["Evoker"] = "Эвокер", + ["Human"] = "Человек", + ["Orc"] = "Орк", + ["Dwarf"] = "Дворф", + ["Night Elf"] = "Ночной Эльф", + ["Tauren"] = "Таурен", + ["Gnome"] = "Гном", + ["Troll"] = "Тролль", + ["Goblin"] = "Гоблин", + ["Blood Elf"] = "Кровавый Эльф", + ["Draenei"] = "Дреней", + ["Worgen"] = "Ворген", + ["Pandaren"] = "Пандарен", + ["Zandalari"] = "Зандалари", + ["Mechagnome"] = "Механом", + ["Vulpera"] = "Вульперы", + ["Undead"] = "Нежить", + ["Alliance"] = "Альянс", + ["Horde"] = "Орда", }, } -for key, value in pairs(shared.L.en.config) do - local rus = shared.L.ru.config[key] +for key, value in pairs(shared._Locale.en.config) do + local rus = shared._Locale.ru.config[key] if not rus then print(key, value) end