Skip to content

Commit

Permalink
chore(mis): 修改用户及账户状态显示的英文单词 (#1196)
Browse files Browse the repository at this point in the history
### 做了什么

此PR修改了用户列表和账户列表下英文国际化时几个英文的描述问题

1.用户列表的封锁状态展示 **Block** 修改为 **Blocked**
2.用户的列表的操作栏的 **Unseal** 修改为 **Unblock**
3.账户列表导航中的 **Normal Accounts** 修改为 **Available Accounts**
4.账户列表操作的 **Blocked** 修改为 **Block**
5. #1170 #1161  关于状态的提示说明中的 **Normal: xxx** 修改为 **Available: xxx**

### 修改前

![image](https://github.com/PKUHPC/SCOW/assets/43978285/603c4488-2a19-4d13-bc12-233c0d5b8292)

![image](https://github.com/PKUHPC/SCOW/assets/43978285/d7996d33-553a-4106-9140-e8ceb87336be)

![image](https://github.com/PKUHPC/SCOW/assets/43978285/35470862-0cd4-4a6d-8be3-42c02c203b16)


### 修改后

![image](https://github.com/PKUHPC/SCOW/assets/43978285/dbd0a129-92a5-4b15-9fda-0bcf44fdc810)

![image](https://github.com/PKUHPC/SCOW/assets/43978285/72a3c821-726f-40a1-96f7-c24decea4a3c)

![image](https://github.com/PKUHPC/SCOW/assets/43978285/e614310a-56b5-44ba-802e-8e9def1cf751)
  • Loading branch information
piccaSun authored Apr 3, 2024
1 parent 4a32bd7 commit 0e3ff89
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/warm-eagles-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@scow/mis-web": patch
---

统一修改规范用户及账户状态 正常和封锁 为 Available, Blocked;操作 封锁和解封 为 Block,Unblock
12 changes: 7 additions & 5 deletions apps/mis-web/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default {
debtAccount: "Debt Accounts",
blockedAccount: "Blocked Accounts",
frozenAccount: "Frozen Accounts",
normalAccount: "Normal Accounts",
normalAccount: "Available Accounts",
account: "Account",
accountName: "Account Name",
owner: "Owner",
Expand All @@ -243,7 +243,7 @@ export default {
+ "platform administrator and cannot submit jobs through this account.",
statusDebtTooltip: "Debt: The account balance is less than or equal to the blocking threshold, "
+ "and jobs cannot be submitted through this account.",
statusNormalTooltip: "Normal: The account status is not blocked or frozen, and the account "
statusNormalTooltip: "Available: The account status is not blocked or frozen, and the account "
+ "balance is greater than the blocking threshold; or the account is already in the whitelist.",
mangerMember: "Manage Members",
blocked: "Blocked",
Expand All @@ -257,6 +257,7 @@ export default {
unblockFail: "Account unblocking failed!",
unblockError: "Account {} has insufficient balance. "
+ "You can add it to the whitelist or unblock by adding funds.",
block: "Block",
unblock: "Unblock",
blockConfirmTitle: "Confirm Account Block?",
blockConfirmContent: "Do you wish to block account {} within tenant {}?",
Expand Down Expand Up @@ -696,15 +697,16 @@ export default {
},
userTable: {
block: "Block",
blocked: "Blocked",
normal: "Available",
quotaExceeded: "Quota Exceeded",
statusExplanation: "User Status Explanation",
blockedExplanation: "Blocked: The user has been blocked by the account administrator or the account owner, "
+ "preventing the selection of this account for job submission.",
quotaExceededExplanation: "Quota Exceeded: The user is not blocked, but the used quota is greater than or "
+ "equal to the user's quota limit, preventing the selection of this account for job submission.",
normalExplanation: "Normal: The user is not blocked, and the used quota is less than the user's quota limit, "
+ "allowing the selection of this account to submit jobs.",
normalExplanation: "Available: The user is not blocked, and the used quota is less than the user's "
+ "quota limit, allowing the selection of this account to submit jobs.",
admin: "Admin",
user: "Regular User",
role: "Role",
Expand All @@ -716,7 +718,7 @@ export default {
confirmUnsealText2: " ",
confirmUnsealText3: "?",
unsealSuccess: "User unsealed successfully!",
unseal: "Unseal",
unseal: "Unblock",
confirmBlock: "Confirm blocking user?",
confirmBlockText1: "Confirm blocking user from account ",
confirmBlockText2: " ",
Expand Down
2 changes: 2 additions & 0 deletions apps/mis-web/src/i18n/zh_cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ export default {
unblockFail: "解封账户失败!",
unblockError: "账户{}余额不足,您可以将其加入白名单或充值解封",

block: "封锁",
unblock: "解除封锁",
blockConfirmTitle: "确认封锁账户?",
blockConfirmContent: "确认要在租户{}中封锁账户{}",
Expand Down Expand Up @@ -696,6 +697,7 @@ export default {
},
userTable:{
block:"封锁",
blocked: "封锁",
normal:"正常",
quotaExceeded: "限额",
statusExplanation: "用户状态说明",
Expand Down
2 changes: 1 addition & 1 deletion apps/mis-web/src/pageComponents/accounts/AccountTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export const AccountTable: React.FC<Props> = ({
});
}}
>
{t(p("blocked"))}
{t(p("block"))}
</a>
)}
</Space>
Expand Down
2 changes: 1 addition & 1 deletion apps/mis-web/src/pageComponents/users/UserTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const UserTable: React.FC<Props> = ({
const DisplayedUserStateTexts = {
[DisplayedUserState.DISPLAYED_NORMAL]: <Tag color="success">{t(p("normal"))}</Tag>,
[DisplayedUserState.DISPLAYED_QUOTA_EXCEEDED]: <Tag color="error">{t(p("quotaExceeded"))}</Tag>,
[DisplayedUserState.DISPLAYED_BLOCKED]: <Tag color="error">{t(p("block"))}</Tag>,
[DisplayedUserState.DISPLAYED_BLOCKED]: <Tag color="error">{t(p("blocked"))}</Tag>,
};


Expand Down

0 comments on commit 0e3ff89

Please sign in to comment.