From 606940bd7763a0e23c6cf4977dc9f0d07995a81b Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 27 Apr 2020 14:07:39 +0100 Subject: [PATCH 1/4] Update Invite Dialog copy to include email addresses Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/dialogs/InviteDialog.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/views/dialogs/InviteDialog.js b/src/components/views/dialogs/InviteDialog.js index a46fa0df07..c30a34cb98 100644 --- a/src/components/views/dialogs/InviteDialog.js +++ b/src/components/views/dialogs/InviteDialog.js @@ -1067,9 +1067,8 @@ export default class InviteDialog extends React.PureComponent { let buttonText; let goButtonFn; + const userId = MatrixClientPeg.get().getUserId(); if (this.props.kind === KIND_DM) { - const userId = MatrixClientPeg.get().getUserId(); - title = _t("Direct Messages"); helpText = _t( "Start a conversation with someone using their name, username (like ) or email address.", @@ -1083,12 +1082,11 @@ export default class InviteDialog extends React.PureComponent { } else { // KIND_INVITE title = _t("Invite to this room"); helpText = _t( - "If you can't find someone, ask them for their username (e.g. @user:server.com) or " + - "share this room.", {}, - { - a: (sub) => - {sub}, - }, + "Invite someone using their name, username (like ) or email address.", + {}, + {userId: () => { + return {userId}; + }}, ); buttonText = _t("Invite"); goButtonFn = this._inviteUsers; From 37374036d5cf098b7c48b30cfe98eff221947720 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 27 Apr 2020 14:09:41 +0100 Subject: [PATCH 2/4] i18n Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/i18n/strings/en_EN.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index bd4c8f58c8..3b6e077aac 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1642,7 +1642,7 @@ "Recently Direct Messaged": "Recently Direct Messaged", "Start a conversation with someone using their name, username (like ) or email address.": "Start a conversation with someone using their name, username (like ) or email address.", "Go": "Go", - "If you can't find someone, ask them for their username (e.g. @user:server.com) or share this room.": "If you can't find someone, ask them for their username (e.g. @user:server.com) or share this room.", + "Invite someone using their name, username (like ) or email address.": "Invite someone using their name, username (like ) or email address.", "You added a new session '%(displayName)s', which is requesting encryption keys.": "You added a new session '%(displayName)s', which is requesting encryption keys.", "Your unverified session '%(displayName)s' is requesting encryption keys.": "Your unverified session '%(displayName)s' is requesting encryption keys.", "Start verification": "Start verification", From a58fd6c4756c15106ad4536f4bf5bb322a9b479d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 27 Apr 2020 14:27:41 +0100 Subject: [PATCH 3/4] delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/dialogs/InviteDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/dialogs/InviteDialog.js b/src/components/views/dialogs/InviteDialog.js index c30a34cb98..7bc9364b52 100644 --- a/src/components/views/dialogs/InviteDialog.js +++ b/src/components/views/dialogs/InviteDialog.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; import * as sdk from "../../../index"; import {MatrixClientPeg} from "../../../MatrixClientPeg"; -import {makeRoomPermalink, makeUserPermalink} from "../../../utils/permalinks/Permalinks"; +import {makeUserPermalink} from "../../../utils/permalinks/Permalinks"; import DMRoomMap from "../../../utils/DMRoomMap"; import {RoomMember} from "matrix-js-sdk/src/matrix"; import SdkConfig from "../../../SdkConfig"; From 41dece38a4d99bfc989ca09efe40b47f76e87400 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 29 Apr 2020 10:35:35 +0100 Subject: [PATCH 4/4] iterate copy Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/dialogs/InviteDialog.js | 13 ++++++++----- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/views/dialogs/InviteDialog.js b/src/components/views/dialogs/InviteDialog.js index 7bc9364b52..516ac3183f 100644 --- a/src/components/views/dialogs/InviteDialog.js +++ b/src/components/views/dialogs/InviteDialog.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import {_t} from "../../../languageHandler"; import * as sdk from "../../../index"; import {MatrixClientPeg} from "../../../MatrixClientPeg"; -import {makeUserPermalink} from "../../../utils/permalinks/Permalinks"; +import {makeRoomPermalink, makeUserPermalink} from "../../../utils/permalinks/Permalinks"; import DMRoomMap from "../../../utils/DMRoomMap"; import {RoomMember} from "matrix-js-sdk/src/matrix"; import SdkConfig from "../../../SdkConfig"; @@ -1082,11 +1082,14 @@ export default class InviteDialog extends React.PureComponent { } else { // KIND_INVITE title = _t("Invite to this room"); helpText = _t( - "Invite someone using their name, username (like ) or email address.", + "Invite someone using their name, username (like ), email address or share this room.", {}, - {userId: () => { - return {userId}; - }}, + { + userId: () => + {userId}, + a: (sub) => + {sub}, + }, ); buttonText = _t("Invite"); goButtonFn = this._inviteUsers; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 3b6e077aac..2a8a614d96 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1642,7 +1642,7 @@ "Recently Direct Messaged": "Recently Direct Messaged", "Start a conversation with someone using their name, username (like ) or email address.": "Start a conversation with someone using their name, username (like ) or email address.", "Go": "Go", - "Invite someone using their name, username (like ) or email address.": "Invite someone using their name, username (like ) or email address.", + "Invite someone using their name, username (like ), email address or share this room.": "Invite someone using their name, username (like ), email address or share this room.", "You added a new session '%(displayName)s', which is requesting encryption keys.": "You added a new session '%(displayName)s', which is requesting encryption keys.", "Your unverified session '%(displayName)s' is requesting encryption keys.": "Your unverified session '%(displayName)s' is requesting encryption keys.", "Start verification": "Start verification",