en.ts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. import { getClientConfig } from "../config/client";
  2. import { SubmitKey } from "../store/config";
  3. import { LocaleType } from "./index";
  4. // if you are adding a new translation, please use PartialLocaleType instead of LocaleType
  5. const isApp = !!getClientConfig()?.isApp;
  6. const en: LocaleType = {
  7. WIP: "Coming Soon...",
  8. Error: {
  9. Unauthorized: isApp
  10. ? "Invalid API Key, please check it in [Settings](/#/settings) page."
  11. : "Unauthorized access, please enter access code in [auth](/#/auth) page, or enter your OpenAI API Key.",
  12. },
  13. Auth: {
  14. Title: "Need Access Code",
  15. Tips: "Please enter access code below",
  16. Input: "access code",
  17. Confirm: "Confirm",
  18. Later: "Later",
  19. },
  20. ChatItem: {
  21. ChatItemCount: (count: number) => `${count} messages`,
  22. },
  23. Chat: {
  24. SubTitle: (count: number) => `${count} messages`,
  25. EditMessage: {
  26. Title: "Edit All Messages",
  27. Topic: {
  28. Title: "Topic",
  29. SubTitle: "Change the current topic",
  30. },
  31. },
  32. Actions: {
  33. ChatList: "Go To Chat List",
  34. CompressedHistory: "Compressed History Memory Prompt",
  35. Export: "Export All Messages as Markdown",
  36. Copy: "Copy",
  37. Stop: "Stop",
  38. Retry: "Retry",
  39. Pin: "Pin",
  40. PinToastContent: "Pinned 1 messages to contextual prompts",
  41. PinToastAction: "View",
  42. Delete: "Delete",
  43. Edit: "Edit",
  44. },
  45. Commands: {
  46. new: "Start a new chat",
  47. newm: "Start a new chat with mask",
  48. next: "Next Chat",
  49. prev: "Previous Chat",
  50. clear: "Clear Context",
  51. del: "Delete Chat",
  52. },
  53. InputActions: {
  54. Stop: "Stop",
  55. ToBottom: "To Latest",
  56. Theme: {
  57. auto: "Auto",
  58. light: "Light Theme",
  59. dark: "Dark Theme",
  60. },
  61. Prompt: "Prompts",
  62. Masks: "Masks",
  63. Clear: "Clear Context",
  64. Settings: "Settings",
  65. },
  66. Rename: "Rename Chat",
  67. Typing: "Typing…",
  68. Input: (submitKey: string) => {
  69. var inputHints = `${submitKey} to send`;
  70. if (submitKey === String(SubmitKey.Enter)) {
  71. inputHints += ", Shift + Enter to wrap";
  72. }
  73. return inputHints + ", / to search prompts, : to use commands";
  74. },
  75. Send: "Send",
  76. Config: {
  77. Reset: "Reset to Default",
  78. SaveAs: "Save as Mask",
  79. },
  80. IsContext: "Contextual Prompt",
  81. },
  82. Export: {
  83. Title: "Export Messages",
  84. Copy: "Copy All",
  85. Download: "Download",
  86. MessageFromYou: "Message From You",
  87. MessageFromChatGPT: "Message From ChatGPT",
  88. Share: "Share to ShareGPT",
  89. Format: {
  90. Title: "Export Format",
  91. SubTitle: "Markdown or PNG Image",
  92. },
  93. IncludeContext: {
  94. Title: "Including Context",
  95. SubTitle: "Export context prompts in mask or not",
  96. },
  97. Steps: {
  98. Select: "Select",
  99. Preview: "Preview",
  100. },
  101. Image: {
  102. Toast: "Capturing Image...",
  103. Modal: "Long press or right click to save image",
  104. },
  105. },
  106. Select: {
  107. Search: "Search",
  108. All: "Select All",
  109. Latest: "Select Latest",
  110. Clear: "Clear",
  111. },
  112. Memory: {
  113. Title: "Memory Prompt",
  114. EmptyContent: "Nothing yet.",
  115. Send: "Send Memory",
  116. Copy: "Copy Memory",
  117. Reset: "Reset Session",
  118. ResetConfirm:
  119. "Resetting will clear the current conversation history and historical memory. Are you sure you want to reset?",
  120. },
  121. Home: {
  122. NewChat: "New Chat",
  123. DeleteChat: "Confirm to delete the selected conversation?",
  124. DeleteToast: "Chat Deleted",
  125. Revert: "Revert",
  126. },
  127. Settings: {
  128. Title: "Settings",
  129. SubTitle: "All Settings",
  130. Danger: {
  131. Reset: {
  132. Title: "Reset All Settings",
  133. SubTitle: "Reset all setting items to default",
  134. Action: "Reset",
  135. Confirm: "Confirm to reset all settings to default?",
  136. },
  137. Clear: {
  138. Title: "Clear All Data",
  139. SubTitle: "Clear all messages and settings",
  140. Action: "Clear",
  141. Confirm: "Confirm to clear all messages and settings?",
  142. },
  143. },
  144. Lang: {
  145. Name: "Language", // ATTENTION: if you wanna add a new translation, please do not translate this value, leave it as `Language`
  146. All: "All Languages",
  147. },
  148. Avatar: "Avatar",
  149. FontSize: {
  150. Title: "Font Size",
  151. SubTitle: "Adjust font size of chat content",
  152. },
  153. InjectSystemPrompts: {
  154. Title: "Inject System Prompts",
  155. SubTitle: "Inject a global system prompt for every request",
  156. },
  157. InputTemplate: {
  158. Title: "Input Template",
  159. SubTitle: "Newest message will be filled to this template",
  160. },
  161. Update: {
  162. Version: (x: string) => `Version: ${x}`,
  163. IsLatest: "Latest version",
  164. CheckUpdate: "Check Update",
  165. IsChecking: "Checking update...",
  166. FoundUpdate: (x: string) => `Found new version: ${x}`,
  167. GoToUpdate: "Update",
  168. },
  169. SendKey: "Send Key",
  170. Theme: "Theme",
  171. TightBorder: "Tight Border",
  172. SendPreviewBubble: {
  173. Title: "Send Preview Bubble",
  174. SubTitle: "Preview markdown in bubble",
  175. },
  176. AutoGenerateTitle: {
  177. Title: "Auto Generate Title",
  178. SubTitle: "Generate a suitable title based on the conversation content",
  179. },
  180. Sync: {
  181. CloudState: "Last Update",
  182. NotSyncYet: "Not sync yet",
  183. Success: "Sync Success",
  184. Fail: "Sync Fail",
  185. Config: {
  186. Modal: {
  187. Title: "Config Sync",
  188. },
  189. SyncType: {
  190. Title: "Sync Type",
  191. SubTitle: "Choose your favorite sync service",
  192. },
  193. Proxy: {
  194. Title: "Enable CORS Proxy",
  195. SubTitle: "Enable a proxy to avoid cross-origin restrictions",
  196. },
  197. ProxyUrl: {
  198. Title: "Proxy Endpoint",
  199. SubTitle:
  200. "Only applicable to the built-in CORS proxy for this project",
  201. },
  202. WebDav: {
  203. Endpoint: "WebDAV Endpoint",
  204. UserName: "User Name",
  205. Password: "Password",
  206. },
  207. },
  208. LocalState: "Local Data",
  209. Overview: (overview: any) => {
  210. return `${overview.chat} chats,${overview.message} messages,${overview.prompt} prompts,${overview.mask} masks`;
  211. },
  212. ImportFailed: "Failed to import from file",
  213. },
  214. Mask: {
  215. Splash: {
  216. Title: "Mask Splash Screen",
  217. SubTitle: "Show a mask splash screen before starting new chat",
  218. },
  219. Builtin: {
  220. Title: "Hide Builtin Masks",
  221. SubTitle: "Hide builtin masks in mask list",
  222. },
  223. },
  224. Prompt: {
  225. Disable: {
  226. Title: "Disable auto-completion",
  227. SubTitle: "Input / to trigger auto-completion",
  228. },
  229. List: "Prompt List",
  230. ListCount: (builtin: number, custom: number) =>
  231. `${builtin} built-in, ${custom} user-defined`,
  232. Edit: "Edit",
  233. Modal: {
  234. Title: "Prompt List",
  235. Add: "Add One",
  236. Search: "Search Prompts",
  237. },
  238. EditModal: {
  239. Title: "Edit Prompt",
  240. },
  241. },
  242. HistoryCount: {
  243. Title: "Attached Messages Count",
  244. SubTitle: "Number of sent messages attached per request",
  245. },
  246. CompressThreshold: {
  247. Title: "History Compression Threshold",
  248. SubTitle:
  249. "Will compress if uncompressed messages length exceeds the value",
  250. },
  251. Token: {
  252. Title: "API Key",
  253. SubTitle: "Use your key to ignore access code limit",
  254. Placeholder: "OpenAI API Key",
  255. },
  256. Usage: {
  257. Title: "Account Balance",
  258. SubTitle(used: any, total: any) {
  259. return `Used this month $${used}, subscription $${total}`;
  260. },
  261. IsChecking: "Checking...",
  262. Check: "Check",
  263. NoAccess: "Enter API Key to check balance",
  264. },
  265. AccessCode: {
  266. Title: "Access Code",
  267. SubTitle: "Access control enabled",
  268. Placeholder: "Need Access Code",
  269. },
  270. Endpoint: {
  271. Title: "Endpoint",
  272. SubTitle: "Custom endpoint must start with http(s)://",
  273. },
  274. CustomModel: {
  275. Title: "Custom Models",
  276. SubTitle: "Add extra model options, separate by comma",
  277. },
  278. Model: "Model",
  279. Temperature: {
  280. Title: "Temperature",
  281. SubTitle: "A larger value makes the more random output",
  282. },
  283. TopP: {
  284. Title: "Top P",
  285. SubTitle: "Do not alter this value together with temperature",
  286. },
  287. MaxTokens: {
  288. Title: "Max Tokens",
  289. SubTitle: "Maximum length of input tokens and generated tokens",
  290. },
  291. PresencePenalty: {
  292. Title: "Presence Penalty",
  293. SubTitle:
  294. "A larger value increases the likelihood to talk about new topics",
  295. },
  296. FrequencyPenalty: {
  297. Title: "Frequency Penalty",
  298. SubTitle:
  299. "A larger value decreasing the likelihood to repeat the same line",
  300. },
  301. },
  302. Store: {
  303. DefaultTopic: "New Conversation",
  304. BotHello: "Hello! How can I assist you today?",
  305. Error: "Something went wrong, please try again later.",
  306. Prompt: {
  307. History: (content: string) =>
  308. "This is a summary of the chat history as a recap: " + content,
  309. Topic:
  310. "Please generate a four to five word title summarizing our conversation without any lead-in, punctuation, quotation marks, periods, symbols, or additional text. Remove enclosing quotation marks.",
  311. Summarize:
  312. "Summarize the discussion briefly in 200 words or less to use as a prompt for future context.",
  313. },
  314. },
  315. Copy: {
  316. Success: "Copied to clipboard",
  317. Failed: "Copy failed, please grant permission to access clipboard",
  318. },
  319. Context: {
  320. Toast: (x: any) => `With ${x} contextual prompts`,
  321. Edit: "Current Chat Settings",
  322. Add: "Add a Prompt",
  323. Clear: "Context Cleared",
  324. Revert: "Revert",
  325. },
  326. Plugin: {
  327. Name: "Plugin",
  328. },
  329. FineTuned: {
  330. Sysmessage: "You are an assistant that",
  331. },
  332. Mask: {
  333. Name: "Mask",
  334. Page: {
  335. Title: "Prompt Template",
  336. SubTitle: (count: number) => `${count} prompt templates`,
  337. Search: "Search Templates",
  338. Create: "Create",
  339. },
  340. Item: {
  341. Info: (count: number) => `${count} prompts`,
  342. Chat: "Chat",
  343. View: "View",
  344. Edit: "Edit",
  345. Delete: "Delete",
  346. DeleteConfirm: "Confirm to delete?",
  347. },
  348. EditModal: {
  349. Title: (readonly: boolean) =>
  350. `Edit Prompt Template ${readonly ? "(readonly)" : ""}`,
  351. Download: "Download",
  352. Clone: "Clone",
  353. },
  354. Config: {
  355. Avatar: "Bot Avatar",
  356. Name: "Bot Name",
  357. Sync: {
  358. Title: "Use Global Config",
  359. SubTitle: "Use global config in this chat",
  360. Confirm: "Confirm to override custom config with global config?",
  361. },
  362. HideContext: {
  363. Title: "Hide Context Prompts",
  364. SubTitle: "Do not show in-context prompts in chat",
  365. },
  366. Share: {
  367. Title: "Share This Mask",
  368. SubTitle: "Generate a link to this mask",
  369. Action: "Copy Link",
  370. },
  371. },
  372. },
  373. NewChat: {
  374. Return: "Return",
  375. Skip: "Just Start",
  376. Title: "Pick a Mask",
  377. SubTitle: "Chat with the Soul behind the Mask",
  378. More: "Find More",
  379. NotShow: "Never Show Again",
  380. ConfirmNoShow: "Confirm to disable?You can enable it in settings later.",
  381. },
  382. UI: {
  383. Confirm: "Confirm",
  384. Cancel: "Cancel",
  385. Close: "Close",
  386. Create: "Create",
  387. Edit: "Edit",
  388. Export: "Export",
  389. Import: "Import",
  390. Sync: "Sync",
  391. Config: "Config",
  392. },
  393. Exporter: {
  394. Model: "Model",
  395. Messages: "Messages",
  396. Topic: "Topic",
  397. Time: "Time",
  398. },
  399. URLCommand: {
  400. Code: "Detected access code from url, confirm to apply? ",
  401. Settings: "Detected settings from url, confirm to apply?",
  402. },
  403. };
  404. export default en;