Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 71fe08e

Browse files
Change wording from avatar to profile picture (#7015)
* Change wording from avatar to profile picture Signed-off-by: Aaron Raimist <[email protected]> * lint Signed-off-by: Aaron Raimist <[email protected]> * Update EventListSummary Signed-off-by: Aaron Raimist <[email protected]> * Delete MembershipEventListSummary.tsx Signed-off-by: Aaron Raimist <[email protected]> * delint * Update tests --------- Signed-off-by: Aaron Raimist <[email protected]> Co-authored-by: Michael Telatynski <[email protected]>
1 parent c153a4d commit 71fe08e

File tree

13 files changed

+38
-30
lines changed

13 files changed

+38
-30
lines changed

src/SlashCommands.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ export const Commands = [
440440
new Command({
441441
command: "myroomavatar",
442442
args: "[<mxc_url>]",
443-
description: _td("Changes your avatar in this current room only"),
443+
description: _td("Changes your profile picture in this current room only"),
444444
isEnabled: (cli) => !isCurrentLocalRoom(cli),
445445
runFn: function (cli, roomId, args) {
446446
const room = cli.getRoom(roomId);
@@ -469,7 +469,7 @@ export const Commands = [
469469
new Command({
470470
command: "myavatar",
471471
args: "[<mxc_url>]",
472-
description: _td("Changes your avatar in all rooms"),
472+
description: _td("Changes your profile picture in all rooms"),
473473
runFn: function (cli, roomId, args) {
474474
let promise = Promise.resolve(args ?? null);
475475
if (!args) {

src/components/views/avatars/BaseAvatar.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ interface IProps {
4646
inputRef?: React.RefObject<HTMLImageElement & HTMLSpanElement>;
4747
className?: string;
4848
tabIndex?: number;
49+
altText?: string;
50+
ariaLabel?: string;
4951
}
5052

5153
const calculateUrls = (url?: string | null, urls?: string[], lowBandwidth = false): string[] => {
@@ -113,6 +115,8 @@ const BaseAvatar: React.FC<IProps> = (props) => {
113115
onClick,
114116
inputRef,
115117
className,
118+
altText = _t("Avatar"),
119+
ariaLabel = _t("Avatar"),
116120
...otherProps
117121
} = props;
118122

@@ -153,7 +157,7 @@ const BaseAvatar: React.FC<IProps> = (props) => {
153157
if (onClick) {
154158
return (
155159
<AccessibleButton
156-
aria-label={_t("Avatar")}
160+
aria-label={ariaLabel}
157161
aria-live="off"
158162
{...otherProps}
159163
element="span"
@@ -193,7 +197,7 @@ const BaseAvatar: React.FC<IProps> = (props) => {
193197
height: toPx(height),
194198
}}
195199
title={title}
196-
alt={_t("Avatar")}
200+
alt={altText}
197201
inputRef={inputRef}
198202
data-testid="avatar-img"
199203
{...otherProps}

src/components/views/avatars/MemberAvatar.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { mediaFromMxc } from "../../../customisations/Media";
2626
import { CardContext } from "../right_panel/context";
2727
import UserIdentifierCustomisations from "../../../customisations/UserIdentifier";
2828
import { useRoomMemberProfile } from "../../../hooks/room/useRoomMemberProfile";
29+
import { _t } from "../../../languageHandler";
2930

3031
interface IProps extends Omit<React.ComponentProps<typeof BaseAvatar>, "name" | "idName" | "url"> {
3132
member: RoomMember | null;
@@ -103,6 +104,8 @@ export default function MemberAvatar({
103104
}
104105
: props.onClick
105106
}
107+
altText={_t("Profile picture")}
108+
ariaLabel={_t("Profile picture")}
106109
/>
107110
);
108111
}

src/components/views/elements/AppPermission.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default class AppPermission extends React.Component<IProps, IState> {
104104
{_t("Any of the following data may be shared:")}
105105
<ul>
106106
<li>{_t("Your display name")}</li>
107-
<li>{_t("Your avatar URL")}</li>
107+
<li>{_t("Your profile picture URL")}</li>
108108
<li>{_t("Your user ID")}</li>
109109
<li>{_t("Your device ID")}</li>
110110
<li>{_t("Your theme")}</li>

src/components/views/elements/EventListSummary.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,11 @@ export default class EventListSummary extends React.Component<
324324
case TransitionType.ChangedAvatar:
325325
res =
326326
userCount > 1
327-
? _t("%(severalUsers)schanged their avatar %(count)s times", { severalUsers: "", count })
328-
: _t("%(oneUser)schanged their avatar %(count)s times", { oneUser: "", count });
327+
? _t("%(severalUsers)schanged their profile picture %(count)s times", {
328+
severalUsers: "",
329+
count,
330+
})
331+
: _t("%(oneUser)schanged their profile picture %(count)s times", { oneUser: "", count });
329332
break;
330333
case TransitionType.NoChange:
331334
res =

src/components/views/messages/EncryptionEvent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ const EncryptionEvent = forwardRef<HTMLDivElement, IProps>(({ mxEvent, timestamp
5454
const displayName = room?.getMember(dmPartner)?.rawDisplayName || dmPartner;
5555
subtitle = _t(
5656
"Messages here are end-to-end encrypted. " +
57-
"Verify %(displayName)s in their profile - tap on their avatar.",
57+
"Verify %(displayName)s in their profile - tap on their profile picture.",
5858
{ displayName },
5959
);
6060
} else if (room && isLocalRoom(room)) {
6161
subtitle = _t("Messages in this chat will be end-to-end encrypted.");
6262
} else {
6363
subtitle = _t(
6464
"Messages in this room are end-to-end encrypted. " +
65-
"When people join, you can verify them in their profile, just tap on their avatar.",
65+
"When people join, you can verify them in their profile, just tap on their profile picture.",
6666
);
6767
}
6868

src/i18n/strings/en_EN.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@
430430
"Changes your display nickname": "Changes your display nickname",
431431
"Changes your display nickname in the current room only": "Changes your display nickname in the current room only",
432432
"Changes the avatar of the current room": "Changes the avatar of the current room",
433-
"Changes your avatar in this current room only": "Changes your avatar in this current room only",
434-
"Changes your avatar in all rooms": "Changes your avatar in all rooms",
433+
"Changes your profile picture in this current room only": "Changes your profile picture in this current room only",
434+
"Changes your profile picture in all rooms": "Changes your profile picture in all rooms",
435435
"Gets or sets the room topic": "Gets or sets the room topic",
436436
"Failed to get room topic: Unable to find room (%(roomId)s": "Failed to get room topic: Unable to find room (%(roomId)s",
437437
"This room has no topic.": "This room has no topic.",
@@ -973,7 +973,7 @@
973973
"Currently experimental.": "Currently experimental.",
974974
"Support adding custom themes": "Support adding custom themes",
975975
"Offline encrypted messaging using dehydrated devices": "Offline encrypted messaging using dehydrated devices",
976-
"Show current avatar and name for users in message history": "Show current avatar and name for users in message history",
976+
"Show current profile picture and name for users in message history": "Show current profile picture and name for users in message history",
977977
"Show HTML representation of room topics": "Show HTML representation of room topics",
978978
"Show info about bridges in room settings": "Show info about bridges in room settings",
979979
"Right panel stays open": "Right panel stays open",
@@ -1006,7 +1006,7 @@
10061006
"Use a more compact 'Modern' layout": "Use a more compact 'Modern' layout",
10071007
"Show a placeholder for removed messages": "Show a placeholder for removed messages",
10081008
"Show join/leave messages (invites/removes/bans unaffected)": "Show join/leave messages (invites/removes/bans unaffected)",
1009-
"Show avatar changes": "Show avatar changes",
1009+
"Show profile picture changes": "Show profile picture changes",
10101010
"Show display name changes": "Show display name changes",
10111011
"Show read receipts sent by other users": "Show read receipts sent by other users",
10121012
"Show timestamps in 12 hour format (e.g. 2:30pm)": "Show timestamps in 12 hour format (e.g. 2:30pm)",
@@ -2395,9 +2395,9 @@
23952395
"Download": "Download",
23962396
"View Source": "View Source",
23972397
"Some encryption parameters have been changed.": "Some encryption parameters have been changed.",
2398-
"Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.": "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their avatar.",
2398+
"Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their profile picture.": "Messages here are end-to-end encrypted. Verify %(displayName)s in their profile - tap on their profile picture.",
23992399
"Messages in this chat will be end-to-end encrypted.": "Messages in this chat will be end-to-end encrypted.",
2400-
"Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their avatar.": "Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their avatar.",
2400+
"Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their profile picture.": "Messages in this room are end-to-end encrypted. When people join, you can verify them in their profile, just tap on their profile picture.",
24012401
"Encryption enabled": "Encryption enabled",
24022402
"Ignored attempt to disable encryption": "Ignored attempt to disable encryption",
24032403
"Encryption not enabled": "Encryption not enabled",
@@ -2526,7 +2526,7 @@
25262526
"Cancel search": "Cancel search",
25272527
"Any of the following data may be shared:": "Any of the following data may be shared:",
25282528
"Your display name": "Your display name",
2529-
"Your avatar URL": "Your avatar URL",
2529+
"Your profile picture URL": "Your profile picture URL",
25302530
"Your user ID": "Your user ID",
25312531
"Your device ID": "Your device ID",
25322532
"Your theme": "Your theme",
@@ -2596,10 +2596,8 @@
25962596
"%(severalUsers)schanged their name %(count)s times|one": "%(severalUsers)schanged their name",
25972597
"%(oneUser)schanged their name %(count)s times|other": "%(oneUser)schanged their name %(count)s times",
25982598
"%(oneUser)schanged their name %(count)s times|one": "%(oneUser)schanged their name",
2599-
"%(severalUsers)schanged their avatar %(count)s times|other": "%(severalUsers)schanged their avatar %(count)s times",
2600-
"%(severalUsers)schanged their avatar %(count)s times|one": "%(severalUsers)schanged their avatar",
2601-
"%(oneUser)schanged their avatar %(count)s times|other": "%(oneUser)schanged their avatar %(count)s times",
2602-
"%(oneUser)schanged their avatar %(count)s times|one": "%(oneUser)schanged their avatar",
2599+
"%(severalUsers)schanged their profile picture %(count)s times|other": "%(severalUsers)schanged their profile picture %(count)s times",
2600+
"%(oneUser)schanged their profile picture %(count)s times|other": "%(oneUser)schanged their profile picture %(count)s times",
26032601
"%(severalUsers)smade no changes %(count)s times|other": "%(severalUsers)smade no changes %(count)s times",
26042602
"%(severalUsers)smade no changes %(count)s times|one": "%(severalUsers)smade no changes",
26052603
"%(oneUser)smade no changes %(count)s times|other": "%(oneUser)smade no changes %(count)s times",

src/settings/Settings.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ export const SETTINGS: { [setting: string]: ISetting } = {
338338
},
339339
"useOnlyCurrentProfiles": {
340340
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
341-
displayName: _td("Show current avatar and name for users in message history"),
341+
displayName: _td("Show current profile picture and name for users in message history"),
342342
default: false,
343343
},
344344
"mjolnirRooms": {
@@ -576,7 +576,7 @@ export const SETTINGS: { [setting: string]: ISetting } = {
576576
},
577577
"showAvatarChanges": {
578578
supportedLevels: LEVELS_ROOM_SETTINGS_WITH_ROOM,
579-
displayName: _td("Show avatar changes"),
579+
displayName: _td("Show profile picture changes"),
580580
default: true,
581581
invertedSettingName: "hideAvatarChanges",
582582
},

test/components/views/messages/EncryptionEvent-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe("EncryptionEvent", () => {
7373
checkTexts(
7474
"Encryption enabled",
7575
"Messages in this room are end-to-end encrypted. " +
76-
"When people join, you can verify them in their profile, just tap on their avatar.",
76+
"When people join, you can verify them in their profile, just tap on their profile picture.",
7777
);
7878
});
7979

test/components/views/right_panel/__snapshots__/UserInfo-test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ exports[`<UserInfo /> with crypto enabled renders <BasicUserInfo /> 1`] = `
9494
class="mx_UserInfo_avatar_transition_child"
9595
>
9696
<span
97-
aria-label="Avatar"
97+
aria-label="Profile picture"
9898
aria-live="off"
9999
class="mx_AccessibleButton mx_BaseAvatar"
100100
role="button"

test/components/views/settings/tabs/user/__snapshots__/PreferencesUserSettingsTab-test.tsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -899,13 +899,13 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
899899
<span
900900
class="mx_SettingsFlag_labelText"
901901
>
902-
Show avatar changes
902+
Show profile picture changes
903903
</span>
904904
</label>
905905
<div
906906
aria-checked="true"
907907
aria-disabled="true"
908-
aria-label="Show avatar changes"
908+
aria-label="Show profile picture changes"
909909
class="mx_AccessibleButton mx_ToggleSwitch mx_ToggleSwitch_on"
910910
role="switch"
911911
tabindex="0"
@@ -999,13 +999,13 @@ exports[`PreferencesUserSettingsTab should render 1`] = `
999999
<span
10001000
class="mx_SettingsFlag_labelText"
10011001
>
1002-
Show current avatar and name for users in message history
1002+
Show current profile picture and name for users in message history
10031003
</span>
10041004
</label>
10051005
<div
10061006
aria-checked="false"
10071007
aria-disabled="true"
1008-
aria-label="Show current avatar and name for users in message history"
1008+
aria-label="Show current profile picture and name for users in message history"
10091009
class="mx_AccessibleButton mx_ToggleSwitch"
10101010
role="switch"
10111011
tabindex="0"

test/components/views/voip/CallView-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ describe("CallLobby", () => {
127127
const carol = mkRoomMember(room.roomId, "@carol:example.org");
128128

129129
const expectAvatars = (userIds: string[]) => {
130-
const avatars = screen.queryAllByRole("button", { name: "Avatar" });
130+
const avatars = screen.queryAllByRole("button", { name: "Profile picture" });
131131
expect(userIds.length).toBe(avatars.length);
132132

133133
for (const [userId, avatar] of zip(userIds, avatars)) {

test/utils/exportUtils/__snapshots__/HTMLExport-test.ts.snap

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)