chore: better i18n

This commit is contained in:
josc146
2023-03-29 21:27:46 +08:00
parent 89c8995048
commit d16b318093
6 changed files with 36 additions and 37 deletions
+9 -10
View File
@@ -18,26 +18,25 @@
"Custom ChatGPT Web API Url": "Custom ChatGPT Web API Url",
"Custom ChatGPT Web API Path": "Custom ChatGPT Web API Path",
"Custom OpenAI API Url": "Custom OpenAI API Url",
"Custom Site Regex:": "Custom Site Regex:",
"Exclusively use Custom Site Regex for website matching,": "Exclusively use Custom Site Regex for website matching,",
"ignoring built-in rules": "ignoring built-in rules",
"Input Query:": "Input Query:",
"Append Query:": "Append Query:",
"Prepend Query:": "Prepend Query:",
"Custom Site Regex": "Custom Site Regex",
"Exclusively use Custom Site Regex for website matching, ignoring built-in rules": "Exclusively use Custom Site Regex for website matching, ignoring built-in rules",
"Input Query": "Input Query",
"Append Query": "Append Query",
"Prepend Query": "Prepend Query",
"Wechat Pay": "Wechat Pay",
"Type your question here\nEnter to send, shift + enter to break line": "Type your question here\nEnter to send, shift + enter to break line",
"Wait for the answer to finish and then continue here": "Wait for the answer to finish and then continue here",
"Ask ChatGPT": "Ask ChatGPT",
"No Input Found": "No Input Found",
"You:": "You:",
"You": "You",
"Collapse": "Collapse",
"Expand": "Expand",
"Stop": "Stop",
"Continue on official website": "Continue on official website",
"Error:": "Error:",
"Error": "Error",
"Copy": "Copy",
"Question:": "Question:",
"Answer:": "Answer:",
"Question": "Question",
"Answer": "Answer",
"Waiting for response...": "Waiting for response...",
"Close the Window": "Close the Window",
"Pin the Window": "Pin the Window",
+9 -10
View File
@@ -18,26 +18,25 @@
"Custom ChatGPT Web API Url": "自定义的ChatGPT网页API地址",
"Custom ChatGPT Web API Path": "自定义的ChatGPT网页API路径",
"Custom OpenAI API Url": "自定义的OpenAI API地址",
"Custom Site Regex:": "自定义站点正则匹配:",
"Exclusively use Custom Site Regex for website matching,": "只使用自定义站点正则匹配,",
"ignoring built-in rules": "忽略内置站点规则",
"Input Query:": "输入的查询选择器:",
"Append Query:": "挂载到末尾的查询选择器:",
"Prepend Query:": "插入到开头的查询选择器:",
"Custom Site Regex": "自定义站点正则匹配",
"Exclusively use Custom Site Regex for website matching, ignoring built-in rules": "只使用自定义站点正则匹配, 忽略内置站点规则",
"Input Query": "输入的查询选择器",
"Append Query": "挂载到末尾的查询选择器",
"Prepend Query": "插入到开头的查询选择器",
"Wechat Pay": "微信打赏",
"Type your question here\nEnter to send, shift + enter to break line": "在此输入你的问题\n回车 发送, shift+回车 换行",
"Wait for the answer to finish and then continue here": "等待回答完成, 然后在此继续",
"Ask ChatGPT": "询问ChatGPT",
"No Input Found": "无输入",
"You:": "你:",
"You": "你",
"Collapse": "折叠",
"Expand": "展开",
"Stop": "停止",
"Continue on official website": "在官网继续",
"Error:": "错误:",
"Error": "错误",
"Copy": "复制",
"Question:": "问题:",
"Answer:": "回答:",
"Question": "问题",
"Answer": "回答",
"Waiting for response...": "等待响应...",
"Close the Window": "关闭窗口",
"Pin the Window": "固定窗口",
+9 -10
View File
@@ -18,26 +18,25 @@
"Custom ChatGPT Web API Url": "自定義的ChatGPT網頁API地址",
"Custom ChatGPT Web API Path": "自定義的ChatGPT網頁API路徑",
"Custom OpenAI API Url": "自定義的OpenAI API地址",
"Custom Site Regex:": "自定義站點正則匹配:",
"Exclusively use Custom Site Regex for website matching,": "只使用自定義站點正則匹配,",
"ignoring built-in rules": "忽略內置站點規則",
"Input Query:": "輸入的查詢選擇器:",
"Append Query:": "掛載到末尾的查詢選擇器:",
"Prepend Query:": "插入到開頭的查詢選擇器:",
"Custom Site Regex": "自定義站點正則匹配",
"Exclusively use Custom Site Regex for website matching, ignoring built-in rules": "只使用自定義站點正則匹配, 忽略內置站點規則",
"Input Query": "輸入的查詢選擇器",
"Append Query": "掛載到末尾的查詢選擇器",
"Prepend Query": "插入到開頭的查詢選擇器",
"Wechat Pay": "微信打賞",
"Type your question here\nEnter to send, shift + enter to break line": "在此輸入你的問題\n回車 發送, shift+回車 換行",
"Wait for the answer to finish and then continue here": "等待回答完成, 然後在此繼續",
"Ask ChatGPT": "詢問ChatGPT",
"No Input Found": "無輸入",
"You:": "你:",
"You": "你",
"Collapse": "折疊",
"Expand": "展開",
"Stop": "停止",
"Continue on official website": "在官網繼續",
"Error:": "錯誤:",
"Error": "錯誤",
"Copy": "復製",
"Question:": "問題:",
"Answer:": "回答:",
"Question": "問題",
"Answer": "回答",
"Waiting for response...": "等待響應...",
"Close the Window": "關閉窗口",
"Pin the Window": "固定窗口",
+3 -1
View File
@@ -230,7 +230,9 @@ function ConversationCard(props) {
onClick={() => {
let output = ''
session.conversationRecords.forEach((data) => {
output += `Question:\n\n${data.question}\n\nAnswer:\n\n${data.answer}\n\n<hr/>\n\n`
output += `${t('Question')}:\n\n${data.question}\n\n${t('Answer')}:\n\n${
data.answer
}\n\n<hr/>\n\n`
})
const blob = new Blob([output], { type: 'text/plain;charset=utf-8' })
FileSaver.saveAs(blob, 'conversation.md')
+2 -2
View File
@@ -15,7 +15,7 @@ export function ConversationItem({ type, content, session, done, port }) {
return (
<div className={type} dir="auto">
<div className="gpt-header">
<p>{t('You:')}</p>
<p>{t('You')}:</p>
<div style="display: flex; gap: 15px;">
<CopyButton contentFn={() => content} size={14} />
{!collapsed ? (
@@ -104,7 +104,7 @@ export function ConversationItem({ type, content, session, done, port }) {
return (
<div className={type} dir="auto">
<div className="gpt-header">
<p>{t('Error:')}</p>
<p>{t('Error')}:</p>
<div style="display: flex; gap: 15px;">
<CopyButton contentFn={() => content} size={14} />
{!collapsed ? (
+4 -4
View File
@@ -288,7 +288,7 @@ function AdvancedPart({ config, updateConfig }) {
/>
</label>
<label>
{t('Custom Site Regex:')}
{t('Custom Site Regex')}
<input
type="text"
value={config.siteRegex}
@@ -311,7 +311,7 @@ function AdvancedPart({ config, updateConfig }) {
</label>
<br />
<label>
{t('Input Query:')}
{t('Input Query')}
<input
type="text"
value={config.inputQuery}
@@ -322,7 +322,7 @@ function AdvancedPart({ config, updateConfig }) {
/>
</label>
<label>
{t('Append Query:')}
{t('Append Query')}
<input
type="text"
value={config.appendQuery}
@@ -333,7 +333,7 @@ function AdvancedPart({ config, updateConfig }) {
/>
</label>
<label>
{t('Prepend Query:')}
{t('Prepend Query')}
<input
type="text"
value={config.prependQuery}