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

View File

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

View File

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

View File

@ -262,16 +262,12 @@
t('system.user.importSuccess')
}}</div>
<div class="sub-text">{{
`${t('system.user.importResultContentStart')} ${importSuccessCount} ${t(
'system.user.importResultContentEnd'
)}`
t('system.user.importResultSuccessContent', { successNum: importSuccessCount })
}}</div>
</div>
<template v-else>
<div>{{
`${t('system.user.importResultContentStart')} ${importSuccessCount} ${t(
'system.user.importResultContentCenter'
)} ${importFailCount} ${t('system.user.importResultContentEnd')};`
t('system.user.importResultContent', { successNum: importSuccessCount, failNum: importFailCount })
}}</div>
<div
>{{ t('system.user.importResultContentSubStart')
@ -489,7 +485,7 @@
function resetPassword(record: any) {
openModal({
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'),
okText: t('system.user.resetPswConfirm'),
cancelText: t('system.user.resetPswCancel'),
@ -512,7 +508,7 @@
function disabledUser(record: any) {
openModal({
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'),
okText: t('system.user.disableUserConfirm'),
cancelText: t('system.user.disableUserCancel'),
@ -538,7 +534,7 @@
function enableUser(record: any) {
openModal({
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'),
okText: t('system.user.enableUserConfirm'),
cancelText: t('system.user.enableUserCancel'),
@ -561,7 +557,7 @@
function deleteUser(record: any) {
openModal({
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'),
okText: t('system.user.deleteUserConfirm'),
cancelText: t('system.user.deleteUserCancel'),