Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix admin tools phrase inconsistency (#8342)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
EECvision and t3chguy authored Apr 17, 2022
1 parent b114c5e commit 27118a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/components/views/right_panel/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,9 @@ const RoomKickButton = ({ room, member, startUpdating, stopUpdating }: Omit<IBas
room.isSpaceRoom() ? ConfirmSpaceUserActionDialog : ConfirmUserActionDialog,
{
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"
? _t("Disinvite from %(roomName)s", { roomName: room.name })
: _t("Remove from %(roomName)s", { roomName: room.name }),
Expand Down Expand Up @@ -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}>
{ kickLabel }
</AccessibleButton>;
Expand Down
7 changes: 4 additions & 3 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 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",
"Disinvite": "Disinvite",
"Remove from chat": "Remove from chat",
"Disinvite from space": "Disinvite from space",
"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",
"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 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.",
"Failed to remove user": "Failed to remove user",
"Remove from room": "Remove from room",
"Remove recent messages": "Remove recent messages",
"Unban from space": "Unban from space",
"Ban from space": "Ban from space",
Expand Down

0 comments on commit 27118a9

Please sign in to comment.