From d9a801910a44a80c63035fcaab5769450951c612 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 3 Mar 2021 11:34:29 +0000 Subject: [PATCH] Tweak spaces copy --- src/RoomInvite.js | 7 ++--- src/components/structures/SpaceRoomView.tsx | 2 +- src/components/views/dialogs/InviteDialog.tsx | 31 +++++++++++-------- .../views/spaces/SpaceCreateMenu.tsx | 11 +++---- src/i18n/strings/en_EN.json | 18 ++++++----- 5 files changed, 37 insertions(+), 32 deletions(-) diff --git a/src/RoomInvite.js b/src/RoomInvite.js index 503411d2b3..9ae41b851a 100644 --- a/src/RoomInvite.js +++ b/src/RoomInvite.js @@ -22,7 +22,7 @@ import MultiInviter from './utils/MultiInviter'; import Modal from './Modal'; import * as sdk from './'; import { _t } from './languageHandler'; -import InviteDialog, {KIND_DM, KIND_INVITE, KIND_SPACE_INVITE} from "./components/views/dialogs/InviteDialog"; +import InviteDialog, {KIND_DM, KIND_INVITE} from "./components/views/dialogs/InviteDialog"; import CommunityPrototypeInviteDialog from "./components/views/dialogs/CommunityPrototypeInviteDialog"; import {CommunityPrototypeStore} from "./stores/CommunityPrototypeStore"; @@ -50,11 +50,10 @@ export function showStartChatInviteDialog(initialText) { } export function showRoomInviteDialog(roomId) { - const isSpace = MatrixClientPeg.get()?.getRoom(roomId)?.isSpaceRoom(); // This dialog handles the room creation internally - we don't need to worry about it. Modal.createTrackedDialog( - "Invite Users", isSpace ? "Space" : "Room", InviteDialog, { - kind: isSpace ? KIND_SPACE_INVITE : KIND_INVITE, + "Invite Users", "", InviteDialog, { + kind: KIND_INVITE, roomId, }, /*className=*/null, /*isPriority=*/false, /*isStatic=*/true, diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index 5c91efc1c0..9bacdd975d 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -557,7 +557,7 @@ export default class SpaceRoomView extends React.PureComponent { case Phase.PublicCreateRooms: return this.setState({ phase: Phase.PublicShare })} />; diff --git a/src/components/views/dialogs/InviteDialog.tsx b/src/components/views/dialogs/InviteDialog.tsx index 9bc5b6476f..6d5cb8786e 100644 --- a/src/components/views/dialogs/InviteDialog.tsx +++ b/src/components/views/dialogs/InviteDialog.tsx @@ -48,7 +48,6 @@ import { MatrixCall } from 'matrix-js-sdk/src/webrtc/call'; export const KIND_DM = "dm"; export const KIND_INVITE = "invite"; -export const KIND_SPACE_INVITE = "space_invite"; export const KIND_CALL_TRANSFER = "call_transfer"; const INITIAL_ROOMS_SHOWN = 3; // Number of rooms to show at first @@ -310,7 +309,7 @@ interface IInviteDialogProps { // not provided. kind: string, - // The room ID this dialog is for. Only required for KIND_INVITE and KIND_SPACE_INVITE. + // The room ID this dialog is for. Only required for KIND_INVITE. roomId: string, // The call to transfer. Only required for KIND_CALL_TRANSFER. @@ -349,8 +348,8 @@ export default class InviteDialog extends React.PureComponent) or share this room."); + "(like ) or share this space."); } else { helpTextUntranslated = _td("Invite someone using their name, username " + - "(like ) or share this room."); + "(like ) or share this space."); } - } else { // KIND_SPACE_INVITE + } else { if (identityServersEnabled) { helpTextUntranslated = _td("Invite someone using their name, email address, username " + - "(like ) or share this space."); + "(like ) or share this room."); } else { helpTextUntranslated = _td("Invite someone using their name, username " + - "(like ) or share this space."); + "(like ) or share this room."); } } diff --git a/src/components/views/spaces/SpaceCreateMenu.tsx b/src/components/views/spaces/SpaceCreateMenu.tsx index 9d0543a6c5..88098d1b66 100644 --- a/src/components/views/spaces/SpaceCreateMenu.tsx +++ b/src/components/views/spaces/SpaceCreateMenu.tsx @@ -107,7 +107,8 @@ const SpaceCreateMenu = ({ onFinished }) => { if (visibility === null) { body =

{ _t("Create a space") }

-

{ _t("Organise rooms into spaces, for just you or anyone") }

+

{ _t("Spaces are new ways to group rooms and people. " + + "To join an existing space you’ll need an invite") }

{ /> setVisibility(Visibility.Private)} /> - {/*

{ _t("Looking to join an existing space?") }

*/} +

{ _t("You can change this later") }

; } else { body = @@ -134,9 +135,7 @@ const SpaceCreateMenu = ({ onFinished }) => {

{ - visibility === Visibility.Public - ? _t("Personalise your public space") - : _t("Personalise your private space") + visibility === Visibility.Public ? _t("Your public space") : _t("Your private space") }

diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 8609af6a71..e256e6bb2f 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -983,14 +983,15 @@ "Name": "Name", "Description": "Description", "Create a space": "Create a space", - "Organise rooms into spaces, for just you or anyone": "Organise rooms into spaces, for just you or anyone", + "Spaces are new ways to group rooms and people. To join an existing space you’ll need an invite": "Spaces are new ways to group rooms and people. To join an existing space you’ll need an invite", "Public": "Public", "Open space for anyone, best for communities": "Open space for anyone, best for communities", "Private": "Private", - "Invite only space, best for yourself or teams": "Invite only space, best for yourself or teams", + "Invite only, best for yourself or teams": "Invite only, best for yourself or teams", + "You can change this later": "You can change this later", "Go back": "Go back", - "Personalise your public space": "Personalise your public space", - "Personalise your private space": "Personalise your private space", + "Your public space": "Your public space", + "Your private space": "Your private space", "Give it a photo, name and description to help you identify it.": "Give it a photo, name and description to help you identify it.", "You can change these at any point.": "You can change these at any point.", "Creating...": "Creating...", @@ -2190,10 +2191,12 @@ "Start a conversation with someone using their name or username (like ).": "Start a conversation with someone using their name or username (like ).", "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here": "This won't invite them to %(communityName)s. To invite someone to %(communityName)s, click here", "Go": "Go", - "Invite someone using their name, email address, username (like ) or share this room.": "Invite someone using their name, email address, username (like ) or share this room.", - "Invite someone using their name, username (like ) or share this room.": "Invite someone using their name, username (like ) or share this room.", + "Invite to %(spaceName)s": "Invite to %(spaceName)s", + "Unnamed Space": "Unnamed Space", "Invite someone using their name, email address, username (like ) or share this space.": "Invite someone using their name, email address, username (like ) or share this space.", "Invite someone using their name, username (like ) or share this space.": "Invite someone using their name, username (like ) or share this space.", + "Invite someone using their name, email address, username (like ) or share this room.": "Invite someone using their name, email address, username (like ) or share this room.", + "Invite someone using their name, username (like ) or share this room.": "Invite someone using their name, username (like ) or share this room.", "Transfer": "Transfer", "a new master key signature": "a new master key signature", "a new cross-signing key signature": "a new cross-signing key signature", @@ -2587,7 +2590,6 @@ "Failed to reject invite": "Failed to reject invite", "You have %(count)s unread notifications in a prior version of this room.|other": "You have %(count)s unread notifications in a prior version of this room.", "You have %(count)s unread notifications in a prior version of this room.|one": "You have %(count)s unread notification in a prior version of this room.", - "Unnamed Space": "Unnamed Space", "Undo": "Undo", "Remove from Space": "Remove from Space", "No permissions": "No permissions", @@ -2626,7 +2628,7 @@ "Invite your teammates": "Invite your teammates", "Invite by username": "Invite by username", "Inviting...": "Inviting...", - "What discussions do you want to have?": "What discussions do you want to have?", + "What are some things you want to discuss?": "What are some things you want to discuss?", "We'll create rooms for each topic.": "We'll create rooms for each topic.", "What projects are you working on?": "What projects are you working on?", "We'll create rooms for each of them. You can add existing rooms after setup.": "We'll create rooms for each of them. You can add existing rooms after setup.",