Repository navigation
feat(i18n): move home screen texts into a dictionary with en and zh - #180
Merged
Merged
Conversation
… and Chinese The session list, its menus and dialogs, the workspace drawer and the folder picker now read their texts from web/src/features/home/messages.ts, with English and Simplified Chinese next to the Japanese. The list dates go through formatDateTime, so they follow the page language.
Owner
Author
|
独立レビュー(自動)の結果です。 判定:直してからマージ 指摘(優先度順)
確認済み
|
The English close button reads "Done", because it leaves reordering as well as selection. The English and Chinese folder limit note keeps the 1,000 that the Japanese states, as docs/i18n/terms/home.md already lists.
docs/design/11-i18n.md asks each translation PR to add its new terms to docs/i18n/glossary.md. The rows link to docs/i18n/terms/home.md for the rest.
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.
Why
Part of the English and Simplified Chinese rollout (Issue #78). The session list, workspace drawer and folder picker wrote Japanese inline and formatted dates by hand (
yyyy/mm/dd,HH:mm). This moves them intohomeMessageswithja,enandzhand formats dates withformatDateTime. Until the last PR enables the languages, the page stays Japanese.Scope
web/src/features/home/messages.ts(homeMessages, 98 keys).HomeScreen.tsx,SessionRow.tsx,WorkspaceDrawer.tsx,DirectoryScreen.tsx,actions.tsxuseuseMessages(homeMessages).data.ts:formatUpdatedAt(timestamp, now, locale, text)usesformatDateTime;folderName(path, text).directory.ts(nativeUnavailableMessageis now a function),session-navigation.ts(errors take the texts).docs/i18n/terms/home.md; the main terms are also rows indocs/i18n/glossary.md.Tradeoffs
・between row details is its own key (rowSeparator), like the inbox, because the workspace name sits in a<small>and cannot join one sentence.Blast radius
No visible change: Japanese strings and the
formatUpdatedAtresults are identical (tests/11-i18n.test.ts already proves theformatDateTimeoptions give2026/01/05and09:07), andtests/01-*.test.tspass unchanged.Verification
pnpm typecheck,pnpm test(1,460 tests, 1,458 pass, 2 existing skips),pnpm build,git diff --checkpass.tests/01-i18n-home.test.tschecks dates, captions and errors in English and Chinese.home-*,directory-*,session-menu-overflow) passes inja-JP.Refs #78