en.ts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  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. Check: "Check Connection",
  189. },
  190. SyncType: {
  191. Title: "Sync Type",
  192. SubTitle: "Choose your favorite sync service",
  193. },
  194. Proxy: {
  195. Title: "Enable CORS Proxy",
  196. SubTitle: "Enable a proxy to avoid cross-origin restrictions",
  197. },
  198. ProxyUrl: {
  199. Title: "Proxy Endpoint",
  200. SubTitle:
  201. "Only applicable to the built-in CORS proxy for this project",
  202. },
  203. WebDav: {
  204. Endpoint: "WebDAV Endpoint",
  205. UserName: "User Name",
  206. Password: "Password",
  207. },
  208. UpStash: {
  209. Endpoint: "UpStash Redis REST Url",
  210. UserName: "Backup Name",
  211. Password: "UpStash Redis REST Token",
  212. },
  213. },
  214. LocalState: "Local Data",
  215. Overview: (overview: any) => {
  216. return `${overview.chat} chats,${overview.message} messages,${overview.prompt} prompts,${overview.mask} masks`;
  217. },
  218. ImportFailed: "Failed to import from file",
  219. },
  220. Mask: {
  221. Splash: {
  222. Title: "Mask Splash Screen",
  223. SubTitle: "Show a mask splash screen before starting new chat",
  224. },
  225. Builtin: {
  226. Title: "Hide Builtin Masks",
  227. SubTitle: "Hide builtin masks in mask list",
  228. },
  229. },
  230. Prompt: {
  231. Disable: {
  232. Title: "Disable auto-completion",
  233. SubTitle: "Input / to trigger auto-completion",
  234. },
  235. List: "Prompt List",
  236. ListCount: (builtin: number, custom: number) =>
  237. `${builtin} built-in, ${custom} user-defined`,
  238. Edit: "Edit",
  239. Modal: {
  240. Title: "Prompt List",
  241. Add: "Add One",
  242. Search: "Search Prompts",
  243. },
  244. EditModal: {
  245. Title: "Edit Prompt",
  246. },
  247. },
  248. HistoryCount: {
  249. Title: "Attached Messages Count",
  250. SubTitle: "Number of sent messages attached per request",
  251. },
  252. CompressThreshold: {
  253. Title: "History Compression Threshold",
  254. SubTitle:
  255. "Will compress if uncompressed messages length exceeds the value",
  256. },
  257. Token: {
  258. Title: "API Key",
  259. SubTitle: "Use your key to ignore access code limit",
  260. Placeholder: "OpenAI API Key",
  261. },
  262. Usage: {
  263. Title: "Account Balance",
  264. SubTitle(used: any, total: any) {
  265. return `Used this month $${used}, subscription $${total}`;
  266. },
  267. IsChecking: "Checking...",
  268. Check: "Check",
  269. NoAccess: "Enter API Key to check balance",
  270. },
  271. AccessCode: {
  272. Title: "Access Code",
  273. SubTitle: "Access control enabled",
  274. Placeholder: "Need Access Code",
  275. },
  276. Endpoint: {
  277. Title: "Endpoint",
  278. SubTitle: "Custom endpoint must start with http(s)://",
  279. },
  280. CustomModel: {
  281. Title: "Custom Models",
  282. SubTitle: "Add extra model options, separate by comma",
  283. },
  284. Model: "Model",
  285. Temperature: {
  286. Title: "Temperature",
  287. SubTitle: "A larger value makes the more random output",
  288. },
  289. TopP: {
  290. Title: "Top P",
  291. SubTitle: "Do not alter this value together with temperature",
  292. },
  293. MaxTokens: {
  294. Title: "Max Tokens",
  295. SubTitle: "Maximum length of input tokens and generated tokens",
  296. },
  297. PresencePenalty: {
  298. Title: "Presence Penalty",
  299. SubTitle:
  300. "A larger value increases the likelihood to talk about new topics",
  301. },
  302. FrequencyPenalty: {
  303. Title: "Frequency Penalty",
  304. SubTitle:
  305. "A larger value decreasing the likelihood to repeat the same line",
  306. },
  307. },
  308. Store: {
  309. DefaultTopic: "New Conversation",
  310. BotHello: "Hello! How can I assist you today?",
  311. Error: "Something went wrong, please try again later.",
  312. Prompt: {
  313. History: (content: string) =>
  314. "This is a summary of the chat history as a recap: " + content,
  315. Topic:
  316. "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.",
  317. Summarize:
  318. "Summarize the discussion briefly in 200 words or less to use as a prompt for future context.",
  319. },
  320. },
  321. Copy: {
  322. Success: "Copied to clipboard",
  323. Failed: "Copy failed, please grant permission to access clipboard",
  324. },
  325. Download: {
  326. Success: "Content downloaded to your directory.",
  327. Failed: "Download failed.",
  328. },
  329. Context: {
  330. Toast: (x: any) => `With ${x} contextual prompts`,
  331. Edit: "Current Chat Settings",
  332. Add: "Add a Prompt",
  333. Clear: "Context Cleared",
  334. Revert: "Revert",
  335. },
  336. Plugin: {
  337. Name: "Plugin",
  338. },
  339. FineTuned: {
  340. Sysmessage: "You are an assistant that",
  341. },
  342. Mask: {
  343. Name: "Mask",
  344. Page: {
  345. Title: "Prompt Template",
  346. SubTitle: (count: number) => `${count} prompt templates`,
  347. Search: "Search Templates",
  348. Create: "Create",
  349. },
  350. Item: {
  351. Info: (count: number) => `${count} prompts`,
  352. Chat: "Chat",
  353. View: "View",
  354. Edit: "Edit",
  355. Delete: "Delete",
  356. DeleteConfirm: "Confirm to delete?",
  357. },
  358. EditModal: {
  359. Title: (readonly: boolean) =>
  360. `Edit Prompt Template ${readonly ? "(readonly)" : ""}`,
  361. Download: "Download",
  362. Clone: "Clone",
  363. },
  364. Config: {
  365. Avatar: "Bot Avatar",
  366. Name: "Bot Name",
  367. Sync: {
  368. Title: "Use Global Config",
  369. SubTitle: "Use global config in this chat",
  370. Confirm: "Confirm to override custom config with global config?",
  371. },
  372. HideContext: {
  373. Title: "Hide Context Prompts",
  374. SubTitle: "Do not show in-context prompts in chat",
  375. },
  376. Share: {
  377. Title: "Share This Mask",
  378. SubTitle: "Generate a link to this mask",
  379. Action: "Copy Link",
  380. },
  381. },
  382. },
  383. NewChat: {
  384. Return: "Return",
  385. Skip: "Just Start",
  386. Title: "Pick a Mask",
  387. SubTitle: "Chat with the Soul behind the Mask",
  388. More: "Find More",
  389. NotShow: "Never Show Again",
  390. ConfirmNoShow: "Confirm to disable?You can enable it in settings later.",
  391. },
  392. UI: {
  393. Confirm: "Confirm",
  394. Cancel: "Cancel",
  395. Close: "Close",
  396. Create: "Create",
  397. Edit: "Edit",
  398. Export: "Export",
  399. Import: "Import",
  400. Sync: "Sync",
  401. Config: "Config",
  402. },
  403. Exporter: {
  404. Model: "Model",
  405. Messages: "Messages",
  406. Topic: "Topic",
  407. Time: "Time",
  408. },
  409. URLCommand: {
  410. Code: "Detected access code from url, confirm to apply? ",
  411. Settings: "Detected settings from url, confirm to apply?",
  412. },
  413. };
  414. export default en;