Skip to content

Commit

Permalink
Fix issues with the Create new room button in Spotlight (#8851)
Browse files Browse the repository at this point in the history
* Correct label of create new room button
* Capitalize suggested name for new room
  • Loading branch information
justjanne committed Jun 15, 2022
1 parent 1188f1a commit f9100d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/views/dialogs/spotlight/SpotlightDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -741,11 +741,11 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
onClick={() => defaultDispatcher.dispatch({
action: 'view_create_room',
public: true,
defaultName: trimmedQuery,
defaultName: capitalize(trimmedQuery),
})}
>
<span className="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary_outline">
{ _t("Create new Room") }
{ _t("Create new room") }
</span>
</Option>
</div>
Expand Down
3 changes: 1 addition & 2 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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…",
Expand Down

0 comments on commit f9100d5

Please sign in to comment.