Skip to content

fix(a11y-l10n): localize Sudoku board-cell VoiceOver state suffixes - #777

Merged
wei18 merged 1 commit into
mainfrom
worktree-impl-771
Jul 11, 2026
Merged

wei18 merged 1 commit into
mainfrom
worktree-impl-771

Conversation

@wei18

@wei18 wei18 commented Jul 11, 2026

Copy link
Copy Markdown
Owner

What

Sudoku's BoardCellView.accessibilityLabel composed its VoiceOver state suffix via plain interpolation (conflict/given/value/Empty), bypassing the l10n catalog — the Sudoku half of the bug class #756 fixed on the MS side. All four suffixes now route through String(localized:bundle:); 4 keys × 7 locales added to the Sudoku catalog only (Empty reuses the MS translations verbatim for cross-app consistency); fixture regenerated via gen:l10n_fixture.

Also rewrites the two E2E header comments that falsely claimed locale-independent element queries (comment-only; the digit-pad Digit %lld, Hidden, and Row/Column tokens are all catalog-routed as of #741/#755/#771 — queries are valid under the simulator's default en locale, which is what the E2E suite runs).

Verification

  • mise run scan:l10n: all 2 catalogs, 0 placeholders, 7 locales complete
  • SudokuKit builds clean; BoardViewTests 18/18 pass, snapshot PNGs byte-identical (en rendering unchanged)
  • swiftlint --strict: 0 violations on the 3 changed Swift files
  • Dual code review (mechanical + fact-check): both APPROVE; key generation cross-checked against the production Digit %lld mechanism; Empty verified byte-identical to the MS catalog entry; E2E comment claims verified line-by-line (incl. game.completion.hero identifier in GameShellUI)

VoiceOver-only surface; no visual impact.

Closes #771

🤖 Generated with Claude Code

Sudoku's BoardCellView composed its per-cell VoiceOver state suffix via
plain interpolation — "conflict \(digit)", "given \(digit)",
"value \(digit)", "Empty" — bypassing the catalog, so VO read English
state words in all non-en locales. This is the Sudoku half of the bug
class #756 fixed on the Minesweeper side (stateDescription switch); #755
fixed the shared Row/Column prefix and left these for their own pass.

All four suffixes now route through String(localized:bundle:). Four keys
added to the Sudoku catalog only (conflict/given/value are Sudoku-
specific; MS has its own state keys since #756) x 7 locales; "Empty"
reuses the MS catalog's translations verbatim for cross-app consistency.
Fixture regenerated via mise run gen:l10n_fixture.

Also cleans up the two E2E header comments that claimed locale-
independent element queries (comment-only, no query changes):
MinesweeperE2ETests' full-label query tokens have been catalog-routed
since #741/#755, and SudokuE2ETests' digit-pad ("Digit %lld") and
"Empty" queries are catalog-routed too — all now documented as valid
under the simulator's default en locale only.

Verification: scan:l10n passes (2 catalogs, 7 locales complete);
SudokuKit builds clean; BoardViewTests 18/18 pass with byte-identical
snapshot PNGs (en rendering unchanged; the assertions compare against
the test's own English format re-implementation, so catalog routing is
covered by the compiler-generated keys matching the catalog entries,
same mechanism as "Digit %lld"); swiftlint --strict 0 violations on
the 3 changed Swift files.

Closes #771

Co-Authored-By: Claude Fable 5 <[email protected]>
@wei18
wei18 enabled auto-merge (squash) July 11, 2026 09:38
@wei18
wei18 merged commit f9f7111 into main Jul 11, 2026
4 checks passed
@wei18
wei18 deleted the worktree-impl-771 branch July 11, 2026 09:38
wei18 added a commit that referenced this pull request Jul 11, 2026
…722) (#782)

Timeline log for the five-issue wave: cross-app coordinate a11y l10n
(#755/PR #776), Sudoku state-suffix l10n (#771/PR #777), the #716 premise
refutation + pencil-notes snapshot regression lock (PR #778), MS practice
personal bests via seed-derived ids (#705/PR #779), and Sudoku digit-first
input (#722/PR #781). Records the three pre-push review catches, the
seed-reuse design decision, and process notes (haiku numeric spot-checks,
reviewer send-report instruction, filtered-batch verification).

Co-authored-by: Claude Fable 5 <[email protected]>
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.

chore(a11y-l10n): Sudoku BoardCellView state suffixes (conflict/given/value/Empty) are unlocalized

1 participant