Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 55889d5

Browse files
committed
Change wording of 'invite anyway' setting
element-hq/element-web#7922
1 parent 82e0436 commit 55889d5

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

src/components/structures/UserSettings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const SIMPLE_SETTINGS = [
8686
{ id: "pinMentionedRooms" },
8787
{ id: "pinUnreadRooms" },
8888
{ id: "showDeveloperTools" },
89-
{ id: "alwaysInviteUnknownUsers" },
89+
{ id: "promptBeforeInviteUnknownUsers" },
9090
];
9191

9292
// These settings must be defined in SettingsStore

src/components/views/dialogs/AskInviteAnywayDialog.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default React.createClass({
3535
},
3636

3737
_onInviteNeverWarnClicked: function() {
38-
SettingsStore.setValue("alwaysInviteUnknownUsers", null, SettingLevel.ACCOUNT, true);
38+
SettingsStore.setValue("promptBeforeInviteUnknownUsers", null, SettingLevel.ACCOUNT, false);
3939
this.props.onInviteAnyways();
4040
this.props.onFinished(true);
4141
},
@@ -58,7 +58,7 @@ export default React.createClass({
5858
contentId='mx_Dialog_content'
5959
>
6060
<div id='mx_Dialog_content'>
61-
<p>{_t("The following users may not exist - would you like to invite them anyways?")}</p>
61+
<p>{_t("Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?")}</p>
6262
<ul>
6363
{ errorList }
6464
</ul>
@@ -69,10 +69,10 @@ export default React.createClass({
6969
{ _t('Close') }
7070
</button>
7171
<button onClick={this._onInviteNeverWarnClicked}>
72-
{ _t('Invite anyways and never warn me again') }
72+
{ _t('Invite anyway and never warn me again') }
7373
</button>
7474
<button onClick={this._onInviteClicked} autoFocus="true">
75-
{ _t('Invite anyways') }
75+
{ _t('Invite anyway') }
7676
</button>
7777
</div>
7878
</BaseDialog>

src/i18n/strings/en_EN.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@
114114
"Failed to invite": "Failed to invite",
115115
"Failed to invite users to the room:": "Failed to invite users to the room:",
116116
"Failed to invite the following users to the %(roomName)s room:": "Failed to invite the following users to the %(roomName)s room:",
117+
"Waiting for %(userId)s to accept...": "Waiting for %(userId)s to accept...",
118+
"Waiting for %(userId)s to confirm...": "Waiting for %(userId)s to confirm...",
117119
"You need to be logged in.": "You need to be logged in.",
118120
"You need to be able to invite users to do that.": "You need to be able to invite users to do that.",
119121
"Unable to create widget.": "Unable to create widget.",
@@ -293,7 +295,7 @@
293295
"Pin unread rooms to the top of the room list": "Pin unread rooms to the top of the room list",
294296
"Enable widget screenshots on supported widgets": "Enable widget screenshots on supported widgets",
295297
"Show empty room list headings": "Show empty room list headings",
296-
"Always invite users which may not exist": "Always invite users which may not exist",
298+
"Prompt before sending invites to potentially invalid matrix IDs": "Prompt before sending invites to potentially invalid matrix IDs",
297299
"Show developer tools": "Show developer tools",
298300
"Collecting app version information": "Collecting app version information",
299301
"Collecting logs": "Collecting logs",
@@ -885,9 +887,9 @@
885887
"You have entered an invalid address.": "You have entered an invalid address.",
886888
"Try using one of the following valid address types: %(validTypesList)s.": "Try using one of the following valid address types: %(validTypesList)s.",
887889
"The following users may not exist": "The following users may not exist",
888-
"The following users may not exist - would you like to invite them anyways?": "The following users may not exist - would you like to invite them anyways?",
889-
"Invite anyways and never warn me again": "Invite anyways and never warn me again",
890-
"Invite anyways": "Invite anyways",
890+
"Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?": "Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?",
891+
"Invite anyway and never warn me again": "Invite anyway and never warn me again",
892+
"Invite anyway": "Invite anyway",
891893
"Preparing to send logs": "Preparing to send logs",
892894
"Logs sent": "Logs sent",
893895
"Thank you!": "Thank you!",

src/settings/Settings.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,10 @@ export const SETTINGS = {
317317
displayName: _td('Show empty room list headings'),
318318
default: true,
319319
},
320-
"alwaysInviteUnknownUsers": {
320+
"promptBeforeInviteUnknownUsers": {
321321
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
322-
displayName: _td('Always invite users which may not exist'),
323-
default: false,
322+
displayName: _td('Prompt before sending invites to potentially invalid matrix IDs'),
323+
default: true,
324324
},
325325
"showDeveloperTools": {
326326
supportedLevels: LEVELS_ACCOUNT_SETTINGS,

src/utils/MultiInviter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export default class MultiInviter {
101101
if (addrType === 'email') {
102102
return MatrixClientPeg.get().inviteByEmail(roomId, addr);
103103
} else if (addrType === 'mx-user-id') {
104-
if (!ignoreProfile && !SettingsStore.getValue("alwaysInviteUnknownUsers", this.roomId)) {
104+
if (!ignoreProfile && SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
105105
try {
106106
const profile = await MatrixClientPeg.get().getProfileInfo(addr);
107107
if (!profile) {
@@ -204,7 +204,7 @@ export default class MultiInviter {
204204
Promise.all(promises).then(() => this.deferred.resolve(this.completionStates));
205205
};
206206

207-
if (SettingsStore.getValue("alwaysInviteUnknownUsers", this.roomId)) {
207+
if (!SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
208208
inviteUnknowns();
209209
return;
210210
}

0 commit comments

Comments
 (0)