繁体中文支持

This commit is contained in:
1355873789 2024-09-26 04:24:36 +08:00 committed by 亢奋猫
parent 849958eeec
commit 00f3b87215
2 changed files with 285 additions and 1 deletions

View File

@ -571,9 +571,292 @@ const resources = {
visualization: '可视化'
}
}
},
'zh-TW': {
translation: {
common: {
avatar: '頭像',
language: '語言',
model: '模型',
models: '模型',
topics: '話題',
docs: '文件',
and: '與',
assistant: '智能體',
name: '名稱',
description: '描述',
prompt: '提示詞',
rename: '重新命名',
delete: '刪除',
edit: '編輯',
duplicate: '複製',
copy: '複製',
regenerate: '重新生成',
provider: '提供商',
you: '您',
save: '保存',
footnotes: '引用',
select: '選擇',
search: '搜尋',
default: '預設',
warning: '警告',
back: '返回',
chat: '聊天'
},
button: {
add: '添加',
added: '已添加',
manage: '管理',
select_model: '選擇模型',
'show.all': '顯示全部',
collapse: '收起'
},
message: {
copied: '已複製',
'assistant.added.content': '智能體添加成功',
'message.delete.title': '刪除訊息',
'message.delete.content': '確定要刪除此訊息嗎?',
'error.enter.api.key': '請先輸入您的 API 密鑰',
'error.enter.api.host': '請先輸入您的 API 主機地址',
'error.enter.model': '請先選擇一個模型',
'error.invalid.proxy.url': '無效的代理 URL',
'api.connection.failed': '連接失敗',
'api.connection.success': '連接成功',
'chat.completion.paused': '聊天完成已暫停',
'switch.disabled': '助手生成回覆時無法切換',
'restore.success': '恢復成功',
'backup.success': '備份成功',
'reset.confirm.content': '確定要清除所有資料嗎?',
'reset.double.confirm.title': '資料將會丟失!!!',
'reset.double.confirm.content': '所有資料將會被清除,您確定要繼續嗎?',
'upgrade.success.title': '升級成功',
'upgrade.success.content': '請重新啟動應用以完成升級',
'upgrade.success.button': '重新啟動',
'topic.added': '新話題已添加'
},
chat: {
save: '保存',
'default.name': '⭐️ 預設助手',
'default.description': '你好,我是預設助手。你可以立即開始與我聊天。',
'default.topic.name': '預設話題',
'topics.title': '話題',
'topics.auto_rename': '自動重新命名',
'topics.edit.title': '編輯名稱',
'topics.edit.placeholder': '輸入新名稱',
'topics.delete.all.title': '刪除所有話題',
'topics.delete.all.content': '確定要刪除所有話題嗎?',
'topics.move_to': '移動到',
'topics.list': '話題列表',
'topics.export.title': '匯出',
'topics.export.image': '匯出為圖片',
'input.new_topic': '新話題',
'input.topics': ' 話題 ',
'input.clear': '清除',
'input.new.context': '清除上下文',
'input.expand': '展開',
'input.collapse': '收起',
'input.clear.title': '清除所有訊息?',
'input.clear.content': '您想要清除當前話題的所有訊息嗎?',
'input.placeholder': '在此輸入您的訊息...',
'input.send': '發送',
'input.pause': '暫停',
'input.settings': '設定',
'input.upload': '上傳圖片或文字檔',
'input.context_count.tip': '上下文數量',
'input.estimated_tokens.tip': '預估 Token 數',
'settings.temperature': '溫度',
'settings.temperature.tip': '較低的值使模型更具創造性和不可預測性,較高的值則使其更具確定性和精確性。',
'settings.conext_count': '上下文',
'settings.conext_count.tip': '在上下文中保留的前幾則訊息。',
'settings.max_tokens': '啟用最大 Token 限制',
'settings.max_tokens.tip':
'模型可以生成的最大 Token 數。普通聊天建議 500-800。短文生成建議 800-2000。代碼生成建議 2000-3600。長文生成建議超過 4000。',
'settings.reset': '重置',
'settings.set_as_default': '設為預設助手',
'settings.max': '最大',
'suggestions.title': '建議的問題',
'add.assistant.title': '添加助手',
'message.new.context': '新上下文',
'message.new.branch': '新分支',
'assistant.search.placeholder': '搜尋'
},
assistants: {
title: '助手',
abbr: '助',
search: '搜尋助手...'
},
model: {
stream_output: '串流輸出'
},
files: {
title: '檔案',
file: '檔案',
name: '名稱',
size: '大小',
count: '數量',
created_at: '建立時間'
},
agents: {
title: '智能體',
my_agents: '我的智能體',
'add.title': '添加智能體',
'edit.title': '編輯智能體',
'add.name': '名稱',
'add.name.placeholder': '輸入名稱',
'add.prompt': '提示詞',
'add.prompt.placeholder': '輸入提示詞',
'add.button': '添加',
'manage.title': '管理智能體',
'delete.popup.content': '確定要刪除此智能體嗎?',
'tag.default': '預設',
'tag.system': '系統',
'tag.user': '我的'
},
provider: {
openai: 'OpenAI',
gemini: 'Gemini',
deepseek: '深度求索',
moonshot: '月之暗面',
silicon: 'SiliconFlow',
openrouter: 'OpenRouter',
yi: '零一万物',
zhipu: '智谱AI',
groq: 'Groq',
ollama: 'Ollama',
baichuan: '百川',
dashscope: 'DashScope',
anthropic: 'Anthropic',
aihubmix: 'AiHubMix',
stepfun: 'StepFun',
doubao: '豆包',
minimax: 'MiniMax',
'graphrag-kylin-mountain': 'GraphRAG',
github: 'GitHub Models',
ocoolai: 'ocoolAI'
},
settings: {
title: '設定',
general: '一般設定',
provider: '模型提供者',
model: '預設模型',
assistant: '預設助手',
about: '關於與回饋',
'messages.model.title': '模型設定',
'messages.title': '訊息設定',
'messages.divider': '訊息間顯示分隔線',
'messages.use_serif_font': '使用襯線字體',
'messages.input.title': '輸入設定',
'messages.input.show_estimated_tokens': '顯示預估輸入 Token 數',
'messages.input.send_shortcuts': '發送快捷鍵',
'messages.input.paste_long_text_as_file': '將長文本貼上為檔案',
'general.title': '一般設定',
'general.user_name': '使用者名稱',
'general.user_name.placeholder': '輸入您的名稱',
'general.backup.title': '資料備份與復原',
'general.backup.button': '備份',
'general.restore.button': '復原',
'general.reset.title': '資料重置',
'general.reset.button': '重置',
'advanced.title': '進階設定',
'advanced.click_assistant_switch_to_topics': '點擊助手切換到話題',
'provider.api_key': 'API 密鑰',
'provider.check': '檢查',
'provider.get_api_key': '獲取 API 密鑰',
'provider.api_host': 'API 主機地址',
'provider.docs_check': '檢查',
'provider.docs_more_details': '查看更多細節',
'provider.search_placeholder': '搜尋模型 ID 或名稱',
'provider.api.url.reset': '重置',
'models.default_assistant_model': '預設助手模型',
'models.topic_naming_model': '話題命名模型',
'models.translate_model': '翻譯模型',
'models.add.add_model': '添加模型',
'models.add.model_id.placeholder': '必填,例如 gpt-3.5-turbo',
'models.add.model_id': '模型 ID',
'models.add.model_id.tooltip': '例如 gpt-3.5-turbo',
'models.add.model_name': '模型名稱',
'models.add.model_name.placeholder': '可選,例如 GPT-4',
'models.add.group_name': '群組名稱',
'models.add.group_name.tooltip': '可選,例如 ChatGPT',
'models.add.group_name.placeholder': '可選,例如 ChatGPT',
'models.empty': '找不到模型',
'assistant.title': '預設助手',
'assistant.model_params': '模型參數',
'about.description': '一款為創作者而生的強大 AI 助手',
'about.updateNotAvailable': '您正在使用最新版本',
'about.checkingUpdate': '正在檢查更新...',
'about.updateError': '更新錯誤',
'about.checkUpdate': '檢查更新',
'about.downloading': '正在下載...',
'provider.delete.title': '刪除提供者',
'provider.delete.content': '確定要刪除此提供者嗎?',
'provider.edit.name': '提供者名稱',
'provider.edit.name.placeholder': '例如OpenAI',
'about.title': '關於我們',
'about.releases.title': '更新日誌',
'about.releases.button': '查看',
'about.website.title': '官方網站',
'about.website.button': '網站',
'about.feedback.title': '回饋',
'about.feedback.button': '回饋',
'about.contact.title': '聯繫方式',
'about.license.title': '許可證',
'about.license.button': '查看',
'about.contact.button': '郵件',
'proxy.title': '代理地址',
'theme.title': '主題',
'theme.dark': '深色主題',
'theme.light': '淺色主題',
'theme.auto': '自動',
'theme.window.style.title': '視窗樣式',
'theme.window.style.transparent': '透明視窗',
'theme.window.style.opaque': '不透明視窗',
'font_size.title': '訊息字體大小',
'topic.position': '話題位置',
'topic.position.left': '左側',
'topic.position.right': '右側'
},
translate: {
title: '翻譯',
'any.language': '任意語言',
'button.translate': '翻譯',
'error.not_configured': '翻譯模型未配置',
'input.placeholder': '輸入文字進行翻譯',
'output.placeholder': '翻譯'
},
languages: {
english: '英文',
chinese: '簡體中文',
'chinese-traditional': '繁體中文',
japanese: '日文',
korean: '韓文',
russian: '俄文',
spanish: '西班牙文',
french: '法文',
italian: '意大利文',
portuguese: '葡萄牙文',
arabic: '阿拉伯文'
},
ollama: {
title: 'Ollama',
'keep_alive_time.title': '保持活躍時間',
'keep_alive_time.placeholder': '分鐘',
'keep_alive_time.description': '對話後模型在記憶體中保持的時間(預設為 5 分鐘)。'
},
minapp: {
title: '小程序'
},
error: {
'chat.response': '出現錯誤。如果尚未配置 API 密鑰,請前往設定 > 模型提供者中配置密鑰',
'backup.file_format': '備份文件格式錯誤'
},
words: {
knowledgeGraph: '知識圖譜',
visualization: '可視化'
}
}
}
}
i18n.use(initReactI18next).init({
resources,
lng: localStorage.getItem('language') || navigator.language || 'en-US',

View File

@ -59,6 +59,7 @@ const GeneralSettings: FC = () => {
onChange={onSelectLanguage}
options={[
{ value: 'zh-CN', label: '中文' },
{ value: 'zh-TW', label: '中文(繁体)' },
{ value: 'en-US', label: 'English' }
]}
/>