Skip to content

2.5.0: locale-correct fonts, a test suite, and four more translations - #15

Merged
chrisdfennell merged 1 commit into
mainfrom
feature/2.5.0-fonts-tests-locales
Aug 7, 2026
Merged

2.5.0: locale-correct fonts, a test suite, and four more translations#15
chrisdfennell merged 1 commit into
mainfrom
feature/2.5.0-fonts-tests-locales

Conversation

@chrisdfennell

Copy link
Copy Markdown
Owner

Why

2.4.0 shipped six translations and documented why four more could not follow:
the addon named Fonts\FRIZQT__.TTF in eleven places, and that file carries
Latin glyphs only on the Korean and Chinese clients. It loads, reports success,
and draws empty boxes — there is no error to catch. This removes that blocker
and adds the four languages.

Along the way the new test suite found a real bug.

The bug

Removing a stat from a section did not stick. sanitize() in Config.lua
treated a section's stat list as a fixed-length array — the rule that exists to
repair a garbled {r,g,b,a} colour — so any section the user had shortened was
"repaired" back to the default membership on the next Config:Activate, which
is every login. Silent: no error, and nothing on screen to say the setting had
been reverted.

Colour arrays are now identified by holding numbers. A variable-length list of
names keeps the length the user gave it, and only the element type is enforced.
Regression tests in tests/spec_profiles.lua.

What's in it

Fonts and translations

  • Media:UIFont() resolves the client's own font; a Game Default choice
    exposes that in the options and is the new default and fallback
  • Media:Fetch substitutes it for any Latin-only face a preset or profile
    names on a non-Latin client, and the font dropdown says which those are
  • ruRU, koKR, zhCN, zhTW added; the six existing locales backfilled.
    All ten at 520/520 keys
  • zhTW is written out rather than converted from zhCN — Versatility is
    臨機應變 against 全能, Crit 爆擊 against 暴擊, Leech 汲取 against 吸血
  • None reviewed by a native speaker. Every file says so in its header

Teststests/, 171 of them, no dependencies, new CI job

  • Loads the addon under a stubbed client (tests/wow_stub.lua) and calls the
    pure logic directly
  • Covers priority parsing, the $token templates and their secret-value
    guarantees, the profile schema, the v1 migration, sanitizing a corrupt
    profile, import/export, the footer, the bindings, and every preset
  • The preset check is the load-bearing one: a preset key that no longer matches
    the defaults schema is written into the profile, read by nobody, and silently
    does less than it claims. All 22 are checked on every push

Features

  • Key bindings: toggle, lock, options, next profile, gear audit
  • /sp debug — one copyable box with everything a bug report needs. Carries no
    character or realm name; the usual destination is a public tracker
  • Attack power, spell power, health, mana, Brewmaster stagger. All off by default
  • $per — combat rating per 1%, divided by the rating bonus so crit's base
    does not understate it, and so it does not change with the total/bonus setting
  • Gear durability and repair cost in the footer
  • Anchor point and X/Y position controls, kept in sync with dragging
  • A Colorblind Safe preset on the Okabe-Ito palette. The default palette
    puts Crit in red and Mastery in green — the two hues red-green colour
    blindness cannot separate — and every other preset inherits it
  • A what's-new notice, once per version, silent on a fresh install
  • The priority box now accepts Mast/Vers (which the panel itself displays)
    and the client's own stat names, and no longer tokenizes on ASCII only

Not in it

  • docs/MULTI-PANEL.md measures a second panel rather than guessing: 135
    references to a file-local frame, 111 of 122 option bindings to re-scope,
    and a DB_VERSION 2→3 saved-variables migration. The note has a four-stage
    plan where stages 1–3 are refactors covered by the new tests.

Tested

  • lua tests/run.lua — 171 pass
  • All 36 Lua files compile under 5.1
  • TOC completeness check passes
  • tools/locale-lint.ps1 — clean, ten locales at 100%
  • TOC version bumped to 2.5.0 with a matching CHANGELOG entry, so the release
    workflow's verify job will pass

Not tested in game. None of this has been loaded in the client. The parts I
would want eyes on first are the new frames in Diagnostics.lua (the copy box)
and the durability sampling in the footer — everything else is either covered by
the suite or a text change.

Fixes a silent data-loss bug found by the new tests: removing a stat from a
section did not stick. Config's sanitize() treated a section's stat list as a
fixed-length array -- the rule that repairs a garbled {r,g,b,a} colour -- so any
section the user had shortened was "repaired" back to the default membership on
the next Activate, which is every login. No error, nothing on screen to explain
it. Colour arrays are now identified by holding numbers; a variable-length list
of names keeps the length the user gave it.

Fonts. The addon named Fonts\FRIZQT__.TTF in eleven places. That file exists on
the Korean and Chinese clients but carries Latin glyphs only, so it loads,
reports success, and draws empty boxes -- there is nothing to catch. Media:UIFont()
now resolves the client's own font, a "Game Default" choice exposes that in the
options, and Media:Fetch substitutes it for any Latin-only face a preset or
profile names. This is what blocked ruRU/koKR/zhCN/zhTW in 2.4.0.

Translations. Russian, Korean, Simplified Chinese and Traditional Chinese, all
complete against the 520-key set; the six existing locales backfilled to 100%.
zhTW is written out rather than converted from zhCN -- Versatility is 臨機應變
against 全能, Crit 爆擊 against 暴擊 -- since a character-level conversion would
read fine and be wrong in the words a user is looking for. None reviewed by a
native speaker; every file says so and points at the issue tracker.

Tests. tests/ loads the addon under a stubbed client and calls the pure logic
directly: priority parsing, the $token templates and their secret-value
guarantees, the profile schema, the v1 migration, sanitizing a corrupt profile,
import/export, the footer, the bindings, and every preset. 171 tests, no
dependencies -- harness.lua is the framework and CI already installs Lua. The
preset check matters most: a preset key that no longer matches the schema is
written into the profile, read by nobody, and silently does less than it claims.

Features:
- Key bindings for toggle, lock, options, next profile and the gear audit
- /sp debug: one copyable box with everything a bug report needs, and no
  character or realm name in it
- Attack power, spell power, health, mana and Brewmaster stagger, all off by
  default
- $per, the combat rating cost of 1% -- divided by the rating bonus rather than
  the displayed value, so crit's base does not understate it
- Gear durability and repair cost in the footer
- Anchor point and X/Y position controls, kept in sync with dragging
- A Colorblind Safe preset on the Okabe-Ito palette, not relying on colour alone
- A what's-new notice, printed once per version, silent on a fresh install
- The priority box accepts the abbreviations the panel itself displays and the
  client's own stat names, and no longer tokenizes on ASCII letters only

docs/MULTI-PANEL.md measures a second panel rather than guessing at it: 135
references to a file-local frame, 111 of 122 option bindings to re-scope, and a
saved-variables migration. Not implemented; the note has a four-stage plan.
@chrisdfennell
chrisdfennell merged commit 8d7cc05 into main Aug 7, 2026
4 checks passed
@chrisdfennell
chrisdfennell deleted the feature/2.5.0-fonts-tests-locales branch August 7, 2026 01:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7d082d2cc1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Diagnostics.lua
Comment on lines +255 to +257
if not seen then
db.lastSeenVersion = current
return

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the prior version for the first upgrade notice

On the first 2.5.0 login, every existing 2.4.x installation also lacks global.lastSeenVersion, because this field did not exist before this commit. This branch therefore treats all upgrading users as fresh installs, stamps 2.5.0, and suppresses the only 2.5.0 highlights permanently; the notice cannot work until a later release. Capture whether the saved database already existed, or seed a previous addon version during initialization, before using a missing stamp to identify fresh installs.

Useful? React with 👍 / 👎.

Comment thread StatPanel.lua
Comment on lines +485 to +486
local function normalizeWord(word)
return (word:lower():gsub("[%s%p]", ""))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Case-fold localized aliases without bytewise string.lower

On the new ruRU client, Lua 5.1's byte-oriented string.lower does not lowercase UTF-8 Cyrillic, so aliases registered as Искусность, Крит, etc. do not match normally typed lowercase forms such as искусность > крит. The parser consequently rejects an otherwise valid localized priority despite claiming case-insensitive support; use a Unicode-aware fold or register normalized lowercase locale variants explicitly.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant