From bc4a603672398f98a905b73182c84f1e82bd0802 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 31 Jan 2019 15:54:53 -0600 Subject: [PATCH 1/3] Add error message when registration is disabled --- src/components/structures/auth/Registration.js | 4 ++++ src/i18n/strings/en_EN.json | 1 + 2 files changed, 5 insertions(+) diff --git a/src/components/structures/auth/Registration.js b/src/components/structures/auth/Registration.js index 03b071ed48..166ae69a8f 100644 --- a/src/components/structures/auth/Registration.js +++ b/src/components/structures/auth/Registration.js @@ -164,6 +164,10 @@ module.exports = React.createClass({ this.setState({ flows: e.data.flows, }); + } else if (e.httpStatus === 403 && e.errcode === "M_UNKNOWN") { + this.setState({ + errorText: _t("Registration has been disabled"), + }); } else { this.setState({ errorText: _t("Unable to query for supported registration methods"), diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index fb025a9e61..9e9f9e4fad 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1418,6 +1418,7 @@ "Failed to fetch avatar URL": "Failed to fetch avatar URL", "Set a display name:": "Set a display name:", "Upload an avatar:": "Upload an avatar:", + "Registration has been disabled": "Registration has been disabled", "Unable to query for supported registration methods": "Unable to query for supported registration methods", "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.", "Missing password.": "Missing password.", From 918d4490c75f12df1a59e7e12f0840081ef30db0 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 1 Feb 2019 08:31:36 -0600 Subject: [PATCH 2/3] Add more detail to error message --- src/components/structures/auth/Registration.js | 2 +- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/auth/Registration.js b/src/components/structures/auth/Registration.js index 166ae69a8f..c5539eade6 100644 --- a/src/components/structures/auth/Registration.js +++ b/src/components/structures/auth/Registration.js @@ -166,7 +166,7 @@ module.exports = React.createClass({ }); } else if (e.httpStatus === 403 && e.errcode === "M_UNKNOWN") { this.setState({ - errorText: _t("Registration has been disabled"), + errorText: _t("Registration has been disabled on this homeserver."), }); } else { this.setState({ diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 9e9f9e4fad..846a91f4e7 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1418,7 +1418,7 @@ "Failed to fetch avatar URL": "Failed to fetch avatar URL", "Set a display name:": "Set a display name:", "Upload an avatar:": "Upload an avatar:", - "Registration has been disabled": "Registration has been disabled", + "Registration has been disabled on this homeserver.": "Registration has been disabled on this homeserver.", "Unable to query for supported registration methods": "Unable to query for supported registration methods", "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.", "Missing password.": "Missing password.", From e414fe434c17b0ef956e91f03f630740380d62e2 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 1 Feb 2019 08:32:47 -0600 Subject: [PATCH 3/3] Add full stop --- src/components/structures/auth/Registration.js | 2 +- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/auth/Registration.js b/src/components/structures/auth/Registration.js index c5539eade6..c0b393febf 100644 --- a/src/components/structures/auth/Registration.js +++ b/src/components/structures/auth/Registration.js @@ -170,7 +170,7 @@ module.exports = React.createClass({ }); } else { this.setState({ - errorText: _t("Unable to query for supported registration methods"), + errorText: _t("Unable to query for supported registration methods."), }); } } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 846a91f4e7..9a04b30bbb 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1419,7 +1419,7 @@ "Set a display name:": "Set a display name:", "Upload an avatar:": "Upload an avatar:", "Registration has been disabled on this homeserver.": "Registration has been disabled on this homeserver.", - "Unable to query for supported registration methods": "Unable to query for supported registration methods", + "Unable to query for supported registration methods.": "Unable to query for supported registration methods.", "This server does not support authentication with a phone number.": "This server does not support authentication with a phone number.", "Missing password.": "Missing password.", "Passwords don't match.": "Passwords don't match.",