i18n and UI fix
This commit is contained in:
33
.sisyphus/evidence/task-04-store-compiled.txt
Normal file
33
.sisyphus/evidence/task-04-store-compiled.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
# Task 04: Locale Store - Compilation Evidence
|
||||
|
||||
## Date: 2026-03-13
|
||||
|
||||
## Files Created
|
||||
- src/renderer/src/stores/localeStore.ts
|
||||
|
||||
## Verification
|
||||
|
||||
### TypeScript Check
|
||||
```bash
|
||||
npx tsc --noEmit
|
||||
# Result: PASSED (no errors)
|
||||
```
|
||||
|
||||
### Store Implementation
|
||||
- Uses Zustand with persist middleware
|
||||
- Imports LocaleCode and DEFAULT_LOCALE from @shared/types/locale
|
||||
- Persists only the locale state value (partialize pattern)
|
||||
- Exports useLocaleStore hook
|
||||
|
||||
### State Shape
|
||||
```typescript
|
||||
interface LocaleState {
|
||||
locale: LocaleCode; // "zh-CN" | "ja-JP" | "en-US"
|
||||
setLocale: (locale: LocaleCode) => void;
|
||||
}
|
||||
```
|
||||
|
||||
### Default Value
|
||||
- locale: "zh-CN" (from DEFAULT_LOCALE constant)
|
||||
|
||||
## Status: COMPLETED
|
||||
Reference in New Issue
Block a user