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:
Brues
2026-07-20 22:16:05 -05:00
parent 9c529512d1
commit 8506f5ffbf
9 changed files with 30 additions and 33 deletions
+2 -1
View File
@@ -619,8 +619,8 @@ pfUI_translation["deDE"] = {
["Random Roll Announcement Rarity"] = nil, ["Random Roll Announcement Rarity"] = nil,
["Random Rolling"] = nil, ["Random Rolling"] = nil,
["Range Based Hunter Paging"] = nil, ["Range Based Hunter Paging"] = nil,
["Range Check Interval"] = nil,
["Rank"] = nil, ["Rank"] = nil,
["Recast Totem"] = nil,
["Red Border On Enemy Units"] = nil, ["Red Border On Enemy Units"] = nil,
["Red Name Text On Infight Units"] = nil, ["Red Name Text On Infight Units"] = nil,
["Regional Settings"] = nil, ["Regional Settings"] = nil,
@@ -782,6 +782,7 @@ pfUI_translation["deDE"] = {
["Target Castbar"] = nil, ["Target Castbar"] = nil,
["Target Debuff Bar"] = nil, ["Target Debuff Bar"] = nil,
["Target Nameplate Zoom Factor"] = nil, ["Target Nameplate Zoom Factor"] = nil,
["Target Totem"] = nil,
["Target-Target"] = nil, ["Target-Target"] = nil,
["Target-Target-Target"] = nil, ["Target-Target-Target"] = nil,
["Text"] = nil, ["Text"] = nil,
+2 -1
View File
@@ -627,8 +627,8 @@ pfUI_translation["enUS"] = {
["Random Roll Announcement Rarity"] = nil, ["Random Roll Announcement Rarity"] = nil,
["Random Rolling"] = nil, ["Random Rolling"] = nil,
["Range Based Hunter Paging"] = nil, ["Range Based Hunter Paging"] = nil,
["Range Check Interval"] = nil,
["Rank"] = nil, ["Rank"] = nil,
["Recast Totem"] = nil,
["Red Border On Enemy Units"] = nil, ["Red Border On Enemy Units"] = nil,
["Red Name Text On Infight Units"] = nil, ["Red Name Text On Infight Units"] = nil,
["Regional Settings"] = nil, ["Regional Settings"] = nil,
@@ -795,6 +795,7 @@ pfUI_translation["enUS"] = {
["Target Castbar"] = nil, ["Target Castbar"] = nil,
["Target Debuff Bar"] = nil, ["Target Debuff Bar"] = nil,
["Target Nameplate Zoom Factor"] = nil, ["Target Nameplate Zoom Factor"] = nil,
["Target Totem"] = nil,
["Target-Target"] = nil, ["Target-Target"] = nil,
["Target-Target-Target"] = nil, ["Target-Target-Target"] = nil,
["Text"] = nil, ["Text"] = nil,
+2 -1
View File
@@ -619,8 +619,8 @@ pfUI_translation["esES"] = {
["Random Roll Announcement Rarity"] = "Anuncio para tirar los dados aleatoriamente", ["Random Roll Announcement Rarity"] = "Anuncio para tirar los dados aleatoriamente",
["Random Rolling"] = "Tirar los dados aleatoriamente", ["Random Rolling"] = "Tirar los dados aleatoriamente",
["Range Based Hunter Paging"] = "Paginado de alcance para cazadores", ["Range Based Hunter Paging"] = "Paginado de alcance para cazadores",
["Range Check Interval"] = "Intervalo de comprobación de alcance",
["Rank"] = "Rango", ["Rank"] = "Rango",
["Recast Totem"] = nil,
["Red Border On Enemy Units"] = "Borde rojo en unidades enemigas", ["Red Border On Enemy Units"] = "Borde rojo en unidades enemigas",
["Red Name Text On Infight Units"] = nil, ["Red Name Text On Infight Units"] = nil,
["Regional Settings"] = nil, ["Regional Settings"] = nil,
@@ -782,6 +782,7 @@ pfUI_translation["esES"] = {
["Target Castbar"] = "Barra de lanzamiento del objetivo", ["Target Castbar"] = "Barra de lanzamiento del objetivo",
["Target Debuff Bar"] = "Barra de perjuicios 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 Nameplate Zoom Factor"] = "Factor de zoom de la placa de nombre del objetivo",
["Target Totem"] = nil,
["Target-Target"] = "Objetivo-Objetivo", ["Target-Target"] = "Objetivo-Objetivo",
["Target-Target-Target"] = "Objetivo-Objetivo-Objetivo", ["Target-Target-Target"] = "Objetivo-Objetivo-Objetivo",
["Text"] = nil, ["Text"] = nil,
+2 -1
View File
@@ -619,8 +619,8 @@ pfUI_translation["frFR"] = {
["Random Roll Announcement Rarity"] = "Rareté des annonces des jets de dés aléatoires", ["Random Roll Announcement Rarity"] = "Rareté des annonces des jets de dés aléatoires",
["Random Rolling"] = "Lancer 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 Based Hunter Paging"] = "Pagination de distance basée sur le chasseur",
["Range Check Interval"] = "Intervalle de vérification de la distance",
["Rank"] = nil, ["Rank"] = nil,
["Recast Totem"] = nil,
["Red Border On Enemy Units"] = "Bordure rouge sur les unités ennemies", ["Red Border On Enemy Units"] = "Bordure rouge sur les unités ennemies",
["Red Name Text On Infight Units"] = nil, ["Red Name Text On Infight Units"] = nil,
["Regional Settings"] = nil, ["Regional Settings"] = nil,
@@ -782,6 +782,7 @@ pfUI_translation["frFR"] = {
["Target Castbar"] = "Barre d'incantation de la cible", ["Target Castbar"] = "Barre d'incantation de la cible",
["Target Debuff Bar"] = "Barre des affaiblissements 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 Nameplate Zoom Factor"] = "Facteur de zoom du Nameplate de la cible",
["Target Totem"] = nil,
["Target-Target"] = "Cible de la cible", ["Target-Target"] = "Cible de la cible",
["Target-Target-Target"] = "Cible de la cible de la cible", ["Target-Target-Target"] = "Cible de la cible de la cible",
["Text"] = nil, ["Text"] = nil,
+2 -1
View File
@@ -619,8 +619,8 @@ pfUI_translation["koKR"] = {
["Random Roll Announcement Rarity"] = nil, ["Random Roll Announcement Rarity"] = nil,
["Random Rolling"] = nil, ["Random Rolling"] = nil,
["Range Based Hunter Paging"] = nil, ["Range Based Hunter Paging"] = nil,
["Range Check Interval"] = nil,
["Rank"] = nil, ["Rank"] = nil,
["Recast Totem"] = nil,
["Red Border On Enemy Units"] = nil, ["Red Border On Enemy Units"] = nil,
["Red Name Text On Infight Units"] = nil, ["Red Name Text On Infight Units"] = nil,
["Regional Settings"] = nil, ["Regional Settings"] = nil,
@@ -782,6 +782,7 @@ pfUI_translation["koKR"] = {
["Target Castbar"] = nil, ["Target Castbar"] = nil,
["Target Debuff Bar"] = nil, ["Target Debuff Bar"] = nil,
["Target Nameplate Zoom Factor"] = nil, ["Target Nameplate Zoom Factor"] = nil,
["Target Totem"] = nil,
["Target-Target"] = "대상-대상", ["Target-Target"] = "대상-대상",
["Target-Target-Target"] = nil, ["Target-Target-Target"] = nil,
["Text"] = nil, ["Text"] = nil,
+2 -1
View File
@@ -619,8 +619,8 @@ pfUI_translation["ruRU"] = {
["Random Roll Announcement Rarity"] = "Оповещение случайного броска для качества предмета", ["Random Roll Announcement Rarity"] = "Оповещение случайного броска для качества предмета",
["Random Rolling"] = "Случайный бросок костей для", ["Random Rolling"] = "Случайный бросок костей для",
["Range Based Hunter Paging"] = "[|cffA9D271Охотник|r] Переключение страниц на основе диапазона", ["Range Based Hunter Paging"] = "[|cffA9D271Охотник|r] Переключение страниц на основе диапазона",
["Range Check Interval"] = "Интервал проверки диапазона",
["Rank"] = "Ранг", ["Rank"] = "Ранг",
["Recast Totem"] = nil,
["Red Border On Enemy Units"] = "Красные границы вражеских юнитов", ["Red Border On Enemy Units"] = "Красные границы вражеских юнитов",
["Red Name Text On Infight Units"] = nil, ["Red Name Text On Infight Units"] = nil,
["Regional Settings"] = "Региональные настройки", ["Regional Settings"] = "Региональные настройки",
@@ -782,6 +782,7 @@ pfUI_translation["ruRU"] = {
["Target Castbar"] = "Панель применения цели", ["Target Castbar"] = "Панель применения цели",
["Target Debuff Bar"] = "Панель дебаффов цели", ["Target Debuff Bar"] = "Панель дебаффов цели",
["Target Nameplate Zoom Factor"] = "Коэффициент увеличения индикатора здоровья цели", ["Target Nameplate Zoom Factor"] = "Коэффициент увеличения индикатора здоровья цели",
["Target Totem"] = nil,
["Target-Target"] = "Цель цели", ["Target-Target"] = "Цель цели",
["Target-Target-Target"] = "Цель цели цели", ["Target-Target-Target"] = "Цель цели цели",
["Text"] = nil, ["Text"] = nil,
+2 -1
View File
@@ -619,8 +619,8 @@ pfUI_translation["zhCN"] = {
["Random Roll Announcement Rarity"] = "随机Roll点稀有度", ["Random Roll Announcement Rarity"] = "随机Roll点稀有度",
["Random Rolling"] = "随机Roll点 物品:", ["Random Rolling"] = "随机Roll点 物品:",
["Range Based Hunter Paging"] = "启用基于范围的自动分页[|cff7fff7f猎人|r]", ["Range Based Hunter Paging"] = "启用基于范围的自动分页[|cff7fff7f猎人|r]",
["Range Check Interval"] = "范围检查间隔",
["Rank"] = "军衔", ["Rank"] = "军衔",
["Recast Totem"] = nil,
["Red Border On Enemy Units"] = "显示敌方单位红色边框", ["Red Border On Enemy Units"] = "显示敌方单位红色边框",
["Red Name Text On Infight Units"] = "进战斗的单位显示红色姓名", ["Red Name Text On Infight Units"] = "进战斗的单位显示红色姓名",
["Regional Settings"] = "区域设置", ["Regional Settings"] = "区域设置",
@@ -783,6 +783,7 @@ pfUI_translation["zhCN"] = {
["Target Castbar"] = "目标施法条", ["Target Castbar"] = "目标施法条",
["Target Debuff Bar"] = "目标Debuffs条", ["Target Debuff Bar"] = "目标Debuffs条",
["Target Nameplate Zoom Factor"] = "目标姓名板缩放系数", ["Target Nameplate Zoom Factor"] = "目标姓名板缩放系数",
["Target Totem"] = nil,
["Target-Target"] = "目标的目标", ["Target-Target"] = "目标的目标",
["Target-Target-Target"] = "目标的目标的目标", ["Target-Target-Target"] = "目标的目标的目标",
["Text"] = "文本", ["Text"] = "文本",
+2 -1
View File
@@ -619,8 +619,8 @@ pfUI_translation["zhTW"] = {
["Random Roll Announcement Rarity"] = "隨機Roll點公示稀有度", ["Random Roll Announcement Rarity"] = "隨機Roll點公示稀有度",
["Random Rolling"] = "隨機Roll點 物品:", ["Random Rolling"] = "隨機Roll點 物品:",
["Range Based Hunter Paging"] = nil, ["Range Based Hunter Paging"] = nil,
["Range Check Interval"] = "範圍檢查間隔",
["Rank"] = nil, ["Rank"] = nil,
["Recast Totem"] = nil,
["Red Border On Enemy Units"] = nil, ["Red Border On Enemy Units"] = nil,
["Red Name Text On Infight Units"] = nil, ["Red Name Text On Infight Units"] = nil,
["Regional Settings"] = nil, ["Regional Settings"] = nil,
@@ -782,6 +782,7 @@ pfUI_translation["zhTW"] = {
["Target Castbar"] = nil, ["Target Castbar"] = nil,
["Target Debuff Bar"] = nil, ["Target Debuff Bar"] = nil,
["Target Nameplate Zoom Factor"] = nil, ["Target Nameplate Zoom Factor"] = nil,
["Target Totem"] = nil,
["Target-Target"] = "目標的目標", ["Target-Target"] = "目標的目標",
["Target-Target-Target"] = nil, ["Target-Target-Target"] = nil,
["Text"] = nil, ["Text"] = nil,
+14 -25
View File
@@ -14,34 +14,25 @@ pfUI:RegisterModule("totems", function ()
end) end)
totems.OnEnter = function(self) totems.OnEnter = function(self)
if not this.id then return end local id = this:GetID()
-- native GetTotemInfo's 1st return is tool presence, not "summoned"; local spellID = select(7, GetTotemInfo(id))
-- a live totem shows a non-empty name / non-zero start. if not spellID or spellID == 0 then return end
local _, name = GetTotemInfo(this.id)
if not name or name == "" then return end
local color = slots[this.id]
GameTooltip:SetOwner(this, "ANCHOR_LEFT") GameTooltip:SetOwner(this, "ANCHOR_LEFT")
GameTooltip:SetText(name, color.r+.2, color.g+.2, color.b+.2) GameTooltip:SetSpell(FindSpellBookSlotByID(spellID))
local timeleft = GetTotemTimeLeft(this.id) GameTooltip:AddDoubleLine(T["Left Click"], "|cffffffff" .. T["Recast Totem"])
if timeleft and timeleft > 0 then GameTooltip:AddDoubleLine(T["Right Click"], "|cffffffff" .. T["Target Totem"])
GameTooltip:AddLine(string.format("%d:%02d", floor(timeleft/60), floor(mod(timeleft, 60))), 1, 1, 1)
end
GameTooltip:Show() GameTooltip:Show()
end end
totems.OnLeave = function(self) totems.OnLeave = GameTooltip_Hide
GameTooltip:Hide()
end
totems.OnClick = function(self) totems.OnClick = function(self)
if not this.id then return end local id = this:GetID()
if arg1 == "LeftButton" then if arg1 == "LeftButton" then
-- recast the totem on left click local _, name = GetTotemInfo(id)
local _, name = GetTotemInfo(this.id)
if name and name ~= "" then CastSpellByName(name) end if name and name ~= "" then CastSpellByName(name) end
elseif arg1 == "RightButton" then elseif arg1 == "RightButton" then
-- target the totem on right click TargetTotem(id)
TargetTotem(this.id)
end end
end end
@@ -57,7 +48,7 @@ pfUI:RegisterModule("totems", function ()
self.bar[count]:Show() self.bar[count]:Show()
self.bar[count]:SetBackdropBorderColor(color.r, color.g, color.b) self.bar[count]:SetBackdropBorderColor(color.r, color.g, color.b)
self.bar[count].icon:SetTexture(icon) 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) CooldownFrame_SetTimer(self.bar[count].cd, start, duration, 1)
end end
@@ -76,7 +67,7 @@ pfUI:RegisterModule("totems", function ()
self:Show() self:Show()
end 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 if pfUI_config.totems.direction == "HORIZONTAL" then
self:SetHeight(self.iconsize + self.spacing*2) self:SetHeight(self.iconsize + self.spacing*2)
@@ -113,8 +104,7 @@ pfUI:RegisterModule("totems", function ()
end end
end end
self.bar[i]:SetHeight(self.iconsize) self.bar[i]:SetSize(self.iconsize, self.iconsize)
self.bar[i]:SetWidth(self.iconsize)
CreateBackdrop(self.bar[i], nil, true) CreateBackdrop(self.bar[i], nil, true)
self.bar[i].icon = self.bar[i].icon or self.bar[i]:CreateTexture(nil, "ARTWORK") 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) 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 = self.bar[i].cdbg or CreateFrame("Frame", nil, self.bar[i])
self.bar[i].cdbg:SetHeight(self.iconsize - 3) self.bar[i].cdbg:SetSize(self.iconsize - 3, self.iconsize - 3)
self.bar[i].cdbg:SetWidth(self.iconsize - 3)
self.bar[i].cdbg:SetPoint("CENTER", self.bar[i], "CENTER", 0, 0) 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 = self.bar[i].cd or CreateFrame(COOLDOWN_FRAME_TYPE, "pfTotemsBar"..i.."Cooldown", self.bar[i].cdbg, "CooldownFrameTemplate")
self.bar[i].cd.pfCooldownStyleAnimation = 1 self.bar[i].cd.pfCooldownStyleAnimation = 1