From 998284acc8929f6716b35a1c2eccf65c28ff4119 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 12 Jul 2018 13:36:49 +0200 Subject: [PATCH] Adjusted texts after review --- lib/Controller/PasswordController.php | 4 ++-- lib/Notifier.php | 4 ++-- lib/Rules/PasswordHistory.php | 2 +- templates/admin.php | 6 +++--- templates/password.php | 15 ++++++++------- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/lib/Controller/PasswordController.php b/lib/Controller/PasswordController.php index 70690007..fdee56c3 100644 --- a/lib/Controller/PasswordController.php +++ b/lib/Controller/PasswordController.php @@ -141,7 +141,7 @@ public function update($current_password, $new_password, $confirm_password, $red if ($new_password !== $confirm_password) { return $this->createPasswordTemplateResponse( $redirect_url, - $this->l10n->t('New passwords are not the same.') + $this->l10n->t('Password confirmation does not match the password.') ); } @@ -150,7 +150,7 @@ public function update($current_password, $new_password, $confirm_password, $red if(!$this->userManager->checkPassword($user->getUID(), $current_password)) { return $this->createPasswordTemplateResponse( $redirect_url, - $this->l10n->t('Incorrect current password supplied.') + $this->l10n->t('The current password is incorrect.') ); } diff --git a/lib/Notifier.php b/lib/Notifier.php index b48d9504..8c3dca2d 100644 --- a/lib/Notifier.php +++ b/lib/Notifier.php @@ -66,7 +66,7 @@ public function prepare(INotification $notification, $languageCode) { private function formatAboutToExpire(INotification $notification, L10N $l) { $params = $notification->getSubjectParameters(); $notification->setParsedSubject( - (string) $l->t('Your password is about to expire!', $params) + (string) $l->t('Password expiration notice', $params) ); $messageParams = $notification->getMessageParameters(); @@ -112,7 +112,7 @@ private function formatExpired(INotification $notification, L10N $l) { $messageParams = $notification->getMessageParameters(); $notification->setParsedMessage( - (string) $l->t('You have to change your password before you can access again', $messageParams) + (string) $l->t('Please change your password to gain back access to your account', $messageParams) ); foreach ($notification->getActions() as $action) { diff --git a/lib/Rules/PasswordHistory.php b/lib/Rules/PasswordHistory.php index c135d276..67f3d19b 100644 --- a/lib/Rules/PasswordHistory.php +++ b/lib/Rules/PasswordHistory.php @@ -65,7 +65,7 @@ public function verify($password, $val, $uid) { foreach($oldPasswords as $oldPassword) { if ($this->hasher->verify($password, $oldPassword->getPassword())) { throw new PolicyException( - $this->l10n->t('The password must be different to your previous %d passwords.', [$val])); + $this->l10n->t('The password must be different than your previous %d passwords.', [$val])); } } } diff --git a/templates/admin.php b/templates/admin.php index 0b733075..51341e3f 100644 --- a/templates/admin.php +++ b/templates/admin.php @@ -80,7 +80,7 @@

- t('User Password policies:'));?> + t('User password policies:'));?>

diff --git a/templates/password.php b/templates/password.php index 1f865e92..5f5780e5 100644 --- a/templates/password.php +++ b/templates/password.php @@ -33,23 +33,24 @@

- t('Password changed required'));?> +
t('Your password has expired.')); ?>
+
t('Please choose a new password.')); ?>

- - + +
- - + +
- - + +