Fix admin tools phrase inconsistency (#8342)

* fix-admin-tools-phrase-inconsistency

* correctly specify space room action

* run i18n

* Apply suggestions from code review

Revert the applied formatting.

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

* fix inconsistency for RoomKickButton

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
t3chguy/dedup-icons-17oct
Emmanuel 2022-04-17 20:29:41 +01:00 committed by GitHub
parent b114c5e239
commit 27118a9799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -575,7 +575,9 @@ const RoomKickButton = ({ room, member, startUpdating, stopUpdating }: Omit<IBas
room.isSpaceRoom() ? ConfirmSpaceUserActionDialog : ConfirmUserActionDialog, room.isSpaceRoom() ? ConfirmSpaceUserActionDialog : ConfirmUserActionDialog,
{ {
member, member,
action: member.membership === "invite" ? _t("Disinvite") : _t("Remove from chat"), action: room.isSpaceRoom() ?
member.membership === "invite" ? _t("Disinvite from space") : _t("Remove from space")
: member.membership === "invite" ? _t("Disinvite from room") : _t("Remove from room"),
title: member.membership === "invite" title: member.membership === "invite"
? _t("Disinvite from %(roomName)s", { roomName: room.name }) ? _t("Disinvite from %(roomName)s", { roomName: room.name })
: _t("Remove from %(roomName)s", { roomName: room.name }), : _t("Remove from %(roomName)s", { roomName: room.name }),
@ -618,7 +620,10 @@ const RoomKickButton = ({ room, member, startUpdating, stopUpdating }: Omit<IBas
}); });
}; };
const kickLabel = member.membership === "invite" ? _t("Disinvite") : _t("Remove from room"); const kickLabel = room.isSpaceRoom() ?
member.membership === "invite" ? _t("Disinvite from space") : _t("Remove from space")
: member.membership === "invite" ? _t("Disinvite from room") : _t("Remove from room");
return <AccessibleButton className="mx_UserInfo_field mx_UserInfo_destructive" onClick={onKick}> return <AccessibleButton className="mx_UserInfo_field mx_UserInfo_destructive" onClick={onKick}>
{ kickLabel } { kickLabel }
</AccessibleButton>; </AccessibleButton>;

View File

@ -1983,15 +1983,16 @@
"You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the space it will be impossible to regain privileges.": "You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the space it will be impossible to regain privileges.", "You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the space it will be impossible to regain privileges.": "You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the space it will be impossible to regain privileges.",
"You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the room it will be impossible to regain privileges.": "You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the room it will be impossible to regain privileges.", "You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the room it will be impossible to regain privileges.": "You will not be able to undo this change as you are demoting yourself, if you are the last privileged user in the room it will be impossible to regain privileges.",
"Demote": "Demote", "Demote": "Demote",
"Disinvite": "Disinvite", "Disinvite from space": "Disinvite from space",
"Remove from chat": "Remove from chat", "Remove from space": "Remove from space",
"Disinvite from room": "Disinvite from room",
"Remove from room": "Remove from room",
"Disinvite from %(roomName)s": "Disinvite from %(roomName)s", "Disinvite from %(roomName)s": "Disinvite from %(roomName)s",
"Remove from %(roomName)s": "Remove from %(roomName)s", "Remove from %(roomName)s": "Remove from %(roomName)s",
"Remove them from everything I'm able to": "Remove them from everything I'm able to", "Remove them from everything I'm able to": "Remove them from everything I'm able to",
"Remove them from specific things I'm able to": "Remove them from specific things I'm able to", "Remove them from specific things I'm able to": "Remove them from specific things I'm able to",
"They'll still be able to access whatever you're not an admin of.": "They'll still be able to access whatever you're not an admin of.", "They'll still be able to access whatever you're not an admin of.": "They'll still be able to access whatever you're not an admin of.",
"Failed to remove user": "Failed to remove user", "Failed to remove user": "Failed to remove user",
"Remove from room": "Remove from room",
"Remove recent messages": "Remove recent messages", "Remove recent messages": "Remove recent messages",
"Unban from space": "Unban from space", "Unban from space": "Unban from space",
"Ban from space": "Ban from space", "Ban from space": "Ban from space",