Skip to content

feat(l10n): scan:l10n shared-code dotted-key gate + fix Tiles2048 leave-game dialog (#594) - #596

Merged
wei18 merged 2 commits into
mainfrom
fix/594-l10n-shared-key-gate
Jun 23, 2026
Merged

wei18 merged 2 commits into
mainfrom
fix/594-l10n-shared-key-gate

Conversation

@wei18

@wei18 wei18 commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Closes #594.

What the gate found

The idb audit caught Tiles2048's close button announcing the raw key leave.game.close (fixed #593). Prototyping this gate revealed the rest of the shared Leave-Game dialog (leave.game.title/message/leave/cancel) was also missing from the Tiles2048 catalog — so 2048's whole confirmation dialog rendered raw keys, while Sudoku/Minesweeper had them.

The gate (the #594 ask)

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's catalog and the old scan:l10n never notices (it only checks that keys a catalog has are 7-locale complete).

New check: extract dotted-namespace l10n keys 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, e.g. leave.game.close) so there are no false positives on app-conditional English-phrase strings.

Proven: with the keys missing the gate FAILS (4 clear messages); with them present it passes.

Also

Added the 4 missing leave.game.* keys to the Tiles2048 catalog (7 locales, mirrored from Sudoku/MS). scan:l10n green; Tiles2048 builds.

The prototype also surfaced English-phrase shared-key gaps (e.g. Game Center, Leaderboard, Version missing from 2048/MS catalogs) — real but fuzzier (some are app-conditional), so the dotted-key gate intentionally skips them; tracked as a follow-up.

🤖 Generated with Claude Code

…ve-game dialog (#594)

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]>
@wei18
wei18 merged commit 4b20bb9 into main Jun 23, 2026
4 checks passed
@wei18
wei18 deleted the fix/594-l10n-shared-key-gate branch June 23, 2026 16:09
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.

scan:l10n doesn't verify shared-code keys exist in each per-app catalog (let Tiles2048 leave.game.close slip)

1 participant