mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Change "Ban" to "Ban from room" to fix an inconsistency in the Admin Tools dialog (#8281)
* 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> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
eb1d9b8f41
commit
8eaae6bdbc
@ -178,7 +178,7 @@ function useHasCrossSigningKeys(cli: MatrixClient, member: User, canVerify: bool
|
||||
}, [cli, member, canVerify], undefined);
|
||||
}
|
||||
|
||||
function DeviceItem({ userId, device }: {userId: string, device: IDevice}) {
|
||||
function DeviceItem({ userId, device }: { userId: string, device: IDevice }) {
|
||||
const cli = useContext(MatrixClientContext);
|
||||
const isMe = userId === cli.getUserId();
|
||||
const deviceTrust = cli.checkDeviceTrust(userId, device.deviceId);
|
||||
@ -239,7 +239,7 @@ function DeviceItem({ userId, device }: {userId: string, device: IDevice}) {
|
||||
}
|
||||
}
|
||||
|
||||
function DevicesSection({ devices, userId, loading }: {devices: IDevice[], userId: string, loading: boolean}) {
|
||||
function DevicesSection({ devices, userId, loading }: { devices: IDevice[], userId: string, loading: boolean }) {
|
||||
const cli = useContext(MatrixClientContext);
|
||||
const userTrust = cli.checkUserTrust(userId);
|
||||
|
||||
@ -653,7 +653,9 @@ const BanToggleButton = ({ room, member, startUpdating, stopUpdating }: Omit<IBa
|
||||
room.isSpaceRoom() ? ConfirmSpaceUserActionDialog : ConfirmUserActionDialog,
|
||||
{
|
||||
member,
|
||||
action: isBanned ? _t("Unban") : _t("Ban"),
|
||||
action: room.isSpaceRoom()
|
||||
? (isBanned ? _t("Unban from space") : _t("Ban from space"))
|
||||
: (isBanned ? _t("Unban from room") : _t("Ban from room")),
|
||||
title: isBanned
|
||||
? _t("Unban from %(roomName)s", { roomName: room.name })
|
||||
: _t("Ban from %(roomName)s", { roomName: room.name }),
|
||||
@ -719,9 +721,13 @@ const BanToggleButton = ({ room, member, startUpdating, stopUpdating }: Omit<IBa
|
||||
});
|
||||
};
|
||||
|
||||
let label = _t("Ban");
|
||||
let label = room.isSpaceRoom()
|
||||
? _t("Ban from space")
|
||||
: _t("Ban from room");
|
||||
if (isBanned) {
|
||||
label = _t("Unban");
|
||||
label = room.isSpaceRoom()
|
||||
? _t("Unban from space")
|
||||
: _t("Unban from room");
|
||||
}
|
||||
|
||||
const classes = classNames("mx_UserInfo_field", {
|
||||
|
@ -1992,7 +1992,10 @@
|
||||
"Failed to remove user": "Failed to remove user",
|
||||
"Remove from room": "Remove from room",
|
||||
"Remove recent messages": "Remove recent messages",
|
||||
"Ban": "Ban",
|
||||
"Unban from space": "Unban from space",
|
||||
"Ban from space": "Ban from space",
|
||||
"Unban from room": "Unban from room",
|
||||
"Ban from room": "Ban from room",
|
||||
"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",
|
||||
|
Loading…
Reference in New Issue
Block a user