Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/desktop/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ long transcript or a busy terminal.

- Every user-facing string goes through `useI18n()` (`src/i18n/context.tsx`).
No literals in JSX.
- **Update all locales together** — `en`, `ja`, `zh`, `zh-hant`. A string change
- **Update all locales together** — `en`, `ja`, `zh`, `zh-hant`, `de`. A string change
in `en.ts` that skips the others is a regression (drifted punctuation,
stale labels). Keep trailing-punctuation and tone consistent across all four.
stale labels). Keep trailing-punctuation and tone consistent across all five.

## State (TypeScript)

Expand Down Expand Up @@ -331,7 +331,7 @@ The detailed state contract lives in the scoped
- [ ] Hot interactions avoid broad subscriptions, layout thrash, and
`transition-all`?
- [ ] Keyboard ownership and single-action `Esc` behavior are correct?
- [ ] All four locales updated for any new/changed string?
- [ ] All five locales updated for any new/changed string?
- [ ] `cursor-pointer`, focus ring, and `Esc`-to-close behave?
- [ ] Touched a primitive, token, or variant? Its named-contract entry in this
file is updated in the same change.
4 changes: 3 additions & 1 deletion apps/desktop/src/i18n/catalog.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ar } from './ar'
import { de } from './de'
import { en } from './en'
import { ja } from './ja'
import type { Locale, Translations } from './types'
Expand All @@ -10,5 +11,6 @@ export const TRANSLATIONS: Record<Locale, Translations> = {
zh,
'zh-hant': zhHant,
ja,
ar
ar,
de
}
4 changes: 3 additions & 1 deletion apps/desktop/src/i18n/context.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ describe('I18nProvider', () => {

it('does not overwrite unsupported configured languages', async () => {
const configClient: I18nConfigClient = {
getConfig: vi.fn().mockResolvedValue({ display: { language: 'de' } }),
// Intentionally not a real locale code (unlike 'de', 'es', etc. which may
// become supported over time) — guarantees this stays unsupported.
getConfig: vi.fn().mockResolvedValue({ display: { language: 'xx' } }),
saveConfig: vi.fn()
}

Expand Down
Loading