This commit is contained in:
David Baker 2017-05-23 15:16:31 +01:00
parent 46bb29a3af
commit d419c42a4f
73 changed files with 4660 additions and 639 deletions

View file

@ -15,6 +15,7 @@ limitations under the License.
*/
var Matrix = require("matrix-js-sdk");
import _t from 'counterpart-riot';
/**
* Allows a user to reset their password on a homeserver.
@ -53,7 +54,7 @@ class PasswordReset {
return res;
}, function(err) {
if (err.errcode == 'M_THREEPID_NOT_FOUND') {
err.message = "This email address was not found";
err.message = _t('This email address was not found');
} else if (err.httpStatus) {
err.message = err.message + ` (Status ${err.httpStatus})`;
}
@ -78,10 +79,10 @@ class PasswordReset {
}
}, this.password).catch(function(err) {
if (err.httpStatus === 401) {
err.message = "Failed to verify email address: make sure you clicked the link in the email";
err.message = _t('Failed to verify email address: make sure you clicked the link in the email');
}
else if (err.httpStatus === 404) {
err.message = "Your email address does not appear to be associated with a Matrix ID on this Homeserver.";
err.message = _t('Your email address does not appear to be associated with a Matrix ID on this Homeserver') + '.';
}
else if (err.httpStatus) {
err.message += ` (Status ${err.httpStatus})`;