Skip to content

Commit 5af02f2

Browse files
feat: i18n
1 parent d2089d0 commit 5af02f2

File tree

21 files changed

+202
-92
lines changed

21 files changed

+202
-92
lines changed

ui/src/components/markdown/MdEditorMagnify.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
>
1010
<template #defFooters>
1111
<el-button text type="info" @click="openDialog">
12-
<AppIcon class="color-secondary" iconName="app-magnify" style="font-size: 16px"></AppIcon>
12+
<AppIcon class="color-secondary" iconName="app-magnify" style="font-size: 16px"></AppIcon>
1313
</el-button>
1414
</template>
1515
</MdEditor>
@@ -18,7 +18,7 @@
1818
<MdEditor v-model="cloneContent" :preview="false" :toolbars="[]" :footers="[]"></MdEditor>
1919
<template #footer>
2020
<div class="dialog-footer mt-24">
21-
<el-button type="primary" @click="submitDialog"> 确认</el-button>
21+
<el-button type="primary" @click="submitDialog"> {{ $t('common.confirm') }}</el-button>
2222
</div>
2323
</template>
2424
</el-dialog>

ui/src/layout/components/breadcrumb/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@
9494
<template v-if="isApplication">
9595
<div class="w-full text-left cursor" @click="openCreateDialog">
9696
<el-button link>
97-
<el-icon class="mr-4"><Plus /></el-icon> 创建应用
97+
<el-icon class="mr-4"><Plus /></el-icon>
98+
{{ $t('views.application.createApplication') }}
9899
</el-button>
99100
</div>
100101
</template>

ui/src/layout/components/top-bar/avatar/ResetPassword.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@
7575
<template #footer>
7676
<div class="dialog-footer">
7777
<el-button @click="resetPasswordDialog = false">{{
78-
$t('layout.topbar.avatar.dialog.cancel')
78+
$t('common.cancel')
7979
}}</el-button>
8080
<el-button type="primary" @click="resetPassword">
81-
{{ $t('layout.topbar.avatar.dialog.save') }}
81+
{{ $t('common.save') }}
8282
</el-button>
8383
</div>
8484
</template>

ui/src/layout/components/top-bar/avatar/SettingAPIKeyDialog.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
<template #footer>
2727
<span class="dialog-footer">
2828
<el-button @click.prevent="dialogVisible = false">{{
29-
$t('views.applicationOverview.appInfo.SettingAPIKeyDialog.cancelButtonText')
29+
$t('common.cancel')
3030
}}</el-button>
3131
<el-button type="primary" @click="submit(settingFormRef)" :loading="loading">
32-
{{ $t('views.applicationOverview.appInfo.SettingAPIKeyDialog.saveButtonText') }}
32+
{{ $t('common.save') }}
3333
</el-button>
3434
</span>
3535
</template>

ui/src/layout/components/top-bar/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
class="mr-8"
1919
>
2020
<AppIcon iconName="app-pricing" class="mr-8" style="font-size: 20px"></AppIcon>
21-
购买专业版
21+
22+
{{ $t('common.professional') }}
2223
</el-button>
2324
<el-tooltip
2425
effect="dark"

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,24 @@ export default {
1414
createSuccess: 'Create Success',
1515
copy: 'Copy',
1616
copySuccess: 'Copy Success',
17+
copyError: 'Copy Failed',
1718
save: 'Save',
1819
saveSuccess: 'Save Success',
1920
delete: 'Delete',
2021
deleteSuccess: 'Successfully deleted',
2122
setting: 'Setting',
23+
settingSuccess: 'Setting Successful',
2224
cancel: 'Cancel',
2325
confirm: 'Confirm',
2426
tip: 'Prompt',
2527
add: 'Add',
2628
refresh: 'Refresh',
2729
search: 'Search',
2830
clear: 'Clear',
29-
professional: 'Purchase the Professional Edition'
31+
professional: 'Purchase the Professional Edition',
32+
status: 'Status',
33+
createDate: 'Create date',
34+
operation: 'Operation',
3035
},
3136
login: {
3237
authentication: 'Login Authentication',

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ export default {
77
forum: "Forum for help",
88
MenuItem: {
99
application: "Application",
10-
dataset: "Knowledge base",
11-
setting: "System settings"
10+
dataset: "Knowledge",
11+
setting: "System settings",
12+
function_lib: "function library"
13+
1214
},
1315
avatar: {
1416
resetPassword: "Change password",
@@ -29,8 +31,6 @@ export default {
2931
getVerificationCode: "Get verification code",
3032
verificationCodeSentSuccess: "Verification code sent successfully",
3133
resend: "Resend",
32-
cancel: "Cancel",
33-
save: "Save",
3434
}
3535
}
3636
},

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

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,23 @@ export default {
1212
accessRestrictions: 'Access Restrictions',
1313
displaySetting: 'Display Setting',
1414
apiAccessCredentials: 'API Access Credentials',
15+
apiDocumentation: 'API Documentation',
1516
apiKey: 'API Key',
1617
refreshToken: {
1718
msgConfirm1: 'Do you want to regenerate the public access link?',
1819
msgConfirm2:
1920
'Regenerating the public access link will affect third-party embedded scripts changes and will require re-embedding the new script into third-party sites. Please proceed with caution!',
20-
confirm: 'Confirm',
21-
cancel: 'Cancel',
2221
refreshSuccess: 'Refresh Successful'
2322
},
2423
changeState: {
2524
enableSuccess: 'Enable Successful',
2625
disableSuccess: 'Disable Successful'
2726
},
2827
APIKeyDialog: {
29-
creatApiKey: 'Create',
30-
status: 'Status',
31-
creationDate: 'Creation Date',
32-
operations: 'Operations',
33-
settings: 'Settings',
34-
delete: 'Delete',
3528
saveSettings: 'Save Settings',
3629
msgConfirm1: 'Are you sure you want to delete the API Key?',
3730
msgConfirm2:
3831
'Deleting the API Key cannot be undone. Please confirm if you want to delete it!',
39-
confirmDelete: 'Delete',
40-
deleteSuccess: 'Delete Successful',
41-
cancel: 'Cancel',
4232
enabledSuccess: 'Enabled',
4333
disabledSuccess: 'Disabled'
4434
},
@@ -49,10 +39,7 @@ export default {
4939
default: 'Default Logo',
5040
custom: 'Custom',
5141
sizeTip: 'Suggested size 32*32, supports jpg, png, gif, size no more than 10 MB',
52-
cancel: 'Cancel',
53-
save: 'Save',
5442
fileSizeExceeded: 'File size exceeds 10 MB',
55-
setSuccess: 'Setting Successful',
5643
uploadImagePrompt: 'Please upload an image'
5744
},
5845
EmbedDialog: {
@@ -71,18 +58,12 @@ export default {
7158
whitelistLabel: 'Whitelist',
7259
whitelistPlaceholder:
7360
'Please enter allowed third-party source addresses, one per line, such as:\nhttp://127.0.0.1:5678\nhttps://dataease.io',
74-
cancelButtonText: 'Cancel',
75-
saveButtonText: 'Save',
76-
settingSuccessMessage: 'Setting Successful'
7761
},
7862
SettingAPIKeyDialog: {
7963
dialogTitle: 'Settings',
8064
allowCrossDomainLabel: 'Allow Cross-Domain Address',
8165
crossDomainPlaceholder:
8266
'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',
83-
cancelButtonText: 'Cancel',
84-
saveButtonText: 'Save',
85-
successMessage: 'Setting Successful'
8667
}
8768
},
8869
monitor: {

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,24 @@ export default {
1414
createSuccess: '创建成功',
1515
copy: '复制',
1616
copySuccess: '复制成功',
17+
copyError: '复制失败',
1718
save: '保存',
1819
saveSuccess: '保存成功',
1920
delete: '删除',
2021
deleteSuccess: '删除成功',
2122
setting: '设置',
23+
settingSuccess: '设置成功',
2224
cancel: '取消',
2325
confirm: '确认',
2426
tip: '提示',
2527
add: '添加',
2628
refresh: '刷新',
2729
search: '搜索',
2830
clear:'清空',
29-
professional: '购买专业版'
31+
professional: '购买专业版',
32+
status: '状态',
33+
createDate: '创建日期',
34+
operation: '操作',
3035
},
3136
login: {
3237
authentication: '登录认证',

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export default {
1212
MenuItem: {
1313
application: "应用",
1414
dataset: "知识库",
15-
setting: "系统管理"
15+
setting: "系统管理",
16+
function_lib: "函数库"
1617
},
1718
avatar: {
1819
resetPassword: "修改密码",
@@ -33,8 +34,6 @@ export default {
3334
getVerificationCode: "获取验证码",
3435
verificationCodeSentSuccess:"验证码发送成功",
3536
resend:"重新发送",
36-
cancel:"取消",
37-
save:"保存",
3837
}
3938
}
4039
},

0 commit comments

Comments
 (0)