From f9100d5fb6c7ec69dfa70a957b64b3ae461f2093 Mon Sep 17 00:00:00 2001 From: Janne Mareike Koschinski Date: Wed, 15 Jun 2022 18:16:40 +0200 Subject: [PATCH] Fix issues with the Create new room button in Spotlight (#8851) * Correct label of create new room button * Capitalize suggested name for new room --- src/components/views/dialogs/spotlight/SpotlightDialog.tsx | 6 +++--- src/i18n/strings/en_EN.json | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/views/dialogs/spotlight/SpotlightDialog.tsx b/src/components/views/dialogs/spotlight/SpotlightDialog.tsx index 862cd4948a..679f611696 100644 --- a/src/components/views/dialogs/spotlight/SpotlightDialog.tsx +++ b/src/components/views/dialogs/spotlight/SpotlightDialog.tsx @@ -15,7 +15,7 @@ limitations under the License. */ import classNames from "classnames"; -import { sum } from "lodash"; +import { capitalize, sum } from "lodash"; import { WebSearch as WebSearchEvent } from "@matrix-org/analytics-events/types/typescript/WebSearch"; import { IHierarchyRoom } from "matrix-js-sdk/src/@types/spaces"; import { IPublicRoomsChunkRoom, MatrixClient, RoomMember } from "matrix-js-sdk/src/matrix"; @@ -741,11 +741,11 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n onClick={() => defaultDispatcher.dispatch({ action: 'view_create_room', public: true, - defaultName: trimmedQuery, + defaultName: capitalize(trimmedQuery), })} > - { _t("Create new Room") } + { _t("Create new room") } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 64ba5dfea4..4e0042bbe3 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2810,7 +2810,7 @@ "Copy invite link": "Copy invite link", "Some results may be hidden": "Some results may be hidden", "If you can't find the room you're looking for, ask for an invite or create a new room.": "If you can't find the room you're looking for, ask for an invite or create a new room.", - "Create new Room": "Create new Room", + "Create new room": "Create new room", "Other options": "Other options", "Start a group chat": "Start a group chat", "Other searches": "Other searches", @@ -3082,7 +3082,6 @@ "remove %(name)s from the directory.": "remove %(name)s from the directory.", "delete the address.": "delete the address.", "The server may be unavailable or overloaded": "The server may be unavailable or overloaded", - "Create new room": "Create new room", "No results for \"%(query)s\"": "No results for \"%(query)s\"", "Try different words or check for typos. Some results may not be visible as they're private and you need an invite to join them.": "Try different words or check for typos. Some results may not be visible as they're private and you need an invite to join them.", "Find a room…": "Find a room…",