diff options
| author | GitHub Action <[email protected]> | 2026-01-20 23:58:59 +0000 |
|---|---|---|
| committer | GitHub Action <[email protected]> | 2026-01-20 23:58:59 +0000 |
| commit | bb8bf32abe55ac49c45eb4801a61db6ca3c3b453 (patch) | |
| tree | 966e2344896cd538192004f118b121db09c5af26 /specs | |
| parent | 233d003b4926ec615ff15c1ddd54a1719a62ef13 (diff) | |
| download | opencode-bb8bf32abe55ac49c45eb4801a61db6ca3c3b453.tar.gz opencode-bb8bf32abe55ac49c45eb4801a61db6ca3c3b453.zip | |
chore: generate
Diffstat (limited to 'specs')
| -rw-r--r-- | specs/06-app-i18n-audit.md | 5 | ||||
| -rw-r--r-- | specs/07-ui-i18n-audit.md | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/specs/06-app-i18n-audit.md b/specs/06-app-i18n-audit.md index c4c735226..0362ec212 100644 --- a/specs/06-app-i18n-audit.md +++ b/specs/06-app-i18n-audit.md @@ -163,6 +163,7 @@ Completed (2026-01-20): ### 15) File Load Failure Toast (Duplicate) Files: + - `packages/app/src/context/file.tsx` - `packages/app/src/context/local.tsx` @@ -220,13 +221,17 @@ Also reuse existing command keys for tooltip titles whenever possible (e.g. `com ## Appendix: Remaining Files At-a-Glance Pages: + - (none) Components: + - (none) Context: + - (none) Utils: + - (none) diff --git a/specs/07-ui-i18n-audit.md b/specs/07-ui-i18n-audit.md index 26bc552bb..e3c746867 100644 --- a/specs/07-ui-i18n-audit.md +++ b/specs/07-ui-i18n-audit.md @@ -27,7 +27,7 @@ Why this is the best long-term shape: ### Proposed Architecture -1) **UI provides an i18n context (no persistence)** +1. **UI provides an i18n context (no persistence)** - Add `packages/ui/src/context/i18n.tsx`: - Exports `I18nProvider` and `useI18n()`. @@ -36,14 +36,14 @@ Why this is the best long-term shape: - `locale()` accessor for locale-sensitive formatting (Luxon/Intl). - Context should have a safe default (English) so UI components can render even if a consumer forgets the provider. -2) **UI owns UI strings (dictionaries live in UI)** +2. **UI owns UI strings (dictionaries live in UI)** - Add `packages/ui/src/i18n/en.ts` and `packages/ui/src/i18n/zh.ts`. - Export them from `@opencode-ai/ui` via `packages/ui/package.json` exports (e.g. `"./i18n/*": "./src/i18n/*.ts"`). - Use a clear namespace prefix for all UI keys to avoid collisions: - Recommended: `ui.*` (e.g. `ui.sessionReview.title`). -3) **Consumers merge dictionaries and provide `t`/`locale` once** +3. **Consumers merge dictionaries and provide `t`/`locale` once** - `packages/app/`: - Keep `packages/app/src/context/language.tsx` as the source of truth for locale selection/persistence. |
