From 3de340550792add5e917b73a7a68d400bc702e17 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Mon, 31 Jan 2022 12:41:33 +0000 Subject: [PATCH] Re-word composer button captions to be simple nouns --- .../views/location/LocationButton.tsx | 4 +-- .../views/rooms/MessageComposerButtons.tsx | 10 +++---- src/i18n/strings/en_EN.json | 17 ++++++----- .../rooms/MessageComposerButtons-test.tsx | 28 +++++++++---------- 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/src/components/views/location/LocationButton.tsx b/src/components/views/location/LocationButton.tsx index 815e001717d..d3f6e7cb3d0 100644 --- a/src/components/views/location/LocationButton.tsx +++ b/src/components/views/location/LocationButton.tsx @@ -72,13 +72,11 @@ export const LocationButton: React.FC = ({ roomId, sender, menuPosition }, ); - // TODO: replace ContextMenuTooltipButton with a unified representation of - // the header buttons and the right panel buttons return { contextMenu } diff --git a/src/components/views/rooms/MessageComposerButtons.tsx b/src/components/views/rooms/MessageComposerButtons.tsx index 7e5cfa21033..877c70cca54 100644 --- a/src/components/views/rooms/MessageComposerButtons.tsx +++ b/src/components/views/rooms/MessageComposerButtons.tsx @@ -168,7 +168,7 @@ const EmojiButton: React.FC = ({ addEmoji, menuPosition }) => { contextMenu } @@ -247,7 +247,7 @@ class UploadButton extends React.Component { props.setStickerPickerOpen(!props.isStickerPickerOpen)} - title={_t("Send a sticker")} + title={props.isStickerPickerOpen ? _t("Hide stickers") : _t("Sticker")} /> : null ); @@ -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")} /> ); } @@ -339,7 +339,7 @@ class PollButton extends React.PureComponent { ); } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index bff54532f9d..847620d6a06 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -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", @@ -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", @@ -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.", @@ -2295,6 +2294,7 @@ "%(oneUser)schanged the server ACLs %(count)s times|one": "%(oneUser)schanged the server ACLs", "%(severalUsers)schanged the pinned messages for the room %(count)s times.|other": "%(severalUsers)schanged the pinned messages for the room %(count)s times.", "%(oneUser)schanged the pinned messages for the room %(count)s times.|other": "%(oneUser)schanged the pinned messages 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.", @@ -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", diff --git a/test/components/views/rooms/MessageComposerButtons-test.tsx b/test/components/views/rooms/MessageComposerButtons-test.tsx index 1c8ad4dcf73..78bf64496ed 100644 --- a/test/components/views/rooms/MessageComposerButtons-test.tsx +++ b/test/components/views/rooms/MessageComposerButtons-test.tsx @@ -46,8 +46,8 @@ describe("MessageComposerButtons", () => { ); expect(buttonLabels(buttons)).toEqual([ - "Add emoji", - "Upload file", + "Emoji", + "Attachment", "More options", ]); }); @@ -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", ], ]); }); @@ -88,7 +88,7 @@ describe("MessageComposerButtons", () => { ); expect(buttonLabels(buttons)).toEqual([ - "Add emoji", + "Emoji", "More options", ]); }); @@ -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", ], ]); });