pr81-localization
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f97ee0df85 |
env: take the yard unit from translations in unit frames and radar
The yard unit is now a translation key instead of a hardcoded string. - Translation key "%.1f yd" becomes " yd" in all locales (8 files, 1,138 keys each, no key set changes). - Target distance in unitxp.lua and the radar tooltip, title and range menu all read T[" yd"]; hiding the unit still leaves a bare number. - ruRU gets a cleaner wording for "Hide When Entering Combat". - zhCN: fix the invalid escapes at translations_zhCN.lua:360 that kept the file from loading. |
||
|
|
239bd77799 |
env: complete localization and sync translation keys with code
Finish the localization pass on pfUI: every key the addon uses as T["..."] is
now present in all translations_*.lua files, keys that are no longer used,
along with duplicates, have been removed, and strings that were still hardcoded
in the UI are wrapped in T[...] and added to the key list.
Summary:
* added 178 keys that were missing from enUS (and therefore from every locale);
values are nil — structure only, no translations;
* localized 59 previously hardcoded strings (raid marker settings, language
dropdown, dropdown labels, chat messages, innervate announcements, battleground
mover, distance/rate/memory formats, all Easter eggs and the first-run profile
buttons); Unknown and Legacy reuse existing keys;
* removed 46 dead keys (45 in enUS/deDE + 1 in zhCN only) — none of them is
referenced anywhere in the code;
* removed 6 duplicates in enUS and deDE; deDE translations from the duplicate
lines were moved to the main key lines, so nothing was lost;
* result: 1146 unique keys in each of the 8 files — exactly the number of keys
used by the code (1599 T["..."] lookups, all literal).
Stats: +2117 key lines, -307 lines (295 dead + 12 duplicates); translated
string count 3889 -> 3774 (the decrease comes only from translations of the
removed dead keys); T["..."] lookups in code 1525 -> 1599 (+74), distinct keys
1087 -> 1146 (+59).
Behavior is unchanged: only labels are translated. Dropdown values keep their
identifiers ("1:...", "0:..."), profile buttons still call
LoadProfile("Modern"/"Nostalgia"/"Legacy"/"Slim"), and the FPS dropdown
suffixes are now one format key, `(%d FPS)`.
Verified:
* parity 1146/1146 in all 8 files: 0 missing, 0 extra, 0 duplicates;
* 0 T["..."] keys without an enUS entry; there are no dynamic T[var] lookups
in the code (1599 of 1599 lookups are literals);
* relative order of the existing keys is unchanged (lost = 0, reordered = 0);
* no live translation was changed or lost; the translation-file diff is
additive only (exactly 59 inserted lines per file, 0 modified lines);
* UTF-8 without BOM, CRLF, files end with "}";
* edited Lua files pass a string/comment-aware bracket-balance check
(no Lua interpreter was available for a full parse);
* the remaining unwrapped literals are symbols and identifiers only
(`+`, `-`, `?`, `X:`, `Y:`, color codes, frame/skin names).
<details>
<summary>Per-file stats</summary>
| File | Keys now | Lines now | Key lines added | Dead removed | Duplicates removed | Translated strings before -> after |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
| `translations_enUS.lua` | 1146 | 1150 | 237 | 45 | 6 | 0 -> 0 |
| `translations_deDE.lua` | 1146 | 1150 | 270 | 45 | 6 | 26 -> 20 |
| `translations_esES.lua` | 1146 | 1148 | 280 | 34 | 0 | 750 -> 733 |
| `translations_frFR.lua` | 1146 | 1148 | 210 | 34 | 0 | 765 -> 748 |
| `translations_koKR.lua` | 1146 | 1148 | 280 | 34 | 0 | 272 -> 268 |
| `translations_ruRU.lua` | 1146 | 1148 | 280 | 34 | 0 | 781 -> 752 |
| `translations_zhCN.lua` | 1146 | 1148 | 280 | 35 | 0 | 849 -> 816 |
| `translations_zhTW.lua` | 1146 | 1148 | 280 | 34 | 0 | 446 -> 437 |
| **Total** | 1146 each | 9188 | **2117** | **295** | **12** | **3889 -> 3774** |
The differing number of additions per locale is because `deDE` already had 11
of the keys from the throttling section and `frFR` already had 27 of the 178,
and because `deDE`/`zhCN` carried one or more locale-only entries.
</details>
<details>
<summary>Newly localized strings (59 keys)</summary>
| Module | Count | Keys |
| --- | ---: | --- |
| `modules/gui.lua` — Raid Marker section | 17 | `Mark Tracking`, `Raid Marker Width`, `Raid Marker Height`, `Raid Marker Grow`, `Raid Marker Texture`, `Raid Marker Font Size`, `Show Name`, `Show Percent HP`, `Show Portrait`, `Star Color`, `Circle Color`, `Diamond Color`, `Triangle Color`, `Moon Color`, `Square Color`, `Cross Color`, `Skull Color` |
| `modules/gui.lua` — dropdown labels | 14 | `English`, `Spanish`, `French`, `Korean`, `Russian`, `Chinese (Simplified)`, `Chinese (Traditional)`, `Original Blizzard`, `pfUI Design`, `Separate Bar`, `Overlay`, `Auto`, `Row-first (1,2,3 / 4,5,6)`, `Column-first (1,3,5 / 2,4,6)` |
| `modules/gui.lua` — messages, FPS suffix | 3 | `Please enable the Hoverbind module to use this feature.`, `Please enable the Share module to use your config.`, `(%d FPS)` |
| `modules/firstrun.lua` | 4 | `Couldn't apply settings. Chat module is disabled.`, `Modern`, `Nostalgia`, `Slim` (`Legacy` reuses an existing key) |
| `modules/easteregg.lua` | 10 | `\|cff33ffccShagu\|cffffffff wishes you a`, `\|cff444444<Click> or '/afk' to exit`, `happy valentine's day!`, `happy hallow's end!`, `merry christmas!`, `happy new year!`, `Another year with \|cff33ffccpf\|rUI has passed.\nThanks for continuing to use it!`, `You are now \|cff33ffcc%s\|r (AFK).`, `You are now \|cff33ffcc%s\|r (AFK): %s`, `You are no longer \|cff33ffcc%s\|r (AFK).\n…merry christmas…` |
| `modules/innervatecall.lua` | 2 | `>> Innervate is ready <<`, `>> Innervate cast on %s <<` (`Unknown` reuses an existing key) |
| `modules/bgscore.lua` | 2 | `\|cff3399ffAlliance: 123\|r \| \|cffff4444Horde: 456\|r`, `BG Score` |
| `modules/radar.lua`, `modules/xpbar.lua`, `modules/panel.lua` | 6 | `%.1f yd`, `/ min`, `(%.0f KB) %s`, `(%.2f MB) %s`, `AddOn Memory: %.0f KB`, `AddOn Memory: %.2f MB` |
| `api/ui-widgets.lua` | 1 | `Are you sure?` |
Notes:
* `(%d FPS)` replaces 12 hardcoded suffixes (`" (2 FPS)"` … `" (50 FPS)"`) in the
two throttling dropdowns.
* The `X:` / `Y:` axis labels in `modules/unlock.lua` were deliberately left
alone (universal axis notation).
* `RESTORE_SET_NAME = "pfUI Auto-Restore"` in `modules/equipmentmanager.lua` is a
persisted comparison identifier and is not translatable.
* The ClassicAPI dependency-gate messages in `API_Check.lua` are not localized:
that file runs before the pfUI environment exists, so `T` is not available.
* GM menu, debug/diagnostics output (`superwow.lua`, `unitxp.lua`), addon proper
names, CVars, format strings and skin/frame identifiers stay untranslated.
</details>
<details>
<summary>Added keys — modules/gui.lua (101)</summary>
| # | Key |
| ---: | --- |
| 1 | `1 Decimal (2.1)` |
| 2 | `2 Decimals (2.14)` |
| 3 | `Abbreviate 1 Decimal (4.2k)` |
| 4 | `Abbreviate 2 Decimals (4.25k)` |
| 5 | `Abbreviate Numbers` |
| 6 | `Always Show Equipment Slot Flyouts` |
| 7 | `Announce Automatic Set Switches In Chat` |
| 8 | `Auto Sort When Opening Bags` |
| 9 | `Automatic Set Switching` * |
| 10 | `Castbar Timer Decimals` |
| 11 | `Character` |
| 12 | `ClassicAPI (UnitInRange)` |
| 13 | `Disable Friendly Nameplates In Friendly Zones` |
| 14 | `Disable Hostile Nameplates In Friendly Zones` |
| 15 | `Display Raid Group Label` |
| 16 | `Druid Mana Bar Spacing` |
| 17 | `Druid Mana Bar Texture` |
| 18 | `Druid Mana Bar Width (-1 = auto)` |
| 19 | `Druid Mana Bar X-Offset` |
| 20 | `Druid Mana Bar Y-Offset` |
| 21 | `Druid Settings` |
| 22 | `Enable Automatic Set Switching` * |
| 23 | `Enable OS Notifications` |
| 24 | `Enable Player Levels` |
| 25 | `Energy/Mana Ticks` |
| 26 | `Equipment Manager` |
| 27 | `Fill Order` |
| 28 | `Five Second Rule Color` |
| 29 | `Five Second Rule Height` |
| 30 | `Five Second Rule Style` |
| 31 | `Full Numbers (4250)` |
| 32 | `Group Label X-Offset` |
| 33 | `Group Label Y-Offset` |
| 34 | `Hide yd characters` |
| 35 | `Hook Distance to Portrait Frame` |
| 36 | `Include Bank Items` |
| 37 | `Inventory` |
| 38 | `Items` |
| 39 | `Items Not In Any Set` * |
| 40 | `Layout Uneven Orientation` |
| 41 | `Mainhand Bar Color` |
| 42 | `Merge Tradeskill Casts` |
| 43 | `Minimap Player Arrow Scale` |
| 44 | `Minimum Item Quality` |
| 45 | `Name Text Position` |
| 46 | `Nampower Settings` |
| 47 | `Note: Only works when Cursor Align is NOT 'Native'` |
| 48 | `Offhand Bar Color` |
| 49 | `Only Show Your Debuffs` |
| 50 | `Pixel Perfect UI-Scale: %s (Overrides UI-Scale)` |
| 51 | `PvP Flag Position` |
| 52 | `PVP Flag Size` |
| 53 | `PvP Flag X-Offset` |
| 54 | `PvP Flag Y-Offset` |
| 55 | `Raid Mark Icon Style` |
| 56 | `Range Check Mode` |
| 57 | `Ranged Bar Color` |
| 58 | `Ranged Warn Color (Hunter)` |
| 59 | `Reactive Indicator Size` |
| 60 | `Reverse Sort Direction (Last Bag First)` |
| 61 | `Reverse Sort Priority (Hearthstone Last)` |
| 62 | `Show Attack Speed` |
| 63 | `Show Aura Caster` |
| 64 | `Show Behind Indicator` |
| 65 | `Show Debuffs on Friendly` |
| 66 | `Show Debuffs on Hostile` |
| 67 | `Show Distance of Target` |
| 68 | `Show Durability` |
| 69 | `Show Faction Icons` |
| 70 | `Show Five Second Rule` |
| 71 | `Show Line of Sight Indicator` |
| 72 | `Show MH/OH Labels` |
| 73 | `Show Movement Speed` |
| 74 | `Show Offhand Bar` |
| 75 | `Show On Next Attack Queue Color` |
| 76 | `Show Only Own Debuffs` |
| 77 | `Show Race Icons` |
| 78 | `Show Ranged Bar` |
| 79 | `Show Reactive Spell Indicator` |
| 80 | `Show Reputation Remaining` |
| 81 | `Show Spell IDs` |
| 82 | `Show Spell Queue Indicator` |
| 83 | `Show Timestamps In Chat Copy` |
| 84 | `Show Unit Buffs` |
| 85 | `Show Unit IDs` |
| 86 | `Spell Queue Icon Size` |
| 87 | `Spells` |
| 88 | `Swing Timer` |
| 89 | `Swing Timer Font Size` |
| 90 | `Swing Timer Height` |
| 91 | `Swing Timer Texture` |
| 92 | `Swing Timer Width` |
| 93 | `Target Indicator Font Size` |
| 94 | `Target Indicators` |
| 95 | `Track Group on Minimap` |
| 96 | `Uninterruptible Color` |
| 97 | `Units` |
| 98 | `UnitXP (Precise)` |
| 99 | `UnitXP Range Threshold (yards)` |
| 100 | `UnitXP Settings` |
| 101 | `Use UI-Scale` |
\* also used in `modules/equipmentmanager.lua`.
</details>
<details>
<summary>Added keys — modules/equipmentmanager.lua (66)</summary>
| # | Key |
| ---: | --- |
| 1 | `%d items, %d ignored` |
| 2 | `Add the current zone` |
| 3 | `Any Form` |
| 4 | `Aquatic Form` |
| 5 | `Automatic Set Switching` * |
| 6 | `Battle Stance` |
| 7 | `Battleground` |
| 8 | `Bear Form` |
| 9 | `Berserker Stance` |
| 10 | `Cat Form` |
| 11 | `Condition met, but a trigger higher in the list wins` |
| 12 | `Create an equipment set first.` |
| 13 | `Currently active` |
| 14 | `Defensive Stance` |
| 15 | `Do Nothing` |
| 16 | `Dungeon` |
| 17 | `Eating / Drinking` |
| 18 | `Enable Automatic Set Switching` * |
| 19 | `Equip` |
| 20 | `Equip sets automatically when mounted, swimming, eating, in a zone, at a given time and more.` |
| 21 | `Equippable items in your bags, bank and paperdoll that no equipment set uses.` |
| 22 | `Equipping %s` |
| 23 | `Equipping %s (%s)` |
| 24 | `Every equippable item is part of a set.` |
| 25 | `Ghost Wolf` |
| 26 | `Here` |
| 27 | `Ignored (Right-Click to unignore)` |
| 28 | `In Bags` |
| 29 | `In Bank` |
| 30 | `Instance Type` |
| 31 | `Items Not In Any Set` * |
| 32 | `Local time window, e.g. 20:00-23:00` |
| 33 | `Moonkin Form` |
| 34 | `Mounted` |
| 35 | `New Trigger` |
| 36 | `No Form (Caster)` |
| 37 | `No set selected` |
| 38 | `No triggers yet. Click "New Trigger" to add one.` |
| 39 | `Not part of any equipment set` |
| 40 | `Open World` |
| 41 | `Resting (Inn / City)` |
| 42 | `Restore Previous Gear` |
| 43 | `Restoring previous gear` |
| 44 | `Select a trigger to edit it.` |
| 45 | `Selected Trigger` |
| 46 | `Separate several zones with ;` |
| 47 | `Shadowform` |
| 48 | `Shapeshift Form / Stance` |
| 49 | `Shift-Click: Link Ctrl-Click: Preview\nRight-Click: Ignore / Unignore` |
| 50 | `Show Ignored` |
| 51 | `Stealth` |
| 52 | `Stealthed` |
| 53 | `Swimming` |
| 54 | `Targeting A Boss` |
| 55 | `Time Of Day` |
| 56 | `Travel Form` |
| 57 | `Tree of Life Form` |
| 58 | `Triggers` |
| 59 | `Triggers higher in the list take priority. Gear is never swapped in combat, while dead or while casting: the switch waits until it can happen.` |
| 60 | `Unused` |
| 61 | `Value` |
| 62 | `When` |
| 63 | `When It Ends` |
| 64 | `Windows may wrap past midnight (22:00-02:00).` |
| 65 | `Zone` |
| 66 | `Zone or subzone name` |
\* also used in `modules/gui.lua`.
</details>
<details>
<summary>Added keys — other modules (14)</summary>
| Module | Key |
| --- | --- |
| `modules/radar.lua` | `Above you` |
| `modules/radar.lua` | `Below you` |
| `modules/radar.lua` | `Out of line of sight` |
| `modules/radar.lua` | `Radar` |
| `modules/tooltip.lua` | `Cast by` |
| `modules/tooltip.lua` | `Speed` |
| `modules/tooltip.lua` | `SpellID` |
| `modules/tooltip.lua` | `UnitID` |
| `modules/hoverbind.lua` | `is currently overridden by` |
| `modules/hoverbind.lua` | `was unbound from` |
| `modules/xpbar.lua` | `Rested Gain` |
| `modules/xpbar.lua` | `Time to Rested Cap` |
| `api.lua` | `The UI-Scale has changed. Reload the UI to redraw the borders?` |
| `modules/firstrun.lua` | `Cancel` |
</details>
<details>
<summary>Removed dead keys (46)</summary>
| Key | Category | Was present in |
| --- | --- | --- |
| `Heal Prediction Cleanup` | dead, throttling-section leftover | enUS, deDE |
| `Health/Status Bar` | dead, throttling-section leftover | enUS, deDE |
| `Libpredict` | dead, throttling-section leftover | enUS, deDE |
| `Mass` | dead, throttling-section leftover | enUS, deDE |
| `Panel Alignment` | dead, throttling-section leftover | enUS, deDE |
| `Panel Alignment Check` | dead, throttling-section leftover | enUS, deDE |
| `Player Frame` | dead, throttling-section leftover | enUS, deDE |
| `Raid/Party Frames` | dead, throttling-section leftover | enUS, deDE |
| `Target/Casting` | dead, throttling-section leftover | enUS, deDE |
| `Target/Casting Plates` | dead, throttling-section leftover | enUS, deDE |
| `Unit Frame Update Rate` | dead, throttling-section leftover | enUS, deDE |
| `Abbreviate Numbers (4200 -> 4.2k)` | legacy | all 8 |
| `Border Size` | legacy | all 8 |
| `Close` | legacy | all 8 |
| `Config UI Settings` | legacy | all 8 |
| `Cooldown / Durations` | legacy | all 8 |
| `Cooldown Text Threshold` | legacy | all 8 |
| `Defaults` | legacy | all 8 |
| `Display Debuff Durations` | legacy | all 8 |
| `Do you really want to reset \|cffffaaaaEVERYTHING\|r?` | legacy | all 8 |
| `Druid Mana Bar Text` | legacy | all 8 |
| `Effective Haste (Haste * cast time reduction)` | legacy | all 8 |
| `Enable Pixel Perfect Borders` | legacy | all 8 |
| `Enable UI-Scale` | legacy | all 8 |
| `Estimate Debuffs` | legacy | all 8 |
| `Focus Castbar` | legacy | all 8 |
| `Haste (cast speed increase)` | legacy | all 8 |
| `Huge (PixelPerfect)` | legacy | all 8 |
| `Load Defaults` | legacy | all 8 |
| `Look & Feel` | legacy | all 8 |
| `Menu Font` | legacy | all 8 |
| `Menu Font Size` | legacy | all 8 |
| `Off` | legacy | all 8 |
| `Only` | legacy | all 8 |
| `Only Show Own Debuffs (\|cffffaaaaExperimental\|r)` | legacy | all 8 |
| `Player Castbar` | legacy | all 8 |
| `Regional Settings` | legacy | all 8 |
| `Save & Reload` | legacy | all 8 |
| `Scale Border On HiDPI Displays` | legacy | all 8 |
| `Show Incompatible Config Entries` | legacy | all 8 |
| `Soul Shard` | legacy | all 8 |
| `Soulshards` | legacy | all 8 |
| `Target Castbar` | legacy | all 8 |
| `Tiny (PixelPerfect)` | legacy | all 8 |
| `Use Blizzard Borders` | legacy | all 8 |
| `Show Player Levels` | stale, zhCN only | zhCN |
</details>
<details>
<summary>Removed duplicates (6, in enUS and deDE)</summary>
| Key | What was done |
| --- | --- |
| `Fast` | kept the first occurrence; in deDE the "Schnell" value was moved from the duplicate into the main key line |
| `Nameplates` | kept the first occurrence; in deDE "Namensplaketten" was moved into the main key line |
| `Normal` | kept the first occurrence (inside the throttling block); both deDE values were identical |
| `Slow` | kept the first occurrence; in deDE "Langsam" was moved into the main key line |
| `Very Fast` | kept the first occurrence; in deDE "Sehr Schnell" was moved into the main key line |
| `Very Slow` | kept the first occurrence; in deDE "Sehr Langsam" was moved into the main key line |
</details>
|
||
|
|
5476a28982 | Skin menu dividers: CreateMenuDivider draws a 1px border-colored line; use it in the radar menu | ||
|
|
d2cefe69cf |
Add a DBM-style range radar for party and raid members
/radar toggles it and /radar <yards> sets the range; the right-click menu and the mouse wheel step through 5-40 yd. The map turns with GetPlayerFacing so ahead is up, and ClassicAPI.UnitPosition places class-colored dots (the mirrored name, since SuperWoW takes the global with x, y, z order). The range ring is two stacked TempPortraitAlphaMask discs: a ring-color disc under a slightly smaller background-color one. It turns red when a member is inside the range, and a list under the radar shows the five nearest with their raid markers inline. Raid markers come from the markN tokens, so marked mobs show too and a marked member shows the marker instead of a dot. Units behind terrain (UnitInLineOfSight, traced 4x a second) are dimmed. Units on another floor, over 5 yd up or down and steeper than 45 degrees so hills don't count, get an arrow above or below them. Hovering a blip shows its name, distance and both states; clicking a blip or a list row targets it. |