From 5eeb0e93eee5ee6c97357575b662fa225d201c00 Mon Sep 17 00:00:00 2001 From: Crum Date: Sun, 15 Jul 2018 19:50:53 -0500 Subject: [PATCH] big cleanup and locales --- ElvUI/Core/install.lua | 12 +- ElvUI/Locales/Chinese_UI.lua | 1 - ElvUI/Locales/English_UI.lua | 1 - ElvUI/Locales/French_UI.lua | 1 - ElvUI/Locales/German_UI.lua | 1 - ElvUI/Locales/Korean_UI.lua | 1 - ElvUI/Locales/Portuguese_UI.lua | 1 - ElvUI/Locales/Russian_UI.lua | 1 - ElvUI/Locales/Spanish_UI.lua | 1 - ElvUI/Locales/Taiwanese_UI.lua | 1 - ElvUI/Settings/Profile.lua | 6 - ElvUI_Config/ActionBars.lua | 13 +- ElvUI_Config/Auras.lua | 50 +++-- ElvUI_Config/Bags.lua | 125 +++++------ ElvUI_Config/Chat.lua | 132 ++++++------ ElvUI_Config/DataTexts.lua | 33 +-- ElvUI_Config/General.lua | 12 +- ElvUI_Config/Locales/Chinese_Config.lua | 10 +- ElvUI_Config/Locales/English_Config.lua | 10 +- ElvUI_Config/Locales/French_Config.lua | 10 +- ElvUI_Config/Locales/German_Config.lua | 10 +- ElvUI_Config/Locales/Korean_Config.lua | 10 +- ElvUI_Config/Locales/Portuguese_Config.lua | 10 +- ElvUI_Config/Locales/Russian_Config.lua | 10 +- ElvUI_Config/Locales/Spanish_Config.lua | 10 +- ElvUI_Config/Locales/Taiwanese_Config.lua | 10 +- ElvUI_Config/Maps.lua | 60 ++---- ElvUI_Config/Nameplates.lua | 236 +++++++++++---------- ElvUI_Config/Tooltip.lua | 15 +- ElvUI_Config/UnitFrames.lua | 111 +++++----- 30 files changed, 423 insertions(+), 481 deletions(-) diff --git a/ElvUI/Core/install.lua b/ElvUI/Core/install.lua index 64f0ecd..a647a97 100644 --- a/ElvUI/Core/install.lua +++ b/ElvUI/Core/install.lua @@ -22,13 +22,15 @@ local FCF_DockFrame, FCF_UnDockFrame = FCF_DockFrame, FCF_UnDockFrame local FCF_OpenNewWindow = FCF_OpenNewWindow local FCF_SetWindowName = FCF_SetWindowName local FCF_SetChatWindowFontSize = FCF_SetChatWindowFontSize -local CLASS, CONTINUE, PREV = CLASS, CONTINUE, PREV -local NUM_CHAT_WINDOWS = NUM_CHAT_WINDOWS -local LOOT, GENERAL, TRADE = LOOT, GENERAL, TRADE -local GUILD_EVENT_LOG = GUILD_EVENT_LOG + local RAID_CLASS_COLORS = RAID_CLASS_COLORS local CUSTOM_CLASS_COLORS = CUSTOM_CLASS_COLORS +local CHAT_LABEL, CLASS, CONTINUE, PREV = CHAT_LABEL, CLASS, CONTINUE, PREV +local GUILD_EVENT_LOG = GUILD_EVENT_LOG +local LOOT, GENERAL, TRADE = LOOT, GENERAL, TRADE +local NUM_CHAT_WINDOWS = NUM_CHAT_WINDOWS + local CURRENT_PAGE = 0 local MAX_PAGE = 8 @@ -748,7 +750,7 @@ local function SetPage(PageNum) InstallOption1Button:SetScript("OnClick", SetupCVars) InstallOption1Button:SetText(L["Setup CVars"]) elseif PageNum == 3 then - f.SubTitle:SetText(L["Chat"]) + f.SubTitle:SetText(CHAT_LABEL) f.Desc1:SetText(L["This part of the installation process sets up your chat windows names, positions and colors."]) f.Desc2:SetText(L["The chat windows function the same as Blizzard standard chat windows, you can right click the tabs and drag them around, rename, etc. Please click the button below to setup your chat windows."]) f.Desc3:SetText(L["Importance: |cffD3CF00Medium|r"]) diff --git a/ElvUI/Locales/Chinese_UI.lua b/ElvUI/Locales/Chinese_UI.lua index 078b71e..85200cf 100644 --- a/ElvUI/Locales/Chinese_UI.lua +++ b/ElvUI/Locales/Chinese_UI.lua @@ -123,7 +123,6 @@ L["Auras Set"] = "光环样式设置" L["Auras"] = "光环" L["Caster DPS"] = "法系输出" L["Chat Set"] = "对话设定" -L["Chat"] = "聊天框" L["Choose a theme layout you wish to use for your initial setup."] = "为你的个人设置选择一个你喜欢的皮肤主题." L["Classic"] = "经典" L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."] = "点击下面的按钮调整聊天框、单位框架的尺寸, 以及移动动作条位置" diff --git a/ElvUI/Locales/English_UI.lua b/ElvUI/Locales/English_UI.lua index ffac9fa..27d1642 100644 --- a/ElvUI/Locales/English_UI.lua +++ b/ElvUI/Locales/English_UI.lua @@ -123,7 +123,6 @@ L["Auras Set"] = true; L["Auras"] = true; L["Caster DPS"] = true; L["Chat Set"] = true; -L["Chat"] = true; L["Choose a theme layout you wish to use for your initial setup."] = true; L["Classic"] = true; L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."] = true; diff --git a/ElvUI/Locales/French_UI.lua b/ElvUI/Locales/French_UI.lua index f9dcfa9..00105eb 100644 --- a/ElvUI/Locales/French_UI.lua +++ b/ElvUI/Locales/French_UI.lua @@ -123,7 +123,6 @@ L["Auras Set"] = "Configuration des Auras" L["Auras"] = "Auras" L["Caster DPS"] = "DPS Distance" L["Chat Set"] = "Chat configuré" -L["Chat"] = "Discussion" L["Choose a theme layout you wish to use for your initial setup."] = "Choisissez un modèle de thème que vous souhaitez utiliser pour votre configuration initiale." L["Classic"] = "Classique" L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."] = "Cliquez sur le bouton ci-dessous pour redimensionner vos fenêtres de chat, vos cadres d'unités et repositionner vos barres d'actions." diff --git a/ElvUI/Locales/German_UI.lua b/ElvUI/Locales/German_UI.lua index 1c3deb5..cb7ed63 100644 --- a/ElvUI/Locales/German_UI.lua +++ b/ElvUI/Locales/German_UI.lua @@ -123,7 +123,6 @@ L["Auras Set"] = "Auren gesetzt" L["Auras"] = "Auren" L["Caster DPS"] = "Fernkampf DD" L["Chat Set"] = "Chat gesetzt" -L["Chat"] = "Chat" L["Choose a theme layout you wish to use for your initial setup."] = "Wähle ein Layout, welches du bei deinem ersten Setup verwenden möchtest." L["Classic"] = "Klassisch" L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."] = "Klicke auf die Taste unten um die Größe deiner Chatfenster, Einheitenfenster und die Umpositionierung deiner Aktionsleisten durchzuführen." diff --git a/ElvUI/Locales/Korean_UI.lua b/ElvUI/Locales/Korean_UI.lua index d569b65..336c174 100644 --- a/ElvUI/Locales/Korean_UI.lua +++ b/ElvUI/Locales/Korean_UI.lua @@ -123,7 +123,6 @@ L["Auras Set"] = "오라설정 적용" L["Auras"] = "오라 설정" L["Caster DPS"] = "원거리 딜러" L["Chat Set"] = "대화창 설정" -L["Chat"] = "대화창" L["Choose a theme layout you wish to use for your initial setup."] = "UI의 전체적인 분위기를 선택하세요." L["Classic"] = "클래식" L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."] = "원하는 해상도로 설정을 강제 적용하고자 한다면 아래에서 원하는 해상도를 선택하세요." diff --git a/ElvUI/Locales/Portuguese_UI.lua b/ElvUI/Locales/Portuguese_UI.lua index c6ea094..042ad3c 100644 --- a/ElvUI/Locales/Portuguese_UI.lua +++ b/ElvUI/Locales/Portuguese_UI.lua @@ -123,7 +123,6 @@ L["Auras Set"] = "Auras configuradas" L["Auras"] = true; L["Caster DPS"] = "DPS Lançador" L["Chat Set"] = "Bate-Papo configurado" -L["Chat"] = "Bate-papo" L["Choose a theme layout you wish to use for your initial setup."] = "Escolha o tema de layout que deseje usar inicialmente." L["Classic"] = "Clássico" L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."] = "Clique no botão abaixo para redimensionar os seus quadros de bate-papo, quadros de unidades, e reposicionar as suas barras de ações." diff --git a/ElvUI/Locales/Russian_UI.lua b/ElvUI/Locales/Russian_UI.lua index 0e37664..7182766 100644 --- a/ElvUI/Locales/Russian_UI.lua +++ b/ElvUI/Locales/Russian_UI.lua @@ -123,7 +123,6 @@ L["Auras Set"] = "Ауры установлены" L["Auras"] = "Ауры" L["Caster DPS"] = "Заклинатель" L["Chat Set"] = "Чат настроен" -L["Chat"] = "Чат" L["Choose a theme layout you wish to use for your initial setup."] = "Выберите тему, которую Вы хотите использовать." L["Classic"] = "Классическая" L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."] = "Нажмите кнопку ниже для изменения размеров вашего чата, рамок юнитов и перемещения ваших панелей действий." diff --git a/ElvUI/Locales/Spanish_UI.lua b/ElvUI/Locales/Spanish_UI.lua index 3117387..98fe273 100644 --- a/ElvUI/Locales/Spanish_UI.lua +++ b/ElvUI/Locales/Spanish_UI.lua @@ -123,7 +123,6 @@ L["Auras Set"] = "Auras Configuradas" L["Auras"] = true; L["Caster DPS"] = "DPS Hechizos" L["Chat Set"] = "Chat Configurado" -L["Chat"] = "Chat" L["Choose a theme layout you wish to use for your initial setup."] = "Elige un tema de distribución para usar en tu configuración inicial." L["Classic"] = "Clásico" L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."] = "Haz clic en el botón de abajo para cambiar el tamaño de los marcos de chat y de unidad, y reubicar tus barras de acción." diff --git a/ElvUI/Locales/Taiwanese_UI.lua b/ElvUI/Locales/Taiwanese_UI.lua index d835616..458183b 100644 --- a/ElvUI/Locales/Taiwanese_UI.lua +++ b/ElvUI/Locales/Taiwanese_UI.lua @@ -123,7 +123,6 @@ L["Auras Set"] = "光環樣式設定" L["Auras"] = "光環" L["Caster DPS"] = "法系輸出" L["Chat Set"] = "對話设置" -L["Chat"] = "對話" L["Choose a theme layout you wish to use for your initial setup."] = "為你的個人設定選擇一個你喜歡的皮膚主題." L["Classic"] = "經典" L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."] = "點選下面的按鈕調整對話框、單位框架的尺寸, 以及移動快捷列位置." diff --git a/ElvUI/Settings/Profile.lua b/ElvUI/Settings/Profile.lua index 8378a8e..71a0851 100644 --- a/ElvUI/Settings/Profile.lua +++ b/ElvUI/Settings/Profile.lua @@ -54,12 +54,6 @@ P["general"] = { ["xOffset"] = 3, ["yOffset"] = 4, }, - ["lfgEye"] = { - ["scale"] = 1, - ["position"] = "BOTTOMRIGHT", - ["xOffset"] = 3, - ["yOffset"] = 0, - }, ["battlefield"] = { ["scale"] = 1, ["position"] = "BOTTOMRIGHT", diff --git a/ElvUI_Config/ActionBars.lua b/ElvUI_Config/ActionBars.lua index 9c6e805..90366c0 100644 --- a/ElvUI_Config/ActionBars.lua +++ b/ElvUI_Config/ActionBars.lua @@ -1,6 +1,6 @@ local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local AB = E:GetModule("ActionBars"); -local group +local ACD = LibStub("AceConfigDialog-3.0"); --Cache global variables --Lua functions @@ -9,8 +9,8 @@ local getn = table.getn --WoW API / Variables local SetCVar = SetCVar local GameTooltip = _G["GameTooltip"] -local NONE, COLOR = NONE, COLOR -local LOCK_ACTIONBAR_TEXT = LOCK_ACTIONBAR_TEXT + +local ACTIONBAR_LABEL, COLOR, GENERAL, LOCK_ACTIONBAR_TEXT, NONE = ACTIONBAR_LABEL, COLOR, GENERAL, LOCK_ACTIONBAR_TEXT, NONE local points = { ["TOPLEFT"] = "TOPLEFT", @@ -19,8 +19,7 @@ local points = { ["BOTTOMRIGHT"] = "BOTTOMRIGHT" } -local ACD = LibStub("AceConfigDialog-3.0") - +local group local function BuildABConfig() group["general"] = { order = 1, @@ -694,7 +693,7 @@ end E.Options.args.actionbar = { type = "group", - name = L["ActionBars"], + name = ACTIONBAR_LABEL, childGroups = "tree", get = function(info) return E.db.actionbar[ info[getn(info)] ] end, set = function(info, value) E.db.actionbar[ info[getn(info)] ] = value AB:UpdateButtonSettings() end, @@ -724,7 +723,7 @@ E.Options.args.actionbar = { generalShortcut = { order = 5, type = "execute", - name = L["General"], + name = GENERAL, buttonElvUI = true, func = function() ACD:SelectGroup("ElvUI", "actionbar", "general") end, disabled = function() return not E.ActionBars end, diff --git a/ElvUI_Config/Auras.lua b/ElvUI_Config/Auras.lua index fc21243..f6e8d08 100644 --- a/ElvUI_Config/Auras.lua +++ b/ElvUI_Config/Auras.lua @@ -1,6 +1,13 @@ -local E, L, V, P, G, _ = unpack(ElvUI); +local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local A = E:GetModule("Auras"); +--Cache global variables +--Lua functions +local format = string.format +local getn = string.getn +--WoW API / Variables +local FONT_SIZE, GENERAL, NAME, NONE = FONT_SIZE, GENERAL, NAME, NONE + local function GetAuraOptions(headerName) local auraOptions = { header = { @@ -65,7 +72,7 @@ local function GetAuraOptions(headerName) values = { ["INDEX"] = L["Index"], ["TIME"] = L["Time"], - ["NAME"] = L["Name"] + ["NAME"] = NAME } }, sortDir = { @@ -89,16 +96,16 @@ local function GetAuraOptions(headerName) [1] = L["Your Auras First"] } } - }; - return auraOptions; + } + return auraOptions end E.Options.args.auras = { type = "group", name = L["Buffs and Debuffs"], childGroups = "tab", - get = function(info) return E.db.auras[ info[getn(info)] ]; end, - set = function(info, value) E.db.auras[ info[getn(info)] ] = value; A:UpdateHeader(ElvUIPlayerBuffs); A:UpdateHeader(ElvUIPlayerDebuffs); end, + get = function(info) return E.db.auras[ info[getn(info)] ] end, + set = function(info, value) E.db.auras[ info[getn(info)] ] = value; A:UpdateHeader(ElvUIPlayerBuffs); A:UpdateHeader(ElvUIPlayerDebuffs) end, args = { intro = { order = 1, @@ -109,10 +116,10 @@ E.Options.args.auras = { order = 2, type = "toggle", name = L["Enable"], - get = function(info) return E.private.auras[ info[getn(info)] ]; end, + get = function(info) return E.private.auras[ info[getn(info)] ] end, set = function(info, value) - E.private.auras[ info[getn(info)] ] = value; - E:StaticPopup_Show("PRIVATE_RL"); + E.private.auras[ info[getn(info)] ] = value + E:StaticPopup_Show("PRIVATE_RL") end, }, disableBlizzard = { @@ -121,19 +128,19 @@ E.Options.args.auras = { name = L["Disabled Blizzard"], get = function(info) return E.private.auras[ info[getn(info)] ] end, set = function(info, value) - E.private.auras[ info[getn(info)] ] = value; - E:StaticPopup_Show("PRIVATE_RL"); + E.private.auras[ info[getn(info)] ] = value + E:StaticPopup_Show("PRIVATE_RL") end }, general = { order = 4, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 0, type = "header", - name = L["General"] + name = GENERAL }, fadeThreshold = { order = 1, @@ -162,7 +169,6 @@ E.Options.args.auras = { values = { ["NONE"] = NONE, ["OUTLINE"] = "OUTLINE", - ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", ["THICKOUTLINE"] = "THICKOUTLINE" } @@ -196,9 +202,9 @@ E.Options.args.auras = { type = "group", guiInline = true, name = L["LBF Support"], - get = function(info) return E.private.auras.lbf[info[getn(info)]]; end, - set = function(info, value) E.private.auras.lbf[info[getn(info)]] = value; E:StaticPopup_Show("PRIVATE_RL"); end, - disabled = function() return not E.private.auras.enable; end, + get = function(info) return E.private.auras.lbf[info[getn(info)]] end, + set = function(info, value) E.private.auras.lbf[info[getn(info)]] = value; E:StaticPopup_Show("PRIVATE_RL") end, + disabled = function() return not E.private.auras.enable end, args = { enable = { order = 1, @@ -214,17 +220,17 @@ E.Options.args.auras = { order = 5, type = "group", name = L["Buffs"], - get = function(info) return E.db.auras.buffs[ info[getn(info)] ]; end, - set = function(info, value) E.db.auras.buffs[ info[getn(info)] ] = value; A:UpdateHeader(ElvUIPlayerBuffs); end, + get = function(info) return E.db.auras.buffs[ info[getn(info)] ] end, + set = function(info, value) E.db.auras.buffs[ info[getn(info)] ] = value; A:UpdateHeader(ElvUIPlayerBuffs) end, args = GetAuraOptions(L["Buffs"]) }, debuffs = { order = 6, type = "group", name = L["Debuffs"], - get = function(info) return E.db.auras.debuffs[ info[getn(info)] ]; end, - set = function(info, value) E.db.auras.debuffs[ info[getn(info)] ] = value; A:UpdateHeader(ElvUIPlayerDebuffs); end, + get = function(info) return E.db.auras.debuffs[ info[getn(info)] ] end, + set = function(info, value) E.db.auras.debuffs[ info[getn(info)] ] = value; A:UpdateHeader(ElvUIPlayerDebuffs) end, args = GetAuraOptions(L["Debuffs"]) } } -}; \ No newline at end of file +} \ No newline at end of file diff --git a/ElvUI_Config/Bags.lua b/ElvUI_Config/Bags.lua index 70d4f92..ecaf16f 100644 --- a/ElvUI_Config/Bags.lua +++ b/ElvUI_Config/Bags.lua @@ -1,12 +1,19 @@ -local E, L, V, P, G = unpack(ElvUI); +local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local B = E:GetModule("Bags"); +--Cache global variables +--Lua functions +local gsub, match = string.gsub, string.match +local getn = table.getn +--WoW API / Variables +local COLOR, GENERAL, NONE = COLOR, GENERAL, NONE + E.Options.args.bags = { type = "group", name = L["Bags"], childGroups = "tab", - get = function(info) return E.db.bags[ info[getn(info)] ]; end, - set = function(info, value) E.db.bags[ info[getn(info)] ] = value; end, + get = function(info) return E.db.bags[ info[getn(info)] ] end, + set = function(info, value) E.db.bags[ info[getn(info)] ] = value end, args = { intro = { order = 1, @@ -18,19 +25,19 @@ E.Options.args.bags = { type = "toggle", name = L["Enable"], desc = L["Enable/Disable the all-in-one bag."], - get = function(info) return E.private.bags.enable; end, - set = function(info, value) E.private.bags.enable = value; E:StaticPopup_Show("PRIVATE_RL"); end + get = function(info) return E.private.bags.enable end, + set = function(info, value) E.private.bags.enable = value; E:StaticPopup_Show("PRIVATE_RL") end }, general = { order = 3, type = "group", - name = L["General"], - disabled = function() return not E.bags; end, + name = GENERAL, + disabled = function() return not E.bags end, args = { header = { order = 0, type = "header", - name = L["General"] + name = GENERAL }, moneyFormat = { order = 1, @@ -45,25 +52,25 @@ E.Options.args.bags = { ["CONDENSED"] = L["Condensed"], ["BLIZZARD"] = L["Blizzard Style"] }, - set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:UpdateGoldText(); end + set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:UpdateGoldText() end }, clearSearchOnClose = { order = 2, type = "toggle", name = L["Clear Search On Close"], - set = function(info, value) E.db.bags[info[getn(info)]] = value; end + set = function(info, value) E.db.bags[ info[getn(info)] ] = value end }, disableBagSort = { order = 3, type = "toggle", name = L["Disable Bag Sort"], - set = function(info, value) E.db.bags[info[getn(info)]] = value; B:ToggleSortButtonState(false); end + set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:ToggleSortButtonState(false) end }, disableBankSort = { order = 4, type = "toggle", name = L["Disable Bank Sort"], - set = function(info, value) E.db.bags[info[getn(info)]] = value; B:ToggleSortButtonState(true); end + set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:ToggleSortButtonState(true) end }, countGroup = { order = 5, @@ -77,20 +84,20 @@ E.Options.args.bags = { dialogControl = "LSM30_Font", name = L["Font"], values = AceGUIWidgetLSMlists.font, - set = function(info, value) E.db.bags.countFont = value; B:UpdateCountDisplay(); end + set = function(info, value) E.db.bags.countFont = value; B:UpdateCountDisplay() end }, countFontSize = { order = 2, type = "range", name = FONT_SIZE, min = 4, max = 22, step = 1, - set = function(info, value) E.db.bags.countFontSize = value; B:UpdateCountDisplay(); end + set = function(info, value) E.db.bags.countFontSize = value; B:UpdateCountDisplay() end }, countFontOutline = { order = 3, type = "select", name = L["Font Outline"], - set = function(info, value) E.db.bags.countFontOutline = value; B:UpdateCountDisplay(); end, + set = function(info, value) E.db.bags.countFontOutline = value; B:UpdateCountDisplay() end, values = { ["NONE"] = NONE, ["OUTLINE"] = "OUTLINE", @@ -101,16 +108,16 @@ E.Options.args.bags = { countFontColor = { order = 4, type = "color", - name = L["Color"], + name = COLOR, get = function(info) - local t = E.db.bags[ info[getn(info)] ]; - local d = P.bags[info[getn(info)]]; - return t.r, t.g, t.b, t.a, d.r, d.g, d.b; + local t = E.db.bags[ info[getn(info)] ] + local d = P.bags[ info[getn(info)] ] + return t.r, t.g, t.b, t.a, d.r, d.g, d.b end, set = function(info, r, g, b) - local t = E.db.bags[ info[getn(info)] ]; - t.r, t.g, t.b = r, g, b; - B:UpdateCountDisplay(); + local t = E.db.bags[ info[getn(info)] ] + t.r, t.g, t.b = r, g, b + B:UpdateCountDisplay() end } } @@ -126,7 +133,7 @@ E.Options.args.bags = { type = "toggle", name = L["Display Item Level"], desc = L["Displays item level on equippable items."], - set = function(info, value) E.db.bags.itemLevel = value; B:UpdateItemLevelDisplay(); end + set = function(info, value) E.db.bags.itemLevel = value; B:UpdateItemLevelDisplay() end }, itemLevelThreshold = { order = 2, @@ -134,8 +141,8 @@ E.Options.args.bags = { desc = L["The minimum item level required for it to be shown."], type = "range", min = 1, max = 1000, step = 1, - disabled = function() return not E.db.bags.itemLevel; end, - set = function(info, value) E.db.bags.itemLevelThreshold = value; B:UpdateItemLevelDisplay(); end + disabled = function() return not E.db.bags.itemLevel end, + set = function(info, value) E.db.bags.itemLevelThreshold = value; B:UpdateItemLevelDisplay() end }, spacer = { order = 3, @@ -148,16 +155,16 @@ E.Options.args.bags = { dialogControl = "LSM30_Font", name = L["Font"], values = AceGUIWidgetLSMlists.font, - disabled = function() return not E.db.bags.itemLevel; end, - set = function(info, value) E.db.bags.itemLevelFont = value; B:UpdateItemLevelDisplay(); end + disabled = function() return not E.db.bags.itemLevel end, + set = function(info, value) E.db.bags.itemLevelFont = value; B:UpdateItemLevelDisplay() end }, itemLevelFontSize = { order = 5, type = "range", name = FONT_SIZE, min = 6, max = 33, step = 1, - disabled = function() return not E.db.bags.itemLevel; end, - set = function(info, value) E.db.bags.itemLevelFontSize = value; B:UpdateItemLevelDisplay(); end + disabled = function() return not E.db.bags.itemLevel end, + set = function(info, value) E.db.bags.itemLevelFontSize = value; B:UpdateItemLevelDisplay() end }, itemLevelFontOutline = { order = 6, @@ -180,7 +187,7 @@ E.Options.args.bags = { order = 4, type = "group", name = L["Size"], - disabled = function() return not E.bags; end, + disabled = function() return not E.bags end, args = { header = { order = 0, @@ -193,7 +200,7 @@ E.Options.args.bags = { name = L["Button Size (Bag)"], desc = L["The size of the individual buttons on the bag frame."], min = 15, max = 45, step = 1, - set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(); end + set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout() end }, bankSize = { order = 2, @@ -201,7 +208,7 @@ E.Options.args.bags = { name = L["Button Size (Bank)"], desc = L["The size of the individual buttons on the bank frame."], min = 15, max = 45, step = 1, - set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(true); end + set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(true) end }, spacer = { order = 3, @@ -214,7 +221,7 @@ E.Options.args.bags = { name = L["Panel Width (Bags)"], desc = L["Adjust the width of the bag frame."], min = 150, max = 1400, step = 1, - set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(); end + set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout() end }, bankWidth = { order = 5, @@ -222,7 +229,7 @@ E.Options.args.bags = { name = L["Panel Width (Bank)"], desc = L["Adjust the width of the bank frame."], min = 150, max = 1400, step = 1, - set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(true); end + set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(true) end } } }, @@ -230,8 +237,8 @@ E.Options.args.bags = { order = 5, type = "group", name = L["Bag-Bar"], - get = function(info) return E.db.bags.bagBar[ info[getn(info)] ]; end, - set = function(info, value) E.db.bags.bagBar[ info[getn(info)] ] = value; B:SizeAndPositionBagBar(); end, + get = function(info) return E.db.bags.bagBar[ info[getn(info)] ] end, + set = function(info, value) E.db.bags.bagBar[ info[getn(info)] ] = value; B:SizeAndPositionBagBar() end, args = { header = { order = 0, @@ -244,7 +251,7 @@ E.Options.args.bags = { name = L["Enable"], desc = L["Enable/Disable the Bag-Bar."], get = function(info) return E.private.bags.bagBar end, - set = function(info, value) E.private.bags.bagBar = value; E:StaticPopup_Show("PRIVATE_RL"); end + set = function(info, value) E.private.bags.bagBar = value; E:StaticPopup_Show("PRIVATE_RL") end }, showBackdrop = { order = 2, @@ -338,12 +345,12 @@ E.Options.args.bags = { type = "input", name = L["Profile"], desc = L["Add an item or search syntax to the ignored list. Items matching the search syntax will be ignored."], - get = function(info) return ""; end, + get = function(info) return "" end, set = function(info, value) - if(value == "" or string.gsub(value, "%s+", "") == "") then return; end + if(value == "" or gsub(value, "%s+", "") == "") then return end - local itemID = string.match(value, "item:(%d+)"); - E.db.bags.ignoredItems[(itemID or value)] = value; + local itemID = match(value, "item:(%d+)") + E.db.bags.ignoredItems[(itemID or value)] = value end }, spacer = { @@ -357,15 +364,15 @@ E.Options.args.bags = { type = "input", name = L["Global"], desc = L["Add an item or search syntax to the ignored list. Items matching the search syntax will be ignored."], - get = function(info) return ""; end, + get = function(info) return "" end, set = function(info, value) - if(value == "" or string.gsub(value, "%s+", "") == "") then return; end + if (value == "" or gsub(value, "%s+", "") == "") then return end - local itemID = string.match(value, "item:(%d+)"); - E.global.bags.ignoredItems[(itemID or value)] = value; + local itemID = match(value, "item:(%d+)") + E.global.bags.ignoredItems[(itemID or value)] = value - if(E.db.bags.ignoredItems[(itemID or value)]) then - E.db.bags.ignoredItems[(itemID or value)] = nil; + if E.db.bags.ignoredItems[(itemID or value)] then + E.db.bags.ignoredItems[(itemID or value)] = nil end end } @@ -375,22 +382,22 @@ E.Options.args.bags = { order = 5, type = "multiselect", name = L["Ignored Items and Search Syntax (Profile)"], - values = function() return E.db.bags.ignoredItems; end, - get = function(info, value) return E.db.bags.ignoredItems[value]; end, + values = function() return E.db.bags.ignoredItems end, + get = function(info, value) return E.db.bags.ignoredItems[value] end, set = function(info, value) - E.db.bags.ignoredItems[value] = nil; - GameTooltip:Hide(); + E.db.bags.ignoredItems[value] = nil + GameTooltip:Hide() end }, --[[ignoredEntriesGlobal = { order = 6, type = "multiselect", name = L["Ignored Items and Search Syntax (Global)"], - values = function() return E.global.bags.ignoredItems; end, - get = function(info, value) return E.global.bags.ignoredItems[value]; end, + values = function() return E.global.bags.ignoredItems end, + get = function(info, value) return E.global.bags.ignoredItems[value] end, set = function(info, value) - E.global.bags.ignoredItems[value] = nil; - GameTooltip:Hide(); + E.global.bags.ignoredItems[value] = nil + GameTooltip:Hide() end }--]] } @@ -399,7 +406,7 @@ E.Options.args.bags = { order = 7, type = "group", name = L["Search Syntax"], - disabled = function() return not E.bags; end, + disabled = function() return not E.bags end, args = { text = { order = 1, @@ -407,10 +414,10 @@ E.Options.args.bags = { multiline = 30, width = "full", name = L["Search Syntax"], - get = function(info) return L["SEARCH_SYNTAX_DESC"]; end, - set = function(info, value) value = L["SEARCH_SYNTAX_DESC"]; end + get = function(info) return L["SEARCH_SYNTAX_DESC"] end, + set = function(info, value) value = L["SEARCH_SYNTAX_DESC"] end } } } } -}; \ No newline at end of file +} \ No newline at end of file diff --git a/ElvUI_Config/Chat.lua b/ElvUI_Config/Chat.lua index 073091a..4321430 100644 --- a/ElvUI_Config/Chat.lua +++ b/ElvUI_Config/Chat.lua @@ -1,12 +1,18 @@ -local E, L, V, P, G = unpack(ElvUI); +local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local CH = E:GetModule("Chat"); +--Cache global variables +--Lua functions +local getn = table.getn +--WoW API / Variables +local CHAT_LABEL, GENERAL, NONE = CHAT_LABEL, GENERAL, NONE + E.Options.args.chat = { type = "group", - name = L["Chat"], + name = CHAT_LABEL, childGroups = "tab", - get = function(info) return E.db.chat[ info[getn(info)] ]; end, - set = function(info, value) E.db.chat[ info[getn(info)] ] = value; end, + get = function(info) return E.db.chat[ info[getn(info)] ] end, + set = function(info, value) E.db.chat[ info[getn(info)] ] = value end, args = { intro = { order = 1, @@ -17,18 +23,18 @@ E.Options.args.chat = { order = 2, type = "toggle", name = L["Enable"], - get = function(info) return E.private.chat.enable; end, - set = function(info, value) E.private.chat.enable = value; E:StaticPopup_Show("PRIVATE_RL"); end + get = function(info) return E.private.chat.enable end, + set = function(info, value) E.private.chat.enable = value; E:StaticPopup_Show("PRIVATE_RL") end }, general = { order = 3, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 0, type = "header", - name = L["General"] + name = GENERAL }, url = { order = 1, @@ -48,11 +54,11 @@ E.Options.args.chat = { name = L["Hyperlink Hover"], desc = L["Display the hyperlink tooltip while hovering over a hyperlink."], set = function(info, value) - E.db.chat[ info[getn(info)] ] = value; - if(value == true) then - CH:EnableHyperlink(); + E.db.chat[ info[getn(info)] ] = value + if value == true then + CH:EnableHyperlink() else - CH:DisableHyperlink(); + CH:DisableHyperlink() end end }, @@ -62,7 +68,7 @@ E.Options.args.chat = { name = L["Sticky Chat"], desc = L["When opening the Chat Editbox to type a message having this option set means it will retain the last channel you spoke in. If this option is turned off opening the Chat Editbox should always default to the SAY channel."], set = function(info, value) - E.db.chat[ info[getn(info)] ] = value; + E.db.chat[ info[getn(info)] ] = value end }, fade = { @@ -71,8 +77,8 @@ E.Options.args.chat = { name = L["Fade Chat"], desc = L["Fade the chat text when there is no activity."], set = function(info, value) - E.db.chat[ info[getn(info)] ] = value; - CH:UpdateFading(); + E.db.chat[ info[getn(info)] ] = value + CH:UpdateFading() end }, fadeUndockedTabs = { @@ -81,8 +87,8 @@ E.Options.args.chat = { name = L["Fade Undocked Tabs"], desc = L["Fades the text on chat tabs that are not docked at the left or right chat panel."], set = function(self, value) - E.db.chat.fadeUndockedTabs = value; - CH:UpdateChatTabs(); + E.db.chat.fadeUndockedTabs = value + CH:UpdateChatTabs() end }, fadeTabsNoBackdrop = { @@ -91,8 +97,8 @@ E.Options.args.chat = { name = L["Fade Tabs No Backdrop"], desc = L["Fades the text on chat tabs that are docked in a panel where the backdrop is disabled."], set = function(self, value) - E.db.chat.fadeTabsNoBackdrop = value; - CH:UpdateChatTabs(); + E.db.chat.fadeTabsNoBackdrop = value + CH:UpdateChatTabs() end }, chatHistory = { @@ -107,8 +113,8 @@ E.Options.args.chat = { name = L["Use Alt Key"], desc = L["Require holding the Alt key down to move cursor or cycle through messages in the editbox."], set = function(self, value) - E.db.chat.useAltKey = value; - CH:UpdateSettings(); + E.db.chat.useAltKey = value + CH:UpdateSettings() end }, spacer = { @@ -123,9 +129,9 @@ E.Options.args.chat = { desc = L["Prevent the same messages from displaying in chat more than once within this set amount of seconds, set to zero to disable."], min = 0, max = 120, step = 1, set = function(info, value) - E.db.chat[ info[getn(info)] ] = value; - if(value == 0) then - CH:DisableChatThrottle(); + E.db.chat[ info[getn(info)] ] = value + if value == 0 then + CH:DisableChatThrottle() end end }, @@ -136,7 +142,7 @@ E.Options.args.chat = { desc = L["Number of time in seconds to scroll down to the bottom of the chat window if you are not scrolled down completely."], min = 0, max = 120, step = 5, set = function(info, value) - E.db.chat[ info[getn(info)] ] = value; + E.db.chat[ info[getn(info)] ] = value end }, numAllowedCombatRepeat = { @@ -177,22 +183,22 @@ E.Options.args.chat = { order = 16, type = "toggle", name = L["Custom Timestamp Color"], - disabled = function() return not E.db.chat.timeStampFormat == "NONE"; end + disabled = function() return not E.db.chat.timeStampFormat == "NONE" end }, customTimeColor = { order = 17, type = "color", hasAlpha = false, name = L["Timestamp Color"], - disabled = function() return (not E.db.chat.timeStampFormat == "NONE" or not E.db.chat.useCustomTimeColor); end, + disabled = function() return (not E.db.chat.timeStampFormat == "NONE" or not E.db.chat.useCustomTimeColor) end, get = function(info) - local t = E.db.chat.customTimeColor; - local d = P.chat.customTimeColor; - return t.r, t.g, t.b, t.a, d.r, d.g, d.b; + local t = E.db.chat.customTimeColor + local d = P.chat.customTimeColor + return t.r, t.g, t.b, t.a, d.r, d.g, d.b end, set = function(info, r, g, b) - local t = E.db.chat.customTimeColor; - t.r, t.g, t.b = r, g, b; + local t = E.db.chat.customTimeColor + t.r, t.g, t.b = r, g, b end } } @@ -230,7 +236,7 @@ E.Options.args.chat = { desc = L["List of words to color in chat if found in a message. If you wish to add multiple words you must seperate the word with a comma. To search for your current name you can use %MYNAME%.\n\nExample:\n%MYNAME%, ElvUI, RBGs, Tank"], type = "input", width = "full", - set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:UpdateChatKeywords(); end + set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:UpdateChatKeywords() end } } }, @@ -250,9 +256,9 @@ E.Options.args.chat = { name = L["Lock Positions"], desc = L["Attempt to lock the left and right chat frame positions. Disabling this option will allow you to move the main chat frame anywhere you wish."], set = function(info, value) - E.db.chat[ info[getn(info)] ] = value; - if(value == true) then - CH:PositionChat(true); + E.db.chat[ info[getn(info)] ] = value + if value == true then + CH:PositionChat(true) end end }, @@ -260,14 +266,14 @@ E.Options.args.chat = { order = 2, type = "toggle", name = L["Tab Panel Transparency"], - set = function(info, value) E.db.chat.panelTabTransparency = value; E:GetModule("Layout"):SetChatTabStyle(); end + set = function(info, value) E.db.chat.panelTabTransparency = value; E:GetModule("Layout"):SetChatTabStyle() end }, panelTabBackdrop = { order = 3, type = "toggle", name = L["Tab Panel"], desc = L["Toggle the chat tab panel backdrop."], - set = function(info, value) E.db.chat.panelTabBackdrop = value; E:GetModule("Layout"):ToggleChatPanels(); end + set = function(info, value) E.db.chat.panelTabBackdrop = value; E:GetModule("Layout"):ToggleChatPanels() end }, editBoxPosition = { order = 4, @@ -278,14 +284,14 @@ E.Options.args.chat = { ["BELOW_CHAT"] = L["Below Chat"], ["ABOVE_CHAT"] = L["Above Chat"] }, - set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:UpdateAnchors(); end + set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:UpdateAnchors() end }, panelBackdrop = { order = 5, type = "select", name = L["Panel Backdrop"], desc = L["Toggle showing of the left and right chat panels."], - set = function(info, value) E.db.chat.panelBackdrop = value; E:GetModule("Layout"):ToggleChatPanels(); E:GetModule("Chat"):PositionChat(true); E:GetModule("Chat"):UpdateAnchors(); end, + set = function(info, value) E.db.chat.panelBackdrop = value; E:GetModule("Layout"):ToggleChatPanels(); E:GetModule("Chat"):PositionChat(true); E:GetModule("Chat"):UpdateAnchors() end, values = { ["HIDEBOTH"] = L["Hide Both"], ["SHOWBOTH"] = L["Show Both"], @@ -299,9 +305,9 @@ E.Options.args.chat = { name = L["Separate Panel Sizes"], desc = L["Enable the use of separate size options for the right chat panel."], set = function(info, value) - E.db.chat.separateSizes = value; - E:GetModule("Chat"):PositionChat(true); - E:GetModule("Bags"):Layout(); + E.db.chat.separateSizes = value + E:GetModule("Chat"):PositionChat(true) + E:GetModule("Bags"):Layout() end }, spacer1 = { @@ -315,7 +321,7 @@ E.Options.args.chat = { name = L["Panel Height"], desc = L["PANEL_DESC"], min = 50, max = 600, step = 1, - set = function(info, value) E.db.chat.panelHeight = value; E:GetModule("Chat"):PositionChat(true); end + set = function(info, value) E.db.chat.panelHeight = value; E:GetModule("Chat"):PositionChat(true) end }, panelWidth = { order = 9, @@ -324,13 +330,13 @@ E.Options.args.chat = { desc = L["PANEL_DESC"], min = 50, max = 1000, step = 1, set = function(info, value) - E.db.chat.panelWidth = value; - E:GetModule("Chat"):PositionChat(true); + E.db.chat.panelWidth = value + E:GetModule("Chat"):PositionChat(true) local bags = E:GetModule("Bags"); - if(not E.db.chat.separateSizes) then - bags:Layout(); + if not E.db.chat.separateSizes then + bags:Layout() end - bags:Layout(true); + bags:Layout(true) end }, spacer2 = { @@ -344,9 +350,9 @@ E.Options.args.chat = { name = L["Right Panel Height"], desc = L["Adjust the height of your right chat panel."], min = 50, max = 600, step = 1, - disabled = function() return not E.db.chat.separateSizes; end, - hidden = function() return not E.db.chat.separateSizes; end, - set = function(info, value) E.db.chat.panelHeightRight = value; E:GetModule("Chat"):PositionChat(true); end + disabled = function() return not E.db.chat.separateSizes end, + hidden = function() return not E.db.chat.separateSizes end, + set = function(info, value) E.db.chat.panelHeightRight = value; E:GetModule("Chat"):PositionChat(true) end }, panelWidthRight = { order = 12, @@ -357,9 +363,9 @@ E.Options.args.chat = { disabled = function() return not E.db.chat.separateSizes end, hidden = function() return not E.db.chat.separateSizes end, set = function(info, value) - E.db.chat.panelWidthRight = value; - E:GetModule("Chat"):PositionChat(true); - E:GetModule("Bags"):Layout(); + E.db.chat.panelWidthRight = value + E:GetModule("Chat"):PositionChat(true) + E:GetModule("Bags"):Layout() end }, panelBackdropNameLeft = { @@ -369,8 +375,8 @@ E.Options.args.chat = { name = L["Panel Texture (Left)"], desc = L["Specify a filename located inside the World of Warcraft directory. Textures folder that you wish to have set as a panel background.\n\nPlease Note:\n-The image size recommended is 256x128\n-You must do a complete game restart after adding a file to the folder.\n-The file type must be tga format.\n\nExample: Interface\\AddOns\\ElvUI\\media\\textures\\copy\n\nOr for most users it would be easier to simply put a tga file into your WoW folder, then type the name of the file here."], set = function(info, value) - E.db.chat[ info[getn(info)] ] = value; - E:UpdateMedia(); + E.db.chat[ info[getn(info)] ] = value + E:UpdateMedia() end }, panelBackdropNameRight = { @@ -380,8 +386,8 @@ E.Options.args.chat = { name = L["Panel Texture (Right)"], desc = L["Specify a filename located inside the World of Warcraft directory. Textures folder that you wish to have set as a panel background.\n\nPlease Note:\n-The image size recommended is 256x128\n-You must do a complete game restart after adding a file to the folder.\n-The file type must be tga format.\n\nExample: Interface\\AddOns\\ElvUI\\media\\textures\\copy\n\nOr for most users it would be easier to simply put a tga file into your WoW folder, then type the name of the file here."], set = function(info, value) - E.db.chat[ info[getn(info)] ] = value; - E:UpdateMedia(); + E.db.chat[ info[getn(info)] ] = value + E:UpdateMedia() end } } @@ -390,7 +396,7 @@ E.Options.args.chat = { order = 6, type = "group", name = L["Fonts"], - set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:SetupChat(); end, + set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:SetupChat() end, args = { header = { order = 0, @@ -454,7 +460,7 @@ E.Options.args.chat = { classColorMentionsChat = { order = 2, type = "toggle", - name = L["Chat"], + name = CHAT_LABEL, desc = L["Use class color for the names of players when they are mentioned."], get = function(info) return E.db.chat.classColorMentionsChat end, set = function(info, value) E.db.chat.classColorMentionsChat = value end, @@ -476,7 +482,7 @@ E.Options.args.chat = { type = 'input', get = function(info) return "" end, set = function(info, value) - if value == "" or string.gsub(value, "%s+", "") == "" then return; end + if value == "" or string.gsub(value, "%s+", "") == "" then return end E.global.chat.classColorMentionExcludedNames[strlower(value)] = value end }, @@ -494,4 +500,4 @@ E.Options.args.chat = { } } } -}; \ No newline at end of file +} \ No newline at end of file diff --git a/ElvUI_Config/DataTexts.lua b/ElvUI_Config/DataTexts.lua index b691409..d9b2c1f 100644 --- a/ElvUI_Config/DataTexts.lua +++ b/ElvUI_Config/DataTexts.lua @@ -1,22 +1,27 @@ -local E, L, V, P, G = unpack(ElvUI); +local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local DT = E:GetModule("DataTexts"); +--Cache global variables +--Lua functions local find, upper = string.find, string.upper +local getn = table.getn +--WoW API / Variables +local GENERAL, NONE = GENERAL, NONE -local datatexts = {}; +local datatexts = {} function DT:PanelLayoutOptions() for name, data in pairs(DT.RegisteredDataTexts) do datatexts[name] = data.localizedName or L[name] end - datatexts[""] = NONE; + datatexts[""] = NONE - local order; - local table = E.Options.args.datatexts.args.panels.args; + local order + local table = E.Options.args.datatexts.args.panels.args for pointLoc, tab in pairs(P.datatexts.panels) do local pointLoc = pointLoc - if(not _G[pointLoc]) then table[pointLoc] = nil; return; end - if(type(tab) == "table") then + if not _G[pointLoc] then table[pointLoc] = nil return end + if type(tab) == "table" then if find(pointLoc, "Chat") then order = 15; else @@ -27,7 +32,7 @@ function DT:PanelLayoutOptions() type = "group", name = L[pointLoc] or pointLoc, args = {} - }; + } for option, value in pairs(tab) do table[pointLoc].args[option] = { type = "select", @@ -35,16 +40,16 @@ function DT:PanelLayoutOptions() values = datatexts, get = function(info) return E.db.datatexts.panels[pointLoc][ info[getn(info)] ]; end, set = function(info, value) E.db.datatexts.panels[pointLoc][ info[getn(info)] ] = value; DT:LoadDataTexts(); end - }; + } end - elseif(type(tab) == "string") then + elseif type(tab) == "string" then table.smallPanels.args[pointLoc] = { type = "select", name = L[pointLoc] or pointLoc, values = datatexts, get = function(info) return E.db.datatexts.panels[pointLoc]; end, set = function(info, value) E.db.datatexts.panels[pointLoc] = value; DT:LoadDataTexts(); end - }; + } end end end @@ -69,18 +74,18 @@ E.Options.args.datatexts = { general = { order = 3, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 1, type = "header", - name = L["General"] + name = GENERAL }, generalGroup = { order = 2, type = "group", guiInline = true, - name = L["General"], + name = GENERAL, args = { battleground = { order = 1, diff --git a/ElvUI_Config/General.lua b/ElvUI_Config/General.lua index 65ca58d..65edf92 100644 --- a/ElvUI_Config/General.lua +++ b/ElvUI_Config/General.lua @@ -1,9 +1,15 @@ local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local CC = E:GetModule("ClassCache"); +--Cache global variables +--Lua functions +local getn = table.getn +--WoW API / Variables +local CHAT_MSG_EMOTE, GENERAL, NONE, PLAYER, RAID_CONTROL, SAY = CHAT_MSG_EMOTE, GENERAL, NONE, PLAYER, RAID_CONTROL, SAY + E.Options.args.general = { type = "group", - name = L["General"], + name = GENERAL, order = 1, childGroups = "tab", get = function(info) return E.db.general[ info[getn(info)] ]; end, @@ -30,12 +36,12 @@ E.Options.args.general = { general = { order = 4, type = "group", - name = L["General"], + name = GENERAL, args = { generalHeader = { order = 1, type = "header", - name = L["General"], + name = GENERAL, }, pixelPerfect = { order = 2, diff --git a/ElvUI_Config/Locales/Chinese_Config.lua b/ElvUI_Config/Locales/Chinese_Config.lua index c307784..8e2e09d 100644 --- a/ElvUI_Config/Locales/Chinese_Config.lua +++ b/ElvUI_Config/Locales/Chinese_Config.lua @@ -64,7 +64,6 @@ L["TEXT_FORMAT_DESC"] = [[提供一个更改文字格式的方式 --ActionBars L["Action Paging"] = "动作条翻页" -L["ActionBars"] = "动作条" L["Action button keybinds will respond on key down, rather than on key up"] = true; L["Allow LBF to handle the skinning of this element."] = "允许LBF来处理这个元素的皮肤" L["Alpha"] = "透明度" @@ -409,7 +408,6 @@ L["Enable/Disable the loot frame."] = "开/关物品掉落框架" L["Enable/Disable the loot roll frame."] = "开/关掷骰子框架" L["Enables the ElvUI Raid Control panel."] = "启用ElvUI团队控制面板" L["Enhanced PVP Messages"] = "PVP增强信息" -L["General"] = "一般" L["Height of the watch tracker. Increase size to be able to see more objectives."] = "任务框体的高度.增加大小以看到更多目标" L["Hide At Max Level"] = "在最高等级时隐藏" L["Hide Error Text"] = "隐藏错误文字" @@ -601,7 +599,7 @@ L["Minimum Time Left"] = "最低时间剩余" L["Missing"] = "缺失" L["Name Color"] = "姓名颜色" L["Name Only"] = "仅姓名" -L["NamePlates"] = "姓名板(血条)" +L["Nameplates"] = "姓名板(血条)" L["Nameplate Motion Type"] = true; L["Non-Target Transparency"] = "非目标透明度" L["Not Targeted"] = "非目标" @@ -815,7 +813,6 @@ L["Color power by classcolor or reaction."] = "以职业色显示能量" L["Color the health backdrop by class or reaction."] = "生命条背景色以职业色显示" L["Color the unit healthbar if there is a debuff that can be dispelled by you."] = "如果单位目标的减益光环可被驱散, 加亮显示其生命值" L["Color Turtle Buffs"] = "减伤类Buff的颜色" -L["Color"] = "颜色" L["Colored Icon"] = "图标色彩" L["Coloring (Specific)"] = "着色(具体)" L["Coloring"] = "着色" @@ -914,7 +911,6 @@ L["Heal Prediction"] = "治疗量预测" L["Health Backdrop"] = "生命条背景" L["Health Border"] = "生命条边框" L["Health By Value"] = "生命条颜色依数值变化" -L["Health"] = "生命条" L["Height"] = "高" L["Horizontal Spacing"] = "水平间隔" L["Horizontal"] = "水平" @@ -958,8 +954,6 @@ L["Middle clicking the unit frame will cause your focus to match the unit."] = " L["Middle"] = "中间" L["Minimum Duration"] = "最低持续时间" L["Mouseover"] = "鼠标滑过显示" -L["Name"] = "姓名" -L["Neutral"] = "中立" L["Non-Interruptable"] = "不可打断颜色" L["Not valid spell id"] = "不正确的技能ID" L["Num Rows"] = "行数" @@ -1090,7 +1084,7 @@ L["Transparent"] = "透明" L["Turtle Color"] = "减伤类的颜色" L["Unholy"] = "邪恶符文" L["Uniform Threshold"] = "统一阈值" -L["UnitFrames"] = "单位框架" +L["Unitframes"] = "单位框架" L["Up"] = "上" L["Use Custom Level"] = "使用自定义层次" L["Use Custom Strata"] = "使用自定义层级" diff --git a/ElvUI_Config/Locales/English_Config.lua b/ElvUI_Config/Locales/English_Config.lua index 7c66591..96f802f 100644 --- a/ElvUI_Config/Locales/English_Config.lua +++ b/ElvUI_Config/Locales/English_Config.lua @@ -64,7 +64,6 @@ To disable leave the field blank, if you need more information visit http://www. --ActionBars L["Action Paging"] = true; -L["ActionBars"] = true; L["Action button keybinds will respond on key down, rather than on key up"] = true; L["Allow LBF to handle the skinning of this element."] = true; L["Alpha"] = true; @@ -398,7 +397,6 @@ L["Enable/Disable the loot frame."] = true; L["Enable/Disable the loot roll frame."] = true; L["Enables the ElvUI Raid Control panel."] = true; L["Enhanced PVP Messages"] = true; -L["General"] = true; L["Height of the watch tracker. Increase size to be able to see more objectives."] = true; L["Hide At Max Level"] = true; L["Hide Error Text"] = true; @@ -590,7 +588,7 @@ L["Minimum Time Left"] = true L["Missing"] = true L["Name Color"] = true L["Name Only"] = true -L["NamePlates"] = true; +L["Nameplates"] = true; L["Nameplate Motion Type"] = true; L["Non-Target Transparency"] = true; L["Not Targeted"] = true @@ -804,7 +802,6 @@ L["Color power by classcolor or reaction."] = true; L["Color the health backdrop by class or reaction."] = true; L["Color the unit healthbar if there is a debuff that can be dispelled by you."] = true; L["Color Turtle Buffs"] = true; -L["Color"] = true; L["Colored Icon"] = true; L["Coloring (Specific)"] = true; L["Coloring"] = true; @@ -903,7 +900,6 @@ L["Heal Prediction"] = true; L["Health Backdrop"] = true; L["Health Border"] = true; L["Health By Value"] = true; -L["Health"] = true; L["Height"] = true; L["Horizontal Spacing"] = true; L["Horizontal"] = true; --Also used in bags module @@ -947,8 +943,6 @@ L["Middle clicking the unit frame will cause your focus to match the unit."] = t L["Middle"] = true; L["Minimum Duration"] = true; L["Mouseover"] = true; -L["Name"] = true; --Also used in Buffs and Debuffs -L["Neutral"] = true; L["Non-Interruptable"] = true; L["Not valid spell id"] = true; L["Num Rows"] = true; @@ -1079,7 +1073,7 @@ L["Transparent"] = true; L["Turtle Color"] = true; L["Unholy"] = true; L["Uniform Threshold"] = true; -L["UnitFrames"] = true; +L["Unitframes"] = true; L["Up"] = true; L["Use Custom Level"] = true; L["Use Custom Strata"] = true; diff --git a/ElvUI_Config/Locales/French_Config.lua b/ElvUI_Config/Locales/French_Config.lua index 699c131..8f31fa8 100644 --- a/ElvUI_Config/Locales/French_Config.lua +++ b/ElvUI_Config/Locales/French_Config.lua @@ -64,7 +64,6 @@ Pour désactiver, laisser le champs vide. Pour plus d'information, merci de visi --ActionBars L["Action Paging"] = "Pagination d'action" -L["ActionBars"] = "Barres d'actions" L["Action button keybinds will respond on key down, rather than on key up"] = true; L["Allow LBF to handle the skinning of this element."] = "Autoriser LBF à gérer l'habillage de cet élement." L["Alpha"] = "Alpha" @@ -409,7 +408,6 @@ L["Enable/Disable the loot frame."] = "Activer / désactiver le cadre de butin." L["Enable/Disable the loot roll frame."] = "Activer / désactiver le cadre du tirage au sort du butin." L["Enables the ElvUI Raid Control panel."] = true; L["Enhanced PVP Messages"] = "Messages PVP améliorés" -L["General"] = "Général" L["Height of the watch tracker. Increase size to be able to see more objectives."] = "Hauteur de la fenêtre des suivis d'objectif, augmenter pour afficher plus d'objectifs" L["Hide At Max Level"] = true; L["Hide Error Text"] = "Cacher les textes d'erreurs" @@ -601,7 +599,7 @@ L["Minimum Time Left"] = true L["Missing"] = "Manquant" L["Name Color"] = "Couleur du nom" L["Name Only"] = true -L["NamePlates"] = "Noms" +L["Nameplates"] = "Noms" L["Nameplate Motion Type"] = true; L["Non-Target Transparency"] = true; L["Not Targeted"] = "Non ciblé" @@ -815,7 +813,6 @@ L["Color power by classcolor or reaction."] = "Colore l'énergie de la classe pa L["Color the health backdrop by class or reaction."] = "Colore l'arrière-plan de la barre de vie par la couleur de la classe ou par l'aggro." L["Color the unit healthbar if there is a debuff that can be dispelled by you."] = "Colore la barre de vie de l'unité qui peut être dissipé par vous-même." L["Color Turtle Buffs"] = "Colore les améliorations 'Turtle'" -- Not yet official translation for this term -L["Color"] = "Couleur" L["Colored Icon"] = "Icône Coloré" L["Coloring (Specific)"] = "Coloration (Spécifique)" L["Coloring"] = "Coloration" @@ -914,7 +911,6 @@ L["Heal Prediction"] = "Soin prévisionnel" L["Health Backdrop"] = "Fond de vie personnalisé" L["Health Border"] = "Bordure de la santé personnalisée" L["Health By Value"] = "Vie par valeur" -L["Health"] = "Vie" L["Height"] = "Hauteur" L["Horizontal Spacing"] = "Espace horizontal" L["Horizontal"] = "Horizontale" --Also used in bags module @@ -958,8 +954,6 @@ L["Middle clicking the unit frame will cause your focus to match the unit."] = " L["Middle"] = true; L["Minimum Duration"] = "Durée minimum" L["Mouseover"] = "Au survol de la souris" -L["Name"] = "Nom" --Also used in Buffs and Debuffs -L["Neutral"] = "Neutre" L["Non-Interruptable"] = "Non-interruptible" L["Not valid spell id"] = "ID du sort invalide" L["Num Rows"] = "Nombre de lignes" @@ -1090,7 +1084,7 @@ L["Transparent"] = "Transparent" L["Turtle Color"] = "Couleur 'Turtle'" -- Same L["Unholy"] = "Sacré" L["Uniform Threshold"] = true; -L["UnitFrames"] = "Cadre d'unité" +L["Unitframes"] = "Cadre d'unité" L["Up"] = "Haut" L["Use Custom Level"] = true; L["Use Custom Strata"] = true; diff --git a/ElvUI_Config/Locales/German_Config.lua b/ElvUI_Config/Locales/German_Config.lua index 1e1e3ed..24a59f5 100644 --- a/ElvUI_Config/Locales/German_Config.lua +++ b/ElvUI_Config/Locales/German_Config.lua @@ -64,7 +64,6 @@ Zum Deaktvieren lasse das Feld leer. Brauchst du mehr Informationen besuche http --ActionBars L["Action Paging"] = "Seitenwechsel der Aktionsleisten" -L["ActionBars"] = "Aktionsleisten" L["Action button keybinds will respond on key down, rather than on key up"] = true; L["Allow LBF to handle the skinning of this element."] = "Erlaubt LBF das Gestalten dieser Elememte." L["Alpha"] = "Alpha" @@ -409,7 +408,6 @@ L["Enable/Disable the loot frame."] = "Aktiviere/Deaktiviere das Beutefenster." L["Enable/Disable the loot roll frame."] = "Aktiviere/Deaktiviere das Beutewürfelfenster." L["Enables the ElvUI Raid Control panel."] = "Aktiviert das ElvUI Raid Control Panel." L["Enhanced PVP Messages"] = "Erweiterte PvP Nachrichten" -L["General"] = "Allgemein" L["Height of the watch tracker. Increase size to be able to see more objectives."] = "Höhe des Questfenster. Größe verändern um mehr Ziele zu sehen." L["Hide At Max Level"] = "Auf max. Level vestecken" L["Hide Error Text"] = "Fehlertext verstecken" @@ -601,7 +599,7 @@ L["Minimum Time Left"] = "Minimale Zeit verbleibend" L["Missing"] = "Fehlend" L["Name Color"] = "Namen Farbe" L["Name Only"] = "Nur Name" -L["NamePlates"] = "Namensplaketten" +L["Nameplates"] = "Namensplaketten" L["Nameplate Motion Type"] = true; L["Non-Target Transparency"] = "Transparenz nicht ausgewählter Ziele" L["Not Targeted"] = "Nicht anvisiert" @@ -816,7 +814,6 @@ L["Color power by classcolor or reaction."] = "Färbe die Kraftleiste entspreche L["Color the health backdrop by class or reaction."] = "Färbe den Gesundheitshintergrund nach Klasse oder Reaktion." L["Color the unit healthbar if there is a debuff that can be dispelled by you."] = "Aktiviere die Hervorhebung von Einheitenfenstern, wenn ein von dir bannbarer Schwächungszauber vorhanden ist." L["Color Turtle Buffs"] = "Färbe Turtle Stärkungszauber" -L["Color"] = "Farbe" L["Colored Icon"] = "Buntes Symbol" L["Coloring (Specific)"] = "Färben (Spezifisch)" L["Coloring"] = "Färben" @@ -915,7 +912,6 @@ L["Heal Prediction"] = "Eingehende Heilung" L["Health Backdrop"] = "Gesundheitshintergrund" L["Health Border"] = "Gesundheitsumrandung" L["Health By Value"] = "Gesundheit nach dem Wert" -L["Health"] = "Leben" L["Height"] = "Höhe" L["Horizontal Spacing"] = "Horizontaler Abstand" L["Horizontal"] = "Horizontal" --Also used in bags module @@ -959,8 +955,6 @@ L["Middle clicking the unit frame will cause your focus to match the unit."] = " L["Middle"] = "Mitte" L["Minimum Duration"] = "Minimale Dauer" L["Mouseover"] = "Mouseover" -L["Name"] = "Name" --Also used in Buffs and Debuffs -L["Neutral"] = "Neutral" L["Non-Interruptable"] = "Nicht-Unterbrechbar" L["Not valid spell id"] = "Keine gültige Zauber ID" L["Num Rows"] = "Anzahl der Reihen" @@ -1091,7 +1085,7 @@ L["Transparent"] = "Transparent" L["Turtle Color"] = "Turtle Farbe" L["Unholy"] = "Unheilig" L["Uniform Threshold"] = "Einheitlicher Schwellenwert" -L["UnitFrames"] = "Einheitenfenster" +L["Unitframes"] = "Einheitenfenster" L["Up"] = "Hinauf" L["Use Custom Level"] = "Benutze benutzerdefinierte Ebene" L["Use Custom Strata"] = "Benutze benutzerdefinierte Schicht" diff --git a/ElvUI_Config/Locales/Korean_Config.lua b/ElvUI_Config/Locales/Korean_Config.lua index fe04598..938b9c7 100644 --- a/ElvUI_Config/Locales/Korean_Config.lua +++ b/ElvUI_Config/Locales/Korean_Config.lua @@ -100,7 +100,6 @@ L["TEXT_FORMAT_DESC"] = [[글자가 표시되는 형식을 변경할 수 있습 --ActionBars L["Action Paging"] = "페이지 자동전환 조건" -L["ActionBars"] = "행동단축바" L["Action button keybinds will respond on key down, rather than on key up"] = true; L["Allow LBF to handle the skinning of this element."] = true; L["Alpha"] = "투명도" @@ -457,7 +456,6 @@ L["Enable/Disable the loot frame."] = "주사위 굴림 및 전리품 획득 확 L["Enable/Disable the loot roll frame."] = "ElvUI 디자인의 입찰 / 차비 / 마력추출을 선택하는 주사위 굴림창 사용 여부를 결정합니다." L["Enables the ElvUI Raid Control panel."] = true; L["Enhanced PVP Messages"] = true; -L["General"] = "일반" L["Height of the watch tracker. Increase size to be able to see more objectives."] = "퀘스트프레임의 길이를 결정합니다." L["Hide At Max Level"] = true; L["Hide Error Text"] = "전투중 에러 숨기기" @@ -649,7 +647,7 @@ L["Minimum Time Left"] = true L["Missing"] = true L["Name Color"] = true L["Name Only"] = true -L["NamePlates"] = "이름표" +L["Nameplates"] = "이름표" L["Nameplate Motion Type"] = true; L["Non-Target Transparency"] = true; L["Not Targeted"] = true @@ -863,7 +861,6 @@ L["Color power by classcolor or reaction."] = "자원 색상을 직업색으로 L["Color the health backdrop by class or reaction."] = "직업이나 관계에 따라 생명력 배경의 색상을 변경합니다." L["Color the unit healthbar if there is a debuff that can be dispelled by you."] = "플레이어가 해제할 수 있는 디버프를 가졌다면 생명력바에 색상을 입혀 강조합니다." L["Color Turtle Buffs"] = "생존기류 따로 색상지정" -L["Color"] = "색상" L["Colored Icon"] = "색상자 아이콘" L["Coloring (Specific)"] = "색상 설정 (지정)" L["Coloring"] = "색상 설정 (공통)" @@ -962,7 +959,6 @@ L["Heal Prediction"] = "예상 치유량" L["Health Backdrop"] = "생명력 배경" L["Health Border"] = "체력바 테두리만" L["Health By Value"] = "생명력에 비례한 색상" -L["Health"] = "생명력" L["Height"] = "세로 길이" L["Horizontal Spacing"] = "수평 간격" L["Horizontal"] = "가로" @@ -1006,8 +1002,6 @@ L["Middle clicking the unit frame will cause your focus to match the unit."] = " L["Middle"] = true; L["Minimum Duration"] = true; L["Mouseover"] = "마우스오버 시 표시" -L["Name"] = "이름" -L["Neutral"] = "중립" L["Non-Interruptable"] = "차단할 수 없는 기술" L["Not valid spell id"] = "유효한 주문 ID가 아닙니다." L["Num Rows"] = "최대 표시 줄 개수" @@ -1138,7 +1132,7 @@ L["Transparent"] = "반투명화" L["Turtle Color"] = "생존기 색상" L["Unholy"] = "부정" L["Uniform Threshold"] = true; -L["UnitFrames"] = "유닛프레임" +L["Unitframes"] = "유닛프레임" L["Up"] = "위로" L["Use Custom Level"] = true; L["Use Custom Strata"] = true; diff --git a/ElvUI_Config/Locales/Portuguese_Config.lua b/ElvUI_Config/Locales/Portuguese_Config.lua index 3b4e38d..7a64550 100644 --- a/ElvUI_Config/Locales/Portuguese_Config.lua +++ b/ElvUI_Config/Locales/Portuguese_Config.lua @@ -64,7 +64,6 @@ Para desactivar deixe o espaço em branco, se precisar de mais informações vis --ActionBars L["Action Paging"] = "Paginação da Barra de Ação" -L["ActionBars"] = "Barras de Ações" L["Action button keybinds will respond on key down, rather than on key up"] = true; L["Allow LBF to handle the skinning of this element."] = true; L["Alpha"] = "Transparência" @@ -409,7 +408,6 @@ L["Enable/Disable the loot frame."] = "Ativar/Desativar painel de saques." L["Enable/Disable the loot roll frame."] = "Ativar/Desativar painel de disputa de saques" L["Enables the ElvUI Raid Control panel."] = true; L["Enhanced PVP Messages"] = true; -L["General"] = "Geral" L["Height of the watch tracker. Increase size to be able to see more objectives."] = true; L["Hide At Max Level"] = true; L["Hide Error Text"] = "Esconder Texto de Erro" @@ -601,7 +599,7 @@ L["Minimum Time Left"] = true L["Missing"] = true L["Name Color"] = true L["Name Only"] = true -L["NamePlates"] = "Placas de Identificação" +L["Nameplates"] = "Placas de Identificação" L["Nameplate Motion Type"] = true; L["Non-Target Transparency"] = true; L["Not Targeted"] = true @@ -815,7 +813,6 @@ L["Color power by classcolor or reaction."] = "Colorir poder pela cor da classe L["Color the health backdrop by class or reaction."] = "Colorir o fundo da vida pela cor da classe ou reação." L["Color the unit healthbar if there is a debuff that can be dispelled by you."] = "Colorir a barra de vida se existir uma penalidade que você possa dissipar." L["Color Turtle Buffs"] = "Colorir bônus de Tartaruga" -L["Color"] = "Cor" L["Colored Icon"] = "Ícone Colorido" L["Coloring (Specific)"] = "Coloração (Específica)" L["Coloring"] = "Coloração" @@ -914,7 +911,6 @@ L["Heal Prediction"] = "Curas por vir" L["Health Backdrop"] = "Fundo da Vida" L["Health Border"] = "Borda da Vida" L["Health By Value"] = "Vida por Valor" -L["Health"] = "Vida" L["Height"] = "Altura" L["Horizontal Spacing"] = "Espamento Horizontal" L["Horizontal"] = "Horizontal" @@ -958,8 +954,6 @@ L["Middle clicking the unit frame will cause your focus to match the unit."] = " L["Middle"] = true; L["Minimum Duration"] = true; L["Mouseover"] = "Mouseover" -L["Name"] = "Nome" -L["Neutral"] = "Neutro" L["Non-Interruptable"] = "Não interrompível" L["Not valid spell id"] = "Identificação (id) do feitiço não é valida" L["Num Rows"] = "Número de linhas" @@ -1090,7 +1084,7 @@ L["Transparent"] = "Transparente" L["Turtle Color"] = "Cor para Tartaruga" L["Unholy"] = "Profano" L["Uniform Threshold"] = true; -L["UnitFrames"] = "Quadro de Unidades" +L["Unitframes"] = "Quadro de Unidades" L["Up"] = "Acima" L["Use Custom Level"] = true; L["Use Custom Strata"] = true; diff --git a/ElvUI_Config/Locales/Russian_Config.lua b/ElvUI_Config/Locales/Russian_Config.lua index 1130342..280c1cf 100644 --- a/ElvUI_Config/Locales/Russian_Config.lua +++ b/ElvUI_Config/Locales/Russian_Config.lua @@ -64,7 +64,6 @@ L["TEXT_FORMAT_DESC"] = [[Строка для изменения вида тек --ActionBars L["Action Paging"] = "Переключение панелей" -L["ActionBars"] = "Панели команд" L["Action button keybinds will respond on key down, rather than on key up"] = "Способности будут задействоваться, когда пользователь нажимает, а не отпускает клавишу." L["Allow LBF to handle the skinning of this element."] = "Разрешить LBF обрабатывать этот элемент." L["Alpha"] = "Прозрачность" @@ -409,7 +408,6 @@ L["Enable/Disable the loot frame."] = "Включить/выключить ок L["Enable/Disable the loot roll frame."] = "Включить/выключить фрейм распределения добычи ElvUI." L["Enables the ElvUI Raid Control panel."] = "Включает панель управления рейдом ElvUI." L["Enhanced PVP Messages"] = "Улущенные PvP сообщения" -L["General"] = "Общие" L["Height of the watch tracker. Increase size to be able to see more objectives."] = "Высота списка заданий. Увеличение размера позволить видеть большее количество." L["Hide At Max Level"] = "Прятать на максимальном уровне" L["Hide Error Text"] = "Прятать сообщения об ошибках" @@ -601,7 +599,7 @@ L["Minimum Time Left"] = "Минимум оставшегося времени" L["Missing"] = "Отсутствует" L["Name Color"] = "Цвет имени" L["Name Only"] = "Только имя" -L["NamePlates"] = "Индикаторы здоровья" +L["Nameplates"] = "Индикаторы здоровья" L["Nameplate Motion Type"] = "Размещение индикаторов здоровья" L["Non-Target Transparency"] = "Прозрачность не цели" L["Not Targeted"] = "Не взят в цель" @@ -815,7 +813,6 @@ L["Color power by classcolor or reaction."] = "Окрашивает полосу L["Color the health backdrop by class or reaction."] = "Окрасить фон полосы здоровья по цвету класса или реакции." L["Color the unit healthbar if there is a debuff that can be dispelled by you."] = "Изменять цвет полосы здоровья, если на юните есть дебафф, который Вы можете снять." L["Color Turtle Buffs"] = "Окрашивать Turtle Buffs" -L["Color"] = "Цвет" L["Colored Icon"] = "Окрашенная иконка" L["Coloring (Specific)"] = "Окрашивание конкретных" L["Coloring"] = "Окрашивание" @@ -914,7 +911,6 @@ L["Heal Prediction"] = "Входящее исцеление" L["Health Backdrop"] = "Фон полосы здоровья" L["Health Border"] = "Граница здоровья" L["Health By Value"] = "Здоровье по значению" -L["Health"] = "Здоровье" L["Height"] = "Высота" L["Horizontal Spacing"] = "Отступ по горизонтали" L["Horizontal"] = "Горизонтально" --Also used in bags module @@ -958,8 +954,6 @@ L["Middle clicking the unit frame will cause your focus to match the unit."] = " L["Middle"] = "Центр" L["Minimum Duration"] = "Минимальная длительность" L["Mouseover"] = "При наведении" -L["Name"] = "Имя" --Also used in Buffs and Debuffs -L["Neutral"] = "Нейтральный" L["Non-Interruptable"] = "Непрерываемые" L["Not valid spell id"] = "Неверный ID заклинания" L["Num Rows"] = "Рядов" @@ -1090,7 +1084,7 @@ L["Transparent"] = "Прозрачный" L["Turtle Color"] = "Цвет Turtle Buffs" L["Unholy"] = "Нечистивость" L["Uniform Threshold"] = "Граница убывания" -L["UnitFrames"] = "Рамки юнитов" +L["Unitframes"] = "Рамки юнитов" L["Up"] = "Вверх" L["Use Custom Level"] = "Свой уровень" L["Use Custom Strata"] = "Свой слой" diff --git a/ElvUI_Config/Locales/Spanish_Config.lua b/ElvUI_Config/Locales/Spanish_Config.lua index 6f3d773..25c4ee5 100644 --- a/ElvUI_Config/Locales/Spanish_Config.lua +++ b/ElvUI_Config/Locales/Spanish_Config.lua @@ -64,7 +64,6 @@ Para desactivarlo dejar el campo en blanco, si necesitas más información visit --ActionBars L["Action Paging"] = "Paginación" -L["ActionBars"] = "Barras de Acción" L["Action button keybinds will respond on key down, rather than on key up"] = true; L["Allow LBF to handle the skinning of this element."] = true; L["Alpha"] = "Transparencia" @@ -409,7 +408,6 @@ L["Enable/Disable the loot frame."] = "Activa/Desactiva el marco de botín." L["Enable/Disable the loot roll frame."] = "Activa/Desactiva el marco de sorteo de botín." L["Enables the ElvUI Raid Control panel."] = true; L["Enhanced PVP Messages"] = true; -L["General"] = "General" L["Height of the watch tracker. Increase size to be able to see more objectives."] = true; L["Hide At Max Level"] = true; L["Hide Error Text"] = "Ocultar Texto de Error" @@ -601,7 +599,7 @@ L["Minimum Time Left"] = true L["Missing"] = true L["Name Color"] = true L["Name Only"] = true -L["NamePlates"] = "Placas de Nombre" +L["Nameplates"] = "Placas de Nombre" L["Nameplate Motion Type"] = true; L["Non-Target Transparency"] = true; L["Not Targeted"] = true @@ -815,7 +813,6 @@ L["Color power by classcolor or reaction."] = "Color de poder por el color de cl L["Color the health backdrop by class or reaction."] = "Color de fondo de salud por el color de clase o reacción." L["Color the unit healthbar if there is a debuff that can be dispelled by you."] = "Color de la barra de salud si hay un perjuicio que puede ser disipado por ti." L["Color Turtle Buffs"] = "Colorear Beneficios de Tortuga" -L["Color"] = "Color" L["Colored Icon"] = "Icono Coloreado" L["Coloring (Specific)"] = "Coloreado (Específico)" L["Coloring"] = "Coloreado" @@ -914,7 +911,6 @@ L["Heal Prediction"] = "Predicción de Sanación" L["Health Backdrop"] = "Fondo de Salud" L["Health Border"] = "Borde de Salud" L["Health By Value"] = "Salud por Valor" -L["Health"] = "Salud" L["Height"] = "Altura" L["Horizontal Spacing"] = "Espaciado Horizontal" L["Horizontal"] = "Horizontal" @@ -958,8 +954,6 @@ L["Middle clicking the unit frame will cause your focus to match the unit."] = " L["Middle"] = true; L["Minimum Duration"] = true; L["Mouseover"] = "Pasar el ratón por encima" -L["Name"] = "Nombre" -L["Neutral"] = "Neutral" L["Non-Interruptable"] = "No-Interrumpible" L["Not valid spell id"] = "No es un id de hechizo válido" L["Num Rows"] = "Número de Filas" @@ -1090,7 +1084,7 @@ L["Transparent"] = "Transparente" L["Turtle Color"] = "Color de Tortuga" L["Unholy"] = "Profano" L["Uniform Threshold"] = true; -L["UnitFrames"] = "Marco de Unidad" +L["Unitframes"] = "Marco de Unidad" L["Up"] = "Arriba" L["Use Custom Level"] = true; L["Use Custom Strata"] = true; diff --git a/ElvUI_Config/Locales/Taiwanese_Config.lua b/ElvUI_Config/Locales/Taiwanese_Config.lua index cd46be8..2e73461 100644 --- a/ElvUI_Config/Locales/Taiwanese_Config.lua +++ b/ElvUI_Config/Locales/Taiwanese_Config.lua @@ -64,7 +64,6 @@ L["TEXT_FORMAT_DESC"] = [[請填入代碼以變更文字格式。 --ActionBars L["Action Paging"] = "快捷列翻頁" -L["ActionBars"] = "快捷列" L["Action button keybinds will respond on key down, rather than on key up"] = true; L["Allow LBF to handle the skinning of this element."] = "允許 LBF 來處理此元件的皮膚" L["Alpha"] = "透明度" @@ -409,7 +408,6 @@ L["Enable/Disable the loot frame."] = "啟用/停用拾取框架." L["Enable/Disable the loot roll frame."] = "啟用/停用擲骰框架." L["Enables the ElvUI Raid Control panel."] = true; L["Enhanced PVP Messages"] = "PVP增強信息" -L["General"] = "一般設定" L["Height of the watch tracker. Increase size to be able to see more objectives."] = "任務框體的高度.增加大小以看到更多目標" L["Hide At Max Level"] = "在最高等級時隱藏" L["Hide Error Text"] = "隱藏錯誤文字" @@ -601,7 +599,7 @@ L["Minimum Time Left"] = true L["Missing"] = "缺失" L["Name Color"] = "姓名顏色" L["Name Only"] = true -L["NamePlates"] = "姓名面板(血條)" +L["Nameplates"] = "姓名面板(血條)" L["Nameplate Motion Type"] = true; L["Non-Target Transparency"] = "非目標透明度" L["Not Targeted"] = "非目標" @@ -814,7 +812,6 @@ L["Color power by classcolor or reaction."] = "以職業色顯示能量." L["Color the health backdrop by class or reaction."] = "生命條背景色以職業色顯示." L["Color the unit healthbar if there is a debuff that can be dispelled by you."] = "如果單位目標的減益光環可被驅散, 加亮顯示其生命值." L["Color Turtle Buffs"] = "減傷類 Buff 的顏色" -L["Color"] = "顏色" L["Colored Icon"] = "圖示色彩" L["Coloring (Specific)"] = "著色(具體)" L["Coloring"] = "著色" @@ -913,7 +910,6 @@ L["Heal Prediction"] = "治療量預測" L["Health Backdrop"] = "生命條背景" L["Health Border"] = "生命條邊框" L["Health By Value"] = "生命條顏色依數值變化" -L["Health"] = "生命條" L["Height"] = "高" L["Horizontal Spacing"] = "水平間隔" L["Horizontal"] = "水平" @@ -957,8 +953,6 @@ L["Middle clicking the unit frame will cause your focus to match the unit."] = " L["Middle"] = "中間" L["Minimum Duration"] = "最低持續時間" L["Mouseover"] = "滑鼠滑過顯示" -L["Name"] = "姓名" -L["Neutral"] = "中立" L["Non-Interruptable"] = "不可斷法的施法條色" L["Not valid spell id"] = "無效的技能ID" L["Num Rows"] = "行數" @@ -1089,7 +1083,7 @@ L["Transparent"] = "透明" L["Turtle Color"] = "減傷類的顏色" L["Unholy"] = "穢邪符文" L["Uniform Threshold"] = "統一閾值" -L["UnitFrames"] = "單位框架" +L["Unitframes"] = "單位框架" L["Up"] = "上" L["Use Custom Level"] = true; L["Use Custom Strata"] = true; diff --git a/ElvUI_Config/Maps.lua b/ElvUI_Config/Maps.lua index c909175..418daa6 100644 --- a/ElvUI_Config/Maps.lua +++ b/ElvUI_Config/Maps.lua @@ -1,7 +1,13 @@ -local E, L, V, P, G, _ = unpack(ElvUI); +local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local WM = E:GetModule("WorldMap"); local MM = E:GetModule("Minimap"); +--Cache global variables +--Lua functions +local getn = table.getn +--WoW API / Variables +local GENERAL, HIDE, MAIL_LABEL, MINIMAP_LABEL, NONE, WORLD_MAP = GENERAL, HIDE, MAIL_LABEL, MINIMAP_LABEL, NONE, WORLD_MAP + E.Options.args.maps = { type = "group", name = L["Maps"], @@ -20,7 +26,7 @@ E.Options.args.maps = { generalGroup = { order = 1, type = "group", - name = L["General"], + name = GENERAL, guiInline = true, args = { smallerWorldMap = { @@ -110,7 +116,7 @@ E.Options.args.maps = { generalGroup = { order = 1, type = "group", - name = L["General"], + name = GENERAL, guiInline = true, args = { enable = { @@ -314,50 +320,8 @@ E.Options.args.maps = { } } }, - lfgEye = { - order = 3, - type = "group", - name = L["LFG Queue"], - get = function(info) return E.db.general.minimap.icons.lfgEye[ info[getn(info)] ]; end, - set = function(info, value) E.db.general.minimap.icons.lfgEye[ info[getn(info)] ] = value; MM:UpdateSettings(); end, - args = { - position = { - order = 1, - type = "select", - name = L["Position"], - values = { - ["LEFT"] = L["Left"], - ["RIGHT"] = L["Right"], - ["TOP"] = L["Top"], - ["BOTTOM"] = L["Bottom"], - ["TOPLEFT"] = L["Top Left"], - ["TOPRIGHT"] = L["Top Right"], - ["BOTTOMLEFT"] = L["Bottom Left"], - ["BOTTOMRIGHT"] = L["Bottom Right"] - } - }, - scale = { - order = 2, - type = "range", - name = L["Scale"], - min = 0.5, max = 2, step = 0.05 - }, - xOffset = { - order = 3, - type = "range", - name = L["xOffset"], - min = -50, max = 50, step = 1 - }, - yOffset = { - order = 4, - type = "range", - name = L["yOffset"], - min = -50, max = 50, step = 1 - } - } - }, battlefield = { - order = 4, + order = 3, type = "group", name = L["PvP Queue"], get = function(info) return E.db.general.minimap.icons.battlefield[ info[getn(info)] ]; end, @@ -399,7 +363,7 @@ E.Options.args.maps = { } }, difficulty = { - order = 5, + order = 4, type = "group", name = L["Instance Difficulty"], get = function(info) return E.db.general.minimap.icons.difficulty[ info[getn(info)] ]; end, @@ -445,4 +409,4 @@ E.Options.args.maps = { } } } -}; \ No newline at end of file +} \ No newline at end of file diff --git a/ElvUI_Config/Nameplates.lua b/ElvUI_Config/Nameplates.lua index ae4ad0b..16c2723 100644 --- a/ElvUI_Config/Nameplates.lua +++ b/ElvUI_Config/Nameplates.lua @@ -1,11 +1,17 @@ local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local NP = E:GetModule("NamePlates"); +local ACD = LibStub("AceConfigDialog-3.0") + +--Cache global variables +--Lua functions +local getn = table.getn +--WoW API / Variables +local COLOR, FACTION_STANDING_LABEL4 = COLOR, FACTION_STANDING_LABEL4 +local FILTER, FILTERS, GENERAL, HEALTH, HIDE, LEVEL, NAME, NONE = FILTER, FILTERS, GENERAL, HEALTH, HIDE, LEVEL, NAME, NONE local selectedFilter local filters -local ACD = LibStub("AceConfigDialog-3.0") - local positionValues = { TOPLEFT = "TOPLEFT", LEFT = "LEFT", @@ -16,7 +22,7 @@ local positionValues = { CENTER = "CENTER", TOP = "TOP", BOTTOM = "BOTTOM" -}; +} local function UpdateFilterGroup() if not selectedFilter or not E.global["nameplates"]["filter"][selectedFilter] then @@ -29,8 +35,8 @@ local function UpdateFilterGroup() name = selectedFilter, guiInline = true, order = -10, - get = function(info) return E.global["nameplates"]["filter"][selectedFilter][ info[getn(info)] ] end, - set = function(info, value) E.global["nameplates"]["filter"][selectedFilter][ info[getn(info)] ] = value; NP:ForEachPlate("CheckFilter"); NP:ConfigureAll(); UpdateFilterGroup() end, + get = function(info) return E.global["nameplates"]["filter"][selectedFilter][ info[getn(info) ]] end, + set = function(info, value) E.global["nameplates"]["filter"][selectedFilter][ info[getn(info) ]] = value; NP:ForEachPlate("CheckFilter"); NP:ConfigureAll(); UpdateFilterGroup() end, args = { enable = { type = "toggle", @@ -53,16 +59,16 @@ local function UpdateFilterGroup() color = { type = "color", order = 4, - name = L["Color"], + name = COLOR, get = function(info) - local t = E.global["nameplates"]["filter"][selectedFilter][ info[getn(info)] ] + local t = E.global["nameplates"]["filter"][selectedFilter][ info[getn(info) ]] if t then return t.r, t.g, t.b, t.a end end, set = function(info, r, g, b) - E.global["nameplates"]["filter"][selectedFilter][ info[getn(info)] ] = {} - local t = E.global["nameplates"]["filter"][selectedFilter][ info[getn(info)] ] + E.global["nameplates"]["filter"][selectedFilter][ info[getn(info) ]] = {} + local t = E.global["nameplates"]["filter"][selectedFilter][ info[getn(info) ]] if t then t.r, t.g, t.b = r, g, b UpdateFilterGroup() @@ -81,12 +87,12 @@ local function UpdateFilterGroup() } end -local ORDER = 100; +local ORDER = 100 local function GetUnitSettings(unit, name) - local copyValues = {}; + local copyValues = {} for x, y in pairs(NP.db.units) do if(type(y) == "table" and x ~= unit) then - copyValues[x] = L[x]; + copyValues[x] = L[x] end end local group = { @@ -94,8 +100,8 @@ local function GetUnitSettings(unit, name) type = "group", name = name, childGroups = "tab", - get = function(info) return E.db.nameplates.units[unit][ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit][ info[getn(info)] ] = value; NP:ConfigureAll(); end, + get = function(info) return E.db.nameplates.units[unit][ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit][ info[getn(info) ]] = value; NP:ConfigureAll() end, args = { copySettings = { order = -10, @@ -103,10 +109,10 @@ local function GetUnitSettings(unit, name) name = L["Copy Settings From"], desc = L["Copy settings from another unit."], values = copyValues, - get = function() return ""; end, + get = function() return "" end, set = function(info, value) - NP:CopySettings(value, unit); - NP:ConfigureAll(); + NP:CopySettings(value, unit) + NP:ConfigureAll() end }, defaultSettings = { @@ -115,21 +121,21 @@ local function GetUnitSettings(unit, name) name = L["Default Settings"], desc = L["Set Settings to Default"], func = function(info, value) - NP:ResetSettings(unit); - NP:ConfigureAll(); + NP:ResetSettings(unit) + NP:ConfigureAll() end }, healthGroup = { order = 1, - name = L["Health"], + name = HEALTH, type = "group", - get = function(info) return E.db.nameplates.units[unit].healthbar[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].healthbar[ info[getn(info)] ] = value; NP:ConfigureAll(); end, + get = function(info) return E.db.nameplates.units[unit].healthbar[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].healthbar[ info[getn(info) ]] = value; NP:ConfigureAll() end, args = { header = { order = 0, type = "header", - name = L["Health"] + name = HEALTH }, enable = { order = 1, @@ -153,8 +159,8 @@ local function GetUnitSettings(unit, name) type = "group", name = L["Text"], guiInline = true, - get = function(info) return E.db.nameplates.units[unit].healthbar.text[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].healthbar.text[ info[getn(info)] ] = value; NP:ConfigureAll(); end, + get = function(info) return E.db.nameplates.units[unit].healthbar.text[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].healthbar.text[ info[getn(info) ]] = value; NP:ConfigureAll() end, args = { enable = { order = 1, @@ -182,8 +188,8 @@ local function GetUnitSettings(unit, name) order = 3, name = L["Cast Bar"], type = "group", - get = function(info) return E.db.nameplates.units[unit].castbar[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].castbar[ info[getn(info)] ] = value; NP:ConfigureAll(); end, + get = function(info) return E.db.nameplates.units[unit].castbar[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].castbar[ info[getn(info) ]] = value; NP:ConfigureAll() end, args = { header = { order = 0, @@ -250,9 +256,9 @@ local function GetUnitSettings(unit, name) order = 4, name = L["Buffs"], type = "group", - get = function(info) return E.db.nameplates.units[unit].buffs.filters[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].buffs.filters[ info[getn(info)] ] = value; NP:ConfigureAll(); end, - disabled = function() return not E.db.nameplates.units[unit].healthbar.enable; end, + get = function(info) return E.db.nameplates.units[unit].buffs.filters[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].buffs.filters[ info[getn(info) ]] = value; NP:ConfigureAll() end, + disabled = function() return not E.db.nameplates.units[unit].healthbar.enable end, args = { header = { order = 0, @@ -263,8 +269,8 @@ local function GetUnitSettings(unit, name) order = 1, type = "toggle", name = L["Enable"], - get = function(info) return E.db.nameplates.units[unit].buffs[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].buffs[ info[getn(info)] ] = value; NP:ConfigureAll(); end + get = function(info) return E.db.nameplates.units[unit].buffs[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].buffs[ info[getn(info) ]] = value; NP:ConfigureAll() end }, numAuras = { order = 2, @@ -272,8 +278,8 @@ local function GetUnitSettings(unit, name) name = L["# Displayed Auras"], desc = L["Controls how many auras are displayed, this will also affect the size of the auras."], min = 1, max = 8, step = 1, - get = function(info) return E.db.nameplates.units[unit].buffs[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].buffs[ info[getn(info)] ] = value; NP:ConfigureAll(); end + get = function(info) return E.db.nameplates.units[unit].buffs[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].buffs[ info[getn(info) ]] = value; NP:ConfigureAll() end }, baseHeight = { order = 3, @@ -281,11 +287,11 @@ local function GetUnitSettings(unit, name) name = L["Icon Base Height"], desc = L["Base Height for the Aura Icon"], min = 6, max = 60, step = 1, - get = function(info) return E.db.nameplates.units[unit].buffs[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].buffs[ info[getn(info)] ] = value; NP:ConfigureAll(); end + get = function(info) return E.db.nameplates.units[unit].buffs[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].buffs[ info[getn(info) ]] = value; NP:ConfigureAll() end }, filtersGroup = { - name = L["Filters"], + name = FILTERS, order = 4, type = "group", guiInline = true, @@ -322,9 +328,9 @@ local function GetUnitSettings(unit, name) order = 5, name = L["Debuffs"], type = "group", - get = function(info) return E.db.nameplates.units[unit].debuffs.filters[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].debuffs.filters[ info[getn(info)] ] = value; NP:ConfigureAll(); end, - disabled = function() return not E.db.nameplates.units[unit].healthbar.enable; end, + get = function(info) return E.db.nameplates.units[unit].debuffs.filters[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].debuffs.filters[ info[getn(info) ]] = value; NP:ConfigureAll() end, + disabled = function() return not E.db.nameplates.units[unit].healthbar.enable end, args = { header = { order = 0, @@ -335,8 +341,8 @@ local function GetUnitSettings(unit, name) order = 1, type = "toggle", name = L["Enable"], - get = function(info) return E.db.nameplates.units[unit].debuffs[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].debuffs[ info[getn(info)] ] = value; NP:ConfigureAll(); end + get = function(info) return E.db.nameplates.units[unit].debuffs[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].debuffs[ info[getn(info) ]] = value; NP:ConfigureAll() end }, numAuras = { order = 2, @@ -344,8 +350,8 @@ local function GetUnitSettings(unit, name) name = L["# Displayed Auras"], desc = L["Controls how many auras are displayed, this will also affect the size of the auras."], min = 1, max = 8, step = 1, - get = function(info) return E.db.nameplates.units[unit].debuffs[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].debuffs[ info[getn(info)] ] = value; NP:ConfigureAll(); end + get = function(info) return E.db.nameplates.units[unit].debuffs[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].debuffs[ info[getn(info) ]] = value; NP:ConfigureAll() end }, baseHeight = { order = 3, @@ -353,11 +359,11 @@ local function GetUnitSettings(unit, name) name = L["Icon Base Height"], desc = L["Base Height for the Aura Icon"], min = 6, max = 60, step = 1, - get = function(info) return E.db.nameplates.units[unit].debuffs[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].debuffs[ info[getn(info)] ] = value; NP:ConfigureAll(); end + get = function(info) return E.db.nameplates.units[unit].debuffs[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].debuffs[ info[getn(info) ]] = value; NP:ConfigureAll() end }, filtersGroup = { - name = L["Filters"], + name = FILTERS, order = 4, type = "group", guiInline = true, @@ -404,57 +410,57 @@ local function GetUnitSettings(unit, name) order = 1, name = L["Enable"], type = "toggle", - get = function(info) return E.db.nameplates.units[unit].showLevel; end, - set = function(info, value) E.db.nameplates.units[unit].showLevel = value; NP:ConfigureAll(); end + get = function(info) return E.db.nameplates.units[unit].showLevel end, + set = function(info, value) E.db.nameplates.units[unit].showLevel = value; NP:ConfigureAll() end } } }, nameGroup = { order = 7, - name = L["Name"], + name = NAME, type = "group", - get = function(info) return E.db.nameplates.units[unit].name[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].name[ info[getn(info)] ] = value; NP:ConfigureAll(); end, + get = function(info) return E.db.nameplates.units[unit].name[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].name[ info[getn(info) ]] = value; NP:ConfigureAll() end, args = { header = { order = 0, type = "header", - name = L["Name"] + name = NAME }, enable = { order = 1, name = L["Enable"], type = "toggle", - get = function(info) return E.db.nameplates.units[unit].showName; end, - set = function(info, value) E.db.nameplates.units[unit].showName = value; NP:ConfigureAll(); end + get = function(info) return E.db.nameplates.units[unit].showName end, + set = function(info, value) E.db.nameplates.units[unit].showName = value; NP:ConfigureAll() end } } } } - }; + } - if(unit == "FRIENDLY_PLAYER" or unit == "ENEMY_PLAYER") then + if (unit == "FRIENDLY_PLAYER" or unit == "ENEMY_PLAYER") then group.args.healthGroup.args.useClassColor = { order = 4, type = "toggle", name = L["Use Class Color"], desc = L["Depends on Class Caching module!"], disabled = function() return not E.private.general.classCache end - }; + } group.args.nameGroup.args.useClassColor = { order = 3, type = "toggle", name = L["Use Class Color"], desc = L["Depends on Class Caching module!"], disabled = function() return not E.private.general.classCache end - }; - elseif(unit == "ENEMY_NPC" or unit == "FRIENDLY_NPC") then + } + elseif (unit == "ENEMY_NPC" or unit == "FRIENDLY_NPC") then group.args.eliteIcon = { order = 10, name = L["Elite Icon"], type = "group", - get = function(info) return E.db.nameplates.units[unit].eliteIcon[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.units[unit].eliteIcon[ info[getn(info)] ] = value; NP:ConfigureAll(); end, + get = function(info) return E.db.nameplates.units[unit].eliteIcon[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.units[unit].eliteIcon[ info[getn(info) ]] = value; NP:ConfigureAll() end, args = { header = { order = 0, @@ -497,26 +503,26 @@ local function GetUnitSettings(unit, name) min = -100, max = 100, step = 1 } } - }; + } end - ORDER = ORDER + 100; - return group; + ORDER = ORDER + 100 + return group end E.Options.args.nameplate = { type = "group", - name = L["NamePlates"], + name = L["Nameplates"], childGroups = "tree", - get = function(info) return E.db.nameplates[ info[getn(info)] ] end, - set = function(info, value) E.db.nameplates[ info[getn(info)] ] = value; NP:ConfigureAll(); end, + get = function(info) return E.db.nameplates[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates[ info[getn(info) ]] = value; NP:ConfigureAll() end, args = { enable = { order = 1, type = "toggle", name = L["Enable"], - get = function(info) return E.private.nameplates[ info[getn(info)] ]; end, - set = function(info, value) E.private.nameplates[ info[getn(info)] ] = value; E:StaticPopup_Show("PRIVATE_RL"); end + get = function(info) return E.private.nameplates[ info[getn(info) ]] end, + set = function(info, value) E.private.nameplates[ info[getn(info) ]] = value; E:StaticPopup_Show("PRIVATE_RL") end }, intro = { order = 2, @@ -531,14 +537,14 @@ E.Options.args.nameplate = { generalGroup = { order = 20, type = "group", - name = L["General Options"], + name = GENERAL, childGroups = "tab", - disabled = function() return not E.NamePlates; end, + disabled = function() return not E.NamePlates end, args = { general = { order = 1, type = "group", - name = L["General"], + name = GENERAL, args = { statusbar = { order = 0, @@ -594,8 +600,8 @@ E.Options.args.nameplate = { ["TOGGLE_OFF"] = L["Toggle Off While In Combat"], }, set = function(info, value) - E.db.nameplates[ info[getn(info)] ] = value; - NP:PLAYER_REGEN_ENABLED(); + E.db.nameplates[ info[getn(info) ]] = value + NP:PLAYER_REGEN_ENABLED() end, }, showFriendlyCombat = { @@ -609,8 +615,8 @@ E.Options.args.nameplate = { ["TOGGLE_OFF"] = L["Toggle Off While In Combat"], }, set = function(info, value) - E.db.nameplates[ info[getn(info)] ] = value; - NP:PLAYER_REGEN_ENABLED(); + E.db.nameplates[ info[getn(info) ]] = value + NP:PLAYER_REGEN_ENABLED() end }, comboPoints = { @@ -658,72 +664,72 @@ E.Options.args.nameplate = { -- TODO hidden = true, get = function(info) - local t = E.db.nameplates.threat[ info[getn(info)] ]; - local d = P.nameplates.threat[info[getn(info)]]; - return t.r, t.g, t.b, t.a, d.r, d.g, d.b; + local t = E.db.nameplates.threat[ info[getn(info) ]] + local d = P.nameplates.threat[ info[getn(info) ]] + return t.r, t.g, t.b, t.a, d.r, d.g, d.b end, set = function(info, r, g, b) - local t = E.db.nameplates.threat[ info[getn(info)] ]; - t.r, t.g, t.b = r, g, b; + local t = E.db.nameplates.threat[ info[getn(info) ]] + t.r, t.g, t.b = r, g, b end, args = { useThreatColor = { order = 1, type = "toggle", name = L["Use Threat Color"], - get = function(info) return E.db.nameplates.threat.useThreatColor; end, - set = function(info, value) E.db.nameplates.threat.useThreatColor = value; end + get = function(info) return E.db.nameplates.threat.useThreatColor end, + set = function(info, value) E.db.nameplates.threat.useThreatColor = value end }, goodColor = { order = 2, type = "color", name = L["Good Color"], hasAlpha = false, - disabled = function() return not E.db.nameplates.threat.useThreatColor; end + disabled = function() return not E.db.nameplates.threat.useThreatColor end }, badColor = { order = 3, type = "color", name = L["Bad Color"], hasAlpha = false, - disabled = function() return not E.db.nameplates.threat.useThreatColor; end + disabled = function() return not E.db.nameplates.threat.useThreatColor end }, goodTransition = { order = 4, type = "color", name = L["Good Transition Color"], hasAlpha = false, - disabled = function() return not E.db.nameplates.threat.useThreatColor; end + disabled = function() return not E.db.nameplates.threat.useThreatColor end }, badTransition = { order = 5, type = "color", name = L["Bad Transition Color"], hasAlpha = false, - disabled = function() return not E.db.nameplates.threat.useThreatColor; end + disabled = function() return not E.db.nameplates.threat.useThreatColor end }, beingTankedByTank = { order = 6, type = "toggle", name = L["Color Tanked"], desc = L["Use Tanked Color when a nameplate is being effectively tanked by another tank."], - get = function(info) return E.db.nameplates.threat[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.threat[ info[getn(info)] ] = value; end, - disabled = function() return not E.db.nameplates.threat.useThreatColor; end + get = function(info) return E.db.nameplates.threat[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.threat[ info[getn(info) ]] = value end, + disabled = function() return not E.db.nameplates.threat.useThreatColor end }, beingTankedByTankColor = { order = 7, type = "color", name = L["Tanked Color"], hasAlpha = false, - disabled = function() return (not E.db.nameplates.threat.beingTankedByTank or not E.db.nameplates.threat.useThreatColor); end + disabled = function() return (not E.db.nameplates.threat.beingTankedByTank or not E.db.nameplates.threat.useThreatColor) end }, goodScale = { order = 8, type = "range", name = L["Good Scale"], - get = function(info) return E.db.nameplates.threat[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.threat[ info[getn(info)] ] = value; end, + get = function(info) return E.db.nameplates.threat[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.threat[ info[getn(info) ]] = value end, min = 0.3, max = 2, step = 0.01, isPercent = true }, @@ -731,8 +737,8 @@ E.Options.args.nameplate = { order = 9, type = "range", name = L["Bad Scale"], - get = function(info) return E.db.nameplates.threat[ info[getn(info)] ]; end, - set = function(info, value) E.db.nameplates.threat[ info[getn(info)] ] = value; end, + get = function(info) return E.db.nameplates.threat[ info[getn(info) ]] end, + set = function(info, value) E.db.nameplates.threat[ info[getn(info) ]] = value end, min = 0.3, max = 2, step = 0.01, isPercent = true } @@ -743,14 +749,14 @@ E.Options.args.nameplate = { type = "group", name = L["Cast Bar"], get = function(info) - local t = E.db.nameplates[ info[getn(info)] ]; - local d = P.nameplates[info[getn(info)]]; - return t.r, t.g, t.b, t.a, d.r, d.g, d.b; + local t = E.db.nameplates[ info[getn(info) ]] + local d = P.nameplates[ info[getn(info) ]] + return t.r, t.g, t.b, t.a, d.r, d.g, d.b end, set = function(info, r, g, b) - local t = E.db.nameplates[ info[getn(info)] ]; - t.r, t.g, t.b = r, g, b; - NP:ForEachPlate("ConfigureElement_CastBar"); + local t = E.db.nameplates[ info[getn(info) ]] + t.r, t.g, t.b = r, g, b + NP:ForEachPlate("ConfigureElement_CastBar") end, args = { castColor = { @@ -766,14 +772,14 @@ E.Options.args.nameplate = { type = "group", name = L["Reaction Colors"], get = function(info) - local t = E.db.nameplates.reactions[ info[getn(info)] ]; - local d = P.nameplates.reactions[info[getn(info)]]; - return t.r, t.g, t.b, t.a, d.r, d.g, d.b; + local t = E.db.nameplates.reactions[ info[getn(info) ]] + local d = P.nameplates.reactions[ info[getn(info) ]] + return t.r, t.g, t.b, t.a, d.r, d.g, d.b end, set = function(info, r, g, b) - local t = E.db.nameplates.reactions[ info[getn(info)] ]; - t.r, t.g, t.b = r, g, b; - NP:ConfigureAll(); + local t = E.db.nameplates.reactions[ info[getn(info) ]] + t.r, t.g, t.b = r, g, b + NP:ConfigureAll() end, args = { bad = { @@ -785,7 +791,7 @@ E.Options.args.nameplate = { neutral = { order = 2, type = "color", - name = L["Neutral"], + name = FACTION_STANDING_LABEL4, hasAlpha = false }, good = { @@ -811,7 +817,7 @@ E.Options.args.nameplate = { filters = { order = 300, type = "group", - name = L["Filters"], + name = FILTERS, args = { addname = { order = 2, @@ -842,14 +848,14 @@ E.Options.args.nameplate = { get = function(info) return "" end, set = function(info, value) if G["nameplates"]["filter"][value] then - E.global["nameplates"]["filter"][value].enable = false; + E.global["nameplates"]["filter"][value].enable = false E:Print(L["You can't remove a default name from the filter, disabling the name."]) else - E.global["nameplates"]["filter"][value] = nil; - E.Options.args.nameplates.args.filters.args.filterGroup = nil; + E.global["nameplates"]["filter"][value] = nil + E.Options.args.nameplates.args.filters.args.filterGroup = nil end UpdateFilterGroup() - NP:ConfigureAll(); + NP:ConfigureAll() end }, selectFilter = { @@ -875,4 +881,4 @@ E.Options.args.nameplate = { friendlyNPCGroup = GetUnitSettings("FRIENDLY_NPC", L["Friendly NPC Frames"]), enemyNPCGroup = GetUnitSettings("ENEMY_NPC", L["Enemy NPC Frames"]) } -}; \ No newline at end of file +} \ No newline at end of file diff --git a/ElvUI_Config/Tooltip.lua b/ElvUI_Config/Tooltip.lua index 1a1b016..0337bb0 100644 --- a/ElvUI_Config/Tooltip.lua +++ b/ElvUI_Config/Tooltip.lua @@ -1,7 +1,12 @@ -local E, L, V, P, G = unpack(ElvUI); +local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB local TT = E:GetModule("Tooltip"); +--Cache global variables +--Lua functions local tonumber, tostring = tonumber, tostring +local getn = table.getn +--WoW API / Variables +local ACTIONBAR_LABEL, FONT_SIZE, GENERAL, HIDE, NONE, OPACITY = ACTIONBAR_LABEL, FONT_SIZE, GENERAL, HIDE, NONE, OPACITY E.Options.args.tooltip = { type = "group", @@ -25,13 +30,13 @@ E.Options.args.tooltip = { general = { order = 3, type = "group", - name = L["General"], + name = GENERAL, disabled = function() return not E.Tooltip; end, args = { header = { order = 0, type = "header", - name = L["General"] + name = GENERAL }, cursorAnchor = { order = 1, @@ -199,7 +204,7 @@ E.Options.args.tooltip = { actionbars = { order = 1, type = "select", - name = L["ActionBars"], + name = ACTIONBAR_LABEL, desc = L["Choose when you want the tooltip to show. If a modifer is chosen, then you need to hold that down to show the tooltip."], values = { ["ALL"] = L["Always Hide"], @@ -225,7 +230,7 @@ E.Options.args.tooltip = { unitFrames = { order = 3, type = "select", - name = L["UnitFrames"], + name = L["Unitframes"], desc = L["Choose when you want the tooltip to show. If a modifer is chosen, then you need to hold that down to show the tooltip."], values = { ["ALL"] = L["Always Hide"], diff --git a/ElvUI_Config/UnitFrames.lua b/ElvUI_Config/UnitFrames.lua index dc3c523..d269470 100644 --- a/ElvUI_Config/UnitFrames.lua +++ b/ElvUI_Config/UnitFrames.lua @@ -3,22 +3,27 @@ local UF = E:GetModule("UnitFrames"); local ns = oUF local ElvUF = ns.oUF + --Cache global variables --Lua functions local _G = _G -local ipairs, next, pairs, select = ipairs, next, pairs, select local find, format = string.find, string.format -local tconcat, tinsert, tremove, twipe = table.concat, table.insert, table.remove, table.wipe local gsub, match, split = string.gsub, string.match, string.split +local ipairs, next, pairs, select = ipairs, next, pairs, select +local concat, getn, insert, remove, wipe = table.concat, table.getn, table.insert, table.remove, table.wipe --WoW API / Variables -local IsAddOnLoaded = IsAddOnLoaded local GetScreenWidth = GetScreenWidth -local RAID_CLASS_COLORS = RAID_CLASS_COLORS -local HIDE, DELETE, NONE, FILTERS, FONT_SIZE, COLOR = HIDE, DELETE, NONE, FILTERS, FONT_SIZE, COLOR +local IsAddOnLoaded = IsAddOnLoaded -local SHIFT_KEY, ALT_KEY, CTRL_KEY = "SHIFT_KEY", "ALT_KEY", "CTRL_KEY" -local HEALTH, MANA, NAME, PLAYER, CLASS, GROUP = HEALTH, MANA, NAME, PLAYER, CLASS, GROUP -local RAGE, FOCUS, ENERGY = RAGE, FOCUS, ENERGY +local COLOR, DELETE, FILTERS, FONT_SIZE = COLOR, DELETE, FILTERS, FONT_SIZE +local CLASS, GROUP, HEALTH, MANA, NAME, PLAYER = CLASS, GROUP, HEALTH, MANA, NAME, PLAYER +local ENERGY, FOCUS, RAGE = ENERGY, FOCUS, RAGE +local FACTION_STANDING_LABEL4 = FACTION_STANDING_LABEL4 +local GENERAL, HIDE, NONE = GENERAL, HIDE, NONE + +local RAID_CLASS_COLORS = RAID_CLASS_COLORS + +local ALT_KEY, CTRL_KEY, SHIFT_KEY = "ALT_KEY", "CTRL_KEY", "SHIFT_KEY" ------------------------------ local ACD = LibStub("AceConfigDialog-3.0") @@ -112,8 +117,8 @@ local function filterPriority(auraType, groupName, value, remove, movehere, frie if tbl[i] == value then sv = i elseif tbl[i] == movehere then sm = i end if sv and sm then break end end - tremove(tbl, sm);tinsert(tbl, sv, movehere); - E.db.unitframe.units[groupName][auraType].priority = tconcat(tbl,",") + remove(tbl, sm);insert(tbl, sv, movehere); + E.db.unitframe.units[groupName][auraType].priority = concat(tbl,",") elseif found and friendState then local realValue = match(value, "^Friendly:([^,]*)") or match(value, "^Enemy:([^,]*)") or value local friend = filterMatch(filter, filterValue("Friendly:"..realValue)) @@ -134,8 +139,8 @@ local function filterPriority(auraType, groupName, value, remove, movehere, frie for i in ipairs(tbl) do if tbl[i] == value then sv = i;break end end - tinsert(tbl, sv, state);tremove(tbl, sv+1) - E.db.unitframe.units[groupName][auraType].priority = tconcat(tbl,",") + insert(tbl, sv, state);remove(tbl, sv+1) + E.db.unitframe.units[groupName][auraType].priority = concat(tbl,",") end end elseif found and remove then @@ -486,7 +491,7 @@ local function GetOptionsTable_Auras(friendlyUnitOnly, auraType, isGroupFrame, u values = { ["FRAME"] = L["Frame"], ["DEBUFFS"] = L["Debuffs"], - ["HEALTH"] = L["Health"], + ["HEALTH"] = HEALTH, ["POWER"] = L["Power"], }, } @@ -499,7 +504,7 @@ local function GetOptionsTable_Auras(friendlyUnitOnly, auraType, isGroupFrame, u values = { ["FRAME"] = L["Frame"], ["BUFFS"] = L["Buffs"], - ["HEALTH"] = L["Health"], + ["HEALTH"] = HEALTH, ["POWER"] = L["Power"], }, } @@ -843,14 +848,14 @@ local function GetOptionsTable_Health(isGroupFrame, updateFunc, groupName, numUn local config = { order = 100, type = "group", - name = L["Health"], + name = HEALTH, get = function(info) return E.db.unitframe.units[groupName]["health"][ info[getn(info)] ] end, set = function(info, value) E.db.unitframe.units[groupName]["health"][ info[getn(info)] ] = value; updateFunc(UF, groupName, numUnits) end, args = { header = { order = 1, type = "header", - name = L["Health"], + name = HEALTH, }, position = { type = "select", @@ -877,7 +882,7 @@ local function GetOptionsTable_Health(isGroupFrame, updateFunc, groupName, numUn order = 5, name = L["Attach Text To"], values = { - ["Health"] = L["Health"], + ["Health"] = HEALTH, ["Power"] = L["Power"], ["InfoPanel"] = L["Information Panel"], ["Frame"] = L["Frame"], @@ -928,7 +933,7 @@ local function CreateCustomTextGroup(unit, objectName) return elseif E.Options.args.unitframe.args[unit].args.customText.args[objectName] then E.Options.args.unitframe.args[unit].args.customText.args[objectName].hidden = false -- Re-show existing custom texts which belong to current profile and were previously hidden - tinsert(CUSTOMTEXT_CONFIGS, E.Options.args.unitframe.args[unit].args.customText.args[objectName]) --Register this custom text config to be hidden again on profile change + insert(CUSTOMTEXT_CONFIGS, E.Options.args.unitframe.args[unit].args.customText.args[objectName]) --Register this custom text config to be hidden again on profile change return end @@ -1035,7 +1040,7 @@ local function CreateCustomTextGroup(unit, objectName) order = 9, name = L["Attach Text To"], values = { - ["Health"] = L["Health"], + ["Health"] = HEALTH, ["Power"] = L["Power"], ["InfoPanel"] = L["Information Panel"], ["Frame"] = L["Frame"], @@ -1051,7 +1056,7 @@ local function CreateCustomTextGroup(unit, objectName) }, } - tinsert(CUSTOMTEXT_CONFIGS, E.Options.args.unitframe.args[unit].args.customText.args[objectName]) --Register this custom text config to be hidden on profile change + insert(CUSTOMTEXT_CONFIGS, E.Options.args.unitframe.args[unit].args.customText.args[objectName]) --Register this custom text config to be hidden on profile change end local function GetOptionsTable_CustomText(updateFunc, groupName, numUnits, orderOverride) @@ -1114,14 +1119,14 @@ local function GetOptionsTable_Name(updateFunc, groupName, numUnits) local config = { order = 400, type = "group", - name = L["Name"], + name = NAME, get = function(info) return E.db.unitframe.units[groupName]["name"][ info[getn(info)] ] end, set = function(info, value) E.db.unitframe.units[groupName]["name"][ info[getn(info)] ] = value; updateFunc(UF, groupName, numUnits) end, args = { header = { order = 1, type = "header", - name = L["Name"], + name = NAME, }, position = { type = "select", @@ -1148,7 +1153,7 @@ local function GetOptionsTable_Name(updateFunc, groupName, numUnits) order = 5, name = L["Attach Text To"], values = { - ["Health"] = L["Health"], + ["Health"] = HEALTH, ["Power"] = L["Power"], ["InfoPanel"] = L["Information Panel"], ["Frame"] = L["Frame"], @@ -1330,7 +1335,7 @@ local function GetOptionsTable_Power(hasDetatchOption, updateFunc, groupName, nu order = 10, name = L["Attach Text To"], values = { - ["Health"] = L["Health"], + ["Health"] = HEALTH, ["Power"] = L["Power"], ["InfoPanel"] = L["Information Panel"], ["Frame"] = L["Frame"], @@ -1444,7 +1449,7 @@ local function GetOptionsTable_RaidIcon(updateFunc, groupName, numUnits) order = 4, name = L["Attach To"], values = { - ["Health"] = L["Health"], + ["Health"] = HEALTH, ["Power"] = L["Power"], ["InfoPanel"] = L["Information Panel"], ["Frame"] = L["Frame"], @@ -1693,7 +1698,7 @@ local function GetOptionsTable_ReadyCheckIcon(updateFunc, groupName) type = "select", name = L["Attach To"], values = { - ["Health"] = L["Health"], + ["Health"] = HEALTH, ["Power"] = L["Power"], ["InfoPanel"] = L["Information Panel"], ["Frame"] = L["Frame"], @@ -1833,7 +1838,7 @@ end E.Options.args.unitframe = { type = "group", - name = L["UnitFrames"], + name = L["Unitframes"], childGroups = "tree", get = function(info) return E.db.unitframe[ info[getn(info)] ] end, set = function(info, value) E.db.unitframe[ info[getn(info)] ] = value end, @@ -1863,19 +1868,19 @@ E.Options.args.unitframe = { generalOptionsGroup = { order = 19, type = "group", - name = L["General Options"], + name = GENERAL, childGroups = "tab", disabled = function() return not E.UnitFrames; end, args = { generalGroup = { order = 1, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 0, type = "header", - name = L["General"], + name = GENERAL, }, thinBorders = { order = 1, @@ -2104,7 +2109,7 @@ E.Options.args.unitframe = { health = { order = 10, type = "color", - name = L["Health"], + name = HEALTH, }, health_backdrop = { order = 11, @@ -2204,7 +2209,7 @@ E.Options.args.unitframe = { }, NEUTRAL = { order = 2, - name = L["Neutral"], + name = FACTION_STANDING_LABEL4, type = "color", }, GOOD = { @@ -2492,12 +2497,12 @@ E.Options.args.unitframe.args.player = { generalGroup = { order = 1, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 1, type = "header", - name = L["General"], + name = GENERAL, }, enable = { type = "toggle", @@ -2876,12 +2881,12 @@ E.Options.args.unitframe.args.target = { generalGroup = { order = 1, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 1, type = "header", - name = L["General"], + name = GENERAL, }, enable = { type = "toggle", @@ -3137,12 +3142,12 @@ E.Options.args.unitframe.args.targettarget = { generalGroup = { order = 1, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 1, type = "header", - name = L["General"], + name = GENERAL, }, enable = { type = "toggle", @@ -3272,12 +3277,12 @@ E.Options.args.unitframe.args.targettargettarget = { generalGroup = { order = 1, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 1, type = "header", - name = L["General"], + name = GENERAL, }, enable = { type = "toggle", @@ -3409,12 +3414,12 @@ E.Options.args.unitframe.args.pet = { generalGroup = { order = 1, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 1, type = "header", - name = L["General"], + name = GENERAL, }, enable = { type = "toggle", @@ -3584,12 +3589,12 @@ E.Options.args.unitframe.args.pettarget = { generalGroup = { order = 1, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 1, type = "header", - name = L["General"], + name = GENERAL, }, enable = { type = "toggle", @@ -3753,12 +3758,12 @@ E.Options.args.unitframe.args.party = { generalGroup = { order = 5, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 1, type = "header", - name = L["General"], + name = GENERAL, }, enable = { type = "toggle", @@ -4063,7 +4068,7 @@ E.Options.args.unitframe.args.party = { order = 4, name = L["Attach To"], values = { - ["Health"] = L["Health"], + ["Health"] = HEALTH, ["Power"] = L["Power"], ["InfoPanel"] = L["Information Panel"], ["Frame"] = L["Frame"], @@ -4181,7 +4186,7 @@ E.Options.args.unitframe.args.party = { guiInline = true, get = function(info) return E.db.unitframe.units["party"]["petsGroup"]["name"][ info[getn(info)] ] end, set = function(info, value) E.db.unitframe.units["party"]["petsGroup"]["name"][ info[getn(info)] ] = value; UF:CreateAndUpdateHeaderGroup("party") end, - name = L["Name"], + name = NAME, args = { position = { type = "select", @@ -4270,7 +4275,7 @@ E.Options.args.unitframe.args.party = { guiInline = true, get = function(info) return E.db.unitframe.units["party"]["targetsGroup"]["name"][ info[getn(info)] ] end, set = function(info, value) E.db.unitframe.units["party"]["targetsGroup"]["name"][ info[getn(info)] ] = value; UF:CreateAndUpdateHeaderGroup("party") end, - name = L["Name"], + name = NAME, args = { position = { type = "select", @@ -4348,12 +4353,12 @@ E.Options.args.unitframe.args.raid = { generalGroup = { order = 5, type = "group", - name = L["General"], + name = GENERAL, args = { header = { order = 1, type = "header", - name = L["General"], + name = GENERAL, }, enable = { type = "toggle", @@ -4665,7 +4670,7 @@ E.Options.args.unitframe.args.raid = { order = 4, name = L["Attach To"], values = { - ["Health"] = L["Health"], + ["Health"] = HEALTH, ["Power"] = L["Power"], ["InfoPanel"] = L["Information Panel"], ["Frame"] = L["Frame"], @@ -4785,7 +4790,7 @@ function E:RefreshCustomTextsConfigs() for _, customText in pairs(CUSTOMTEXT_CONFIGS) do customText.hidden = true end - twipe(CUSTOMTEXT_CONFIGS) + wipe(CUSTOMTEXT_CONFIGS) for unit, _ in pairs(E.db.unitframe.units) do if E.db.unitframe.units[unit].customTexts then