diff --git a/src/components/views/dialogs/ConfirmSpaceUserActionDialog.tsx b/src/components/views/dialogs/ConfirmSpaceUserActionDialog.tsx index 9e014b86fd..1c5dd3fafa 100644 --- a/src/components/views/dialogs/ConfirmSpaceUserActionDialog.tsx +++ b/src/components/views/dialogs/ConfirmSpaceUserActionDialog.tsx @@ -15,11 +15,11 @@ limitations under the License. */ import React, { ComponentProps, useMemo, useState } from 'react'; + import ConfirmUserActionDialog from "./ConfirmUserActionDialog"; import SpaceStore from "../../../stores/SpaceStore"; import { Room } from "matrix-js-sdk/src/models/room"; import SpaceChildrenPicker from "../spaces/SpaceChildrenPicker"; -import { _t } from '../../../languageHandler'; type BaseProps = ComponentProps; interface IProps extends Omit { @@ -54,14 +54,7 @@ const ConfirmSpaceUserActionDialog: React.FC = ({ const selectedRooms = useMemo(() => new Set(roomsToLeave), [roomsToLeave]); let warning: JSX.Element; - if (!spaceChildren.length) { - warning =
- { _t("You’re not an admin of anything they’re a member of in , " + - "so banning won’t remove them from any rooms or spaces in .", {}, { - SpaceName: () => { space.name }, - }) } -
; - } else if (warningMessage) { + if (warningMessage) { warning =
{ warningMessage }
; diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx index 605b47f027..edb78fc167 100644 --- a/src/components/views/right_panel/UserInfo.tsx +++ b/src/components/views/right_panel/UserInfo.tsx @@ -541,21 +541,6 @@ 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', @@ -563,7 +548,9 @@ const RoomKickButton = ({ room, member, startUpdating, stopUpdating }: Omit, " + - "they'll still be able to access it after you kick them.", {}, { + "they'll still be able to access whatever you're not an admin of.", {}, { SpaceName: () => { room.name }, }), }, @@ -696,21 +683,6 @@ const BanToggleButton = ({ 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', @@ -718,7 +690,9 @@ const BanToggleButton = ({ room, member, startUpdating, stopUpdating }: Omit, " + - "they won’t be unbanned from it.", {}, { + "they still won't be able to access whatever you're not an admin of.", {}, { SpaceName: () => { room.name }, }) : _t("If you're not an admin of a room or space in , " + - "they'll still be able to access it after you ban them.", {}, { + "they'll still be able to access whatever you're not an admin of.", {}, { SpaceName: () => { room.name }, }), }, diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index e986139eb8..07757b9c8b 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1845,15 +1845,13 @@ "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 this user from %(spaceName)s?": "Disinvite this user from %(spaceName)s?", - "Kick this user from %(spaceName)s?": "Kick this user from %(spaceName)s?", - "Disinvite this user?": "Disinvite this user?", - "Kick this user?": "Kick this user?", "Disinvite": "Disinvite", "Kick": "Kick", + "Disinvite from %(roomName)s": "Disinvite from %(roomName)s", + "Kick from %(roomName)s": "Kick from %(roomName)s", "Kick them from everything I'm able to": "Kick them from everything I'm able to", "Kick them from specific things I'm able to": "Kick them from specific things I'm able to", - "If you're not an admin of a room or space in , 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.", + "If you're not an admin of a room or space in , they'll still be able to access whatever you're not an admin of.": "If you're not an admin of a room or space in , they'll still be able to access whatever you're not an admin of.", "Failed to kick": "Failed to kick", "No recent messages by %(user)s found": "No recent messages by %(user)s found", "Try scrolling up in the timeline to see if there are any earlier ones.": "Try scrolling up in the timeline to see if there are any earlier ones.", @@ -1864,17 +1862,14 @@ "Remove %(count)s messages|other": "Remove %(count)s messages", "Remove %(count)s messages|one": "Remove 1 message", "Remove recent messages": "Remove recent messages", - "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 from %(roomName)s": "Unban from %(roomName)s", + "Ban from %(roomName)s": "Ban from %(roomName)s", "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", "Ban them from specific things I'm able to": "Ban them from specific things I'm able to", - "If you’re not an admin of a room or space in , they won’t be unbanned from it.": "If you’re not an admin of a room or space in , they won’t be unbanned from it.", - "If you're not an admin of a room or space in , they'll still be able to access it after you ban them.": "If you're not an admin of a room or space in , they'll still be able to access it after you ban them.", + "If you’re not an admin of a room or space in , they still won't be able to access whatever you're not an admin of.": "If you’re not an admin of a room or space in , they still won't be able to access whatever you're not an admin of.", "Failed to ban user": "Failed to ban user", "Failed to mute user": "Failed to mute user", "Unmute": "Unmute", @@ -2233,7 +2228,6 @@ "Confirm Removal": "Confirm Removal", "Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change.": "Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change.", "Reason (optional)": "Reason (optional)", - "You’re not an admin of anything they’re a member of in , so banning won’t remove them from any rooms or spaces in .": "You’re not an admin of anything they’re a member of in , so banning won’t remove them from any rooms or spaces in .", "Clear all data in this session?": "Clear all data in this session?", "Clearing all data from this session is permanent. Encrypted messages will be lost unless their keys have been backed up.": "Clearing all data from this session is permanent. Encrypted messages will be lost unless their keys have been backed up.", "Clear all data": "Clear all data",