]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
fix labels on new user prompt 1656/head
authorThomas Citharel <tcit@tcit.fr>
Mon, 8 Feb 2016 21:49:17 +0000 (22:49 +0100)
committerThomas Citharel <tcit@tcit.fr>
Thu, 11 Feb 2016 16:52:00 +0000 (17:52 +0100)
fix tests

nl

add translation validation length

src/Wallabag/CoreBundle/Form/Type/NewUserType.php
src/Wallabag/CoreBundle/Resources/translations/validators.fr.yml [new file with mode: 0644]
src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php

index ffbe9ba27b6a33209fc42aaeac05591d07ac16d0..d8bde17ee2400f881603bf9f189040bb3226930f 100644 (file)
@@ -20,6 +20,9 @@ class NewUserType extends AbstractType
             ->add('username', TextType::class, array('required' => true))
             ->add('plainPassword', RepeatedType::class, array(
                 'type' => PasswordType::class,
+                'invalid_message' => 'The password fields must match',
+                'first_options'  => array('label' => 'Password'),
+                'second_options' => array('label' => 'Repeat new password'),
                 'constraints' => array(
                     new Constraints\Length(array(
                         '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 (file)
index 0000000..40513f2
--- /dev/null
@@ -0,0 +1,3 @@
+# Config screen
+The password fields must match: 'Les deux mots de passe doivent être les mêmes'
+Password should by at least 8 chars long: 'Le mot de passe doit contenir au moins 8 caractères'
index c8807425aa031bcc82ee6cbf19aa6efb949b4552..6c370a2d8373781d4d997a488fe1405f1ff4e81b 100644 (file)
@@ -293,7 +293,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
                     'new_user[plainPassword][second]' => 'mypassword2',
                     'new_user[email]' => 'wallace@wallace.me',
                 ),
-                'This value is not valid',
+                'The password fields must match',
             ),
         );
     }