chore: 用户管理-部分国际化重写

This commit is contained in:
baiqi 2023-06-20 10:13:19 +08:00 committed by rubylliu
parent 3effa909d9
commit 00fd45bc93
4 changed files with 22 additions and 40 deletions

View File

@ -53,26 +53,23 @@ export default {
'system.user.enable': 'Enable', 'system.user.enable': 'Enable',
'system.user.tableEnable': 'Enabled', 'system.user.tableEnable': 'Enabled',
'system.user.tableDisable': 'Disabled', 'system.user.tableDisable': 'Disabled',
'system.user.deleteUserStart': 'Are you sure to delete the user', 'system.user.deleteUserTip': 'Are you sure to delete the user `{name}` ?',
'system.user.deleteUserEnd': '?',
'system.user.deleteUserContent': "Only delete user information, does not handle the user's system data", 'system.user.deleteUserContent': "Only delete user information, does not handle the user's system data",
'system.user.deleteUserConfirm': 'Delete', 'system.user.deleteUserConfirm': 'Delete',
'system.user.deleteUserCancel': 'Cancel', 'system.user.deleteUserCancel': 'Cancel',
'system.user.deleteUserSuccess': 'Delete successful', 'system.user.deleteUserSuccess': 'Delete successful',
'system.user.disableUserStart': 'Are you sure to disable the user', 'system.user.disableUserTip': 'Are you sure to disable the user `{name}` ?',
'system.user.disableUserEnd': '?',
'system.user.disableUserContent': "Disabled users can't log in to the system", 'system.user.disableUserContent': "Disabled users can't log in to the system",
'system.user.disableUserConfirm': 'Disabled', 'system.user.disableUserConfirm': 'Disabled',
'system.user.disableUserCancel': 'Cancel', 'system.user.disableUserCancel': 'Cancel',
'system.user.disableUserSuccess': 'Disabled successful', 'system.user.disableUserSuccess': 'Disabled successful',
'system.user.enableUserStart': 'Are you sure to enable the user', 'system.user.enableUserTip': 'Are you sure to enable the user `{name}` ?',
'system.user.enableUserEnd': '?',
'system.user.enableUserContent': 'Enabled users can log in to the system', 'system.user.enableUserContent': 'Enabled users can log in to the system',
'system.user.enableUserConfirm': 'Enable', 'system.user.enableUserConfirm': 'Enable',
'system.user.enableUserCancel': 'Cancel', 'system.user.enableUserCancel': 'Cancel',
'system.user.enableUserSuccess': 'Enable successful', 'system.user.enableUserSuccess': 'Enable successful',
'system.user.resetPswStart': 'Reset the password of', 'system.user.resetPswStart': 'Reset the password of',
'system.user.resetPswEnd': 'to its initial password?', 'system.user.resetPswTip': 'Reset the password of `{name}` to its initial password?',
'system.user.resetPswContent': "The initial password is the user's mailbox, which will take effect at the next login", 'system.user.resetPswContent': "The initial password is the user's mailbox, which will take effect at the next login",
'system.user.resetPswConfirm': 'Reset', 'system.user.resetPswConfirm': 'Reset',
'system.user.resetPswCancel': 'Cancel', 'system.user.resetPswCancel': 'Cancel',
@ -102,6 +99,7 @@ export default {
'system.user.editUserModalEditUser': 'Save', 'system.user.editUserModalEditUser': 'Save',
'system.user.invite': 'Email invite', 'system.user.invite': 'Email invite',
'system.user.inviteEmail': 'Email', 'system.user.inviteEmail': 'Email',
'system.user.inviteCancel': 'Cancel',
'system.user.inviteEmailPlaceholder': 'Enter multiple email addresses, separated by spaces or carriage returns', 'system.user.inviteEmailPlaceholder': 'Enter multiple email addresses, separated by spaces or carriage returns',
'system.user.inviteSendEmail': 'SendEmail', 'system.user.inviteSendEmail': 'SendEmail',
'system.user.importModalTitle': 'Import user', 'system.user.importModalTitle': 'Import user',
@ -116,12 +114,11 @@ export default {
'system.user.importSuccess': 'Import succeeded', 'system.user.importSuccess': 'Import succeeded',
'system.user.importFailTitle': 'Some user information failed to import', 'system.user.importFailTitle': 'Some user information failed to import',
'system.user.importAllfailTitle': 'User information import failed', 'system.user.importAllfailTitle': 'User information import failed',
'system.user.importResultContentStart': 'Successfully imported user', 'system.user.importResultContent': 'Successfully imported user {successNum} items, failed to import {failNum} items;',
'system.user.importResultContentCenter': 'items, failed to import',
'system.user.importResultContentEnd': 'items;',
'system.user.importResultContentSubStart': 'You can', 'system.user.importResultContentSubStart': 'You can',
'system.user.importResultContentDownload': 'Download bug report', 'system.user.importResultContentDownload': 'Download bug report',
'system.user.importResultContentSubEnd': ',re-import after modification', 'system.user.importResultContentSubEnd': ',re-import after modification',
'system.user.importResultSuccessContent': 'Successfully imported user {successNum} items',
'system.user.importResultReturn': 'Return list', 'system.user.importResultReturn': 'Return list',
'system.user.importResultContinue': 'Continue importing', 'system.user.importResultContinue': 'Continue importing',
'system.user.importErrorFile': 'error report', 'system.user.importErrorFile': 'error report',
@ -129,8 +126,7 @@ export default {
'system.user.batchActionAddUsergroup': 'Add to usergroup', 'system.user.batchActionAddUsergroup': 'Add to usergroup',
'system.user.batchActionAddOrgnization': 'Add to org', 'system.user.batchActionAddOrgnization': 'Add to org',
'system.user.batchModalTip': 'Add project member usergroup as member by default', 'system.user.batchModalTip': 'Add project member usergroup as member by default',
'system.user.batchModalSubTitleStart': 'Selected', 'system.user.batchModalSubTitle': '(Selected {count} users)',
'system.user.batchModalSubTitleEnd': 'users',
'system.user.batchModalCancel': 'Cancel', 'system.user.batchModalCancel': 'Cancel',
'system.user.batchModalConfirm': 'Add', 'system.user.batchModalConfirm': 'Add',
'system.user.batchModalSuccess': 'Successfully added', 'system.user.batchModalSuccess': 'Successfully added',

View File

@ -52,26 +52,22 @@ export default {
'system.user.enable': '启用', 'system.user.enable': '启用',
'system.user.tableEnable': '正常', 'system.user.tableEnable': '正常',
'system.user.tableDisable': '禁用', 'system.user.tableDisable': '禁用',
'system.user.deleteUserStart': '确认删除', 'system.user.deleteUserTip': '确认删除 `{name}` 这个用户吗?',
'system.user.deleteUserEnd': '这个用户吗?',
'system.user.deleteUserContent': '仅删除用户信息,不处理该用户的系统数据', 'system.user.deleteUserContent': '仅删除用户信息,不处理该用户的系统数据',
'system.user.deleteUserConfirm': '确认删除', 'system.user.deleteUserConfirm': '确认删除',
'system.user.deleteUserCancel': '取消', 'system.user.deleteUserCancel': '取消',
'system.user.deleteUserSuccess': '删除成功', 'system.user.deleteUserSuccess': '删除成功',
'system.user.disableUserStart': '确认禁用', 'system.user.disableUserTip': '确认禁用 `{name}` 这个用户吗?',
'system.user.disableUserEnd': '这个用户吗?',
'system.user.disableUserContent': '禁用的用户无法登录系统', 'system.user.disableUserContent': '禁用的用户无法登录系统',
'system.user.disableUserConfirm': '确认禁用', 'system.user.disableUserConfirm': '确认禁用',
'system.user.disableUserCancel': '取消', 'system.user.disableUserCancel': '取消',
'system.user.disableUserSuccess': '禁用成功', 'system.user.disableUserSuccess': '禁用成功',
'system.user.enableUserStart': '确认启用', 'system.user.enableUserTip': '确认启用 `{name}` 这个用户吗?',
'system.user.enableUserEnd': '这个用户吗?',
'system.user.enableUserContent': '启用后用户可以登录系统', 'system.user.enableUserContent': '启用后用户可以登录系统',
'system.user.enableUserConfirm': '确认启用', 'system.user.enableUserConfirm': '确认启用',
'system.user.enableUserCancel': '取消', 'system.user.enableUserCancel': '取消',
'system.user.enableUserSuccess': '启用成功', 'system.user.enableUserSuccess': '启用成功',
'system.user.resetPswStart': '是否将', 'system.user.resetPswTip': '是否将 `{name}` 的密码重置为初始密码?',
'system.user.resetPswEnd': '的密码重置为初始密码?',
'system.user.resetPswContent': '初始的密码为用户邮箱,下次登录时生效', 'system.user.resetPswContent': '初始的密码为用户邮箱,下次登录时生效',
'system.user.resetPswConfirm': '确认重置', 'system.user.resetPswConfirm': '确认重置',
'system.user.resetPswCancel': '取消', 'system.user.resetPswCancel': '取消',
@ -116,12 +112,11 @@ export default {
'system.user.importSuccess': '导入成功', 'system.user.importSuccess': '导入成功',
'system.user.importFailTitle': '部分用户信息导入失败', 'system.user.importFailTitle': '部分用户信息导入失败',
'system.user.importAllfailTitle': '用户信息导入失败', 'system.user.importAllfailTitle': '用户信息导入失败',
'system.user.importResultContentStart': '成功导入用户', 'system.user.importResultContent': '成功导入用户 {successNum} 个,导入失败 {failNum} 个;',
'system.user.importResultContentCenter': '条,导入失败',
'system.user.importResultContentEnd': '条',
'system.user.importResultContentSubStart': '可', 'system.user.importResultContentSubStart': '可',
'system.user.importResultContentDownload': '下载错误报告', 'system.user.importResultContentDownload': '下载错误报告',
'system.user.importResultContentSubEnd': ',修改后重新导入', 'system.user.importResultContentSubEnd': ',修改后重新导入',
'system.user.importResultSuccessContent': '成功导入 {successNum} 个用户',
'system.user.importResultReturn': '返回列表', 'system.user.importResultReturn': '返回列表',
'system.user.importResultContinue': '继续导入', 'system.user.importResultContinue': '继续导入',
'system.user.importErrorFile': '错误报告', 'system.user.importErrorFile': '错误报告',
@ -129,8 +124,7 @@ export default {
'system.user.batchActionAddUsergroup': '添加至用户组', 'system.user.batchActionAddUsergroup': '添加至用户组',
'system.user.batchActionAddOrgnization': '添加至组织', 'system.user.batchActionAddOrgnization': '添加至组织',
'system.user.batchModalTip': '默认为成员添加项目成员用户组', 'system.user.batchModalTip': '默认为成员添加项目成员用户组',
'system.user.batchModalSubTitleStart': '(已选', 'system.user.batchModalSubTitle': '(已选 {count} 个用户)',
'system.user.batchModalSubTitleEnd': '个用户)',
'system.user.batchModalCancel': '取消', 'system.user.batchModalCancel': '取消',
'system.user.batchModalConfirm': '添加', 'system.user.batchModalConfirm': '添加',
'system.user.batchModalSuccess': '添加成功', 'system.user.batchModalSuccess': '添加成功',

View File

@ -8,11 +8,7 @@
<template #title> <template #title>
{{ batchTitle }} {{ batchTitle }}
<div class="text-[var(--color-text-4)]"> <div class="text-[var(--color-text-4)]">
{{ {{ t('system.user.batchModalSubTitle', { count: props.tableSelected.length }) }}
`${t('system.user.batchModalSubTitleStart')} ${props.tableSelected.length} ${t(
'system.user.batchModalSubTitleEnd'
)}`
}}
</div> </div>
</template> </template>
<a-alert v-if="batchModalMode === 'project'" class="mb-[16px]"> <a-alert v-if="batchModalMode === 'project'" class="mb-[16px]">

View File

@ -262,16 +262,12 @@
t('system.user.importSuccess') t('system.user.importSuccess')
}}</div> }}</div>
<div class="sub-text">{{ <div class="sub-text">{{
`${t('system.user.importResultContentStart')} ${importSuccessCount} ${t( t('system.user.importResultSuccessContent', { successNum: importSuccessCount })
'system.user.importResultContentEnd'
)}`
}}</div> }}</div>
</div> </div>
<template v-else> <template v-else>
<div>{{ <div>{{
`${t('system.user.importResultContentStart')} ${importSuccessCount} ${t( t('system.user.importResultContent', { successNum: importSuccessCount, failNum: importFailCount })
'system.user.importResultContentCenter'
)} ${importFailCount} ${t('system.user.importResultContentEnd')};`
}}</div> }}</div>
<div <div
>{{ t('system.user.importResultContentSubStart') >{{ t('system.user.importResultContentSubStart')
@ -489,7 +485,7 @@
function resetPassword(record: any) { function resetPassword(record: any) {
openModal({ openModal({
type: 'warning', type: 'warning',
title: `${t('system.user.resetPswStart')} '${record.name}' ${t('system.user.resetPswEnd')}`, title: t('system.user.resetPswTip', { name: record.name }),
content: t('system.user.resetPswContent'), content: t('system.user.resetPswContent'),
okText: t('system.user.resetPswConfirm'), okText: t('system.user.resetPswConfirm'),
cancelText: t('system.user.resetPswCancel'), cancelText: t('system.user.resetPswCancel'),
@ -512,7 +508,7 @@
function disabledUser(record: any) { function disabledUser(record: any) {
openModal({ openModal({
type: 'warning', type: 'warning',
title: `${t('system.user.disableUserStart')} '${record.name}' ${t('system.user.disableUserEnd')}`, title: t('system.user.disableUserTip', { name: record.name }),
content: t('system.user.disableUserContent'), content: t('system.user.disableUserContent'),
okText: t('system.user.disableUserConfirm'), okText: t('system.user.disableUserConfirm'),
cancelText: t('system.user.disableUserCancel'), cancelText: t('system.user.disableUserCancel'),
@ -538,7 +534,7 @@
function enableUser(record: any) { function enableUser(record: any) {
openModal({ openModal({
type: 'info', type: 'info',
title: `${t('system.user.enableUserStart')} '${record.name}' ${t('system.user.enableUserEnd')}`, title: t('system.user.enableUserTip', { name: record.name }),
content: t('system.user.enableUserContent'), content: t('system.user.enableUserContent'),
okText: t('system.user.enableUserConfirm'), okText: t('system.user.enableUserConfirm'),
cancelText: t('system.user.enableUserCancel'), cancelText: t('system.user.enableUserCancel'),
@ -561,7 +557,7 @@
function deleteUser(record: any) { function deleteUser(record: any) {
openModal({ openModal({
type: 'warning', type: 'warning',
title: `${t('system.user.deleteUserStart')} '${record.name}' ${t('system.user.deleteUserEnd')}`, title: t('system.user.deleteUserTip', { name: record.name }),
content: t('system.user.deleteUserContent'), content: t('system.user.deleteUserContent'),
okText: t('system.user.deleteUserConfirm'), okText: t('system.user.deleteUserConfirm'),
cancelText: t('system.user.deleteUserCancel'), cancelText: t('system.user.deleteUserCancel'),