Skip to content

Commit

Permalink
Adjusted texts after review
Browse files Browse the repository at this point in the history
  • Loading branch information
PVince81 committed Jul 12, 2018
1 parent 2031e80 commit 998284a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/PasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
);
}

Expand All @@ -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.')
);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Rules/PasswordHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions templates/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</ul>
<input type="hidden" name="app" value="oca-password-policy" />
<p class="margin-add-top">
<?php p($l->t('User Password policies:'));?>
<?php p($l->t('User password policies:'));?>
</p>
<ul>
<li>
Expand All @@ -94,13 +94,13 @@
<label>
<input type="checkbox" name="spv_user_password_expiration_notification_checked" <?php if ($_['spv_user_password_expiration_notification_checked']): ?> checked="checked"<?php endif; ?>/>
<input type="number" name="spv_user_password_expiration_notification_value" min="0" value="<?php p($_['spv_user_password_expiration_notification_value']) ?>" placeholder="30"/>
<span><?php p($l->t('days to send a notification before the password expires'));?></span>
<span><?php p($l->t('days before password expires, users will receive a reminder notification'));?></span>
</label>
</li>
<li>
<label>
<input type="checkbox" name="spv_user_password_force_change_on_first_login_checked" <?php if ($_['spv_user_password_force_change_on_first_login_checked']): ?> checked="checked"<?php endif; ?>/>
<span><?php p($l->t('force change on first login'));?></span>
<span><?php p($l->t('Force users to change their password on first login'));?></span>
</label>
</li>
</ul>
Expand Down
15 changes: 8 additions & 7 deletions templates/password.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,24 @@
<form id="password_policy" method="post">
<fieldset>
<h1 class="warning">
<?php p($l->t('Password changed required'));?>
<div><?php p($l->t('Your password has expired.')); ?></div>
<div><?php p($l->t('Please choose a new password.')); ?></div>
</h1>
<?php if (isset($_['error'])) { ?><div id="error" class="warning"><?php p($_['error']) ?></div> <?php } ?>
<input type="hidden" name="redirect_url" value="<?php p($_['redirect_url']) ?>" />
<input type="hidden" name="app" value="oca-password-policy" />
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken">

<label for="current_password" class="infield"><?php p($l->t('current password'));?></label>
<input type="password" id="current_password" name="current_password" value="" autofocus placeholder="<?php p($l->t('current password'));?>"/>
<label for="current_password" class="infield"><?php p($l->t('Current password'));?></label>
<input type="password" id="current_password" name="current_password" value="" autofocus placeholder="<?php p($l->t('Current password'));?>"/>

<div class="grouptop">
<label for="new_password" class="infield"><?php p($l->t('new password'));?></label>
<input type="password" id="new_password" name="new_password" value="" placeholder="<?php p($l->t('new password'));?>"/>
<label for="new_password" class="infield"><?php p($l->t('New password'));?></label>
<input type="password" id="new_password" name="new_password" value="" placeholder="<?php p($l->t('New password'));?>"/>
</div>
<div class="groupbottom">
<label for="confirm_password" class="infield"><?php p($l->t('confirm new password'));?></label>
<input type="password" id="confirm_password" name="confirm_password" value="" placeholder="<?php p($l->t('confirm new password'));?>"/>
<label for="confirm_password" class="infield"><?php p($l->t('Confirm new password'));?></label>
<input type="password" id="confirm_password" name="confirm_password" value="" placeholder="<?php p($l->t('Confirm new password'));?>"/>
</div>
<button id="submit" type="submit"><?php p($l->t('Save'));?></button>
</fieldset>
Expand Down

0 comments on commit 998284a

Please sign in to comment.