Skip to content

Commit ab597af

Browse files
feat: i18n
1 parent 65896cf commit ab597af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+413
-281
lines changed

ui/src/components/ai-chat/component/chat-input-operate/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ const startRecording = async () => {
395395
},
396396
(err: any) => {
397397
MsgAlert(
398-
`提示`,
398+
t('common.tip'),
399399
`<p>该功能需要使用麦克风,浏览器禁止不安全页面录音,解决方案如下:<br/>
400400
1、可开启 https 解决;<br/>
401401
2、若无 https 配置则需要修改浏览器安全配置,Chrome 设置如下:<br/>
@@ -412,7 +412,7 @@ const startRecording = async () => {
412412
)
413413
} catch (error) {
414414
MsgAlert(
415-
`提示`,
415+
t('common.tip'),
416416
`<p>该功能需要使用麦克风,浏览器禁止不安全页面录音,解决方案如下:<br/>
417417
1、可开启 https 解决;<br/>
418418
2、若无 https 配置则需要修改浏览器安全配置,Chrome 设置如下:<br/>

ui/src/components/app-table/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
clearable
1616
/>
1717

18-
<el-button type="primary" @click="submitHandle" :disabled="loading">创建</el-button>
19-
<el-button @click="showInput = false" :disabled="loading">取消</el-button>
18+
<el-button type="primary" @click="submitHandle" :disabled="loading">{{$t('common.create')}}</el-button>
19+
<el-button @click="showInput = false" :disabled="loading">{{$t('common.cancel')}}</el-button>
2020
</div>
2121
<div v-else @click="quickCreateHandle" class="w-full">
2222
<el-button type="primary" link class="quich-button">

ui/src/components/dynamics-form/items/JsonInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
/>
3232
<template #footer>
3333
<div class="dialog-footer mt-24">
34-
<el-button type="primary" @click="submitDialog"> 确认</el-button>
34+
<el-button type="primary" @click="submitDialog"> {{ $t('common.confirm') }}</el-button>
3535
</div>
3636
</template>
3737
</el-dialog>

ui/src/components/dynamics-form/items/complex/ArrayObjectCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
v-bind="attr"
1515
:parent_field="formField.field + '.' + index"
1616
></DynamicsForm>
17-
<el-tooltip effect="dark" content="删除" placement="top">
17+
<el-tooltip effect="dark" :content="$t('common.delete')" placement="top">
1818
<el-button text @click.stop="deleteDataset(item)" class="delete-button">
1919
<el-icon><Delete /></el-icon>
2020
</el-button>

ui/src/components/generate-related-dialog/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
</div>
4242
<template #footer>
4343
<span class="dialog-footer">
44-
<el-button @click.prevent="dialogVisible = false"> 取消 </el-button>
44+
<el-button @click.prevent="dialogVisible = false"> {{ $t('common.cancel') }} </el-button>
4545
<el-button type="primary" @click="submitHandle(FormRef)" :disabled="!model || loading">
46-
确定
46+
{{ $t('common.confirm') }}
4747
</el-button>
4848
</span>
4949
</template>

ui/src/locales/lang/en_US/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export default {
2323
settingSuccess: 'Setting Successful',
2424
submit: 'Submit',
2525
submitSuccess: 'Submitted successfully',
26+
edit: 'Edit',
27+
editSuccess: 'Edit Successful',
2628
cancel: 'Cancel',
2729
confirm: 'Confirm',
2830
tip: 'Prompt',
@@ -40,8 +42,11 @@ export default {
4042
exportSuccess: 'Export successful',
4143
unavailable: '(Unavailable)',
4244
public: 'Public',
45+
private: 'Private',
4346
paramSetting: 'Parameter Settings',
44-
edit: 'Edit',
47+
creator: 'Creator',
48+
debug: 'Debug',
49+
modify: 'Modify',
4550
},
4651

4752
}

ui/src/locales/lang/en_US/views/application.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ export default {
33
createApplication: 'Create Application',
44
importApplication: 'Import Application',
55
copyApplication: 'Copy Application',
6-
creator: 'Creator',
76
workflow: 'WORKFLOW',
87
simple: 'SIMPLE',
98
searchBar: {
@@ -29,7 +28,8 @@ export default {
2928
applicationForm: {
3029
title: {
3130
info: 'Application Information',
32-
apptest: 'Debug Preview'
31+
apptest: 'Debug Preview',
32+
copy: 'copy'
3333
},
3434
form: {
3535
appName: {
@@ -136,8 +136,7 @@ export default {
136136
'Hello, I am XXX Assistant. My knowledge base only contains information related to XXX products. Please rephrase your question.',
137137
defaultPrompt1:
138138
"The content inside the parentheses () represents the user's question. Based on the context, please speculate and complete the user's question ({question}). The requirement is to output a completed question and place it",
139-
defaultPrompt2: 'tag',
140-
copy: 'copy'
139+
defaultPrompt2: 'tag'
141140
}
142141
},
143142
applicationAccess: {

ui/src/locales/lang/zh_CN/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ export default {
2323
settingSuccess: '设置成功',
2424
submit: '提交',
2525
submitSuccess: '提交成功',
26+
edit: '编辑',
27+
editSuccess: '编辑成功',
2628
cancel: '取消',
27-
confirm: '确认',
29+
confirm: '确定',
2830
tip: '提示',
2931
add: '添加',
3032
refresh: '刷新',
@@ -40,7 +42,10 @@ export default {
4042
exportSuccess: '导出成功',
4143
unavailable: '(不可用)',
4244
public: '公用',
45+
private: '私有',
4346
paramSetting: '参数设置',
44-
edit: '编辑'
47+
creator: '创建者',
48+
debug: '调试',
49+
modify: '修改'
4550
}
4651
}

ui/src/locales/lang/zh_CN/views/application.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ export default {
33
createApplication: '创建应用',
44
importApplication: '导入应用',
55
copyApplication: '复制应用',
6-
creator: '创建者',
76
workflow: '高级编排',
87
simple: '简单配置',
98
searchBar: {
@@ -25,7 +24,8 @@ export default {
2524
applicationForm: {
2625
title: {
2726
info: '应用信息',
28-
apptest: '调试预览'
27+
apptest: '调试预览',
28+
copy: '副本'
2929
},
3030
form: {
3131
appName: {
@@ -130,9 +130,7 @@ export default {
130130
'你好,我是 XXX 小助手,我的知识库只包含了 XXX 产品相关知识,请重新描述您的问题。',
131131
defaultPrompt1:
132132
'()里面是用户问题,根据上下文回答揣测用户问题({question}) 要求: 输出一个补全问题,并且放在',
133-
defaultPrompt2: '标签中',
134-
135-
copy: '副本'
133+
defaultPrompt2: '标签中'
136134
}
137135
},
138136
applicationAccess: {

ui/src/locales/lang/zh_CN/views/dataset.ts

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export default {
22
title: '知识库',
33
createDataset: '创建知识库',
4-
creator: '创建者',
54
general: '通用型',
65
web: 'web 站点',
76
relatedApplications: '关联应用',
@@ -62,34 +61,7 @@ export default {
6261
buttons: {},
6362

6463
dialog: {
65-
addDataset: '添加关联知识库',
66-
addDatasetPlaceholder: '所选知识库必须使用相同的 Embedding 模型',
67-
selected: '已选',
68-
countDataset: '个知识库',
69-
70-
selectSearchMode: '检索模式',
71-
vectorSearch: '向量检索',
72-
vectorSearchTooltip: '向量检索是一种基于向量相似度的检索方式,适用于知识库中的大数据量场景。',
73-
fullTextSearch: '全文检索',
74-
fullTextSearchTooltip:
75-
'全文检索是一种基于文本相似度的检索方式,适用于知识库中的小数据量场景。',
76-
hybridSearch: '混合检索',
77-
hybridSearchTooltip:
78-
'混合检索是一种基于向量和文本相似度的检索方式,适用于知识库中的中等数据量场景。',
79-
similarityThreshold: '相似度高于',
80-
similarityTooltip: '相似度越高相关性越强。',
81-
topReferences: '引用分段数 TOP',
82-
maxCharacters: '最多引用字符数',
83-
noReferencesAction: '无引用知识库分段时',
84-
continueQuestioning: '继续向 AI 模型提问',
85-
provideAnswer: '指定回答内容',
86-
designated_answer:
87-
'你好,我是 XXX 小助手,我的知识库只包含了 XXX 产品相关知识,请重新描述您的问题。',
88-
defaultPrompt1:
89-
'()里面是用户问题,根据上下文回答揣测用户问题({question}) 要求: 输出一个补全问题,并且放在',
90-
defaultPrompt2: '标签中',
91-
92-
copy: '副本'
64+
9365
}
9466
}
9567
}

0 commit comments

Comments
 (0)