From bb8bf32abe55ac49c45eb4801a61db6ca3c3b453 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 20 Jan 2026 23:58:59 +0000 Subject: chore: generate --- specs/06-app-i18n-audit.md | 5 +++++ specs/07-ui-i18n-audit.md | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'specs') 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. -- cgit v1.2.3