Skip to content

Commit 4f7e6d4

Browse files
author
Saket Hatwar
committed
lint
1 parent f01c570 commit 4f7e6d4

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

modules/my_preferences/locale/hi/LC_MESSAGES/my_preferences.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ msgstr "अमान्य ईमेल पता"
9393
msgid "The email address already exists"
9494
msgstr "ईमेल पता पहले से मौजूद है"
9595

96-
msgid "Your password cannot be your email."
96+
msgid "Your password can't be your email."
9797
msgstr "आपका पासवर्ड आपका ईमेल नहीं हो सकता।"
9898

99-
msgid "Your password cannot be your user name."
99+
msgid "Your password can't be your username."
100100
msgstr "आपका पासवर्ड आपका उपयोगकर्ता नाम नहीं हो सकता।"
101101

102102
msgid "The passwords do not match."

modules/my_preferences/locale/my_preferences.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ msgstr ""
9393
msgid "The email address already exists"
9494
msgstr ""
9595

96-
msgid "Your password cannot be your email."
96+
msgid "Your password can't be your email."
9797
msgstr ""
9898

99-
msgid "Your password cannot be your user name."
99+
msgid "Your password can't be your username."
100100
msgstr ""
101101

102102
msgid "The passwords do not match."

modules/my_preferences/php/my_preferences.class.inc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ namespace LORIS\my_preferences;
1010
class My_Preferences extends \NDB_Form
1111
{
1212
// Use gettext for error messages
13-
private const PASSWORD_ERROR_IS_EMAIL = 'Your password cannot be your email.';
14-
private const PASSWORD_ERROR_IS_USER = 'Your password cannot be your user name.';
13+
private const PASSWORD_ERROR_IS_EMAIL = 'Your password can't be your email.';
14+
private const PASSWORD_ERROR_IS_USER = 'Your password can't be your username.';
1515
private const PASSWORD_ERROR_NO_MATCH = 'The passwords do not match.';
16-
private const PASSWORD_ERROR_NO_CHANGE
17-
= 'New and old passwords are identical: please choose another one';
16+
private const PASSWORD_ERROR_NO_CHANGE = 'New and old passwords are identical:'
17+
' please choose another one';
1818

1919
/**
2020
* Computes the initial values this page will be filled with.
@@ -86,7 +86,8 @@ class My_Preferences extends \NDB_Form
8686
foreach ($operations as $operation => $services) {
8787
unset($services['desc']);
8888
foreach ($services as $service => $subscribed) {
89-
$var_name = "notif_" . $module . "_" . $operation . "_" . $service;
89+
$var_name
90+
= "notif_" . $module . "_" . $operation . "_" . $service;
9091

9192
if ($subscribed === 'Y') {
9293
$defaults[$var_name] = 'on';
@@ -461,7 +462,8 @@ class My_Preferences extends \NDB_Form
461462
$decoded = htmlspecialchars_decode($plaintext);
462463
new \Password($decoded);
463464
// New password must be different than current one
464-
if (! \User::factory($this->identifier)->isPasswordDifferent($decoded)) {
465+
if (!\User::factory($this->identifier)->isPasswordDifferent($decoded)
466+
) {
465467
$errors['Password_Group'] = dgettext(
466468
'my_preferences',
467469
self::PASSWORD_ERROR_NO_CHANGE

0 commit comments

Comments
 (0)