diff --git a/app/src/components/VoiceProfiles/ProfileList.tsx b/app/src/components/VoiceProfiles/ProfileList.tsx index 894cb92a..3bfad014 100644 --- a/app/src/components/VoiceProfiles/ProfileList.tsx +++ b/app/src/components/VoiceProfiles/ProfileList.tsx @@ -1,5 +1,6 @@ import { Info, Mic, Sparkles } from 'lucide-react'; import { useEffect, useRef } from 'react'; +import { useTranslation } from 'react-i18next'; import { Button } from '@/components/ui/button'; import { Card, CardContent } from '@/components/ui/card'; import { useProfiles } from '@/lib/hooks/useProfiles'; @@ -11,6 +12,7 @@ import { ProfileForm } from './ProfileForm'; const PRESET_ENGINES = new Set(['kokoro', 'qwen_custom_voice']); export function ProfileList() { + const { t } = useTranslation(); const { data: profiles, isLoading, error } = useProfiles(); const setDialogOpen = useUIStore((state) => state.setProfileDialogOpen); const selectedEngine = useUIStore((state) => state.selectedEngine); @@ -45,7 +47,9 @@ export function ProfileList() { if (error) { return (
-
Error loading profiles: {error.message}
+
+ {t('profiles.list.errorLoading', { message: error.message })} +
); } @@ -73,12 +77,10 @@ export function ProfileList() { -

- No voice profiles yet. Create your first profile to get started. -

+

{t('profiles.list.empty')}

@@ -99,7 +101,7 @@ export function ProfileList() { {hasUnsupported && (
- Only supported voice profiles can be selected for the current model. + {t('profiles.list.unsupportedNote')}
)} diff --git a/app/src/i18n/locales/en/translation.json b/app/src/i18n/locales/en/translation.json index 9934e8eb..b9de81cf 100644 --- a/app/src/i18n/locales/en/translation.json +++ b/app/src/i18n/locales/en/translation.json @@ -255,6 +255,12 @@ "selectLabel": "{{name}}, {{language}}. Select as voice for generation.", "selectLabelSelected": "{{name}}, {{language}}. Selected as voice for generation." }, + "list": { + "errorLoading": "Error loading profiles: {{message}}", + "empty": "No voice profiles yet. Create your first profile to get started.", + "createVoice": "Create Voice", + "unsupportedNote": "Only supported voice profiles can be selected for the current model." + }, "deleteDialog": { "title": "Delete Profile", "body": "Are you sure you want to delete \"{{name}}\"? This action cannot be undone.", diff --git a/app/src/i18n/locales/zh-CN/translation.json b/app/src/i18n/locales/zh-CN/translation.json index 8ca5ba81..176381d7 100644 --- a/app/src/i18n/locales/zh-CN/translation.json +++ b/app/src/i18n/locales/zh-CN/translation.json @@ -255,6 +255,12 @@ "selectLabel": "{{name}},{{language}}。选择用于生成的声音。", "selectLabelSelected": "{{name}},{{language}}。已选为用于生成的声音。" }, + "list": { + "errorLoading": "加载声音档案时出错:{{message}}", + "empty": "还没有声音档案。创建您的第一个档案以开始使用。", + "createVoice": "创建声音", + "unsupportedNote": "当前模型仅可选择支持的声音档案。" + }, "deleteDialog": { "title": "删除声音档案", "body": "确定要删除 \"{{name}}\" 吗?此操作不可撤销。",