cn.ts 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. import { SubmitKey } from "../store/config";
  2. const cn = {
  3. WIP: "该功能仍在开发中……",
  4. Error: {
  5. Unauthorized:
  6. "访问密码不正确或为空,请前往[设置](/#/settings)页输入正确的访问密码,或者填入你自己的 OpenAI API Key。",
  7. },
  8. ChatItem: {
  9. ChatItemCount: (count: number) => `${count} 条对话`,
  10. },
  11. Chat: {
  12. SubTitle: (count: number) => `与 ChatGPT 的 ${count} 条对话`,
  13. Actions: {
  14. ChatList: "查看消息列表",
  15. CompressedHistory: "查看压缩后的历史 Prompt",
  16. Export: "导出聊天记录",
  17. Copy: "复制",
  18. Stop: "停止",
  19. Retry: "重试",
  20. Delete: "删除",
  21. },
  22. Rename: "重命名对话",
  23. Typing: "正在输入…",
  24. Input: (submitKey: string) => {
  25. var inputHints = `${submitKey} 发送`;
  26. if (submitKey === String(SubmitKey.Enter)) {
  27. inputHints += ",Shift + Enter 换行";
  28. }
  29. return inputHints + ",/ 触发补全";
  30. },
  31. Send: "发送",
  32. Config: {
  33. Reset: "重置默认",
  34. SaveAs: "另存为面具",
  35. },
  36. },
  37. Export: {
  38. Title: "导出聊天记录为 Markdown",
  39. Copy: "全部复制",
  40. Download: "下载文件",
  41. MessageFromYou: "来自你的消息",
  42. MessageFromChatGPT: "来自 ChatGPT 的消息",
  43. },
  44. Memory: {
  45. Title: "历史摘要",
  46. EmptyContent: "对话内容过短,无需总结",
  47. Send: "自动压缩聊天记录并作为上下文发送",
  48. Copy: "复制摘要",
  49. Reset: "重置对话",
  50. ResetConfirm: "重置后将清空当前对话记录以及历史摘要,确认重置?",
  51. },
  52. Home: {
  53. NewChat: "新的聊天",
  54. DeleteChat: "确认删除选中的对话?",
  55. DeleteToast: "已删除会话",
  56. Revert: "撤销",
  57. },
  58. Settings: {
  59. Title: "设置",
  60. SubTitle: "设置选项",
  61. Actions: {
  62. ClearAll: "清除所有数据",
  63. ResetAll: "重置所有选项",
  64. Close: "关闭",
  65. ConfirmResetAll: "确认重置所有配置?",
  66. ConfirmClearAll: "确认清除所有数据?",
  67. },
  68. Lang: {
  69. Name: "Language", // ATTENTION: if you wanna add a new translation, please do not translate this value, leave it as `Language`
  70. All: "所有语言",
  71. Options: {
  72. cn: "简体中文",
  73. en: "English",
  74. tw: "繁體中文",
  75. es: "Español",
  76. it: "Italiano",
  77. tr: "Türkçe",
  78. jp: "日本語",
  79. de: "Deutsch",
  80. vi: "Vietnamese",
  81. ru: "Русский",
  82. cs: "Čeština",
  83. },
  84. },
  85. Avatar: "头像",
  86. FontSize: {
  87. Title: "字体大小",
  88. SubTitle: "聊天内容的字体大小",
  89. },
  90. Update: {
  91. Version: (x: string) => `当前版本:${x}`,
  92. IsLatest: "已是最新版本",
  93. CheckUpdate: "检查更新",
  94. IsChecking: "正在检查更新...",
  95. FoundUpdate: (x: string) => `发现新版本:${x}`,
  96. GoToUpdate: "前往更新",
  97. },
  98. SendKey: "发送键",
  99. Theme: "主题",
  100. TightBorder: "无边框模式",
  101. SendPreviewBubble: {
  102. Title: "预览气泡",
  103. SubTitle: "在预览气泡中预览 Markdown 内容",
  104. },
  105. Mask: {
  106. Title: "面具启动页",
  107. SubTitle: "新建聊天时,展示面具启动页",
  108. },
  109. Prompt: {
  110. Disable: {
  111. Title: "禁用提示词自动补全",
  112. SubTitle: "在输入框开头输入 / 即可触发自动补全",
  113. },
  114. List: "自定义提示词列表",
  115. ListCount: (builtin: number, custom: number) =>
  116. `内置 ${builtin} 条,用户定义 ${custom} 条`,
  117. Edit: "编辑",
  118. Modal: {
  119. Title: "提示词列表",
  120. Add: "新建",
  121. Search: "搜索提示词",
  122. },
  123. EditModal: {
  124. Title: "编辑提示词",
  125. },
  126. },
  127. HistoryCount: {
  128. Title: "附带历史消息数",
  129. SubTitle: "每次请求携带的历史消息数",
  130. },
  131. CompressThreshold: {
  132. Title: "历史消息长度压缩阈值",
  133. SubTitle: "当未压缩的历史消息超过该值时,将进行压缩",
  134. },
  135. Token: {
  136. Title: "API Key",
  137. SubTitle: "使用自己的 Key 可绕过密码访问限制",
  138. Placeholder: "OpenAI API Key",
  139. },
  140. Usage: {
  141. Title: "余额查询",
  142. SubTitle(used: any, total: any) {
  143. return `本月已使用 $${used},订阅总额 $${total}`;
  144. },
  145. IsChecking: "正在检查…",
  146. Check: "重新检查",
  147. NoAccess: "输入 API Key 或访问密码查看余额",
  148. },
  149. AccessCode: {
  150. Title: "访问密码",
  151. SubTitle: "管理员已开启加密访问",
  152. Placeholder: "请输入访问密码",
  153. },
  154. Model: "模型 (model)",
  155. Temperature: {
  156. Title: "随机性 (temperature)",
  157. SubTitle: "值越大,回复越随机",
  158. },
  159. MaxTokens: {
  160. Title: "单次回复限制 (max_tokens)",
  161. SubTitle: "单次交互所用的最大 Token 数",
  162. },
  163. PresencePenlty: {
  164. Title: "话题新鲜度 (presence_penalty)",
  165. SubTitle: "值越大,越有可能扩展到新话题",
  166. },
  167. },
  168. Store: {
  169. DefaultTopic: "新的聊天",
  170. BotHello: "有什么可以帮你的吗",
  171. Error: "出错了,稍后重试吧",
  172. Prompt: {
  173. History: (content: string) =>
  174. "这是 ai 和用户的历史聊天总结作为前情提要:" + content,
  175. Topic:
  176. "使用四到五个字直接返回这句话的简要主题,不要解释、不要标点、不要语气词、不要多余文本,如果没有主题,请直接返回“闲聊”",
  177. Summarize:
  178. "简要总结一下你和用户的对话,用作后续的上下文提示 prompt,控制在 200 字以内",
  179. },
  180. },
  181. Copy: {
  182. Success: "已写入剪切板",
  183. Failed: "复制失败,请赋予剪切板权限",
  184. },
  185. Context: {
  186. Toast: (x: any) => `已设置 ${x} 条前置上下文`,
  187. Edit: "当前对话设置",
  188. Add: "新增预设对话",
  189. },
  190. Plugin: {
  191. Name: "插件",
  192. },
  193. Mask: {
  194. Name: "面具",
  195. Page: {
  196. Title: "预设角色面具",
  197. SubTitle: (count: number) => `${count} 个预设角色定义`,
  198. Search: "搜索角色面具",
  199. Create: "新建",
  200. },
  201. Item: {
  202. Info: (count: number) => `包含 ${count} 条预设对话`,
  203. Chat: "对话",
  204. View: "查看",
  205. Edit: "编辑",
  206. Delete: "删除",
  207. DeleteConfirm: "确认删除?",
  208. },
  209. EditModal: {
  210. Title: (readonly: boolean) =>
  211. `编辑预设面具 ${readonly ? "(只读)" : ""}`,
  212. Download: "下载预设",
  213. Clone: "克隆预设",
  214. },
  215. Config: {
  216. Avatar: "角色头像",
  217. Name: "角色名称",
  218. },
  219. },
  220. NewChat: {
  221. Return: "返回",
  222. Skip: "直接开始",
  223. NotShow: "不再展示",
  224. ConfirmNoShow: "确认禁用?禁用后可以随时在设置中重新启用。",
  225. Title: "挑选一个面具",
  226. SubTitle: "现在开始,与面具背后的灵魂思维碰撞",
  227. More: "查看全部",
  228. },
  229. UI: {
  230. Confirm: "确认",
  231. Cancel: "取消",
  232. Close: "关闭",
  233. Create: "新建",
  234. Edit: "编辑",
  235. },
  236. };
  237. export type LocaleType = typeof cn;
  238. export default cn;