From 0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 9 Mar 2016 08:59:08 +0100 Subject: Convert english translation file - convert english translation to translate key - remove baggy template for login (never used since user isn't logged in and it'll use the default theme: material) - fix tests about text in response (now checking translation key instead of translated text) - remove all ugly `` --- src/Wallabag/CoreBundle/Form/Type/NewUserType.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/Wallabag/CoreBundle/Form/Type/NewUserType.php') diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index 6eb0e63f..60fcc20c 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php @@ -17,22 +17,30 @@ class NewUserType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('username', TextType::class, array('required' => true)) + ->add('username', TextType::class, array( + 'required' => true, + 'label' => 'config.form_new_user.username_label', + )) ->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'), + 'invalid_message' => 'validator.password_must_match', + 'first_options' => array('label' => 'config.form_new_user.password_label'), + 'second_options' => array('label' => 'config.form_new_user.repeat_new_password_label'), 'constraints' => array( new Constraints\Length(array( 'min' => 8, - 'minMessage' => 'Password should by at least 8 chars long', + 'minMessage' => 'validator.password_too_short', )), new Constraints\NotBlank(), ), + 'label' => 'config.form_new_user.plain_password_label', + )) + ->add('email', EmailType::class, array( + 'label' => 'config.form_new_user.email_label', + )) + ->add('save', SubmitType::class, array( + 'label' => 'config.form.save', )) - ->add('email', EmailType::class) - ->add('save', SubmitType::class) ; } -- cgit v1.2.3