Repository navigation
feat(i18n): show the page in English and Simplified Chinese - #184
Merged
Merged
Conversation
AliceSaikawa
force-pushed
the
feat/issue-78-en-zh
branch
from
October 22, 2026 05:40
e8c30ce to
33b2a35
Compare
Owner
Author
|
独立レビュー(自動)の結果です。 判定:直してからマージ(#175〜#183 のマージ後に rebase してから) 指摘(優先度順)
確認済み
|
tests/11-i18n-literals.test.ts reads every web/src source file with the TypeScript parser and fails on a Japanese string, template or JSX text outside messages.ts, mock data and console logs. Such a string would stay Japanese for English and Chinese readers.
The page now follows DSH's language setting, or the browser language when nothing is set, and is shown in Japanese, English or Simplified Chinese. Other languages, Traditional Chinese included, are shown in English, and a change applies without a reload. The Language row in Settings → General also offers 日本語.
…tion store The shell PR returned interactions-store.ts to fixed Japanese, because docs/design/11-i18n.md keeps those reasons out of the dictionaries: they go back to the DSH requester and are not shown. The literals test lists them as allowed with that reason.
The page used to paint in the browser's language and switch once locale.preference arrived. connectLocalePreference now returns a disposer with a ready promise for the first read, and main.tsx waits for it at most FIRST_LOCALE_WAIT_MS before rendering, so a slow or failed read never holds the page.
ModelsPanel showed any error message that contained kana or kanji, so a Japanese Host text could reach the English page and kana could reach the Chinese page. It now uses errorText from the composer, which shows LocalizedError messages and Host failures through remoteErrorMessage, and the per-provider failure rows show catalogFailed instead of the Host text.
With "Match device language" the page uses the first of Japanese, English or Simplified Chinese in the device's language order, and English when none is there. The language row description now says so in all three languages instead of saying that any other first language gives English.
AliceSaikawa
force-pushed
the
feat/issue-78-en-zh
branch
from
October 22, 2026 12:57
726b78d to
eb7484e
Compare
This was referenced Oct 22, 2026
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
The last step of Issue #78. With every dictionary translated in #175–#183, the page can follow DSH's language setting (or the browser when nothing is set) in Japanese, English and Simplified Chinese. This branch stacks on those PRs by merging them: until they land, the diff includes them. Review only the commits that are not merges:
test(i18n): fail when a Japanese UI string lives outside a dictionary,feat(i18n): show the page in English and Simplified Chinese, and the four review fixes after the latest merges. I will rebase onto main once they are merged.Scope
DISPLAY_LOCALESis['ja', 'en', 'zh'](web/src/i18n/locale.ts). Outside a page,localeStorestarts in Japanese (web/src/i18n/current.ts).generalRowsingeneral.ts);languageDescriptionis rewritten in all three languages.tests/11-i18n-literals.test.tsfails on a Japanese string outsidemessages.ts(mock data and logs excepted);tests/11-i18n.test.tsfails on kana in English or Chinese, or Han in English.e2e/i18n.spec.tsreplacesi18n-foundation.spec.ts;settings-generalG13–G15 now expect the page to switch.FIRST_LOCALE_WAIT_MS(1 s) for the firstlocale.preferenceread:connectLocalePreferencereturns a disposer withready, andmain.tsxwaits throughwaitAtMost(web/src/i18n/dsh.ts).ModelsPanel.tsxshows catalog failures through the composer'serrorText(M3E's ownLocalizedErrortexts and Host failures only) instead of a kana and kanji check.docs/design/11-i18n.md,08-settings.md,docs/ui-spec.md,docs/i18n/glossary.md(common rows and links todocs/i18n/terms/*), the three READMEs,CHANGELOG.md.Tradeoffs
en-US) and local runs agree; tests that need another language pass it explicitly.Blast radius
Every screen changes for English and Chinese readers, and for anyone whose DSH language is English or Chinese. Japanese readers see no change: the whole mock e2e suite runs in
ja-JP.Verification
pnpm typecheck,tsc -p tsconfig.e2e.json,pnpm test(1,515 tests, 1,513 pass, 2 existing skips; same result withLANG=en_US.UTF-8,zh_CN.UTF-8andC),pnpm build,pnpm check:pack,git diff --checkpass.e2e/i18n.spec.ts(switching via DSH without reload;en-US,zh-CN,zh-SG,zh-TW,fr-FRbrowsers; start-up failure text) andsettings-generalG13–G16.en-USandzh-CNbefore the review fixes: the only Japanese left is mock data (titles, fake providers and plugins, Host texts). Not reopened after the fixes.Refs #78