Skip to content

fix(l10n,a11y): add missing leave.game.close key to Tiles2048 catalog - #593

Merged
wei18 merged 1 commit into
mainfrom
fix/2048-close-a11y-key
Jun 23, 2026
Merged

wei18 merged 1 commit into
mainfrom
fix/2048-close-a11y-key

Conversation

@wei18

@wei18 wei18 commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Found by the idb simulator UX audit across all three apps.

Bug

The Tiles2048 board close [X] button announced the raw key leave.game.close in VoiceOver (Sudoku & Minesweeper correctly say "Close").

Root cause

The shared GameAppKit/GameRoot.swift:197 labels the close button via Text("leave.game.close", bundle: .main). The Sudoku + Minesweeper catalogs have this key; the Tiles2048 catalog was missing it, so SwiftUI fell back to rendering the raw key.

Fix

Added leave.game.close to the Tiles2048 catalog (7 locales, copied from the Sudoku/MS translations). Verified on the simulator: the board close button's a11y label now reads "Close". scan:l10n green.

⚠️ Gate gap (filed separately): scan:l10n did not catch this — it checks that keys a catalog has are complete across 7 locales, but not that all keys referenced by shared code (GameAppKit/GameShellUI) exist in each per-app catalog. That's how a 2048-missing key slipped through.

🤖 Generated with Claude Code

Found by idb sim audit: the Tiles2048 board close [X] button announced the raw
key "leave.game.close" in VoiceOver. Root cause — the shared
GameAppKit/GameRoot.swift:197 labels it via Text("leave.game.close",
bundle: .main); the Sudoku + Minesweeper catalogs have the key but the
Tiles2048 catalog was missing it, so it fell back to the raw key string.

Added the key (7 locales, copied from the Sudoku/MS translations). Verified on
sim: the board close button now reads "Close". scan:l10n green.

Note: scan:l10n did NOT catch this — it validates that keys a catalog HAS are
complete across 7 locales, not that all shared-code-referenced keys EXIST in
each per-app catalog. That gate gap is filed separately.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@wei18
wei18 merged commit 3938897 into main Jun 23, 2026
4 checks passed
@wei18
wei18 deleted the fix/2048-close-a11y-key branch June 23, 2026 08:53
wei18 added a commit that referenced this pull request Jun 23, 2026
…ve-game dialog (#594) (#596)

The idb sim audit found Tiles2048 rendered the raw key `leave.game.close`
(#593). Prototyping the gate revealed the rest of the shared leave-game dialog
(`leave.game.title/message/leave/cancel`) was ALSO missing from the Tiles2048
catalog — so its whole Leave-Game confirmation rendered raw keys, while Sudoku
and Minesweeper had them.

Root cause class: a key referenced from a SHARED UI target (GameAppKit /
GameShellUI / SettingsUI / MonetizationUI — linked by all three apps, resolving
against bundle: .main) can be missing from one app catalog and the existing
scan:l10n never notices — it only checks that keys a catalog HAS are complete
across 7 locales.

This adds a shared-code dotted-key gate: extract dotted-namespace l10n keys
(e.g. `leave.game.close`) referenced from the shared UI targets, and require
any such key present in >=1 app catalog to exist in ALL three. Scoped to dotted
keys (unambiguous l10n keys) to avoid false positives on app-conditional
English-phrase strings. Verified: the gate FAILS on the 4 missing keys and
passes once added.

Also adds the 4 missing `leave.game.*` keys to the Tiles2048 catalog (7 locales,
mirrored from Sudoku/Minesweeper).

scan:l10n green; Tiles2048 builds. (English-phrase shared-key gaps in 2048/MS
catalogs — Game Center, Leaderboard, Version, etc. — are real but fuzzier and
tracked as a separate follow-up; the dotted-key gate intentionally skips them.)

Closes #594.

Co-authored-by: Claude Opus 4.8 <[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.

1 participant