Skip to content

Commit 65aac98

Browse files
committed
feat: i18n
1 parent 275d734 commit 65aac98

File tree

4 files changed

+186
-44
lines changed

4 files changed

+186
-44
lines changed

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

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,41 @@ export default {
5757
timesDays: 'Times/Day',
5858
whitelistLabel: 'Whitelist',
5959
whitelistPlaceholder:
60-
'Please enter allowed third-party source addresses, one per line, such as:\nhttp://127.0.0.1:5678\nhttps://dataease.io',
60+
'Please enter allowed third-party source addresses, one per line, such as:\nhttp://127.0.0.1:5678\nhttps://dataease.io'
6161
},
6262
SettingAPIKeyDialog: {
6363
dialogTitle: 'Settings',
6464
allowCrossDomainLabel: 'Allow Cross-Domain Address',
6565
crossDomainPlaceholder:
66-
'Please enter allowed cross-domain addresses, if open without inputting addresses, there are no restrictions.\nCross-domain addresses one per line, such as:\nhttp://127.0.0.1:5678\nhttps://dataease.io',
66+
'Please enter allowed cross-domain addresses, if open without inputting addresses, there are no restrictions.\nCross-domain addresses one per line, such as:\nhttp://127.0.0.1:5678\nhttps://dataease.io'
67+
},
68+
SettingDisplayDialog: {
69+
dialogTitle: 'Display Settings',
70+
showSourceLabel: 'Show Source',
71+
showExecutionDetail: 'Show Execution Detail',
72+
successMessage: 'Settings Successful',
73+
restoreDefault: 'Restore Default',
74+
customThemeColor: 'Custom Theme Color',
75+
headerTitleFontColor: 'Header Title Font Color',
76+
default: 'Default',
77+
askUserAvatar: 'Ask User Avatar',
78+
replace: 'Replace',
79+
imageMessage: 'Suggested size 32*32, supports jpg, png, gif, size no more than 10 MB',
80+
AIAvatar: 'AI Reply Avatar',
81+
floatIcon: 'Floating Icon',
82+
iconDefaultPosition: 'Icon Default Position',
83+
iconPosition: {
84+
left: 'Left',
85+
right: 'Right',
86+
bottom: 'Bottom',
87+
top: 'Top'
88+
},
89+
draggablePosition: 'Draggable Position',
90+
showHistory: 'Show History',
91+
displayGuide: 'Display guide image (floating window mode)',
92+
disclaimer: 'Disclaimer',
93+
disclaimerValue:
94+
'「The above content is generated by AI and is for reference and reference only.」'
6795
}
6896
},
6997
monitor: {

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

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,41 @@ export default {
5656
authenticationValue: '验证密码',
5757
whitelistLabel: '白名单',
5858
whitelistPlaceholder:
59-
'请输入允许嵌入第三方的源地址,一行一个,如:\nhttp://127.0.0.1:5678\nhttps://dataease.io',
59+
'请输入允许嵌入第三方的源地址,一行一个,如:\nhttp://127.0.0.1:5678\nhttps://dataease.io'
6060
},
6161
SettingAPIKeyDialog: {
6262
dialogTitle: '设置',
6363
allowCrossDomainLabel: '允许跨域地址',
6464
crossDomainPlaceholder:
6565
'请输入允许的跨域地址,开启后不输入跨域地址则不限制。\n跨域地址一行一个,如:\nhttp://127.0.0.1:5678 \nhttps://dataease.io',
6666
successMessage: '设置成功'
67+
},
68+
SettingDisplayDialog: {
69+
dialogTitle: '显示设置',
70+
showSourceLabel: '显示知识来源',
71+
showExecutionDetail: '显示执行详情',
72+
successMessage: '设置成功',
73+
restoreDefault: '恢复默认',
74+
customThemeColor: '自定义主题色',
75+
headerTitleFontColor: '头部标题字体颜色',
76+
default: '默认',
77+
askUserAvatar: '提问用户头像',
78+
replace: '替换',
79+
imageMessage: '建议尺寸 32*32,支持 JPG、PNG、GIF,大小不超过 10 MB',
80+
AIAvatar: 'AI 回复头像',
81+
floatIcon: '浮窗入口图标',
82+
iconDefaultPosition: '图标默认位置',
83+
iconPosition: {
84+
left: '左',
85+
right: '右',
86+
bottom: '下',
87+
top: '上'
88+
},
89+
draggablePosition: '可拖拽位置',
90+
showHistory: '显示历史记录',
91+
displayGuide: '显示引导图(浮窗模式)',
92+
disclaimer: '免责声明',
93+
disclaimerValue: '「以上内容均由 AI 生成,仅供参考和借鉴」'
6794
}
6895
},
6996
monitor: {

ui/src/views/application-overview/component/DisplaySettingDialog.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<el-dialog
3-
title="显示设置"
3+
:title="$t('views.applicationOverview.appInfo.DisplaySettingDialog.dialogTitle')"
44
v-model="dialogVisible"
55
:close-on-click-modal="false"
66
:close-on-press-escape="false"
@@ -10,16 +10,18 @@
1010
<el-space direction="vertical" alignment="start">
1111
<el-checkbox
1212
v-model="form.show_source"
13-
:label="isWorkFlow(detail.type) ? '显示执行详情' : '显示知识来源'"
13+
:label="
14+
isWorkFlow(detail.type)
15+
? $t('views.applicationOverview.appInfo.DisplaySettingDialog.showExecutionDetail')
16+
: $t('views.applicationOverview.appInfo.DisplaySettingDialog.showSourceLabel')
17+
"
1418
/>
1519
</el-space>
1620
</el-form-item>
1721
</el-form>
1822
<template #footer>
1923
<span class="dialog-footer">
20-
<el-button @click.prevent="dialogVisible = false"
21-
>{{ $t('common.cancel') }}
22-
</el-button>
24+
<el-button @click.prevent="dialogVisible = false">{{ $t('common.cancel') }} </el-button>
2325
<el-button type="primary" @click="submit(displayFormRef)" :loading="loading">
2426
{{ $t('common.save') }}
2527
</el-button>
@@ -43,7 +45,6 @@ const {
4345
4446
const emit = defineEmits(['refresh'])
4547
46-
4748
const displayFormRef = ref()
4849
const form = ref<any>({
4950
show_source: false

0 commit comments

Comments
 (0)