From cce47371f7dfcb8704966e8402f0e449c94f1599 Mon Sep 17 00:00:00 2001 From: FengXiaoJian <47876885+PleasePerfunctory@users.noreply.github.com> Date: Fri, 18 Nov 2022 11:54:11 +0800 Subject: [PATCH] The 'Tenant Management' module has been translated (#995) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Run the report module to change internationalization * fix: Internationalize the tenant management page * fix: Internationalize the tenant management page * feat: Continue to refine the 'internationalization' configuration file * feat: The 'Tenant Management' module has been translated Co-authored-by: 冯建军 --- hippo4j-ui/src/locale/lang/en.js | 38 ++++++++--- hippo4j-ui/src/locale/lang/zh.js | 35 +++++++--- .../dashboard/admin/components/PanelGroup.vue | 2 +- .../src/views/dashboard/admin/index.vue | 4 +- hippo4j-ui/src/views/hippo4j/tenant/index.vue | 68 +++++++++---------- 5 files changed, 93 insertions(+), 54 deletions(-) diff --git a/hippo4j-ui/src/locale/lang/en.js b/hippo4j-ui/src/locale/lang/en.js index 8f65326b..a3b6ca8c 100644 --- a/hippo4j-ui/src/locale/lang/en.js +++ b/hippo4j-ui/src/locale/lang/en.js @@ -7,34 +7,54 @@ export default { logOut: 'Log Out', }, + // 信息 + message: { + success: 'Success', + createdSuccess: 'Created Successfully', + deleteMessage: 'This action will delete {name}, Do you want to continue?' + }, + // 公共 common: { - search: 'Search', - addition: 'Addition', - serialNumber: 'No.', + query: 'Query', + insert: 'Insert', + serialNumber: 'Serial Number', operation: 'Operation', + create: 'Create', edit: 'Edit', delete: 'Delete', cancel: 'Cancel', confirm: 'Confirm', + ok: 'Ok', threadPool: 'Thread Pool', + num: 'Num', + createTime: 'Create Time', + updateTime: 'Update Time', + tenant: 'Tenant', + requiredError: 'this is required', + hint: 'Warning' }, // 运行报表 report: { - tenant: 'Tenant', item: 'Item', poolInstance: 'Pool Instance', user: 'User', role: 'Role', - tenants: 'Tenants', - createTime: 'Create Time', - updateTime: 'Update Time', + tenants: 'Tenants' + }, + + // 租户管理 + tenantManage: { + tenantName: 'Tenant Name', + owner: 'Owner', + tenantIntro: 'Tenant Intro' }, // 线程池 threadPool: { tenant: 'Tenant', project: 'Project', - }, -}; + } + +} diff --git a/hippo4j-ui/src/locale/lang/zh.js b/hippo4j-ui/src/locale/lang/zh.js index 628f4af3..5824d378 100644 --- a/hippo4j-ui/src/locale/lang/zh.js +++ b/hippo4j-ui/src/locale/lang/zh.js @@ -7,34 +7,53 @@ export default { logOut: '注销', }, + // 信息 + message: { + success: '成功', + createdSuccess: '创建成功', + deleteMessage: '此操作将删除 {name}, 是否继续?' + }, + // 公共 common: { - search: '搜索', - addition: '添加', + query: '搜索', + insert: '添加', serialNumber: '序号', operation: '操作', + create: '创建', edit: '编辑', delete: '删除', cancel: '取消', confirm: '确认', + ok: '确定', threadPool: '线程池', + num: '序号', + createTime: '创建时间', + updateTime: '修改时间', + tenant: '租户', + requiredError: '这是必填项', + hint: '提示' }, // 运行报表 report: { - tenant: '租户', item: '项目', poolInstance: '线程池实例', user: '登录用户', role: '用户角色', - tenants: '所属租户', - createTime: '创建时间', - updateTime: '修改时间', + tenants: '所属租户' }, + // 租户管理 + tenantManage: { + tenantName: '租户名称', + owner: '负责人', + tenantIntro: '租户简介' + }, + // 线程池 threadPool: { tenant: '租户', project: '项目', - }, -}; + } +} diff --git a/hippo4j-ui/src/views/dashboard/admin/components/PanelGroup.vue b/hippo4j-ui/src/views/dashboard/admin/components/PanelGroup.vue index 0d616534..b0915ca6 100644 --- a/hippo4j-ui/src/views/dashboard/admin/components/PanelGroup.vue +++ b/hippo4j-ui/src/views/dashboard/admin/components/PanelGroup.vue @@ -7,7 +7,7 @@
- {{ $t('report.tenant') }} + {{ $t('common.tenant') }}
diff --git a/hippo4j-ui/src/views/dashboard/admin/index.vue b/hippo4j-ui/src/views/dashboard/admin/index.vue index e9f79e76..fd7a19cd 100644 --- a/hippo4j-ui/src/views/dashboard/admin/index.vue +++ b/hippo4j-ui/src/views/dashboard/admin/index.vue @@ -27,10 +27,10 @@ - + {{ temp.gmtCreate }} - + {{ temp.gmtModified }} diff --git a/hippo4j-ui/src/views/hippo4j/tenant/index.vue b/hippo4j-ui/src/views/hippo4j/tenant/index.vue index 0fe26b81..cada4eab 100755 --- a/hippo4j-ui/src/views/hippo4j/tenant/index.vue +++ b/hippo4j-ui/src/views/hippo4j/tenant/index.vue @@ -4,7 +4,7 @@ @@ -15,7 +15,7 @@ icon="el-icon-search" @click="fetchData" > - 搜索 + {{ $t('common.query') }} - 添加 + {{ $t('common.insert') }} - + - + - + - + - + - + @@ -81,36 +81,36 @@ :rules="rules" :model="temp" label-position="left" - label-width="100px" + label-width="120px" > - + - - + + - - + + - + @@ -120,7 +120,7 @@ - Confirm + {{ $t('common.confirm') }} @@ -170,14 +170,14 @@ export default { dialogFormVisible: false, dialogStatus: '', textMap: { - update: 'Edit', - create: 'Create', + update: this.$t('common.edit'), + create: this.$t('common.create'), }, rules: { - tenantId: [{ required: true, message: 'this is required', trigger: 'blur' }], - tenantName: [{ required: true, message: 'this is required', trigger: 'blur' }], - owner: [{ required: true, message: 'this is required', trigger: 'blur' }], - tenantDesc: [{ required: true, message: 'this is required', trigger: 'blur' }], + tenantId: [{ required: true, message: this.$t('common.requiredError'), trigger: 'blur' }], + tenantName: [{ required: true, message: this.$t('common.requiredError'), trigger: 'blur' }], + owner: [{ required: true, message: this.$t('common.requiredError'), trigger: 'blur' }], + tenantDesc: [{ required: true, message: this.$t('common.requiredError'), trigger: 'blur' }], }, temp: { id: undefined, @@ -228,8 +228,8 @@ export default { this.fetchData(); this.dialogFormVisible = false; this.$notify({ - title: 'Success', - message: 'Created Successfully', + title: this.$t('message.success'), + message: this.$t('message.createdSuccess'), type: 'success', duration: 2000, }); @@ -263,9 +263,9 @@ export default { }); }, openDelConfirm(name) { - return this.$confirm(`此操作将删除 ${name}, 是否继续?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', + return this.$confirm(this.$t('message.deleteMessage', { name }), this.$t('common.hint'), { + confirmButtonText: this.$t('common.ok'), + cancelButtonText: this.$t('common.cancel'), type: 'warning', }); },