From a9cc34103abb4c9d08bff948a26b7d75c2619b1f Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Tue, 21 Jan 2025 20:27:10 +0800 Subject: [PATCH] feat: about i18n --- ui/src/layout/components/app-header/index.vue | 2 +- ui/src/layout/components/breadcrumb/index.vue | 2 +- .../top-bar/avatar/APIKeyDialog.vue | 4 ++-- .../components/top-bar/avatar/AboutDialog.vue | 14 +++++------ .../components/top-bar/avatar/index.vue | 6 ++--- ui/src/locales/lang/en-US/layout.ts | 23 ++++++++++++------- ui/src/locales/lang/zh-CN/layout.ts | 23 ++++++++++++------- ui/src/locales/lang/zh-Hant/layout.ts | 23 ++++++++++++------- 8 files changed, 59 insertions(+), 38 deletions(-) diff --git a/ui/src/layout/components/app-header/index.vue b/ui/src/layout/components/app-header/index.vue index dae395725..47b97cf0a 100644 --- a/ui/src/layout/components/app-header/index.vue +++ b/ui/src/layout/components/app-header/index.vue @@ -2,7 +2,7 @@
- 创建知识库 + {{ $t('views.dataset.createDataset') }}
diff --git a/ui/src/layout/components/top-bar/avatar/APIKeyDialog.vue b/ui/src/layout/components/top-bar/avatar/APIKeyDialog.vue index 7d5d8197e..c6fa67db8 100644 --- a/ui/src/layout/components/top-bar/avatar/APIKeyDialog.vue +++ b/ui/src/layout/components/top-bar/avatar/APIKeyDialog.vue @@ -1,6 +1,6 @@
- 授权给{{ licenseInfo?.corporation || '-' }} + {{ $t('layout.about.authorize') }}{{ licenseInfo?.corporation || '-' }}
- 到期时间 + {{ $t('layout.about.expiredTime') }} {{ licenseInfo?.expired || '-' }}
- 版本{{ user.showXpack() ? '专业版' : '社区版' }} + {{ $t('layout.about.edition') }}{{ user.showXpack() ? '专业版' : '社区版' }}
- 版本号{{ user.version }} + {{ $t('layout.about.version') }}{{ user.version }}
- 序列号{{ licenseInfo?.serialNo || '-' }} + {{ $t('layout.about.serialNo') }}{{ licenseInfo?.serialNo || '-' }}
- 备注{{ licenseInfo?.remark || '-' }} + {{ $t('layout.about.remark') }}{{ licenseInfo?.remark || '-' }}
- 更新 License + {{ $t('layout.about.update') }} License
diff --git a/ui/src/layout/components/top-bar/avatar/index.vue b/ui/src/layout/components/top-bar/avatar/index.vue index 4de983b3f..8ccf0039c 100644 --- a/ui/src/layout/components/top-bar/avatar/index.vue +++ b/ui/src/layout/components/top-bar/avatar/index.vue @@ -25,7 +25,7 @@
- {{ $t('layout.avatar.apiKey') }} + {{ $t('layout.apiKey') }}
@@ -60,11 +60,11 @@ - {{ $t('layout.avatar.about') }} + {{ $t('layout.about.label') }} - {{ $t('layout.avatar.logout') }} + {{ $t('layout.logout') }} diff --git a/ui/src/locales/lang/en-US/layout.ts b/ui/src/locales/lang/en-US/layout.ts index f886aab80..9106ceeec 100644 --- a/ui/src/locales/lang/en-US/layout.ts +++ b/ui/src/locales/lang/en-US/layout.ts @@ -2,12 +2,19 @@ export default { github: 'Project Address', wiki: 'User Manual', forum: 'Forum For Help', - avatar: { - about: 'About', - logout: 'Logout', - version: 'Version', - apiKey: 'API Key', - apiServiceAddress: 'API Service Address', - }, - language: 'Language' + logout: 'Logout', + version: 'Version', + apiKey: 'API Key', + apiServiceAddress: 'API Service Address', + language: 'Language', + isExpire: 'License not uploaded or expired', + about: { + title: 'About', + expiredTime: 'Expiration Date', + edition: 'Edition', + serialNo: 'Serial No.', + remark: 'Remarks', + update: 'Update', + authorize: 'Authorized' + } } diff --git a/ui/src/locales/lang/zh-CN/layout.ts b/ui/src/locales/lang/zh-CN/layout.ts index 490650c76..ec32ffe00 100644 --- a/ui/src/locales/lang/zh-CN/layout.ts +++ b/ui/src/locales/lang/zh-CN/layout.ts @@ -2,12 +2,19 @@ export default { github: '项目地址', wiki: '用户手册', forum: '论坛求助', - avatar: { - about: '关于', - logout: '退出', - version: '版本号', - apiKey: 'API Key 管理', - apiServiceAddress: 'API 服务地址', - }, - language: '语言' + logout: '退出', + version: '版本号', + apiKey: 'API Key 管理', + apiServiceAddress: 'API 服务地址', + language: '语言', + isExpire: '未上传 License 或 License 已过期。', + about: { + title: '关于', + expiredTime: '到期时间', + edition: '版本', + serialNo: '序列号', + remark: '备注', + update: '更新', + authorize:'授权给' + } } diff --git a/ui/src/locales/lang/zh-Hant/layout.ts b/ui/src/locales/lang/zh-Hant/layout.ts index 7698ceb88..df9340581 100644 --- a/ui/src/locales/lang/zh-Hant/layout.ts +++ b/ui/src/locales/lang/zh-Hant/layout.ts @@ -2,12 +2,19 @@ export default { github: '項目地址', wiki: '使用者手冊', forum: '論壇求助', - avatar: { - about: '關於', - logout: '退出', - version: '版本號', - apiKey: 'API Key 管理', - apiServiceAddress: 'API 服務地址', - }, - language: '語言' + logout: '退出', + version: '版本號', + apiKey: 'API Key 管理', + apiServiceAddress: 'API 服務地址', + language: '語言', + isExpire: '未上傳 License 或 License 已過期。', + about: { + title: '關於', + expiredTime: '到期時間', + edition: '版本', + serialNo: '序列號', + remark: '備註', + update: '更新', + authorize: '授權給' + } }