aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2016-02-11 18:19:35 +0100
committerJeremy Benoist <j0k3r@users.noreply.github.com>2016-02-11 18:19:35 +0100
commit7a97c7d06fa96a4f2d8bb17817dc15b091698e80 (patch)
tree6dcb415323da8d715c50a34eee2b33e2dc885234
parent06c190887fd38c314db8d240ab2e46f5777ed59e (diff)
parent6fa4be38eb1b42a224b1649736c16b8d4b44d66a (diff)
downloadwallabag-7a97c7d06fa96a4f2d8bb17817dc15b091698e80.tar.gz
wallabag-7a97c7d06fa96a4f2d8bb17817dc15b091698e80.tar.zst
wallabag-7a97c7d06fa96a4f2d8bb17817dc15b091698e80.zip
Merge pull request #1656 from wallabag/v2-fix-new-user-password-prompts
fix labels on new user prompt
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/NewUserType.php3
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/validators.fr.yml3
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php2
3 files changed, 7 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
index ffbe9ba2..d8bde17e 100644
--- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
@@ -20,6 +20,9 @@ class NewUserType extends AbstractType
20 ->add('username', TextType::class, array('required' => true)) 20 ->add('username', TextType::class, array('required' => true))
21 ->add('plainPassword', RepeatedType::class, array( 21 ->add('plainPassword', RepeatedType::class, array(
22 'type' => PasswordType::class, 22 'type' => PasswordType::class,
23 'invalid_message' => 'The password fields must match',
24 'first_options' => array('label' => 'Password'),
25 'second_options' => array('label' => 'Repeat new password'),
23 'constraints' => array( 26 'constraints' => array(
24 new Constraints\Length(array( 27 new Constraints\Length(array(
25 'min' => 8, 28 'min' => 8,
diff --git a/src/Wallabag/CoreBundle/Resources/translations/validators.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/validators.fr.yml
new file mode 100644
index 00000000..40513f2a
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/translations/validators.fr.yml
@@ -0,0 +1,3 @@
1# Config screen
2The password fields must match: 'Les deux mots de passe doivent être les mêmes'
3Password should by at least 8 chars long: 'Le mot de passe doit contenir au moins 8 caractères'
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
index c8807425..6c370a2d 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
@@ -293,7 +293,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
293 'new_user[plainPassword][second]' => 'mypassword2', 293 'new_user[plainPassword][second]' => 'mypassword2',
294 'new_user[email]' => 'wallace@wallace.me', 294 'new_user[email]' => 'wallace@wallace.me',
295 ), 295 ),
296 'This value is not valid', 296 'The password fields must match',
297 ), 297 ),
298 ); 298 );
299 } 299 }