1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

added missing i18n strings (#1)

This commit is contained in:
Kyle Spearrin
2016-11-19 01:36:09 -05:00
parent 1968dd2d08
commit e7e4a66750
26 changed files with 262 additions and 92 deletions

View File

@@ -13,23 +13,23 @@
$scope.submitPromise = null;
$scope.submit = function (model) {
if (!model.email) {
toastr.error('Email address is required.', 'Errors have occurred');
toastr.error(i18nService.emailRequired, i18nService.errorsOccurred);
return;
}
if (model.email.indexOf('@') === -1) {
toastr.error('Invalid email address.', 'Errors have occurred');
toastr.error(i18nService.invalidEmail, i18nService.errorsOccurred);
return;
}
if (!model.masterPassword) {
toastr.error('Master password is required.', 'Errors have occurred');
toastr.error(i18nService.masterPassRequired, i18nService.errorsOccurred);
return;
}
if (model.masterPassword.length < 8) {
toastr.error('Master password must be at least 8 characters long.', 'Errors have occurred');
toastr.error(i18nService.masterPassLength, i18nService.errorsOccurred);
return;
}
if (model.masterPassword !== model.masterPasswordRetype) {
toastr.error('Master password confirmation does not match.', 'Errors have occurred');
toastr.error(i18nService.masterPassDoesntMatch, i18nService.errorsOccurred);
return;
}
@@ -38,7 +38,7 @@
$scope.submitPromise = registerPromise(key, model.masterPassword, email, model.hint);
$scope.submitPromise.then(function () {
$analytics.eventTrack('Registered');
toastr.success('Your new account has been created! You may now log in.');
toastr.success(i18nService.newAccountCreated);
$state.go('login', { email: email, animation: 'in-slide-left' });
});
};