Skip to content

i18n: extract the game detail page - #153

Open
Janlhin wants to merge 2 commits into
Liquid-co:dev-publicfrom
Janlhin:pr-5-game-detail
Open

Janlhin wants to merge 2 commits into
Liquid-co:dev-publicfrom
Janlhin:pr-5-game-detail

Conversation

@Janlhin

@Janlhin Janlhin commented Nov 7, 2026 •

Copy link
Copy Markdown

What

Extract the user-facing strings of the game detail view (13 Svelte components) into the catalogue, one key per sentence, grouped per component (game.*).

Why

Refs #18 (per-view i18n plan).
This is the next per-view PR after #145, continuing the screen-by-screen plan agreed there.

Stacking: this branch sits on the PR4b branch (Janlhin:fix/145-app-strings), so its diff currently also shows PR4b's three lines. Once #152 is merged, GitHub moves this PR's merge base onto that commit and the diff shrinks to this PR alone — no rebase needed. Please merge #152 first; I'm holding this one as a draft until it lands.

Verification

  • npm test → 336/336 passed (41 files), incl. the i18n.test.js catalog alignment gate
  • npm run build (vite build) → clean, 431 modules transformed
  • Catalog alignment: 0 missing / 0 extra / 0 empty across en, zh-Hans, zh-Hant (858 keys each)
  • 245 new keys; no existing key changed or removed
  • Every $t() reference in the touched views resolves to an existing, non-empty en.json key

Not verified

  • Manual render check of the game detail view in the built app, both scripts: not performed in this environment.
  • npm test in its default parallel mode intermittently raises one EPERM unhandled error on this machine (Windows temp-dir contention in Vitest's SSR cache); the run above was serial (--no-file-parallelism).

Impact and risk

  • Public API: none
  • Behavior change: the game detail view's strings are now read from the catalogue; English remains the fallback for any key a locale lacks
  • Breaking change: none
  • lib/ is untouched

Translation and review: @Janlhin (simplified & traditional)

The boot label was still hardcoded even though app.startingOpenSave was already in the catalogs, and app.detailsSaved was still English in zh-Hans and zh-Hant. Both were pointed out in the Liquid-co#145 merge review. Only the reference and the two values change; key sets stay aligned with en.json.
Replayed the two original batches onto the current dev-public base, with the Liquid-co#145 follow-up (PR4b) as its parent. The three catalogs gain 245 keys each; no existing key was changed or removed. The 13 game-detail views now use $t(). A duplicate import of t in GameHeader.svelte, introduced by the three-way merge against upstream changes, was removed so the build stays clean.
@vercel

vercel Bot commented Nov 7, 2026

Copy link
Copy Markdown

@Janlhin is attempting to deploy a commit to the sivadaboi's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Janlhin
Janlhin marked this pull request as ready for review November 9, 2026 10:08

This branch has not been deployed

No deployments
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