en.ts 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  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. SubTips: "Or enter your OpenAI or Google API Key",
  17. Input: "access code",
  18. Confirm: "Confirm",
  19. Later: "Later",
  20. },
  21. ChatItem: {
  22. ChatItemCount: (count: number) => `${count} messages`,
  23. },
  24. Chat: {
  25. SubTitle: (count: number) => `${count} messages`,
  26. EditMessage: {
  27. Title: "Edit All Messages",
  28. Topic: {
  29. Title: "Topic",
  30. SubTitle: "Change the current topic",
  31. },
  32. },
  33. Actions: {
  34. ChatList: "Go To Chat List",
  35. CompressedHistory: "Compressed History Memory Prompt",
  36. Export: "Export All Messages as Markdown",
  37. Copy: "Copy",
  38. Stop: "Stop",
  39. Retry: "Retry",
  40. Pin: "Pin",
  41. PinToastContent: "Pinned 1 messages to contextual prompts",
  42. PinToastAction: "View",
  43. Delete: "Delete",
  44. Edit: "Edit",
  45. },
  46. Commands: {
  47. new: "Start a new chat",
  48. newm: "Start a new chat with mask",
  49. next: "Next Chat",
  50. prev: "Previous Chat",
  51. clear: "Clear Context",
  52. del: "Delete Chat",
  53. },
  54. InputActions: {
  55. Stop: "Stop",
  56. ToBottom: "To Latest",
  57. Theme: {
  58. auto: "Auto",
  59. light: "Light Theme",
  60. dark: "Dark Theme",
  61. },
  62. Prompt: "Prompts",
  63. Masks: "Masks",
  64. Clear: "Clear Context",
  65. Settings: "Settings",
  66. UploadImage: "Upload Images",
  67. },
  68. Rename: "Rename Chat",
  69. Typing: "Typing…",
  70. Input: (submitKey: string) => {
  71. var inputHints = `${submitKey} to send`;
  72. if (submitKey === String(SubmitKey.Enter)) {
  73. inputHints += ", Shift + Enter to wrap";
  74. }
  75. return inputHints + ", / to search prompts, : to use commands";
  76. },
  77. Send: "Send",
  78. Config: {
  79. Reset: "Reset to Default",
  80. SaveAs: "Save as Mask",
  81. },
  82. IsContext: "Contextual Prompt",
  83. },
  84. Export: {
  85. Title: "Export Messages",
  86. Copy: "Copy All",
  87. Download: "Download",
  88. MessageFromYou: "Message From You",
  89. MessageFromChatGPT: "Message From ChatGPT",
  90. Share: "Share to ShareGPT",
  91. Format: {
  92. Title: "Export Format",
  93. SubTitle: "Markdown or PNG Image",
  94. },
  95. IncludeContext: {
  96. Title: "Including Context",
  97. SubTitle: "Export context prompts in mask or not",
  98. },
  99. Steps: {
  100. Select: "Select",
  101. Preview: "Preview",
  102. },
  103. Image: {
  104. Toast: "Capturing Image...",
  105. Modal: "Long press or right click to save image",
  106. },
  107. Artifacts: {
  108. Title: "Share Artifacts",
  109. Error: "Share Error",
  110. },
  111. },
  112. Select: {
  113. Search: "Search",
  114. All: "Select All",
  115. Latest: "Select Latest",
  116. Clear: "Clear",
  117. },
  118. Memory: {
  119. Title: "Memory Prompt",
  120. EmptyContent: "Nothing yet.",
  121. Send: "Send Memory",
  122. Copy: "Copy Memory",
  123. Reset: "Reset Session",
  124. ResetConfirm:
  125. "Resetting will clear the current conversation history and historical memory. Are you sure you want to reset?",
  126. },
  127. Home: {
  128. NewChat: "New Chat",
  129. DeleteChat: "Confirm to delete the selected conversation?",
  130. DeleteToast: "Chat Deleted",
  131. Revert: "Revert",
  132. },
  133. Settings: {
  134. Title: "Settings",
  135. SubTitle: "All Settings",
  136. Danger: {
  137. Reset: {
  138. Title: "Reset All Settings",
  139. SubTitle: "Reset all setting items to default",
  140. Action: "Reset",
  141. Confirm: "Confirm to reset all settings to default?",
  142. },
  143. Clear: {
  144. Title: "Clear All Data",
  145. SubTitle: "Clear all messages and settings",
  146. Action: "Clear",
  147. Confirm: "Confirm to clear all messages and settings?",
  148. },
  149. },
  150. Lang: {
  151. Name: "Language", // ATTENTION: if you wanna add a new translation, please do not translate this value, leave it as `Language`
  152. All: "All Languages",
  153. },
  154. Avatar: "Avatar",
  155. FontSize: {
  156. Title: "Font Size",
  157. SubTitle: "Adjust font size of chat content",
  158. },
  159. FontFamily: {
  160. Title: "Chat Font Family",
  161. SubTitle:
  162. "Font Family of the chat content, leave empty to apply global default font",
  163. Placeholder: "Font Family Name",
  164. },
  165. InjectSystemPrompts: {
  166. Title: "Inject System Prompts",
  167. SubTitle: "Inject a global system prompt for every request",
  168. },
  169. InputTemplate: {
  170. Title: "Input Template",
  171. SubTitle: "Newest message will be filled to this template",
  172. },
  173. Update: {
  174. Version: (x: string) => `Version: ${x}`,
  175. IsLatest: "Latest version",
  176. CheckUpdate: "Check Update",
  177. IsChecking: "Checking update...",
  178. FoundUpdate: (x: string) => `Found new version: ${x}`,
  179. GoToUpdate: "Update",
  180. },
  181. SendKey: "Send Key",
  182. Theme: "Theme",
  183. TightBorder: "Tight Border",
  184. SendPreviewBubble: {
  185. Title: "Send Preview Bubble",
  186. SubTitle: "Preview markdown in bubble",
  187. },
  188. AutoGenerateTitle: {
  189. Title: "Auto Generate Title",
  190. SubTitle: "Generate a suitable title based on the conversation content",
  191. },
  192. Sync: {
  193. CloudState: "Last Update",
  194. NotSyncYet: "Not sync yet",
  195. Success: "Sync Success",
  196. Fail: "Sync Fail",
  197. Config: {
  198. Modal: {
  199. Title: "Config Sync",
  200. Check: "Check Connection",
  201. },
  202. SyncType: {
  203. Title: "Sync Type",
  204. SubTitle: "Choose your favorite sync service",
  205. },
  206. Proxy: {
  207. Title: "Enable CORS Proxy",
  208. SubTitle: "Enable a proxy to avoid cross-origin restrictions",
  209. },
  210. ProxyUrl: {
  211. Title: "Proxy Endpoint",
  212. SubTitle:
  213. "Only applicable to the built-in CORS proxy for this project",
  214. },
  215. WebDav: {
  216. Endpoint: "WebDAV Endpoint",
  217. UserName: "User Name",
  218. Password: "Password",
  219. },
  220. UpStash: {
  221. Endpoint: "UpStash Redis REST Url",
  222. UserName: "Backup Name",
  223. Password: "UpStash Redis REST Token",
  224. },
  225. },
  226. LocalState: "Local Data",
  227. Overview: (overview: any) => {
  228. return `${overview.chat} chats,${overview.message} messages,${overview.prompt} prompts,${overview.mask} masks`;
  229. },
  230. ImportFailed: "Failed to import from file",
  231. },
  232. Mask: {
  233. Splash: {
  234. Title: "Mask Splash Screen",
  235. SubTitle: "Show a mask splash screen before starting new chat",
  236. },
  237. Builtin: {
  238. Title: "Hide Builtin Masks",
  239. SubTitle: "Hide builtin masks in mask list",
  240. },
  241. },
  242. Prompt: {
  243. Disable: {
  244. Title: "Disable auto-completion",
  245. SubTitle: "Input / to trigger auto-completion",
  246. },
  247. List: "Prompt List",
  248. ListCount: (builtin: number, custom: number) =>
  249. `${builtin} built-in, ${custom} user-defined`,
  250. Edit: "Edit",
  251. Modal: {
  252. Title: "Prompt List",
  253. Add: "Add One",
  254. Search: "Search Prompts",
  255. },
  256. EditModal: {
  257. Title: "Edit Prompt",
  258. },
  259. },
  260. HistoryCount: {
  261. Title: "Attached Messages Count",
  262. SubTitle: "Number of sent messages attached per request",
  263. },
  264. CompressThreshold: {
  265. Title: "History Compression Threshold",
  266. SubTitle:
  267. "Will compress if uncompressed messages length exceeds the value",
  268. },
  269. Usage: {
  270. Title: "Account Balance",
  271. SubTitle(used: any, total: any) {
  272. return `Used this month $${used}, subscription $${total}`;
  273. },
  274. IsChecking: "Checking...",
  275. Check: "Check",
  276. NoAccess: "Enter API Key to check balance",
  277. },
  278. Access: {
  279. AccessCode: {
  280. Title: "Access Code",
  281. SubTitle: "Access control Enabled",
  282. Placeholder: "Enter Code",
  283. },
  284. CustomEndpoint: {
  285. Title: "Custom Endpoint",
  286. SubTitle: "Use custom Azure or OpenAI service",
  287. },
  288. Provider: {
  289. Title: "Model Provider",
  290. SubTitle: "Select Azure or OpenAI",
  291. },
  292. OpenAI: {
  293. ApiKey: {
  294. Title: "OpenAI API Key",
  295. SubTitle: "User custom OpenAI Api Key",
  296. Placeholder: "sk-xxx",
  297. },
  298. Endpoint: {
  299. Title: "OpenAI Endpoint",
  300. SubTitle: "Must start with http(s):// or use /api/openai as default",
  301. },
  302. },
  303. Azure: {
  304. ApiKey: {
  305. Title: "Azure Api Key",
  306. SubTitle: "Check your api key from Azure console",
  307. Placeholder: "Azure Api Key",
  308. },
  309. Endpoint: {
  310. Title: "Azure Endpoint",
  311. SubTitle: "Example: ",
  312. },
  313. ApiVerion: {
  314. Title: "Azure Api Version",
  315. SubTitle: "Check your api version from azure console",
  316. },
  317. },
  318. Anthropic: {
  319. ApiKey: {
  320. Title: "Anthropic API Key",
  321. SubTitle:
  322. "Use a custom Anthropic Key to bypass password access restrictions",
  323. Placeholder: "Anthropic API Key",
  324. },
  325. Endpoint: {
  326. Title: "Endpoint Address",
  327. SubTitle: "Example: ",
  328. },
  329. ApiVerion: {
  330. Title: "API Version (claude api version)",
  331. SubTitle: "Select and input a specific API version",
  332. },
  333. },
  334. Baidu: {
  335. ApiKey: {
  336. Title: "Baidu API Key",
  337. SubTitle: "Use a custom Baidu API Key",
  338. Placeholder: "Baidu API Key",
  339. },
  340. SecretKey: {
  341. Title: "Baidu Secret Key",
  342. SubTitle: "Use a custom Baidu Secret Key",
  343. Placeholder: "Baidu Secret Key",
  344. },
  345. Endpoint: {
  346. Title: "Endpoint Address",
  347. SubTitle: "not supported, configure in .env",
  348. },
  349. },
  350. Tencent: {
  351. ApiKey: {
  352. Title: "Tencent API Key",
  353. SubTitle: "Use a custom Tencent API Key",
  354. Placeholder: "Tencent API Key",
  355. },
  356. SecretKey: {
  357. Title: "Tencent Secret Key",
  358. SubTitle: "Use a custom Tencent Secret Key",
  359. Placeholder: "Tencent Secret Key",
  360. },
  361. Endpoint: {
  362. Title: "Endpoint Address",
  363. SubTitle: "not supported, configure in .env",
  364. },
  365. },
  366. ByteDance: {
  367. ApiKey: {
  368. Title: "ByteDance API Key",
  369. SubTitle: "Use a custom ByteDance API Key",
  370. Placeholder: "ByteDance API Key",
  371. },
  372. Endpoint: {
  373. Title: "Endpoint Address",
  374. SubTitle: "Example: ",
  375. },
  376. },
  377. Alibaba: {
  378. ApiKey: {
  379. Title: "Alibaba API Key",
  380. SubTitle: "Use a custom Alibaba Cloud API Key",
  381. Placeholder: "Alibaba Cloud API Key",
  382. },
  383. Endpoint: {
  384. Title: "Endpoint Address",
  385. SubTitle: "Example: ",
  386. },
  387. },
  388. Moonshot: {
  389. ApiKey: {
  390. Title: "Moonshot API Key",
  391. SubTitle: "Use a custom Moonshot API Key",
  392. Placeholder: "Moonshot API Key",
  393. },
  394. Endpoint: {
  395. Title: "Endpoint Address",
  396. SubTitle: "Example: ",
  397. },
  398. },
  399. Stability: {
  400. ApiKey: {
  401. Title: "Stability API Key",
  402. SubTitle: "Use a custom Stability API Key",
  403. Placeholder: "Stability API Key",
  404. },
  405. Endpoint: {
  406. Title: "Endpoint Address",
  407. SubTitle: "Example: ",
  408. },
  409. },
  410. CustomModel: {
  411. Title: "Custom Models",
  412. SubTitle: "Custom model options, seperated by comma",
  413. },
  414. Google: {
  415. ApiKey: {
  416. Title: "API Key",
  417. SubTitle: "Obtain your API Key from Google AI",
  418. Placeholder: "Enter your Google AI Studio API Key",
  419. },
  420. Endpoint: {
  421. Title: "Endpoint Address",
  422. SubTitle: "Example: ",
  423. },
  424. ApiVersion: {
  425. Title: "API Version (specific to gemini-pro)",
  426. SubTitle: "Select a specific API version",
  427. },
  428. GoogleSafetySettings: {
  429. Title: "Google Safety Settings",
  430. SubTitle: "Select a safety filtering level",
  431. },
  432. },
  433. },
  434. Model: "Model",
  435. Temperature: {
  436. Title: "Temperature",
  437. SubTitle: "A larger value makes the more random output",
  438. },
  439. TopP: {
  440. Title: "Top P",
  441. SubTitle: "Do not alter this value together with temperature",
  442. },
  443. MaxTokens: {
  444. Title: "Max Tokens",
  445. SubTitle: "Maximum length of input tokens and generated tokens",
  446. },
  447. PresencePenalty: {
  448. Title: "Presence Penalty",
  449. SubTitle:
  450. "A larger value increases the likelihood to talk about new topics",
  451. },
  452. FrequencyPenalty: {
  453. Title: "Frequency Penalty",
  454. SubTitle:
  455. "A larger value decreasing the likelihood to repeat the same line",
  456. },
  457. },
  458. Store: {
  459. DefaultTopic: "New Conversation",
  460. BotHello: "Hello! How can I assist you today?",
  461. Error: "Something went wrong, please try again later.",
  462. Prompt: {
  463. History: (content: string) =>
  464. "This is a summary of the chat history as a recap: " + content,
  465. Topic:
  466. "Please generate a four to five word title summarizing our conversation without any lead-in, punctuation, quotation marks, periods, symbols, bold text, or additional text. Remove enclosing quotation marks.",
  467. Summarize:
  468. "Summarize the discussion briefly in 200 words or less to use as a prompt for future context.",
  469. },
  470. },
  471. Copy: {
  472. Success: "Copied to clipboard",
  473. Failed: "Copy failed, please grant permission to access clipboard",
  474. },
  475. Download: {
  476. Success: "Content downloaded to your directory.",
  477. Failed: "Download failed.",
  478. },
  479. Context: {
  480. Toast: (x: any) => `With ${x} contextual prompts`,
  481. Edit: "Current Chat Settings",
  482. Add: "Add a Prompt",
  483. Clear: "Context Cleared",
  484. Revert: "Revert",
  485. },
  486. Plugin: {
  487. Name: "Plugin",
  488. Artifacts: "Artifacts",
  489. },
  490. Discovery: {
  491. Name: "Discovery",
  492. },
  493. FineTuned: {
  494. Sysmessage: "You are an assistant that",
  495. },
  496. Mask: {
  497. Name: "Mask",
  498. Page: {
  499. Title: "Prompt Template",
  500. SubTitle: (count: number) => `${count} prompt templates`,
  501. Search: "Search Templates",
  502. Create: "Create",
  503. },
  504. Item: {
  505. Info: (count: number) => `${count} prompts`,
  506. Chat: "Chat",
  507. View: "View",
  508. Edit: "Edit",
  509. Delete: "Delete",
  510. DeleteConfirm: "Confirm to delete?",
  511. },
  512. EditModal: {
  513. Title: (readonly: boolean) =>
  514. `Edit Prompt Template ${readonly ? "(readonly)" : ""}`,
  515. Download: "Download",
  516. Clone: "Clone",
  517. },
  518. Config: {
  519. Avatar: "Bot Avatar",
  520. Name: "Bot Name",
  521. Sync: {
  522. Title: "Use Global Config",
  523. SubTitle: "Use global config in this chat",
  524. Confirm: "Confirm to override custom config with global config?",
  525. },
  526. HideContext: {
  527. Title: "Hide Context Prompts",
  528. SubTitle: "Do not show in-context prompts in chat",
  529. },
  530. Share: {
  531. Title: "Share This Mask",
  532. SubTitle: "Generate a link to this mask",
  533. Action: "Copy Link",
  534. },
  535. },
  536. },
  537. NewChat: {
  538. Return: "Return",
  539. Skip: "Just Start",
  540. Title: "Pick a Mask",
  541. SubTitle: "Chat with the Soul behind the Mask",
  542. More: "Find More",
  543. NotShow: "Never Show Again",
  544. ConfirmNoShow: "Confirm to disable?You can enable it in settings later.",
  545. },
  546. UI: {
  547. Confirm: "Confirm",
  548. Cancel: "Cancel",
  549. Close: "Close",
  550. Create: "Create",
  551. Edit: "Edit",
  552. Export: "Export",
  553. Import: "Import",
  554. Sync: "Sync",
  555. Config: "Config",
  556. },
  557. Exporter: {
  558. Description: {
  559. Title: "Only messages after clearing the context will be displayed",
  560. },
  561. Model: "Model",
  562. Messages: "Messages",
  563. Topic: "Topic",
  564. Time: "Time",
  565. },
  566. URLCommand: {
  567. Code: "Detected access code from url, confirm to apply? ",
  568. Settings: "Detected settings from url, confirm to apply?",
  569. },
  570. SdPanel: {
  571. Prompt: "Prompt",
  572. NegativePrompt: "Negative Prompt",
  573. PleaseInput: (name: string) => `Please input ${name}`,
  574. AspectRatio: "Aspect Ratio",
  575. ImageStyle: "Image Style",
  576. OutFormat: "Output Format",
  577. AIModel: "AI Model",
  578. ModelVersion: "Model Version",
  579. Submit: "Submit",
  580. ParamIsRequired: (name: string) => `${name} is required`,
  581. Styles: {
  582. D3Model: "3d-model",
  583. AnalogFilm: "analog-film",
  584. Anime: "anime",
  585. Cinematic: "cinematic",
  586. ComicBook: "comic-book",
  587. DigitalArt: "digital-art",
  588. Enhance: "enhance",
  589. FantasyArt: "fantasy-art",
  590. Isometric: "isometric",
  591. LineArt: "line-art",
  592. LowPoly: "low-poly",
  593. ModelingCompound: "modeling-compound",
  594. NeonPunk: "neon-punk",
  595. Origami: "origami",
  596. Photographic: "photographic",
  597. PixelArt: "pixel-art",
  598. TileTexture: "tile-texture",
  599. },
  600. },
  601. Sd: {
  602. SubTitle: (count: number) => `${count} images`,
  603. Actions: {
  604. Params: "See Params",
  605. Copy: "Copy Prompt",
  606. Delete: "Delete",
  607. Retry: "Retry",
  608. ReturnHome: "Return Home",
  609. History: "History",
  610. },
  611. EmptyRecord: "No images yet",
  612. Status: {
  613. Name: "Status",
  614. Success: "Success",
  615. Error: "Error",
  616. Wait: "Waiting",
  617. Running: "Running",
  618. },
  619. Danger: {
  620. Delete: "Confirm to delete?",
  621. },
  622. GenerateParams: "Generate Params",
  623. Detail: "Detail",
  624. },
  625. };
  626. export default en;