diff --git a/src/cli/ui/Wizard.tsx b/src/cli/ui/Wizard.tsx index 9706f8b..4d07f2e 100644 --- a/src/cli/ui/Wizard.tsx +++ b/src/cli/ui/Wizard.tsx @@ -401,7 +401,7 @@ function LanguageStep({ const items: SelectItem[] = getSupportedLanguages().map((code) => ({ value: code, label: LANGUAGE_LABELS[code], - hint: code === detectSystemLanguage() ? "(detected)" : undefined, + hint: code === detectSystemLanguage() ? t("wizard.languageDetectedHint") : undefined, })); return ( diff --git a/src/i18n/EN.ts b/src/i18n/EN.ts index 0ac9539..4c11811 100644 --- a/src/i18n/EN.ts +++ b/src/i18n/EN.ts @@ -426,6 +426,7 @@ export const EN: TranslationSchema = { wizard: { languageTitle: "Choose your language", languageSubtitle: "Detected from your system locale. Switch later via /language.", + languageDetectedHint: "(detected)", welcomeTitle: "Welcome to Carbon Code.", apiKeyPrompt: "Paste your DeepSeek API key to get started.", apiKeyGetOne: "Get one at: https://platform.deepseek.com/api_keys", diff --git a/src/i18n/types.ts b/src/i18n/types.ts index 8282c0a..82888bc 100644 --- a/src/i18n/types.ts +++ b/src/i18n/types.ts @@ -280,6 +280,7 @@ export interface TranslationSchema { wizard: { languageTitle: string; languageSubtitle: string; + languageDetectedHint: string; welcomeTitle: string; apiKeyPrompt: string; apiKeyGetOne: string; diff --git a/src/i18n/zh-CN.ts b/src/i18n/zh-CN.ts index 7afc2e3..d09fb31 100644 --- a/src/i18n/zh-CN.ts +++ b/src/i18n/zh-CN.ts @@ -415,6 +415,7 @@ export const zhCN: TranslationSchema = { wizard: { languageTitle: "选择语言", languageSubtitle: "已根据系统语言自动选中。之后可用 /language 切换。", + languageDetectedHint: "(已检测)", welcomeTitle: "欢迎使用 Carbon Code。", apiKeyPrompt: "粘贴你的 DeepSeek API key 开始使用。", apiKeyGetOne: "在此获取:https://platform.deepseek.com/api_keys", diff --git a/tests/wizard.test.tsx b/tests/wizard.test.tsx index 552e2b4..c974bf7 100644 --- a/tests/wizard.test.tsx +++ b/tests/wizard.test.tsx @@ -62,6 +62,8 @@ describe("Wizard — first-launch language picker", () => { expect(out).toContain("选择语言"); expect(out).toContain("English"); expect(out).toContain("简体中文"); + expect(out).toContain("(已检测)"); + expect(out).not.toContain("(detected)"); unmount(); }); });