Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Weblate 2019-01-16 15:31:19 +00:00
commit d627660aaf
5 changed files with 16 additions and 14 deletions

View file

@ -86,7 +86,7 @@ const SIMPLE_SETTINGS = [
{ id: "pinMentionedRooms" },
{ id: "pinUnreadRooms" },
{ id: "showDeveloperTools" },
{ id: "alwaysInviteUnknownUsers" },
{ id: "promptBeforeInviteUnknownUsers" },
];
// These settings must be defined in SettingsStore

View file

@ -35,7 +35,7 @@ export default React.createClass({
},
_onInviteNeverWarnClicked: function() {
SettingsStore.setValue("alwaysInviteUnknownUsers", null, SettingLevel.ACCOUNT, true);
SettingsStore.setValue("promptBeforeInviteUnknownUsers", null, SettingLevel.ACCOUNT, false);
this.props.onInviteAnyways();
this.props.onFinished(true);
},
@ -58,7 +58,7 @@ export default React.createClass({
contentId='mx_Dialog_content'
>
<div id='mx_Dialog_content'>
<p>{_t("The following users may not exist - would you like to invite them anyways?")}</p>
<p>{_t("Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?")}</p>
<ul>
{ errorList }
</ul>
@ -69,10 +69,10 @@ export default React.createClass({
{ _t('Close') }
</button>
<button onClick={this._onInviteNeverWarnClicked}>
{ _t('Invite anyways and never warn me again') }
{ _t('Invite anyway and never warn me again') }
</button>
<button onClick={this._onInviteClicked} autoFocus="true">
{ _t('Invite anyways') }
{ _t('Invite anyway') }
</button>
</div>
</BaseDialog>

View file

@ -114,6 +114,8 @@
"Failed to invite": "Failed to invite",
"Failed to invite users to the room:": "Failed to invite users to the room:",
"Failed to invite the following users to the %(roomName)s room:": "Failed to invite the following users to the %(roomName)s room:",
"Waiting for %(userId)s to accept...": "Waiting for %(userId)s to accept...",
"Waiting for %(userId)s to confirm...": "Waiting for %(userId)s to confirm...",
"You need to be logged in.": "You need to be logged in.",
"You need to be able to invite users to do that.": "You need to be able to invite users to do that.",
"Unable to create widget.": "Unable to create widget.",
@ -293,7 +295,7 @@
"Pin unread rooms to the top of the room list": "Pin unread rooms to the top of the room list",
"Enable widget screenshots on supported widgets": "Enable widget screenshots on supported widgets",
"Show empty room list headings": "Show empty room list headings",
"Always invite users which may not exist": "Always invite users which may not exist",
"Prompt before sending invites to potentially invalid matrix IDs": "Prompt before sending invites to potentially invalid matrix IDs",
"Show developer tools": "Show developer tools",
"Collecting app version information": "Collecting app version information",
"Collecting logs": "Collecting logs",
@ -885,9 +887,9 @@
"You have entered an invalid address.": "You have entered an invalid address.",
"Try using one of the following valid address types: %(validTypesList)s.": "Try using one of the following valid address types: %(validTypesList)s.",
"The following users may not exist": "The following users may not exist",
"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?",
"Invite anyways and never warn me again": "Invite anyways and never warn me again",
"Invite anyways": "Invite anyways",
"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?",
"Invite anyway and never warn me again": "Invite anyway and never warn me again",
"Invite anyway": "Invite anyway",
"Preparing to send logs": "Preparing to send logs",
"Logs sent": "Logs sent",
"Thank you!": "Thank you!",

View file

@ -317,10 +317,10 @@ export const SETTINGS = {
displayName: _td('Show empty room list headings'),
default: true,
},
"alwaysInviteUnknownUsers": {
"promptBeforeInviteUnknownUsers": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td('Always invite users which may not exist'),
default: false,
displayName: _td('Prompt before sending invites to potentially invalid matrix IDs'),
default: true,
},
"showDeveloperTools": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,

View file

@ -101,7 +101,7 @@ export default class MultiInviter {
if (addrType === 'email') {
return MatrixClientPeg.get().inviteByEmail(roomId, addr);
} else if (addrType === 'mx-user-id') {
if (!ignoreProfile && !SettingsStore.getValue("alwaysInviteUnknownUsers", this.roomId)) {
if (!ignoreProfile && SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
try {
const profile = await MatrixClientPeg.get().getProfileInfo(addr);
if (!profile) {
@ -204,7 +204,7 @@ export default class MultiInviter {
Promise.all(promises).then(() => this.deferred.resolve(this.completionStates));
};
if (SettingsStore.getValue("alwaysInviteUnknownUsers", this.roomId)) {
if (!SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
inviteUnknowns();
return;
}