From 00fd45bc9353106c367e2037e6eda0ee95562377 Mon Sep 17 00:00:00 2001 From: baiqi Date: Tue, 20 Jun 2023 10:13:19 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=9B=BD=E9=99=85=E5=8C=96=E9=87=8D=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/system/locale/en-US.ts | 20 ++++++++----------- frontend/src/views/system/locale/zh-CN.ts | 20 +++++++------------ .../system/user/components/batchModal.vue | 6 +----- frontend/src/views/system/user/index.vue | 16 ++++++--------- 4 files changed, 22 insertions(+), 40 deletions(-) diff --git a/frontend/src/views/system/locale/en-US.ts b/frontend/src/views/system/locale/en-US.ts index a4d897989b..e5b04f2eab 100644 --- a/frontend/src/views/system/locale/en-US.ts +++ b/frontend/src/views/system/locale/en-US.ts @@ -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', diff --git a/frontend/src/views/system/locale/zh-CN.ts b/frontend/src/views/system/locale/zh-CN.ts index f342352e5e..adc96af16b 100644 --- a/frontend/src/views/system/locale/zh-CN.ts +++ b/frontend/src/views/system/locale/zh-CN.ts @@ -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': '添加成功', diff --git a/frontend/src/views/system/user/components/batchModal.vue b/frontend/src/views/system/user/components/batchModal.vue index d44bfb77d7..888cd0dbbe 100644 --- a/frontend/src/views/system/user/components/batchModal.vue +++ b/frontend/src/views/system/user/components/batchModal.vue @@ -8,11 +8,7 @@ diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue index 812c1c0c7d..5e6b54187d 100644 --- a/frontend/src/views/system/user/index.vue +++ b/frontend/src/views/system/user/index.vue @@ -262,16 +262,12 @@ t('system.user.importSuccess') }}
{{ - `${t('system.user.importResultContentStart')} ${importSuccessCount} ${t( - 'system.user.importResultContentEnd' - )}` + t('system.user.importResultSuccessContent', { successNum: importSuccessCount }) }}