mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-21 23:26:56 +00:00
Localize the totem tooltip click hints
Add a Left Click / Right Click hint to the totem icon tooltip via AddDoubleLine, matching the panel.lua convention. Reuses the existing "Left Click" / "Right Click" strings and adds "Recast Totem" / "Target Totem" as new translation keys (stubbed across all locales; they fall back to English until translated). Also drop the now-orphaned "Range Check Interval" string from every locale manifest -- the setting was removed when librange stopped scanning, but its translation stubs were left behind.
This commit is contained in:
Vendored
+2
-1
@@ -619,8 +619,8 @@ pfUI_translation["deDE"] = {
|
||||
["Random Roll Announcement Rarity"] = nil,
|
||||
["Random Rolling"] = nil,
|
||||
["Range Based Hunter Paging"] = nil,
|
||||
["Range Check Interval"] = nil,
|
||||
["Rank"] = nil,
|
||||
["Recast Totem"] = nil,
|
||||
["Red Border On Enemy Units"] = nil,
|
||||
["Red Name Text On Infight Units"] = nil,
|
||||
["Regional Settings"] = nil,
|
||||
@@ -782,6 +782,7 @@ pfUI_translation["deDE"] = {
|
||||
["Target Castbar"] = nil,
|
||||
["Target Debuff Bar"] = nil,
|
||||
["Target Nameplate Zoom Factor"] = nil,
|
||||
["Target Totem"] = nil,
|
||||
["Target-Target"] = nil,
|
||||
["Target-Target-Target"] = nil,
|
||||
["Text"] = nil,
|
||||
|
||||
Vendored
+2
-1
@@ -627,8 +627,8 @@ pfUI_translation["enUS"] = {
|
||||
["Random Roll Announcement Rarity"] = nil,
|
||||
["Random Rolling"] = nil,
|
||||
["Range Based Hunter Paging"] = nil,
|
||||
["Range Check Interval"] = nil,
|
||||
["Rank"] = nil,
|
||||
["Recast Totem"] = nil,
|
||||
["Red Border On Enemy Units"] = nil,
|
||||
["Red Name Text On Infight Units"] = nil,
|
||||
["Regional Settings"] = nil,
|
||||
@@ -795,6 +795,7 @@ pfUI_translation["enUS"] = {
|
||||
["Target Castbar"] = nil,
|
||||
["Target Debuff Bar"] = nil,
|
||||
["Target Nameplate Zoom Factor"] = nil,
|
||||
["Target Totem"] = nil,
|
||||
["Target-Target"] = nil,
|
||||
["Target-Target-Target"] = nil,
|
||||
["Text"] = nil,
|
||||
|
||||
Vendored
+2
-1
@@ -619,8 +619,8 @@ pfUI_translation["esES"] = {
|
||||
["Random Roll Announcement Rarity"] = "Anuncio para tirar los dados aleatoriamente",
|
||||
["Random Rolling"] = "Tirar los dados aleatoriamente",
|
||||
["Range Based Hunter Paging"] = "Paginado de alcance para cazadores",
|
||||
["Range Check Interval"] = "Intervalo de comprobación de alcance",
|
||||
["Rank"] = "Rango",
|
||||
["Recast Totem"] = nil,
|
||||
["Red Border On Enemy Units"] = "Borde rojo en unidades enemigas",
|
||||
["Red Name Text On Infight Units"] = nil,
|
||||
["Regional Settings"] = nil,
|
||||
@@ -782,6 +782,7 @@ pfUI_translation["esES"] = {
|
||||
["Target Castbar"] = "Barra de lanzamiento del objetivo",
|
||||
["Target Debuff Bar"] = "Barra de perjuicios del objetivo",
|
||||
["Target Nameplate Zoom Factor"] = "Factor de zoom de la placa de nombre del objetivo",
|
||||
["Target Totem"] = nil,
|
||||
["Target-Target"] = "Objetivo-Objetivo",
|
||||
["Target-Target-Target"] = "Objetivo-Objetivo-Objetivo",
|
||||
["Text"] = nil,
|
||||
|
||||
Vendored
+2
-1
@@ -619,8 +619,8 @@ pfUI_translation["frFR"] = {
|
||||
["Random Roll Announcement Rarity"] = "Rareté des annonces des jets de dés aléatoires",
|
||||
["Random Rolling"] = "Lancer de dés aléatoires",
|
||||
["Range Based Hunter Paging"] = "Pagination de distance basée sur le chasseur",
|
||||
["Range Check Interval"] = "Intervalle de vérification de la distance",
|
||||
["Rank"] = nil,
|
||||
["Recast Totem"] = nil,
|
||||
["Red Border On Enemy Units"] = "Bordure rouge sur les unités ennemies",
|
||||
["Red Name Text On Infight Units"] = nil,
|
||||
["Regional Settings"] = nil,
|
||||
@@ -782,6 +782,7 @@ pfUI_translation["frFR"] = {
|
||||
["Target Castbar"] = "Barre d'incantation de la cible",
|
||||
["Target Debuff Bar"] = "Barre des affaiblissements de la cible",
|
||||
["Target Nameplate Zoom Factor"] = "Facteur de zoom du Nameplate de la cible",
|
||||
["Target Totem"] = nil,
|
||||
["Target-Target"] = "Cible de la cible",
|
||||
["Target-Target-Target"] = "Cible de la cible de la cible",
|
||||
["Text"] = nil,
|
||||
|
||||
Vendored
+2
-1
@@ -619,8 +619,8 @@ pfUI_translation["koKR"] = {
|
||||
["Random Roll Announcement Rarity"] = nil,
|
||||
["Random Rolling"] = nil,
|
||||
["Range Based Hunter Paging"] = nil,
|
||||
["Range Check Interval"] = nil,
|
||||
["Rank"] = nil,
|
||||
["Recast Totem"] = nil,
|
||||
["Red Border On Enemy Units"] = nil,
|
||||
["Red Name Text On Infight Units"] = nil,
|
||||
["Regional Settings"] = nil,
|
||||
@@ -782,6 +782,7 @@ pfUI_translation["koKR"] = {
|
||||
["Target Castbar"] = nil,
|
||||
["Target Debuff Bar"] = nil,
|
||||
["Target Nameplate Zoom Factor"] = nil,
|
||||
["Target Totem"] = nil,
|
||||
["Target-Target"] = "대상-대상",
|
||||
["Target-Target-Target"] = nil,
|
||||
["Text"] = nil,
|
||||
|
||||
Vendored
+2
-1
@@ -619,8 +619,8 @@ pfUI_translation["ruRU"] = {
|
||||
["Random Roll Announcement Rarity"] = "Оповещение случайного броска для качества предмета",
|
||||
["Random Rolling"] = "Случайный бросок костей для",
|
||||
["Range Based Hunter Paging"] = "[|cffA9D271Охотник|r] Переключение страниц на основе диапазона",
|
||||
["Range Check Interval"] = "Интервал проверки диапазона",
|
||||
["Rank"] = "Ранг",
|
||||
["Recast Totem"] = nil,
|
||||
["Red Border On Enemy Units"] = "Красные границы вражеских юнитов",
|
||||
["Red Name Text On Infight Units"] = nil,
|
||||
["Regional Settings"] = "Региональные настройки",
|
||||
@@ -782,6 +782,7 @@ pfUI_translation["ruRU"] = {
|
||||
["Target Castbar"] = "Панель применения цели",
|
||||
["Target Debuff Bar"] = "Панель дебаффов цели",
|
||||
["Target Nameplate Zoom Factor"] = "Коэффициент увеличения индикатора здоровья цели",
|
||||
["Target Totem"] = nil,
|
||||
["Target-Target"] = "Цель цели",
|
||||
["Target-Target-Target"] = "Цель цели цели",
|
||||
["Text"] = nil,
|
||||
|
||||
Vendored
+2
-1
@@ -619,8 +619,8 @@ pfUI_translation["zhCN"] = {
|
||||
["Random Roll Announcement Rarity"] = "随机Roll点稀有度",
|
||||
["Random Rolling"] = "随机Roll点 物品:",
|
||||
["Range Based Hunter Paging"] = "启用基于范围的自动分页[|cff7fff7f猎人|r]",
|
||||
["Range Check Interval"] = "范围检查间隔",
|
||||
["Rank"] = "军衔",
|
||||
["Recast Totem"] = nil,
|
||||
["Red Border On Enemy Units"] = "显示敌方单位红色边框",
|
||||
["Red Name Text On Infight Units"] = "进战斗的单位显示红色姓名",
|
||||
["Regional Settings"] = "区域设置",
|
||||
@@ -783,6 +783,7 @@ pfUI_translation["zhCN"] = {
|
||||
["Target Castbar"] = "目标施法条",
|
||||
["Target Debuff Bar"] = "目标Debuffs条",
|
||||
["Target Nameplate Zoom Factor"] = "目标姓名板缩放系数",
|
||||
["Target Totem"] = nil,
|
||||
["Target-Target"] = "目标的目标",
|
||||
["Target-Target-Target"] = "目标的目标的目标",
|
||||
["Text"] = "文本",
|
||||
|
||||
Vendored
+2
-1
@@ -619,8 +619,8 @@ pfUI_translation["zhTW"] = {
|
||||
["Random Roll Announcement Rarity"] = "隨機Roll點公示稀有度",
|
||||
["Random Rolling"] = "隨機Roll點 物品:",
|
||||
["Range Based Hunter Paging"] = nil,
|
||||
["Range Check Interval"] = "範圍檢查間隔",
|
||||
["Rank"] = nil,
|
||||
["Recast Totem"] = nil,
|
||||
["Red Border On Enemy Units"] = nil,
|
||||
["Red Name Text On Infight Units"] = nil,
|
||||
["Regional Settings"] = nil,
|
||||
@@ -782,6 +782,7 @@ pfUI_translation["zhTW"] = {
|
||||
["Target Castbar"] = nil,
|
||||
["Target Debuff Bar"] = nil,
|
||||
["Target Nameplate Zoom Factor"] = nil,
|
||||
["Target Totem"] = nil,
|
||||
["Target-Target"] = "目標的目標",
|
||||
["Target-Target-Target"] = nil,
|
||||
["Text"] = nil,
|
||||
|
||||
+14
-25
@@ -14,34 +14,25 @@ pfUI:RegisterModule("totems", function ()
|
||||
end)
|
||||
|
||||
totems.OnEnter = function(self)
|
||||
if not this.id then return end
|
||||
-- native GetTotemInfo's 1st return is tool presence, not "summoned";
|
||||
-- a live totem shows a non-empty name / non-zero start.
|
||||
local _, name = GetTotemInfo(this.id)
|
||||
if not name or name == "" then return end
|
||||
local color = slots[this.id]
|
||||
local id = this:GetID()
|
||||
local spellID = select(7, GetTotemInfo(id))
|
||||
if not spellID or spellID == 0 then return end
|
||||
GameTooltip:SetOwner(this, "ANCHOR_LEFT")
|
||||
GameTooltip:SetText(name, color.r+.2, color.g+.2, color.b+.2)
|
||||
local timeleft = GetTotemTimeLeft(this.id)
|
||||
if timeleft and timeleft > 0 then
|
||||
GameTooltip:AddLine(string.format("%d:%02d", floor(timeleft/60), floor(mod(timeleft, 60))), 1, 1, 1)
|
||||
end
|
||||
GameTooltip:SetSpell(FindSpellBookSlotByID(spellID))
|
||||
GameTooltip:AddDoubleLine(T["Left Click"], "|cffffffff" .. T["Recast Totem"])
|
||||
GameTooltip:AddDoubleLine(T["Right Click"], "|cffffffff" .. T["Target Totem"])
|
||||
GameTooltip:Show()
|
||||
end
|
||||
|
||||
totems.OnLeave = function(self)
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
totems.OnLeave = GameTooltip_Hide
|
||||
|
||||
totems.OnClick = function(self)
|
||||
if not this.id then return end
|
||||
local id = this:GetID()
|
||||
if arg1 == "LeftButton" then
|
||||
-- recast the totem on left click
|
||||
local _, name = GetTotemInfo(this.id)
|
||||
local _, name = GetTotemInfo(id)
|
||||
if name and name ~= "" then CastSpellByName(name) end
|
||||
elseif arg1 == "RightButton" then
|
||||
-- target the totem on right click
|
||||
TargetTotem(this.id)
|
||||
TargetTotem(id)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -57,7 +48,7 @@ pfUI:RegisterModule("totems", function ()
|
||||
self.bar[count]:Show()
|
||||
self.bar[count]:SetBackdropBorderColor(color.r, color.g, color.b)
|
||||
self.bar[count].icon:SetTexture(icon)
|
||||
self.bar[count].id = i
|
||||
self.bar[count]:SetID(i)
|
||||
|
||||
CooldownFrame_SetTimer(self.bar[count].cd, start, duration, 1)
|
||||
end
|
||||
@@ -76,7 +67,7 @@ pfUI:RegisterModule("totems", function ()
|
||||
self:Show()
|
||||
end
|
||||
|
||||
local count = count and count > 0 and count or MAX_TOTEMS
|
||||
count = count and count > 0 and count or MAX_TOTEMS
|
||||
|
||||
if pfUI_config.totems.direction == "HORIZONTAL" then
|
||||
self:SetHeight(self.iconsize + self.spacing*2)
|
||||
@@ -113,8 +104,7 @@ pfUI:RegisterModule("totems", function ()
|
||||
end
|
||||
end
|
||||
|
||||
self.bar[i]:SetHeight(self.iconsize)
|
||||
self.bar[i]:SetWidth(self.iconsize)
|
||||
self.bar[i]:SetSize(self.iconsize, self.iconsize)
|
||||
CreateBackdrop(self.bar[i], nil, true)
|
||||
|
||||
self.bar[i].icon = self.bar[i].icon or self.bar[i]:CreateTexture(nil, "ARTWORK")
|
||||
@@ -122,8 +112,7 @@ pfUI:RegisterModule("totems", function ()
|
||||
SetAllPointsOffset(self.bar[i].icon, self.bar[i], 2,-2)
|
||||
|
||||
self.bar[i].cdbg = self.bar[i].cdbg or CreateFrame("Frame", nil, self.bar[i])
|
||||
self.bar[i].cdbg:SetHeight(self.iconsize - 3)
|
||||
self.bar[i].cdbg:SetWidth(self.iconsize - 3)
|
||||
self.bar[i].cdbg:SetSize(self.iconsize - 3, self.iconsize - 3)
|
||||
self.bar[i].cdbg:SetPoint("CENTER", self.bar[i], "CENTER", 0, 0)
|
||||
self.bar[i].cd = self.bar[i].cd or CreateFrame(COOLDOWN_FRAME_TYPE, "pfTotemsBar"..i.."Cooldown", self.bar[i].cdbg, "CooldownFrameTemplate")
|
||||
self.bar[i].cd.pfCooldownStyleAnimation = 1
|
||||
|
||||
Reference in New Issue
Block a user