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

Commit

Permalink
Re-word composer button captions to be simple nouns
Browse files Browse the repository at this point in the history
  • Loading branch information
andybalaam committed Feb 1, 2022
1 parent bf78ea5 commit 3de3405
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 31 deletions.
4 changes: 1 addition & 3 deletions src/components/views/location/LocationButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,11 @@ export const LocationButton: React.FC<IProps> = ({ roomId, sender, menuPosition
},
);

// TODO: replace ContextMenuTooltipButton with a unified representation of
// the header buttons and the right panel buttons
return <React.Fragment>
<CollapsibleButton
className={className}
onClick={openMenu}
title={_t("Share location")}
title={_t("Location")}
/>

{ contextMenu }
Expand Down
10 changes: 5 additions & 5 deletions src/components/views/rooms/MessageComposerButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const EmojiButton: React.FC<IEmojiButtonProps> = ({ addEmoji, menuPosition }) =>
<CollapsibleButton
className={className}
onClick={openMenu}
title={_t("Add emoji")}
title={_t("Emoji")}
/>

{ contextMenu }
Expand Down Expand Up @@ -247,7 +247,7 @@ class UploadButton extends React.Component<IUploadButtonProps> {
<CollapsibleButton
className="mx_MessageComposer_button mx_MessageComposer_upload"
onClick={this.onUploadClick}
title={_t('Upload file')}
title={_t('Attachment')}
>
<input
ref={this.uploadInput}
Expand All @@ -269,7 +269,7 @@ function showStickersButton(props: IProps): ReactElement {
key="controls_stickers"
className="mx_MessageComposer_button mx_MessageComposer_stickers"
onClick={() => props.setStickerPickerOpen(!props.isStickerPickerOpen)}
title={_t("Send a sticker")}
title={props.isStickerPickerOpen ? _t("Hide stickers") : _t("Sticker")}
/>
: null
);
Expand All @@ -284,7 +284,7 @@ function voiceRecordingButton(props: IProps): ReactElement {
key="voice_message_send"
className="mx_MessageComposer_button mx_MessageComposer_voiceMessage"
onClick={props.onRecordStartEndClick}
title={_t("Send voice message")}
title={_t("Voice Message")}
/>
);
}
Expand Down Expand Up @@ -339,7 +339,7 @@ class PollButton extends React.PureComponent<IPollButtonProps> {
<CollapsibleButton
className="mx_MessageComposer_button mx_MessageComposer_poll"
onClick={this.onCreateClick}
title={_t("Create poll")}
title={_t("Poll")}
/>
);
}
Expand Down
17 changes: 8 additions & 9 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1694,13 +1694,12 @@
"You do not have permission to post to this room": "You do not have permission to post to this room",
"%(seconds)ss left": "%(seconds)ss left",
"Send voice message": "Send voice message",
"Add emoji": "Add emoji",
"Upload file": "Upload file",
"Send a sticker": "Send a sticker",
"Hide Stickers": "Hide Stickers",
"Show Stickers": "Show Stickers",
"Emoji": "Emoji",
"Hide stickers": "Hide stickers",
"Sticker": "Sticker",
"Voice Message": "Voice Message",
"You do not have permission to start polls in this room.": "You do not have permission to start polls in this room.",
"Create poll": "Create poll",
"Poll": "Poll",
"Bold": "Bold",
"Italics": "Italics",
"Strikethrough": "Strikethrough",
Expand Down Expand Up @@ -2095,7 +2094,6 @@
"Invalid file%(extra)s": "Invalid file%(extra)s",
"Error decrypting image": "Error decrypting image",
"Show image": "Show image",
"Sticker": "Sticker",
"Image": "Image",
"Join the conference at the top of this room": "Join the conference at the top of this room",
"Join the conference from the room information card on the right": "Join the conference from the room information card on the right",
Expand Down Expand Up @@ -2153,10 +2151,11 @@
"Submit logs": "Submit logs",
"Can't load this message": "Can't load this message",
"toggle event": "toggle event",
"Share location": "Share location",
"Location": "Location",
"We couldn’t send your location": "We couldn’t send your location",
"Element could not send your location. Please try again later.": "Element could not send your location. Please try again later.",
"Could not fetch location": "Could not fetch location",
"Share location": "Share location",
"Element was denied permission to fetch your location. Please allow location access in your browser settings.": "Element was denied permission to fetch your location. Please allow location access in your browser settings.",
"Failed to fetch your location. Please try again later.": "Failed to fetch your location. Please try again later.",
"Timed out trying to fetch your location. Please try again later.": "Timed out trying to fetch your location. Please try again later.",
Expand Down Expand Up @@ -2295,6 +2294,7 @@
"%(oneUser)schanged the server ACLs %(count)s times|one": "%(oneUser)schanged the server ACLs",
"%(severalUsers)schanged the <a>pinned messages</a> for the room %(count)s times.|other": "%(severalUsers)schanged the <a>pinned messages</a> for the room %(count)s times.",
"%(oneUser)schanged the <a>pinned messages</a> for the room %(count)s times.|other": "%(oneUser)schanged the <a>pinned messages</a> for the room %(count)s times.",
"Create poll": "Create poll",
"Create Poll": "Create Poll",
"Failed to post poll": "Failed to post poll",
"Sorry, the poll you tried to create was not posted.": "Sorry, the poll you tried to create was not posted.",
Expand Down Expand Up @@ -3276,7 +3276,6 @@
"Commands": "Commands",
"Command Autocomplete": "Command Autocomplete",
"Community Autocomplete": "Community Autocomplete",
"Emoji": "Emoji",
"Emoji Autocomplete": "Emoji Autocomplete",
"Notify the whole room": "Notify the whole room",
"Room Notification": "Room Notification",
Expand Down
28 changes: 14 additions & 14 deletions test/components/views/rooms/MessageComposerButtons-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ describe("MessageComposerButtons", () => {
);

expect(buttonLabels(buttons)).toEqual([
"Add emoji",
"Upload file",
"Emoji",
"Attachment",
"More options",
]);
});
Expand All @@ -64,14 +64,14 @@ describe("MessageComposerButtons", () => {
);

expect(buttonLabels(buttons)).toEqual([
"Add emoji",
"Upload file",
"Emoji",
"Attachment",
"More options",
[
"Send a sticker",
"Send voice message",
"Create poll",
"Share location",
"Sticker",
"Voice Message",
"Poll",
"Location",
],
]);
});
Expand All @@ -88,7 +88,7 @@ describe("MessageComposerButtons", () => {
);

expect(buttonLabels(buttons)).toEqual([
"Add emoji",
"Emoji",
"More options",
]);
});
Expand All @@ -105,13 +105,13 @@ describe("MessageComposerButtons", () => {
);

expect(buttonLabels(buttons)).toEqual([
"Add emoji",
"Emoji",
"More options",
[
"Upload file",
"Send a sticker",
"Create poll",
"Share location",
"Attachment",
"Sticker",
"Poll",
"Location",
],
]);
});
Expand Down

0 comments on commit 3de3405

Please sign in to comment.