From 78cc28692b8891c383f0708d1860a30498068575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=91=E5=85=88=E7=94=9F?= Date: Thu, 3 Apr 2025 00:14:35 +0800 Subject: [PATCH] Adapt to Chinese clients to dynamically take duration seconds (#30) --- Localization.lua | 10 +++++++++- curses.lua | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Localization.lua b/Localization.lua index ae760f0..54eeb38 100644 --- a/Localization.lua +++ b/Localization.lua @@ -91,6 +91,7 @@ L:RegisterTranslations("enUS", function() -- spells + ["Rank"] = true, ["Rank 1"] = true, ["Rank 2"] = true, ["Rank 3"] = true, @@ -207,7 +208,13 @@ L:RegisterTranslations("zhCN", function() ["Same as HIGHEST_HP_RAID_MARK but with RAID_MARK_SQUARE mark prio."] = "与HIGHEST_HP_RAID_MARK相同,但是RAID_MARK_SQUARE标记优先.", ["Same as HIGHEST_HP_RAID_MARK but with INVERSE_RAID_MARK mark prio."] = "与HIGHEST_HP_RAID_MARK相同,但是INVERSE_RAID_MARK标记优先.", ["|cffffcc00Cursive:|cffffaaaa Couldn't find a target to curse."] = "|cffffcc00Cursive:|cffffaaaa 找不到要诅咒的目标.", - ["curse_duration_format"] = ".*持续([%d.]+)秒.", -- no idea if this is right + -- 法术描述样本 + -- 腐蚀术:腐蚀目标,在18.69秒内造成累计828到834点伤害。 + -- 精灵之火:使目标的护甲降低175点,持续40秒。在效果持续期间,目标无法潜行或隐形。 + -- 扫击:对目标造成19点伤害,并在9秒内造成总计39点额外伤害。伤害受到你的攻击强度加成,奖励1个连击点数。 + -- 虫群:敌人被飞虫围绕,攻击命中率降低2%,在18秒内受到总计99点自然伤害。 + -- 月火术:灼烧敌人,对其造成40到48点伤害,并在18秒内造成额外的120点奥术伤害。 + ["curse_duration_format"] = "(%d+%.?%d*)秒", -- curses ["(.+) fades from (.+)"] = "(.+)效果从(.+)身上消失", @@ -264,6 +271,7 @@ L:RegisterTranslations("zhCN", function() ["Expiring latest -> soonest"] = "最新->即将到期", -- spells + ["Rank"] = "等级", ["Rank 1"] = "等级 1", ["Rank 2"] = "等级 2", ["Rank 3"] = "等级 3", diff --git a/curses.lua b/curses.lua index 2d818ea..b859537 100644 --- a/curses.lua +++ b/curses.lua @@ -67,7 +67,7 @@ function curses:LoadCurses() end if spellrank == "" then - spellrank = "Rank 1" + spellrank = L["Rank 1"] end curses.trackedCurseNameRanksToSpellSlots[string.lower(spellname) .. spellrank] = i @@ -86,7 +86,7 @@ end function curses:ScanTooltipForDuration(curseSpellID) -- scan spellbook for duration in case they have haste talent - local nameRank = curses.trackedCurseIds[curseSpellID].name .. "Rank " .. curses.trackedCurseIds[curseSpellID].rank + local nameRank = curses.trackedCurseIds[curseSpellID].name .. L["Rank"] .. " " .. curses.trackedCurseIds[curseSpellID].rank local spellSlot = curses.trackedCurseNameRanksToSpellSlots[nameRank] if spellSlot then