Repository navigation
Conversation
- 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)
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.