Merge pull request #3884 from leeyazhou/i18n
feat(i18n): add toast i18n with en/zh locale and plugin config support
This commit is contained in:
@@ -6,6 +6,7 @@ export type {
|
||||
OhMyOpenCodeConfig,
|
||||
AgentOverrideConfig,
|
||||
AgentOverrides,
|
||||
I18nConfig,
|
||||
McpName,
|
||||
AgentName,
|
||||
HookName,
|
||||
|
||||
@@ -14,6 +14,7 @@ export * from "./schema/fallback-models"
|
||||
export * from "./schema/git-env-prefix"
|
||||
export * from "./schema/git-master"
|
||||
export * from "./schema/hooks"
|
||||
export * from "./schema/i18n"
|
||||
export * from "./schema/keyword-detector"
|
||||
export * from "./schema/model-capabilities"
|
||||
export * from "./schema/notification"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
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>
|
||||
@@ -13,6 +13,7 @@ import { BuiltinCommandNameSchema } from "./commands"
|
||||
import { DefaultModeConfigSchema } from "./default-mode"
|
||||
import { ExperimentalConfigSchema } from "./experimental"
|
||||
import { GitMasterConfigSchema } from "./git-master"
|
||||
import { I18nConfigSchema } from "./i18n"
|
||||
import { KeywordDetectorConfigSchema } from "./keyword-detector"
|
||||
import { NotificationConfigSchema } from "./notification"
|
||||
import { OpenClawConfigSchema } from "./openclaw"
|
||||
@@ -76,6 +77,8 @@ export const OhMyOpenCodeConfigSchema = z.object({
|
||||
notification: NotificationConfigSchema.optional(),
|
||||
model_capabilities: ModelCapabilitiesConfigSchema.optional(),
|
||||
openclaw: OpenClawConfigSchema.optional(),
|
||||
/** Plugin i18n settings */
|
||||
i18n: I18nConfigSchema.optional(),
|
||||
team_mode: TeamModeConfigSchema.optional(),
|
||||
/** Per-keyword disable list for the keyword-detector transform hook. Allowed values: "ultrawork", "search", "analyze", "team". */
|
||||
keyword_detector: KeywordDetectorConfigSchema.optional(),
|
||||
|
||||
Reference in New Issue
Block a user