diff --git a/src/components/structures/auth/Login.tsx b/src/components/structures/auth/Login.tsx index cb09ade895..f50f2167b5 100644 --- a/src/components/structures/auth/Login.tsx +++ b/src/components/structures/auth/Login.tsx @@ -476,8 +476,8 @@ export default class LoginComponent extends React.PureComponent errCode = "HTTP " + err.httpStatus; } - let errorText: ReactNode = _t("Error: Problem communicating with the given homeserver.") + - (errCode ? " (" + errCode + ")" : ""); + let errorText: ReactNode = _t("There was a problem communicating with the homeserver, " + + "please try again later.") + (errCode ? " (" + errCode + ")" : ""); if (err.cors === 'rejected') { if (window.location.protocol === 'https:' && diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index a31a07a96b..f954c50b13 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -366,6 +366,8 @@ export default class Registration extends React.Component { if (!msisdnAvailable) { msg = _t('This server does not support authentication with a phone number.'); } + } else if (response.errcode === "M_USER_IN_USE") { + msg = _t("That username already exists, please try another."); } this.setState({ busy: false, diff --git a/src/components/views/auth/PasswordLogin.tsx b/src/components/views/auth/PasswordLogin.tsx index 80384ba26e..84e583c3a5 100644 --- a/src/components/views/auth/PasswordLogin.tsx +++ b/src/components/views/auth/PasswordLogin.tsx @@ -1,5 +1,5 @@ /* -Copyright 2015, 2016, 2017, 2019 New Vector Ltd. +Copyright 2015, 2016, 2017, 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -293,7 +293,7 @@ export default class PasswordLogin extends React.PureComponent { }, { key: "number", test: ({ value }) => !value || PHONE_NUMBER_REGEX.test(value), - invalid: () => _t("Doesn't look like a valid phone number"), + invalid: () => _t("That phone number doesn't look quite right, please check and try again"), }, ], }); diff --git a/src/components/views/auth/RegistrationForm.tsx b/src/components/views/auth/RegistrationForm.tsx index b005c8e0e2..8c8103fd09 100644 --- a/src/components/views/auth/RegistrationForm.tsx +++ b/src/components/views/auth/RegistrationForm.tsx @@ -346,7 +346,7 @@ export default class RegistrationForm extends React.PureComponent !value || phoneNumberLooksValid(value), - invalid: () => _t("Doesn't look like a valid phone number"), + invalid: () => _t("That phone number doesn't look quite right, please check and try again"), }, ], });