diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx index 091581a6f8..605b47f027 100644 --- a/src/components/views/right_panel/UserInfo.tsx +++ b/src/components/views/right_panel/UserInfo.tsx @@ -541,6 +541,21 @@ const RoomKickButton = ({ room, member, startUpdating, stopUpdating }: Omit { + let title: string; + if (room.isSpaceRoom()) { + if (member.membership === "invite") { + title = _t("Disinvite this user from %(spaceName)s?", { spaceName: room.name }); + } else { + title = _t("Kick this user from %(spaceName)s?", { spaceName: room.name }); + } + } else { + if (member.membership === "invite") { + title = _t("Disinvite this user?"); + } else { + title = _t("Kick this user?"); + } + } + const { finished } = Modal.createTrackedDialog( 'Confirm User Action Dialog', 'onKick', @@ -548,7 +563,7 @@ const RoomKickButton = ({ room, member, startUpdating, stopUpdating }: Omit { + let title: string; + if (room.isSpaceRoom()) { + if (isBanned) { + title = _t("Unban this user from %(spaceName)s?", { spaceName: room.name }); + } else { + title = _t("Ban this user from %(spaceName)s?", { spaceName: room.name }); + } + } else { + if (isBanned) { + title = _t("Unban this user?"); + } else { + title = _t("Ban this user?"); + } + } + const { finished } = Modal.createTrackedDialog( 'Confirm User Action Dialog', 'onBanOrUnban', @@ -688,7 +718,7 @@ const BanToggleButton = ({ room, member, startUpdating, stopUpdating }: Omit, they'll still be able to access it after you kick them.": "If you're not an admin of a room or space in , they'll still be able to access it after you kick them.", @@ -1862,9 +1864,11 @@ "Remove %(count)s messages|other": "Remove %(count)s messages", "Remove %(count)s messages|one": "Remove 1 message", "Remove recent messages": "Remove recent messages", - "Ban": "Ban", + "Unban this user from %(spaceName)s?": "Unban this user from %(spaceName)s?", + "Ban this user from %(spaceName)s?": "Ban this user from %(spaceName)s?", "Unban this user?": "Unban this user?", "Ban this user?": "Ban this user?", + "Ban": "Ban", "Unban them from everything I'm able to": "Unban them from everything I'm able to", "Ban them from everything I'm able to": "Ban them from everything I'm able to", "Unban them from specific things I'm able to": "Unban them from specific things I'm able to",