Skip to content

Commit a9cc341

Browse files
feat: about i18n
1 parent 2972353 commit a9cc341

File tree

8 files changed

+59
-38
lines changed

8 files changed

+59
-38
lines changed

ui/src/layout/components/app-header/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="app-header" :class="!isDefaultTheme ? 'custom-header' : ''">
33
<el-alert
44
v-if="user.isExpire()"
5-
title="未上传 License 或 License 已过期。"
5+
:title="$t('layout.isExpire')"
66
type="warning"
77
class="border-b"
88
show-icon

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<template v-else-if="isDataset">
103103
<div class="w-full text-left cursor" @click="openCreateDialog">
104104
<el-button link>
105-
<el-icon class="mr-4"><Plus /></el-icon> 创建知识库
105+
<el-icon class="mr-4"><Plus /></el-icon> {{ $t('views.dataset.createDataset') }}
106106
</el-button>
107107
</div>
108108
</template>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<template>
22
<el-dialog
3-
:title="$t('layout.avatar.apiKey')"
3+
:title="$t('layout.apiKey')"
44
v-model="dialogVisible"
55
width="800"
66
:close-on-click-modal="false"
77
:close-on-press-escape="false"
88
>
99
<el-card shadow="never" class="layout-bg mb-16">
1010
<el-text type="info" class="color-secondary">{{
11-
$t('layout.avatar.apiServiceAddress')
11+
$t('layout.apiServiceAddress')
1212
}}</el-text>
1313
<p style="margin-top: 10px">
1414
<span class="vertical-middle lighter break-all">

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
</template>
1212
<div class="about-ui" v-loading="loading">
1313
<div class="flex">
14-
<span class="label">授权给</span><span>{{ licenseInfo?.corporation || '-' }}</span>
14+
<span class="label">{{ $t('layout.about.authorize') }}</span><span>{{ licenseInfo?.corporation || '-' }}</span>
1515
</div>
1616
<div class="flex">
17-
<span class="label">到期时间</span>
17+
<span class="label">{{ $t('layout.about.expiredTime') }}</span>
1818
<span
1919
>{{ licenseInfo?.expired || '-' }}
2020
<span class="danger" v-if="licenseInfo?.expired && fromNowDate(licenseInfo?.expired)"
@@ -23,16 +23,16 @@
2323
>
2424
</div>
2525
<div class="flex">
26-
<span class="label">版本</span><span>{{ user.showXpack() ? '专业版' : '社区版' }}</span>
26+
<span class="label">{{ $t('layout.about.edition') }}</span><span>{{ user.showXpack() ? '专业版' : '社区版' }}</span>
2727
</div>
2828
<div class="flex">
29-
<span class="label">版本号</span><span>{{ user.version }}</span>
29+
<span class="label">{{ $t('layout.about.version') }}</span><span>{{ user.version }}</span>
3030
</div>
3131
<div class="flex">
32-
<span class="label">序列号</span><span>{{ licenseInfo?.serialNo || '-' }}</span>
32+
<span class="label">{{ $t('layout.about.serialNo') }}</span><span>{{ licenseInfo?.serialNo || '-' }}</span>
3333
</div>
3434
<div class="flex">
35-
<span class="label">备注</span><span>{{ licenseInfo?.remark || '-' }}</span>
35+
<span class="label">{{ $t('layout.about.remark') }}</span><span>{{ licenseInfo?.remark || '-' }}</span>
3636
</div>
3737
<div class="mt-16 flex align-center" v-if="user.showXpack()">
3838
<el-upload
@@ -43,7 +43,7 @@
4343
:on-change="onChange"
4444
v-hasPermission="new Role('ADMIN')"
4545
>
46-
<el-button class="border-primary mr-16">更新 License</el-button>
46+
<el-button class="border-primary mr-16">{{ $t('layout.about.update') }} License</el-button>
4747
</el-upload>
4848
</div>
4949
</div>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</el-dropdown-item>
2626
<div v-hasPermission="new ComplexPermission([], ['x-pack'], 'OR')">
2727
<el-dropdown-item class="border-t p-8" @click="openAPIKeyDialog">
28-
{{ $t('layout.avatar.apiKey') }}
28+
{{ $t('layout.apiKey') }}
2929
</el-dropdown-item>
3030
</div>
3131
<el-dropdown-item class="border-t" style="padding: 0" @click.stop>
@@ -60,11 +60,11 @@
6060
</el-dropdown>
6161
</el-dropdown-item>
6262
<el-dropdown-item class="border-t" @click="openAbout">
63-
{{ $t('layout.avatar.about') }}
63+
{{ $t('layout.about.label') }}
6464
</el-dropdown-item>
6565

6666
<el-dropdown-item class="border-t" @click="logout">
67-
{{ $t('layout.avatar.logout') }}
67+
{{ $t('layout.logout') }}
6868
</el-dropdown-item>
6969
</el-dropdown-menu>
7070
</template>

ui/src/locales/lang/en-US/layout.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@ export default {
22
github: 'Project Address',
33
wiki: 'User Manual',
44
forum: 'Forum For Help',
5-
avatar: {
6-
about: 'About',
7-
logout: 'Logout',
8-
version: 'Version',
9-
apiKey: 'API Key',
10-
apiServiceAddress: 'API Service Address',
11-
},
12-
language: 'Language'
5+
logout: 'Logout',
6+
version: 'Version',
7+
apiKey: 'API Key',
8+
apiServiceAddress: 'API Service Address',
9+
language: 'Language',
10+
isExpire: 'License not uploaded or expired',
11+
about: {
12+
title: 'About',
13+
expiredTime: 'Expiration Date',
14+
edition: 'Edition',
15+
serialNo: 'Serial No.',
16+
remark: 'Remarks',
17+
update: 'Update',
18+
authorize: 'Authorized'
19+
}
1320
}

ui/src/locales/lang/zh-CN/layout.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@ export default {
22
github: '项目地址',
33
wiki: '用户手册',
44
forum: '论坛求助',
5-
avatar: {
6-
about: '关于',
7-
logout: '退出',
8-
version: '版本号',
9-
apiKey: 'API Key 管理',
10-
apiServiceAddress: 'API 服务地址',
11-
},
12-
language: '语言'
5+
logout: '退出',
6+
version: '版本号',
7+
apiKey: 'API Key 管理',
8+
apiServiceAddress: 'API 服务地址',
9+
language: '语言',
10+
isExpire: '未上传 License 或 License 已过期。',
11+
about: {
12+
title: '关于',
13+
expiredTime: '到期时间',
14+
edition: '版本',
15+
serialNo: '序列号',
16+
remark: '备注',
17+
update: '更新',
18+
authorize:'授权给'
19+
}
1320
}

ui/src/locales/lang/zh-Hant/layout.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@ export default {
22
github: '項目地址',
33
wiki: '使用者手冊',
44
forum: '論壇求助',
5-
avatar: {
6-
about: '關於',
7-
logout: '退出',
8-
version: '版本號',
9-
apiKey: 'API Key 管理',
10-
apiServiceAddress: 'API 服務地址',
11-
},
12-
language: '語言'
5+
logout: '退出',
6+
version: '版本號',
7+
apiKey: 'API Key 管理',
8+
apiServiceAddress: 'API 服務地址',
9+
language: '語言',
10+
isExpire: '未上傳 License 或 License 已過期。',
11+
about: {
12+
title: '關於',
13+
expiredTime: '到期時間',
14+
edition: '版本',
15+
serialNo: '序列號',
16+
remark: '備註',
17+
update: '更新',
18+
authorize: '授權給'
19+
}
1320
}

0 commit comments

Comments
 (0)