Skip to content

i18n: move onto dev-public (2.4.2 base) - #48

Open
Janlhin wants to merge 6 commits into
Liquid-co:dev-publicfrom
Janlhin:i18n-dev-public
Open

Janlhin wants to merge 6 commits into
Liquid-co:dev-publicfrom
Janlhin:i18n-dev-public

Conversation

@Janlhin

@Janlhin Janlhin commented Oct 11, 2026

Copy link
Copy Markdown

Brings the merged i18n branch (#19/#20) onto dev-public, per your Oct 5 suggestion.

Merged clean - i18n touches frontend only, dev-public is backend. Component extraction PRs will stack on top of this.

Janlhin and others added 6 commits October 1, 2026 12:25
- lib/i18n.js: zero-dependency t store + t(key, params), locale persisted
  per device, system-language default, English fallback for missing keys,
  plurals through Intl.PluralRules
- src/locales/en.json (source of truth) + zh-CN.json
- Settings > Appearance: language dropdown
- Home view extracted (en + zh-CN)
- format.js plural() now selects via the chosen locale's plural rules
- tests: catalog completeness (no missing/extra keys), fallback, params,
  plural categories, locale detection; language pinned where tests assert
  English wording
- catalog tests compare top-level keys and require an 'other' form on
  plural values (leaf-walking broke on the first plural)
- welcome hint is one key with {devices}/{cloud} placeholders; new
  segments() helper renders the filled parts in bold
- language is 'system' until explicitly picked; only an explicit pick is
  persisted, and the picker gains a System default option
- <html lang> follows the resolved locale in App.svelte
i18n: skeleton with Settings language picker and Home extracted (en + zh-CN)
Follows the pattern from Liquid-co#19: one sentence per key, bold parts through
segments() placeholders, counts through Intl.PluralRules.

- home/ScanDialog, ScanFolderList, SetupGuide, LibraryGrid, LibraryTile,
  LibraryViewOptions, HomeSummary, AddGameCard, OfferedGames,
  RecentActivity
- 146 new keys, grouped per component
- a few generic strings land in common.* (cancel, nowTracking) so the same
  wording is not translated twice; duplicated existing keys reuse the
  originals (home.devices, home.scanning, home.chooseFolderDialog,
  home.welcome.scanForSaves)
- Labels built in lib/ (cover styles, sort names, status text, time ago)
  are still English: they return words, not sentences, so they need their
  own pass to expose keys instead. Left out to keep this reviewable.
- Windows example path in AddGameCard's placeholder stays as typed

npm test: 271/271; vite build clean
i18n: extract the Home child components (en + zh-CN)
@vercel

vercel Bot commented Oct 11, 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.

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.

2 participants