Skip to content

Commit dedc8c0

Browse files
committed
feat: i18n
1 parent 557c077 commit dedc8c0

File tree

8 files changed

+281
-67
lines changed

8 files changed

+281
-67
lines changed

ui/src/locales/lang/en-US/ai-chat.ts

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,92 @@ export default {
77
exportRecords: 'Export Chat Records',
88
chatId: 'Chat ID',
99
userInput: 'User Input',
10+
quote: 'Quote',
11+
download: 'Click to Download File',
1012
passwordValidator: {
1113
title: 'Enter password to open the link',
1214
errorMessage1: 'Password cannot be empty',
1315
errorMessage2: 'Incorrect password'
1416
},
17+
operation: {
18+
play: 'Click to Play',
19+
pause: 'Stop',
20+
regeneration: 'Regenerate Answer',
21+
like: 'Like',
22+
cancelLike: 'Cancel Like',
23+
oppose: 'Dislike',
24+
cancelOppose: 'Cancel Dislike',
25+
continue: 'Continue',
26+
stopChat: 'Stop Answering'
27+
},
1528
tip: {
1629
error500Message: 'Sorry, the service is currently under maintenance. Please try again later!',
1730
errorIdentifyMessage: 'Unable to identify user',
1831
errorLimitMessage:
19-
'Sorry, you have reached the maximum number of questions. Please try again tomorrow!'
32+
'Sorry, you have reached the maximum number of questions. Please try again tomorrow!',
33+
answerMessage:
34+
'Sorry, no relevant content was found. Please rephrase your question or provide more information.',
35+
stopAnswer: 'Answering stopped',
36+
answerLoading: 'Answering',
37+
recorderTip: `<p>This feature requires the use of a microphone. Browsers prohibit recording on insecure pages. Solutions are as follows:<br/>
38+
1. Enable HTTPS to resolve;<br/>
39+
2. If there is no HTTPS configuration, modify the browser security settings. Chrome settings as follows:<br/>
40+
(1) Enter chrome://flags/#unsafely-treat-insecure-origin-as-secure in the address bar;<br/>
41+
(2) Add the HTTP site to the text box, e.g., http://127.0.0.1:8080.</p>`,
42+
recorderError: 'Recording failed',
43+
confirm: 'I understand',
44+
requiredMessage: 'Please fill in all required fields',
45+
inputParamMessage1: 'Please enter parameters in the URL',
46+
inputParamMessage2: 'value',
47+
prologueMessage: 'Sorry, the service is currently under maintenance. Please try again later!'
48+
},
49+
inputPlaceholder: {
50+
speaking: 'Speaking',
51+
recorderLoading: 'Transcribing',
52+
default: 'Enter your question, Ctrl+Enter for new line, Enter to send'
53+
},
54+
uploadFile: {
55+
label: 'Upload File',
56+
most: 'Up to',
57+
limit: 'files, each file limited to',
58+
fileType: 'File Type',
59+
tipMessage: 'Please select file types in the file upload configuration',
60+
limitMessage1: 'Up to',
61+
limitMessage2: 'files',
62+
sizeLimit: 'Each file size cannot exceed',
63+
imageMessage: 'Please parse the image content',
64+
errorMessage: 'Upload failed'
2065
},
2166
executionDetails: {
2267
title: 'Execution Details',
2368
paramInput: 'Parameter Input',
24-
paramOutput: 'Parameter Output'
69+
paramOutput: 'Parameter Output',
70+
paramOutputTooltip: 'Each document supports preview of up to 500 characters',
71+
audioFile: 'Audio File',
72+
searchContent: 'Search Content',
73+
searchResult: 'Search Results',
74+
conditionResult: 'Condition Result',
75+
currentChat: 'Current Conversation',
76+
answer: 'AI Response',
77+
replyContent: 'Reply Content',
78+
textContent: 'Text Content',
79+
input: 'Input',
80+
output: 'Output',
81+
rerankerContent: 'Reranked Content',
82+
rerankerResult: 'Reranked Results',
83+
paragraph: 'Paragraph',
84+
noSubmit: 'User did not submit',
85+
errMessage: 'Error Log'
2586
},
2687
KnowledgeSource: {
2788
title: 'Knowledge Source',
2889
referenceParagraph: 'Referenced Paragraph',
2990
consume: 'Consumption',
3091
consumeTime: 'Time Consumed'
92+
},
93+
paragraphSource: {
94+
title: 'Knowledge Base Reference',
95+
question: 'User Question',
96+
optimizationQuestion: 'Optimized Question'
3197
}
3298
}

ui/src/locales/lang/en-US/views/dataset.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,27 @@ export default {
5858
label: 'Selector',
5959
placeholder: 'Default is body, can input .classname/#idname/tagname'
6060
}
61-
},
61+
}
62+
},
63+
ResultSuccess: {
64+
title: 'Knowledge Base Created Successfully',
65+
paragraph: 'Paragraphs',
66+
paragraph_count: 'Paragraphs',
67+
documentList: 'Document List',
68+
loading: 'Importing',
69+
buttons: {
70+
toDataset: 'Return to Knowledge Base List',
71+
toDocument: 'Go to Document'
72+
}
73+
},
74+
syncWeb: {
75+
title: 'Sync Knowledge Base',
76+
syncMethod: 'Sync Method',
77+
replace: 'Replace Sync',
78+
replaceText: 'Re-fetch Web site documents, replacing the documents in the local knowledge base',
79+
complete: 'Full Sync',
80+
completeText:
81+
'Delete all documents in the local knowledge base and re-fetch Web site documents',
82+
tip: 'Note: All syncs will delete existing data and re-fetch new data. Please proceed with caution.'
6283
}
6384
}
Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
import notFound from './404'
2-
import application from './application';
3-
import applicationOverview from './application-overview';
4-
import dataset from './dataset';
5-
import system from './system';
6-
import functionLib from './function-lib';
7-
import user from './user';
8-
import team from './team';
9-
import template from './template';
10-
import document from './document';
11-
import paragraph from './paragraph';
12-
import problem from './problem';
13-
import log from './log';
14-
import applicationWorkflow from './application-workflow';
15-
2+
import application from './application'
3+
import applicationOverview from './application-overview'
4+
import dataset from './dataset'
5+
import system from './system'
6+
import functionLib from './function-lib'
7+
import user from './user'
8+
import team from './team'
9+
import template from './template'
10+
import document from './document'
11+
import paragraph from './paragraph'
12+
import problem from './problem'
13+
import log from './log'
14+
import applicationWorkflow from './application-workflow'
15+
import login from './login'
1616
export default {
17-
notFound,
18-
application,
19-
applicationOverview,
20-
system,
21-
functionLib,
22-
user,
23-
team,
24-
template,
25-
dataset,
26-
applicationWorkflow,
27-
document,
28-
paragraph,
29-
problem,
30-
log,
17+
notFound,
18+
application,
19+
applicationOverview,
20+
system,
21+
functionLib,
22+
user,
23+
team,
24+
template,
25+
dataset,
26+
applicationWorkflow,
27+
document,
28+
paragraph,
29+
problem,
30+
log,
31+
login
3132
}
Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
export default {
2-
jump_tip: 'Jumping to the authentication source page for authentication',
3-
jump: 'Jump'
2+
title: 'Login',
3+
jump_tip: 'You will be redirected to the authentication source page for authentication',
4+
jump: 'Redirect',
5+
resetPassword: 'Reset Password',
6+
forgotPassword: 'Forgot Password',
7+
userRegister: 'User Registration',
8+
buttons: {
9+
login: 'Login',
10+
register: 'Register',
11+
backLogin: 'Back to Login',
12+
checkCode: 'Verify Now'
13+
},
14+
newPassword: 'New Password',
15+
enterPassword: 'Please enter your new password',
16+
useEmail: 'Use Email',
17+
moreMethod: 'More Login Methods',
18+
verificationCode: {
19+
placeholder: 'Please enter the verification code',
20+
getVerificationCode: 'Get Verification Code',
21+
successMessage: 'Verification code sent successfully',
22+
resend: 'Resend'
23+
}
424
}

ui/src/locales/lang/zh-Hant/ai-chat.ts

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,90 @@ export default {
77
exportRecords: '導出聊天記錄',
88
chatId: '對話ID',
99
userInput: '用戶輸入',
10+
quote: '引用',
11+
download: '點擊下載文件',
1012
passwordValidator: {
1113
title: '請輸入密碼打開連結',
1214
errorMessage1: '密碼不能為空',
1315
errorMessage2: '密碼錯誤'
1416
},
17+
operation: {
18+
play: '點擊播放',
19+
pause: '停止',
20+
regeneration: '換個答案',
21+
like: '贊同',
22+
cancelLike: '取消贊同',
23+
oppose: '反對',
24+
cancelOppose: '取消反對',
25+
continue: '繼續',
26+
stopChat: '停止回答'
27+
},
1528
tip: {
1629
error500Message: '抱歉,當前正在維護,無法提供服務,請稍後再試!',
1730
errorIdentifyMessage: '無法識別用戶身份',
18-
errorLimitMessage: '抱歉,您的提問已達最大限制,請明天再來吧!'
31+
errorLimitMessage: '抱歉,您的提問已達最大限制,請明天再來吧!',
32+
answerMessage: '抱歉,沒有查找到相關內容,請重新描述您的問題或提供更多資訊。',
33+
stopAnswer: '已停止回答',
34+
answerLoading: '回答中',
35+
recorderTip: `<p>該功能需要使用麥克風,瀏覽器禁止不安全頁面錄音,解決方案如下:<br/>
36+
1、可開啟 https 解決;<br/>
37+
2、若無 https 配置則需要修改瀏覽器安全配置,Chrome 設定如下:<br/>
38+
(1) 地址欄輸入 chrome://flags/#unsafely-treat-insecure-origin-as-secure;<br/>
39+
(2) 將 http 站點配置在文字框中,例如: http://127.0.0.1:8080。</p>`,
40+
recorderError: '錄音失敗',
41+
confirm: '我知道了',
42+
requiredMessage: '請填寫所有必填欄位',
43+
inputParamMessage1: '請在 URL 中填寫參數',
44+
inputParamMessage2: '的值',
45+
prologueMessage: '抱歉,當前正在維護,無法提供服務,請稍後再試!'
46+
},
47+
inputPlaceholder: {
48+
speaking: '說話中',
49+
recorderLoading: '轉文字中',
50+
default: '請輸入問題,Ctrl+Enter 換行,Enter 發送'
51+
},
52+
uploadFile: {
53+
label: '上傳文件',
54+
most: '最多',
55+
limit: '個,每個文件限制',
56+
fileType: '文件類型',
57+
tipMessage: '請在文件上傳配置中選擇文件類型',
58+
limitMessage1: '最多上傳',
59+
limitMessage2: '個文件',
60+
sizeLimit: '單個文件大小不能超過',
61+
imageMessage: '請解析圖片內容',
62+
errorMessage: '上傳失敗'
1963
},
2064
executionDetails: {
2165
title: '執行詳細',
2266
paramInput: '參數輸入',
23-
paramOutput: '參數輸出'
67+
paramOutput: '參數輸出',
68+
paramOutputTooltip: '每個文件僅支持預覽 500 字',
69+
audioFile: '語音文件',
70+
searchContent: '檢索內容',
71+
searchResult: '檢索結果',
72+
conditionResult: '判斷結果',
73+
currentChat: '本次對話',
74+
answer: 'AI 回答',
75+
replyContent: '回覆內容',
76+
textContent: '文本內容',
77+
input: '輸入',
78+
output: '輸出',
79+
rerankerContent: '重排內容',
80+
rerankerResult: '重排結果',
81+
paragraph: '段落',
82+
noSubmit: '用戶未提交',
83+
errMessage: '錯誤日誌'
2484
},
2585
KnowledgeSource: {
2686
title: '知識來源',
27-
referenceParagraph: '引用分段',
87+
referenceParagraph: '引用段落',
2888
consume: '消耗',
2989
consumeTime: '耗時'
90+
},
91+
paragraphSource: {
92+
title: '知識庫引用',
93+
question: '用戶問題',
94+
optimizationQuestion: '優化後問題'
3095
}
3196
}

ui/src/locales/lang/zh-Hant/views/dataset.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,26 @@ export default {
5656
label: '選擇器',
5757
placeholder: '預設為 body,可輸入 .classname/#idname/tagname'
5858
}
59-
},
59+
}
60+
},
61+
ResultSuccess: {
62+
title: '知識庫建立成功',
63+
paragraph: '段落',
64+
paragraph_count: '個段落',
65+
documentList: '文件列表',
66+
loading: '正在導入',
67+
buttons: {
68+
toDataset: '返回知識庫列表',
69+
toDocument: '前往文件'
70+
}
71+
},
72+
syncWeb: {
73+
title: '同步知識庫',
74+
syncMethod: '同步方式',
75+
replace: '替換同步',
76+
replaceText: '重新獲取 Web 站點文件,覆蓋替換本地知識庫中的文件',
77+
complete: '完整同步',
78+
completeText: '先刪除本地知識庫所有文件,重新獲取 Web 站點文件',
79+
tip: '注意:所有同步都會刪除現有數據並重新獲取新數據,請謹慎操作。'
6080
}
6181
}
Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
import notFound from './404'
2-
import application from './application';
3-
import applicationOverview from './application-overview';
4-
import dataset from './dataset';
5-
import system from './system';
6-
import functionLib from './function-lib';
7-
import user from './user';
8-
import team from './team';
9-
import template from './template';
10-
import document from './document';
11-
import paragraph from './paragraph';
12-
import problem from './problem';
13-
import log from './log';
14-
import applicationWorkflow from './application-workflow';
15-
2+
import application from './application'
3+
import applicationOverview from './application-overview'
4+
import dataset from './dataset'
5+
import system from './system'
6+
import functionLib from './function-lib'
7+
import user from './user'
8+
import team from './team'
9+
import template from './template'
10+
import document from './document'
11+
import paragraph from './paragraph'
12+
import problem from './problem'
13+
import log from './log'
14+
import applicationWorkflow from './application-workflow'
15+
import login from './login'
1616
export default {
17-
notFound,
18-
application,
19-
applicationOverview,
20-
system,
21-
functionLib,
22-
user,
23-
team,
24-
template,
25-
dataset,
26-
applicationWorkflow,
27-
document,
28-
paragraph,
29-
problem,
30-
log,
17+
notFound,
18+
application,
19+
applicationOverview,
20+
system,
21+
functionLib,
22+
user,
23+
team,
24+
template,
25+
dataset,
26+
applicationWorkflow,
27+
document,
28+
paragraph,
29+
problem,
30+
log,
31+
login
3132
}

0 commit comments

Comments
 (0)