Replace `kick` terminology with `Remove from chat` (#7469)

pull/21833/head
Michael Telatynski 2022-01-14 13:08:34 +00:00 committed by GitHub
parent 54357c2d63
commit f4a6219c88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 38 additions and 36 deletions

View File

@ -722,9 +722,10 @@ export const Commands = [
renderingTypes: [TimelineRenderingType.Room],
}),
new Command({
command: 'kick',
command: 'remove',
aliases: ["kick"],
args: '<user-id> [reason]',
description: _td('Kicks user with given id'),
description: _td('Removes user with given id from this room'),
runFn: function(roomId, args) {
if (args) {
const matches = args.match(/^(\S+?)( +(.*))?$/);

View File

@ -158,12 +158,12 @@ function textForMemberEvent(ev: MatrixEvent, allowJSX: boolean, showHiddenEvents
: _t('%(senderName)s withdrew %(targetName)s\'s invitation', { senderName, targetName });
} else if (prevContent.membership === "join") {
return () => reason
? _t('%(senderName)s kicked %(targetName)s: %(reason)s', {
? _t('%(senderName)s removed %(targetName)s: %(reason)s', {
senderName,
targetName,
reason,
})
: _t('%(senderName)s kicked %(targetName)s', { senderName, targetName });
: _t('%(senderName)s removed %(targetName)s', { senderName, targetName });
} else {
return null;
}

View File

@ -295,8 +295,8 @@ export default class MemberEventListSummary extends React.Component<IProps> {
break;
case "kicked":
res = (userCount > 1)
? _t("were kicked %(count)s times", { count: repeats })
: _t("was kicked %(count)s times", { count: repeats });
? _t("were removed %(count)s times", { count: repeats })
: _t("was removed %(count)s times", { count: repeats });
break;
case "changed_name":
res = (userCount > 1)

View File

@ -567,10 +567,10 @@ const RoomKickButton = ({ room, member, startUpdating, stopUpdating }: Omit<IBas
room.isSpaceRoom() ? ConfirmSpaceUserActionDialog : ConfirmUserActionDialog,
{
member,
action: member.membership === "invite" ? _t("Disinvite") : _t("Kick"),
action: member.membership === "invite" ? _t("Disinvite") : _t("Remove from chat"),
title: member.membership === "invite"
? _t("Disinvite from %(roomName)s", { roomName: room.name })
: _t("Kick from %(roomName)s", { roomName: room.name }),
: _t("Remove from %(roomName)s", { roomName: room.name }),
askReason: member.membership === "join",
danger: true,
// space-specific props
@ -583,8 +583,8 @@ const RoomKickButton = ({ room, member, startUpdating, stopUpdating }: Omit<IBas
myMember.powerLevel > theirMember.powerLevel &&
child.currentState.hasSufficientPowerLevelFor("kick", myMember.powerLevel);
},
allLabel: _t("Kick them from everything I'm able to"),
specificLabel: _t("Kick them from specific things I'm able to"),
allLabel: _t("Remove them from everything I'm able to"),
specificLabel: _t("Remove them from specific things I'm able to"),
warningMessage: _t("They'll still be able to access whatever you're not an admin of."),
},
room.isSpaceRoom() ? "mx_ConfirmSpaceUserActionDialog_wrapper" : undefined,
@ -602,7 +602,7 @@ const RoomKickButton = ({ room, member, startUpdating, stopUpdating }: Omit<IBas
}, function(err) {
logger.error("Kick error: " + err);
Modal.createTrackedDialog('Failed to kick', '', ErrorDialog, {
title: _t("Failed to kick"),
title: _t("Failed to remove user"),
description: ((err && err.message) ? err.message : "Operation failed"),
});
}).finally(() => {
@ -610,7 +610,7 @@ const RoomKickButton = ({ room, member, startUpdating, stopUpdating }: Omit<IBas
});
};
const kickLabel = member.membership === "invite" ? _t("Disinvite") : _t("Kick");
const kickLabel = member.membership === "invite" ? _t("Disinvite") : _t("Remove from room");
return <AccessibleButton className="mx_UserInfo_field mx_UserInfo_destructive" onClick={onKick}>
{ kickLabel }
</AccessibleButton>;

View File

@ -359,7 +359,7 @@ export default class RoomPreviewBar extends React.Component<IProps, IState> {
}
case MessageCase.Kicked: {
const { memberName, reason } = this.getKickOrBanInfo();
title = _t("You were kicked from %(roomName)s by %(memberName)s",
title = _t("You were removed from %(roomName)s by %(memberName)s",
{ memberName, roomName: this.roomName() });
subTitle = reason ? _t("Reason: %(reason)s", { reason }) : null;

View File

@ -265,7 +265,7 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
defaultValue: 50,
},
"kick": {
desc: _t('Kick users'),
desc: _t('Remove users'),
defaultValue: 50,
},
"ban": {

View File

@ -454,7 +454,7 @@
"Joins room with given address": "Joins room with given address",
"Leave room": "Leave room",
"Unrecognised room address: %(roomAlias)s": "Unrecognised room address: %(roomAlias)s",
"Kicks user with given id": "Kicks user with given id",
"Removes user with given id from this room": "Removes user with given id from this room",
"Bans user with given id": "Bans user with given id",
"Unbans user with given ID": "Unbans user with given ID",
"Ignores a user, hiding their messages from you": "Ignores a user, hiding their messages from you",
@ -518,8 +518,8 @@
"%(senderName)s unbanned %(targetName)s": "%(senderName)s unbanned %(targetName)s",
"%(senderName)s withdrew %(targetName)s's invitation: %(reason)s": "%(senderName)s withdrew %(targetName)s's invitation: %(reason)s",
"%(senderName)s withdrew %(targetName)s's invitation": "%(senderName)s withdrew %(targetName)s's invitation",
"%(senderName)s kicked %(targetName)s: %(reason)s": "%(senderName)s kicked %(targetName)s: %(reason)s",
"%(senderName)s kicked %(targetName)s": "%(senderName)s kicked %(targetName)s",
"%(senderName)s removed %(targetName)s: %(reason)s": "%(senderName)s removed %(targetName)s: %(reason)s",
"%(senderName)s removed %(targetName)s": "%(senderName)s removed %(targetName)s",
"%(senderDisplayName)s changed the topic to \"%(topic)s\".": "%(senderDisplayName)s changed the topic to \"%(topic)s\".",
"%(senderDisplayName)s changed the room avatar.": "%(senderDisplayName)s changed the room avatar.",
"%(senderDisplayName)s removed the room name.": "%(senderDisplayName)s removed the room name.",
@ -614,9 +614,9 @@
"See when the avatar changes in this room": "See when the avatar changes in this room",
"Change the avatar of your active room": "Change the avatar of your active room",
"See when the avatar changes in your active room": "See when the avatar changes in your active room",
"Kick, ban, or invite people to this room, and make you leave": "Kick, ban, or invite people to this room, and make you leave",
"Remove, ban, or invite people to this room, and make you leave": "Remove, ban, or invite people to this room, and make you leave",
"See when people join, leave, or are invited to this room": "See when people join, leave, or are invited to this room",
"Kick, ban, or invite people to your active room, and make you leave": "Kick, ban, or invite people to your active room, and make you leave",
"Remove, ban, or invite people to your active room, and make you leave": "Remove, ban, or invite people to your active room, and make you leave",
"See when people join, leave, or are invited to your active room": "See when people join, leave, or are invited to your active room",
"Send stickers to this room as you": "Send stickers to this room as you",
"See when a sticker is posted in this room": "See when a sticker is posted in this room",
@ -894,7 +894,7 @@
"Show stickers button": "Show stickers button",
"Use a more compact 'Modern' layout": "Use a more compact 'Modern' layout",
"Show a placeholder for removed messages": "Show a placeholder for removed messages",
"Show join/leave messages (invites/kicks/bans unaffected)": "Show join/leave messages (invites/kicks/bans unaffected)",
"Show join/leave messages (invites/removes/bans unaffected)": "Show join/leave messages (invites/removes/bans unaffected)",
"Show avatar changes": "Show avatar changes",
"Show display name changes": "Show display name changes",
"Show read receipts sent by other users": "Show read receipts sent by other users",
@ -1575,7 +1575,7 @@
"Send messages": "Send messages",
"Invite users": "Invite users",
"Change settings": "Change settings",
"Kick users": "Kick users",
"Remove users": "Remove users",
"Ban users": "Ban users",
"Remove messages sent by others": "Remove messages sent by others",
"Notify everyone": "Notify everyone",
@ -1791,7 +1791,7 @@
"Join the conversation with an account": "Join the conversation with an account",
"Sign Up": "Sign Up",
"Loading room preview": "Loading room preview",
"You were kicked from %(roomName)s by %(memberName)s": "You were kicked from %(roomName)s by %(memberName)s",
"You were removed from %(roomName)s by %(memberName)s": "You were removed from %(roomName)s by %(memberName)s",
"Reason: %(reason)s": "Reason: %(reason)s",
"Forget this room": "Forget this room",
"Re-join": "Re-join",
@ -1964,13 +1964,14 @@
"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",
"Kick": "Kick",
"Remove from chat": "Remove from chat",
"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",
"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 kick": "Failed to kick",
"Failed to remove user": "Failed to remove user",
"Remove from room": "Remove from room",
"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.",
"Remove recent messages by %(user)s": "Remove recent messages by %(user)s",
@ -2255,10 +2256,10 @@
"were unbanned %(count)s times|one": "were unbanned",
"was unbanned %(count)s times|other": "was unbanned %(count)s times",
"was unbanned %(count)s times|one": "was unbanned",
"were kicked %(count)s times|other": "were kicked %(count)s times",
"were kicked %(count)s times|one": "were kicked",
"was kicked %(count)s times|other": "was kicked %(count)s times",
"was kicked %(count)s times|one": "was kicked",
"were removed %(count)s times|other": "were removed %(count)s times",
"were removed %(count)s times|one": "were removed",
"was removed %(count)s times|other": "was removed %(count)s times",
"was removed %(count)s times|one": "was removed",
"%(severalUsers)schanged their name %(count)s times|other": "%(severalUsers)schanged their name %(count)s times",
"%(severalUsers)schanged their name %(count)s times|one": "%(severalUsers)schanged their name",
"%(oneUser)schanged their name %(count)s times|other": "%(oneUser)schanged their name %(count)s times",

View File

@ -426,7 +426,7 @@ export const SETTINGS: {[setting: string]: ISetting} = {
},
"showJoinLeaves": {
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
displayName: _td('Show join/leave messages (invites/kicks/bans unaffected)'),
displayName: _td('Show join/leave messages (invites/removes/bans unaffected)'),
default: true,
invertedSettingName: 'hideJoinLeaves',
},

View File

@ -110,11 +110,11 @@ export class CapabilityText {
},
[EventType.RoomMember]: {
[WidgetKind.Room]: {
[EventDirection.Send]: _td("Kick, ban, or invite people to this room, and make you leave"),
[EventDirection.Send]: _td("Remove, ban, or invite people to this room, and make you leave"),
[EventDirection.Receive]: _td("See when people join, leave, or are invited to this room"),
},
[GENERIC_WIDGET_KIND]: {
[EventDirection.Send]: _td("Kick, ban, or invite people to your active room, and make you leave"),
[EventDirection.Send]: _td("Remove, ban, or invite people to your active room, and make you leave"),
[EventDirection.Receive]: _td("See when people join, leave, or are invited to your active room"),
},
},

View File

@ -516,7 +516,7 @@ describe('MemberEventListSummary', function() {
expect(summaryText).toBe(
"user_1 was invited, was banned, joined, rejected their invitation, left, " +
"had their invitation withdrawn, was unbanned, was kicked, left and was kicked",
"had their invitation withdrawn, was unbanned, was removed, left and was removed",
);
});

View File

@ -18,7 +18,7 @@ exports[`<RoomPreviewBar /> renders kicked message 1`] = `
class="mx_RoomPreviewBar_message"
>
<h3>
You were kicked from RoomPreviewBar-test-room by @kicker:test.com
You were removed from RoomPreviewBar-test-room by @kicker:test.com
</h3>
<p>
Reason: test reason