fd4b3bb3c9
- Add src/locales/ with en baseline and zh overrides (Partial<Record> fallback) - Add src/shared/i18n.ts with initI18n/t/setLocale/getLocale (LANG env auto-detect) - Add I18nConfigSchema with locale field to plugin config - Internationalize 13 hardcoded strings in task-toast-manager - Add 18 unit tests for i18n module - Pin manager tests to en locale for determinism
9 lines
260 B
TypeScript
9 lines
260 B
TypeScript
import { z } from "zod"
|
|
|
|
export const I18nConfigSchema = z.object({
|
|
/** Override auto-detected locale (e.g. "en", "zh"). Falls back to LANG env var if not set. */
|
|
locale: z.string().optional(),
|
|
})
|
|
|
|
export type I18nConfig = z.infer<typeof I18nConfigSchema>
|