2023-03-29 09:53:52 +00:00
|
|
|
|
import { SubmitKey } from "../store/app";
|
|
|
|
|
|
2023-03-20 16:17:45 +00:00
|
|
|
|
const cn = {
|
2023-03-23 17:42:38 +00:00
|
|
|
|
WIP: "该功能仍在开发中……",
|
2023-03-26 06:53:40 +00:00
|
|
|
|
Error: {
|
|
|
|
|
Unauthorized: "现在是未授权状态,请在设置页填写授权码。",
|
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
ChatItem: {
|
|
|
|
|
ChatItemCount: (count: number) => `${count} 条对话`,
|
|
|
|
|
},
|
|
|
|
|
Chat: {
|
|
|
|
|
SubTitle: (count: number) => `与 ChatGPT 的 ${count} 条对话`,
|
|
|
|
|
Actions: {
|
|
|
|
|
ChatList: "查看消息列表",
|
|
|
|
|
CompressedHistory: "查看压缩后的历史 Prompt",
|
|
|
|
|
Export: "导出聊天记录",
|
2023-03-23 17:42:38 +00:00
|
|
|
|
Copy: "复制",
|
|
|
|
|
Stop: "停止",
|
2023-03-26 10:59:09 +00:00
|
|
|
|
Retry: "重试",
|
2023-03-21 16:20:32 +00:00
|
|
|
|
},
|
2023-03-29 16:02:50 +00:00
|
|
|
|
Rename: "重命名对话",
|
2023-03-21 16:20:32 +00:00
|
|
|
|
Typing: "正在输入…",
|
2023-03-29 09:53:52 +00:00
|
|
|
|
Input: (submitKey: string) => {
|
|
|
|
|
var inputHints = `输入消息,${submitKey} 发送`;
|
|
|
|
|
if (submitKey === String(SubmitKey.Enter)) {
|
2023-03-29 11:31:34 +00:00
|
|
|
|
inputHints += ",Shift + Enter 换行";
|
2023-03-29 09:53:52 +00:00
|
|
|
|
}
|
|
|
|
|
return inputHints;
|
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
Send: "发送",
|
|
|
|
|
},
|
|
|
|
|
Export: {
|
|
|
|
|
Title: "导出聊天记录为 Markdown",
|
|
|
|
|
Copy: "全部复制",
|
|
|
|
|
Download: "下载文件",
|
|
|
|
|
},
|
|
|
|
|
Memory: {
|
|
|
|
|
Title: "上下文记忆 Prompt",
|
|
|
|
|
EmptyContent: "尚未记忆",
|
|
|
|
|
Copy: "全部复制",
|
|
|
|
|
},
|
|
|
|
|
Home: {
|
|
|
|
|
NewChat: "新的聊天",
|
|
|
|
|
DeleteChat: "确认删除选中的对话?",
|
|
|
|
|
},
|
|
|
|
|
Settings: {
|
|
|
|
|
Title: "设置",
|
|
|
|
|
SubTitle: "设置选项",
|
|
|
|
|
Actions: {
|
|
|
|
|
ClearAll: "清除所有数据",
|
|
|
|
|
ResetAll: "重置所有选项",
|
|
|
|
|
Close: "关闭",
|
|
|
|
|
},
|
|
|
|
|
Lang: {
|
|
|
|
|
Name: "Language",
|
|
|
|
|
Options: {
|
2023-03-28 13:29:30 +00:00
|
|
|
|
cn: "简体中文",
|
2023-03-21 16:20:32 +00:00
|
|
|
|
en: "English",
|
2023-03-28 13:29:30 +00:00
|
|
|
|
tw: "繁體中文",
|
2023-03-31 00:48:57 +00:00
|
|
|
|
es: "Español",
|
2023-03-21 16:20:32 +00:00
|
|
|
|
},
|
2023-03-20 16:17:45 +00:00
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
Avatar: "头像",
|
2023-03-28 06:37:44 +00:00
|
|
|
|
FontSize: {
|
|
|
|
|
Title: "字体大小",
|
|
|
|
|
SubTitle: "聊天内容的字体大小",
|
|
|
|
|
},
|
2023-03-29 17:45:26 +00:00
|
|
|
|
|
2023-03-23 16:01:00 +00:00
|
|
|
|
Update: {
|
|
|
|
|
Version: (x: string) => `当前版本:${x}`,
|
|
|
|
|
IsLatest: "已是最新版本",
|
|
|
|
|
CheckUpdate: "检查更新",
|
|
|
|
|
IsChecking: "正在检查更新...",
|
|
|
|
|
FoundUpdate: (x: string) => `发现新版本:${x}`,
|
|
|
|
|
GoToUpdate: "前往更新",
|
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
SendKey: "发送键",
|
|
|
|
|
Theme: "主题",
|
|
|
|
|
TightBorder: "紧凑边框",
|
2023-03-31 05:16:12 +00:00
|
|
|
|
SendPreviewBubble: "发送预览气泡",
|
2023-03-28 17:30:11 +00:00
|
|
|
|
Prompt: {
|
|
|
|
|
Disable: {
|
|
|
|
|
Title: "禁用提示词自动补全",
|
2023-03-29 15:31:55 +00:00
|
|
|
|
SubTitle: "在输入框开头输入 / 即可触发自动补全",
|
2023-03-28 17:30:11 +00:00
|
|
|
|
},
|
|
|
|
|
List: "自定义提示词列表",
|
|
|
|
|
ListCount: (builtin: number, custom: number) =>
|
|
|
|
|
`内置 ${builtin} 条,用户定义 ${custom} 条`,
|
|
|
|
|
Edit: "编辑",
|
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
HistoryCount: {
|
|
|
|
|
Title: "附带历史消息数",
|
|
|
|
|
SubTitle: "每次请求携带的历史消息数",
|
2023-03-20 16:17:45 +00:00
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
CompressThreshold: {
|
|
|
|
|
Title: "历史消息长度压缩阈值",
|
|
|
|
|
SubTitle: "当未压缩的历史消息超过该值时,将进行压缩",
|
2023-03-20 16:17:45 +00:00
|
|
|
|
},
|
2023-03-26 11:58:25 +00:00
|
|
|
|
Token: {
|
|
|
|
|
Title: "API Key",
|
|
|
|
|
SubTitle: "使用自己的 Key 可绕过受控访问限制",
|
|
|
|
|
Placeholder: "OpenAI API Key",
|
|
|
|
|
},
|
2023-03-29 17:45:26 +00:00
|
|
|
|
Usage: {
|
|
|
|
|
Title: "账户余额",
|
2023-04-02 14:22:06 +00:00
|
|
|
|
SubTitle(used: any) {
|
|
|
|
|
return `本月已使用 $${used}`;
|
2023-03-29 17:45:26 +00:00
|
|
|
|
},
|
|
|
|
|
IsChecking: "正在检查…",
|
|
|
|
|
Check: "重新检查",
|
|
|
|
|
},
|
2023-03-26 06:53:40 +00:00
|
|
|
|
AccessCode: {
|
|
|
|
|
Title: "访问码",
|
|
|
|
|
SubTitle: "现在是受控访问状态",
|
|
|
|
|
Placeholder: "请输入访问码",
|
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
Model: "模型 (model)",
|
|
|
|
|
Temperature: {
|
|
|
|
|
Title: "随机性 (temperature)",
|
|
|
|
|
SubTitle: "值越大,回复越随机",
|
2023-03-20 16:17:45 +00:00
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
MaxTokens: {
|
|
|
|
|
Title: "单次回复限制 (max_tokens)",
|
|
|
|
|
SubTitle: "单次交互所用的最大 Token 数",
|
2023-03-20 16:17:45 +00:00
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
PresencePenlty: {
|
|
|
|
|
Title: "话题新鲜度 (presence_penalty)",
|
|
|
|
|
SubTitle: "值越大,越有可能扩展到新话题",
|
2023-03-20 16:17:45 +00:00
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
},
|
|
|
|
|
Store: {
|
|
|
|
|
DefaultTopic: "新的聊天",
|
|
|
|
|
BotHello: "有什么可以帮你的吗",
|
|
|
|
|
Error: "出错了,稍后重试吧",
|
|
|
|
|
Prompt: {
|
|
|
|
|
History: (content: string) =>
|
|
|
|
|
"这是 ai 和用户的历史聊天总结作为前情提要:" + content,
|
|
|
|
|
Topic:
|
2023-03-29 16:02:50 +00:00
|
|
|
|
"使用四到五个字直接返回这句话的简要主题,不要解释、不要标点、不要语气词、不要多余文本,如果没有主题,请直接返回“闲聊”",
|
2023-03-21 16:20:32 +00:00
|
|
|
|
Summarize:
|
2023-04-02 17:48:43 +00:00
|
|
|
|
"简要总结一下你和用户的对话,用作后续的上下文提示 prompt,控制在 200 字以内",
|
2023-03-20 16:17:45 +00:00
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
ConfirmClearAll: "确认清除所有聊天、设置数据?",
|
|
|
|
|
},
|
|
|
|
|
Copy: {
|
|
|
|
|
Success: "已写入剪切板",
|
|
|
|
|
Failed: "复制失败,请赋予剪切板权限",
|
|
|
|
|
},
|
2023-04-02 18:02:03 +00:00
|
|
|
|
Context: {
|
|
|
|
|
Toast: (x: any) => `已设置 ${x} 条前置上下文`,
|
|
|
|
|
Edit: "前置上下文和历史记忆",
|
|
|
|
|
Add: "新增一条",
|
|
|
|
|
},
|
2023-03-21 16:20:32 +00:00
|
|
|
|
};
|
2023-03-20 16:17:45 +00:00
|
|
|
|
|
|
|
|
|
export type LocaleType = typeof cn;
|
|
|
|
|
|
2023-03-21 16:20:32 +00:00
|
|
|
|
export default cn;
|