Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace kick terminology with Remove from chat #7469

Merged
merged 5 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/SlashCommands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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+?)( +(.*))?$/);
Expand Down
4 changes: 2 additions & 2 deletions src/TextForEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/elements/MemberEventListSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions src/components/views/right_panel/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -602,15 +602,15 @@ 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(() => {
stopUpdating();
});
};

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>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/rooms/RoomPreviewBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
35 changes: 18 additions & 17 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/CapabilityText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down