Repository navigation
feat(i18n): move settings texts into dictionaries with en and zh - #178
Merged
Merged
Conversation
…d Chinese The settings tab, its detail pages, the schema-driven fields, the appearance sheet and the modes page now read their texts from web/src/features/settings/messages.ts, with English and Simplified Chinese next to the Japanese. Host titles and descriptions are shown only when they are written in the page language. In Chinese a Chinese-only rejection reason is shown as is, and in English the fixed message is used.
… language change m3e-select copies its options only when their child list changes, so a select kept showing the old option labels after the page language changed. Each label now sits in a keyed span, so a new label replaces a node and the copy is made again. The select also applies each value asynchronously and could end with no option selected when the language and the stored value changed together, so the field sets the value again once those applications have settled.
Owner
Author
|
独立レビュー(自動)の結果です。 判定:直してからマージ 指摘(優先度順)
確認済み
メモ:#179 はこの PR のブランチを base にしています。この PR を先にマージし、その後 #179 を main に向け直して rebase してください。 |
… notices The provider row on the settings top now builds its summary with the page language's dictionary and number format, instead of the Japanese defaults of providerSummary. When a field is left after a language change, the save failure notice names the field in the current language, because SchemaFields reads the label through a ref. The English and Chinese step error now says "in steps of", since matchesNumberStep counts the steps from the field's minimum. The Minimal mode description says only what the Japanese says.
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/settings.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 settings tab still wrote its Japanese inline, and the settings store and schema produced Japanese text outside React. This moves the settings tab (except providers and models, #179) into dictionaries with
ja,enandzh. Until the last PR adds the languages toDISPLAY_LOCALES, the page stays Japanese.Scope
web/src/features/settings/messages.ts:en/zhforagentPresetMessages; newappearanceMessages,settingsFieldMessages,settingsSchemaMessages,settingsScreenMessages,settingsStoreMessages.generalMessagesis unchanged.schema.ts: names, notes, summaries and parse errors come fromsettingsSchemaMessages;hostTextInLocalereplaces the Japanese-onlyjapanese()filter.store.ts: texts are made withcurrentLocale()when they happen;displayableRejection(message, locale).SettingsScreen.tsx,SettingsDetailScreen.tsx,SchemaFields.tsx,AppearanceSheet.tsx; theme color names move fromTHEME_COLOR_PRESETS(web/src/app/theme/appearance.ts) intoappearanceMessages.SchemaFields.tsxFieldEditor: each option label sits in a keyed span and the select's value is set again once it settles, becausem3e-selectkept stale option copies and could lose its selection when the language and the stored value changed together (found by the language-row e2e of the last PR).docs/i18n/terms/settings.md; the main terms are also rows indocs/i18n/glossary.md.Tradeoffs
Blast radius
No visible change: Japanese strings and results are identical, and the existing settings unit tests (
tests/08-*.test.ts) pass with unchanged expectations.Verification
pnpm typecheck,pnpm test(1,460 tests, 1,458 pass, 2 existing skips),git diff --checkpass.tests/08-i18n-settings-core.test.tscheckshostTextInLocale,displayableRejectionand parse errors per language.ja-JP) passes except the language-row tests that the last PR rewrites.Refs #78