The 'Tenant Management' module has been translated (#995)

* 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: 冯建军 <fengjj@data4truth.com>
pull/999/head
FengXiaoJian 2 years ago committed by GitHub
parent 01d9db161a
commit cce47371f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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',
},
};
}
}

@ -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: '项目',
},
};
}
}

@ -7,7 +7,7 @@
</div>
<div class="card-panel-description">
<div class="card-panel-text">
{{ $t('report.tenant') }}
{{ $t('common.tenant') }}
</div>
<count-to :start-val="0" :end-val="successCount" :duration="2600" class="card-panel-num" />
</div>

@ -27,10 +27,10 @@
<el-form-item :label="$t('report.tenants')" label-width="120px">
<span></span>
</el-form-item>
<el-form-item :label="$t('report.createTime')" label-width="120px">
<el-form-item :label="$t('common.createTime')" label-width="120px">
<span> {{ temp.gmtCreate }}</span>
</el-form-item>
<el-form-item :label="$t('report.updateTime')" label-width="120px">
<el-form-item :label="$t('common.updateTime')" label-width="120px">
<span>{{ temp.gmtModified }}</span>
</el-form-item>
</el-form>

@ -4,7 +4,7 @@
<el-input
v-model="listQuery.tenantId"
clearable
placeholder="租户"
:placeholder="$t('common.tenant')"
style="width: 200px"
class="filter-item"
/>
@ -15,7 +15,7 @@
icon="el-icon-search"
@click="fetchData"
>
搜索
{{ $t('common.query') }}
</el-button>
<el-button
:disabled="isEditDisabled"
@ -25,7 +25,7 @@
icon="el-icon-edit"
@click="handleCreate"
>
添加
{{ $t('common.insert') }}
</el-button>
</div>
<el-table
@ -35,34 +35,34 @@
highlight-current-row
element-loading-text="Loading"
>
<el-table-column label="序号" width="95">
<el-table-column :label="$t('common.num')" width="95">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column label="租户">
<el-table-column :label="$t('common.tenant')">
<template slot-scope="scope">{{ scope.row.tenantId }}</template>
</el-table-column>
<el-table-column label="租户名称">
<el-table-column :label="$t('tenantManage.tenantName')">
<template slot-scope="scope">{{ scope.row.tenantName }}</template>
</el-table-column>
<!-- <el-table-column label="租户简介">
<template slot-scope="scope">{{ scope.row.tenantDesc | ellipsis }}</template>
</el-table-column> -->
<el-table-column label="负责人">
<el-table-column :label="$t('tenantManage.owner')">
<template slot-scope="scope">{{ scope.row.owner }} </template>
</el-table-column>
<!-- <el-table-column label="创建时间">
<template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
</el-table-column> -->
<el-table-column label="修改时间">
<el-table-column :label="$t('common.updateTime')">
<template slot-scope="scope">{{ scope.row.gmtModified }}</template>
</el-table-column>
<el-table-column label="操作" width="90" class-name="small-padding fixed-width">
<el-table-column :label="$t('common.operation')" width="90" class-name="small-padding fixed-width">
<template slot-scope="{ row }">
<el-button type="text" :disabled="isEditDisabled" size="small" @click="handleUpdate(row)">
编辑
{{ $t('common.edit') }}
</el-button>
<el-button size="small" :disabled="isEditDisabled" type="text" @click="handleDelete(row)">
删除
{{ $t('common.delete') }}
</el-button>
</template>
</el-table-column>
@ -81,36 +81,36 @@
:rules="rules"
:model="temp"
label-position="left"
label-width="100px"
label-width="120px"
>
<el-form-item label="租户" prop="tenantId">
<el-form-item :label="$t('common.tenant')" prop="tenantId">
<el-input
v-model="temp.tenantId"
:disabled="dialogStatus === 'create' ? false : true"
placeholder="租户"
:placeholder="$t('common.tenant')"
style="width: 40%"
/>
</el-form-item>
<el-form-item label="租户名称" prop="tenantName">
<el-input v-model="temp.tenantName" placeholder="租户名称" style="width: 40%" />
<el-form-item :label="$t('tenantManage.tenantName')" prop="tenantName">
<el-input v-model="temp.tenantName" :placeholder="$t('tenantManage.tenantName')" style="width: 40%" />
</el-form-item>
<el-form-item label="负责人" prop="owner">
<el-input v-model="temp.owner" placeholder="负责人" style="width: 40%" />
<el-form-item :label="$t('tenantManage.owner')" prop="owner">
<el-input v-model="temp.owner" :placeholder="$t('tenantManage.owner')" style="width: 40%" />
</el-form-item>
<el-form-item label="租户简介" prop="tenantDesc">
<el-form-item :label="$t('tenantManage.tenantIntro')" prop="tenantDesc">
<el-input
v-model="temp.tenantDesc"
:autosize="{ minRows: 3, maxRows: 6 }"
type="textarea"
placeholder="租户简介"
:placeholder="$t('tenantManage.tenantIntro')"
style="width: 40%"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> 取消 </el-button>
<el-button @click="dialogFormVisible = false"> {{ $t('common.cancel') }} </el-button>
<el-button type="primary" @click="dialogStatus === 'create' ? createData() : updateData()">
确认
{{ $t('common.confirm') }}
</el-button>
</div>
</el-dialog>
@ -120,7 +120,7 @@
<el-table-column prop="pv" label="Pv" />
</el-table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogPvVisible = false">Confirm</el-button>
<el-button type="primary" @click="dialogPvVisible = false">{{ $t('common.confirm') }}</el-button>
</span>
</el-dialog>
</div>
@ -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',
});
},

Loading…
Cancel
Save