From 2208e4dfc754bcd799a42bfddb51e54a4fc28d16 Mon Sep 17 00:00:00 2001 From: ryanhex53 Date: Wed, 19 Apr 2023 22:32:29 +0800 Subject: [PATCH] more chinese translation. (#609) --- components/Chat/Chat.tsx | 2 +- components/Chat/Temperature.tsx | 6 +++--- components/Chatbar/Chatbar.tsx | 4 ++-- pages/api/home/home.tsx | 4 ++-- public/locales/zh/chat.json | 8 +++++++- public/locales/zh/settings.json | 5 ++++- public/locales/zh/sidebar.json | 5 ++++- 7 files changed, 23 insertions(+), 11 deletions(-) diff --git a/components/Chat/Chat.tsx b/components/Chat/Chat.tsx index 4e583e5165..5d1148c4ac 100644 --- a/components/Chat/Chat.tsx +++ b/components/Chat/Chat.tsx @@ -425,7 +425,7 @@ export const Chat = memo(({ stopConversationRef }: Props) => { /> handleUpdateConversation(selectedConversation, { key: 'temperature', diff --git a/components/Chat/Temperature.tsx b/components/Chat/Temperature.tsx index e4ebd28e6f..78968a21b6 100644 --- a/components/Chat/Temperature.tsx +++ b/components/Chat/Temperature.tsx @@ -52,13 +52,13 @@ export const TemperatureSlider: FC = ({ onChange={handleChange} />
    -
  • +
  • {t('Precise')}
  • -
  • +
  • {t('Neutral')}
  • -
  • +
  • {t('Creative')}
diff --git a/components/Chatbar/Chatbar.tsx b/components/Chatbar/Chatbar.tsx index 6bb07c1a9f..a02e98a537 100644 --- a/components/Chatbar/Chatbar.tsx +++ b/components/Chatbar/Chatbar.tsx @@ -115,7 +115,7 @@ export const Chatbar = () => { field: 'selectedConversation', value: { id: uuidv4(), - name: 'New conversation', + name: t('New Conversation'), messages: [], model: OpenAIModels[defaultModelId], prompt: DEFAULT_SYSTEM_PROMPT, @@ -157,7 +157,7 @@ export const Chatbar = () => { field: 'selectedConversation', value: { id: uuidv4(), - name: 'New conversation', + name: t('New Conversation'), messages: [], model: OpenAIModels[defaultModelId], prompt: DEFAULT_SYSTEM_PROMPT, diff --git a/pages/api/home/home.tsx b/pages/api/home/home.tsx index f973a90005..9244727c10 100644 --- a/pages/api/home/home.tsx +++ b/pages/api/home/home.tsx @@ -183,7 +183,7 @@ const Home = ({ const newConversation: Conversation = { id: uuidv4(), - name: `${t('New Conversation')}`, + name: t('New Conversation'), messages: [], model: lastConversation?.model || { id: OpenAIModels[defaultModelId].id, @@ -331,7 +331,7 @@ const Home = ({ field: 'selectedConversation', value: { id: uuidv4(), - name: 'New conversation', + name: t('New Conversation'), messages: [], model: OpenAIModels[defaultModelId], prompt: DEFAULT_SYSTEM_PROMPT, diff --git a/public/locales/zh/chat.json b/public/locales/zh/chat.json index 673dde21ff..b109d6f664 100644 --- a/public/locales/zh/chat.json +++ b/public/locales/zh/chat.json @@ -4,6 +4,7 @@ "If you don't have an OpenAI API key, you can get one here: ": "如果你没有 OpenAI API 密钥,你可以在此获取:", "Stop Generating": "停止生成", "Prompt limit is {{maxLength}} characters": "提示字数限制为 {{maxLength}} 个字符", + "New Conversation": "新的聊天", "System Prompt": "系统提示", "You are ChatGPT, a large language model trained by OpenAI. Follow the user's instructions carefully. Respond using markdown.": "你是 ChatGPT,一个由 OpenAI 训练的大型语言模型。请仔细遵循用户的指示。使用 Markdown 格式进行回应。", "Enter a prompt": "输入一个提示", @@ -26,5 +27,10 @@ "Please enter a message": "请输入一条消息", "Chatbot UI is an advanced chatbot kit for OpenAI's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI 是一个高级聊天机器人工具包,旨在模仿 OpenAI 聊天模型的 ChatGPT 界面和功能。", "Are you sure you want to clear all messages?": "你确定要清除所有的消息吗?", - "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "较高的数值(例如0.8)会使输出更随机,而较低的数值(例如0.2)会使输出更加聚焦和确定性更强。" + "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "较高的数值(例如0.8)会使输出更随机,而较低的数值(例如0.2)会使输出更加聚焦和确定性更强。", + "View Account Usage": "查阅账户用量", + "Temperature": "生成温度", + "Precise": "保守", + "Neutral": "中立", + "Creative": "随性" } diff --git a/public/locales/zh/settings.json b/public/locales/zh/settings.json index 72b7a03d4a..c3dd302c00 100644 --- a/public/locales/zh/settings.json +++ b/public/locales/zh/settings.json @@ -1,4 +1,7 @@ { + "Settings": "设置", + "Theme": "主题", "Dark mode": "深色模式", - "Light mode": "浅色模式" + "Light mode": "浅色模式", + "Save": "保存" } diff --git a/public/locales/zh/sidebar.json b/public/locales/zh/sidebar.json index c46ed03508..493a50a559 100644 --- a/public/locales/zh/sidebar.json +++ b/public/locales/zh/sidebar.json @@ -1,11 +1,14 @@ { "New folder": "新建文件夹", "New chat": "新建聊天", + "New Conversation": "新的聊天", "No conversations.": "无对话", "Search conversations...": "搜索对话...", "OpenAI API Key": "OpenAI API 密钥", "Import data": "导入对话", "Are you sure?": "确定吗?", "Clear conversations": "清空对话", - "Export data": "导出对话" + "Settings": "设置", + "Export data": "导出对话", + "Plugin Keys": "插件密钥" }