Skip to content

i18n: extract the shared components - #112

Merged
Omar-VF merged 2 commits into
Liquid-co:dev-publicfrom
Janlhin:pr-2-shared-components
Oct 23, 2026
Merged

Omar-VF merged 2 commits into
Liquid-co:dev-publicfrom
Janlhin:pr-2-shared-components

Conversation

@Janlhin

@Janlhin Janlhin commented Oct 20, 2026

Copy link
Copy Markdown

What

Extracts the user-facing strings of the remaining shared / chrome components into the catalog (en / zh-Hans / zh-Hant), one key per sentence, grouped per component:

  • First commit — the all-purpose components whose text was plain strings: the About modal, the Discord banner, the drop overlay, the release-notes empty state, the What's-new modal, the collections dialog (its delete confirmation now counts through a plural) and the notification hub (bell title, unread counts, and the hand-built "1 notification / 2 notifications" plural).
  • Second commit — the framework-layer chrome: CloudOfferBanner, NewGamesBanner, PairingBanner, Sidebar, CommandPalette, ProtectionBadge, ShortcutsSheet and PauseButton, including the whole-sentence cloud-offer / pairing / sidebar-plural restructures.

Notes

  • Both Chinese scripts land in the same commits; the three catalogs are key-aligned (scripted check: 0 missing / 0 extra across 344 keys).
  • Plurals go through Intl.PluralRules; English uses {one, other} objects, Chinese uses the single {n} form.
  • Inline-bold sentences use segments() like Home; no hintA/hintB splits.
  • Two upstream features that landed on dev-public after PR i18n: offer Chinese by script (zh-Hans/zh-Hant) and extract the window shell #77 were still hardcoded: the NotificationHub "Clear all" button and the CommandPalette "Rename" entry. Both are extracted here too, adding notifications.clearAll, notifications.clearAllTitle and palette.renameGame.
  • npm test 287/287 · vite build clean · catalog alignment verified (344/344/344).
  • No lib/ behavior changes.

Verification

  • Rendered check in the built app (all views, both scripts).
  • Bisect self-consistency: each commit in the range checks out to an aligned three-language catalog.

Translation and review: @Janlhin (simplified & traditional)

Janlhin added 2 commits October 20, 2026 17:33
collections and notifications pieces

The remaining all-purpose components whose text is plain strings: the
About modal, the Discord banner, the drop overlay, the release-notes
empty state, the What's-new modal, the collections dialog (its delete
confirmation now counts through a plural) and the notification hub,
bell title and unread counts included.

- 41 new keys in each catalog (229 total).
- ReleaseNotes imports the store as `i18n`: its toneFor() declares a
  local `t`, and a `$t` in the template would collide with it — the
  same trap the toast dismiss button hit.
- The notifications bell's hand-built "1 notification / 2
  notifications" plural moves into the catalog.

npm test: 310/310 · vite build clean · catalogs aligned (0 missing, 0 extra).
…uts sheet and pause button

The framework-layer batch: every remaining chrome-and-banner component
whose text was plain strings, including the ones whose English sentences
were assembled piece by piece.

- 73 new keys in each catalog (302 total).
- Sentence restructures: the cloud-offer card's "X has a newer save for
  Y" and its accepted-toast, the pairing card's "X wants to pair" with
  its "over the internet / from {address}" sub-line now whole-sentence
  keys with placeholders instead of English-order fragments; the sidebar's
  hand-built "1 sync / 2 syncs in progress" plural moves into the catalog;
  the new-games list keeps its enumeration but takes the "and"/","
  joiners and "{n} more" from the catalog.
- ProtectionBadge now keys its labels and details by protection state,
  so lib/protection.js stays untouched and its wording tests keep
  passing; same for the palette's six kind chips.
- Reused existing keys where the string matched exactly: common.dismiss,
  statusBar.pause, home.addGame.title, home.welcome.scanForSaves,
  home.syncAllToast and the home.title/home.devices/home.cloudBackup/
  about.changelog page names for the sidebar nav.
- Palette entry labels with lib values ("Go to {page}", pause lengths,
  snapshot note labels) take the English value as a {placeholder} — the
  lib/i18n split is a later batch, as with pauseLength() inside the
  pause button's title. The shortcuts sheet's descriptions come from
  lib/shortcuts.js and stay English for the same reason.

npx vitest run: 310/310 · vite build clean · catalogs aligned (0 missing, 0 extra).
@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

@Omar-VF
Omar-VF merged commit 1fe3fdd into Liquid-co:dev-public Oct 23, 2026
10 of 11 checks passed
@Omar-VF

Omar-VF commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Thanks, merged. Great to have the sidebar and the rest of the window in Chinese now, and thanks for fixing 跟踪 → 跟蹤 in the Traditional catalog. Five keys still have 跟踪, all from the Track game feature: home.trackGame, home.findGame.title, home.findGame.trackedAs, home.findGame.noSavesYet and home.findGame.already. Could you include those in your next PR?

Omar-VF added a commit that referenced this pull request Oct 23, 2026
Seagulls pushed a commit to Seagulls/OpenSave that referenced this pull request Oct 25, 2026
Omar-VF pushed a commit that referenced this pull request Oct 27, 2026
The zh-Hant catalog still carried the Simplified spelling 跟踪 in the
five keys of the Track game feature (home.trackGame and four
home.findGame.* keys), while the rest of the catalog uses 跟蹤.

The regression came from my own review pass in #77 (82e95c5): polishing
the strings ported from #73 reverted them to the Simplified spelling.
The #112 sweep (858d71a) fixed the neighbouring home.addGame.title but
missed these five. Omar-VF asked for them in the next PR (#112 review).

Only the glyph changes — placeholders and wording are untouched.

Not in scope here (lib-layer batch): StatusBar's "Syncing is paused …"
tooltip and its visible label stay hardcoded English because
lib/syncpause.js (pauseLength, pauseShort, PAUSE_CHOICES, the
pause/resume toasts) is still English-only; extracting the wrapper
sentences alone would ship mixed-language UI.
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.

2 participants