From 6432b9277ed5dcf269590e421bd0aac4ad66f09c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 14 Mar 2016 13:49:47 +0100 Subject: [PATCH] Replace slider with select --- data/db/wallabag_test.sqlite-journal | Bin 7736 -> 0 bytes .../Controller/DeveloperController.php | 2 +- src/Wallabag/CoreBundle/Form/Type/ConfigType.php | 12 ++++++------ .../Resources/translations/messages.fr.yml | 6 ++++++ .../views/themes/material/Config/index.html.twig | 1 + 5 files changed, 14 insertions(+), 7 deletions(-) delete mode 100644 data/db/wallabag_test.sqlite-journal diff --git a/data/db/wallabag_test.sqlite-journal b/data/db/wallabag_test.sqlite-journal deleted file mode 100644 index 153aa1871eda7b25ac07f1d158072b88be1ce8f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7736 zcmeI1U2oe|7{~3Ht}E}bL0LD(A#AiE3-e1}oK)53Bu*FQt#OiW;l^@pw>5R_Vml-m znnbzaim$;vUw}`+4L4jMAwB{(lPaE*rEN@;bd`oQb$;TXUHdsc=Q)2LpYvEHh!ZQh z`Y&)6BZv?jUORCFe_dn+=H7zdk;JbAY_L1OeSiL2Ufdl&-d~zuTwW%By5}idrruLb zQ`u5>oFirtYF#xt1N1NQFRk%QF%-XGWaXmkct&S zYNL|ahG8Fxl-!+r@IsP}dfD)Fv~A|A$BtnPO0rmtIDDdhia6nw2Ura5N2X_ri)BCMzu`VXh2Vu?$(L|C}<;v+QiHdL#gPCSot%#-{t^5n*|2qLE=5a@h5S;!WA5!^mAf}`6e zMlj4x$C`(E;1HfSUgNQS4&e3w4)6tlXA26zABhoQ1;9DM+rT`4^MW^lH-H7;GJt2D zMc_l=1Kc1zt`Cet1M)BXVF1rGqu%GX4l1z>eeKdvwNH_rhIY z_jxX1^faEP<23KmJ>KQrogPoSd%d`A@0x0Kpjln6X*=HI=59^eY N6HiRI1o^;U{{kod?Wq6& diff --git a/src/Wallabag/CoreBundle/Controller/DeveloperController.php b/src/Wallabag/CoreBundle/Controller/DeveloperController.php index f519bdbc..e5cfd83c 100644 --- a/src/Wallabag/CoreBundle/Controller/DeveloperController.php +++ b/src/Wallabag/CoreBundle/Controller/DeveloperController.php @@ -43,7 +43,7 @@ class DeveloperController extends Controller $clientForm->handleRequest($request); if ($clientForm->isValid()) { - $client->setAllowedGrantTypes(array('token', 'authorization_code', 'password','refresh_token')); + $client->setAllowedGrantTypes(array('token', 'authorization_code', 'password', 'refresh_token')); $em->persist($client); $em->flush(); diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 1218a933..0a5ea6cc 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php @@ -4,7 +4,6 @@ namespace Wallabag\CoreBundle\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\Extension\Core\Type\RangeType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -36,11 +35,12 @@ class ConfigType extends AbstractType 'choices_as_values' => true, )) ->add('items_per_page') - ->add('reading_speed', RangeType::class, array( - 'attr' => array( - 'min' => 0.5, - 'max' => 2, - 'step' => 0.5, + ->add('reading_speed', ChoiceType::class, array( + 'choices' => array( + 'I read ~100 words per minute' => '0.5', + 'I read ~200 words per minute' => '1', + 'I read ~300 words per minute' => '1.5', + 'I read ~400 words per minute' => '2', ), )) ->add('language', ChoiceType::class, array( diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index f6ac34fd..7c6ad07e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -57,6 +57,12 @@ Repeat new password: 'Confirmez votre nouveau mot de passe' Username: "Nom d'utilisateur" Two factor authentication: "Double authentification" "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion": "Activer l'authentification double-facteur veut dire que vous allez recevoir un code par email à chaque nouvelle connexion non approuvée." +"I read ~100 words per minute": "Je lis environ 100 mots par minute" +"I read ~200 words per minute": "Je lis environ 200 mots par minute" +"I read ~300 words per minute": "Je lis environ 300 mots par minute" +"I read ~400 words per minute": "Je lis environ 400 mots par minute" +"You can use online tools to estimate your reading speed": "Vous pouvez utiliser un outil en ligne pour estimer votre vitesse de lecture" +"like this one": "comme celui-ci" # Tagging rules Tagging rules: "Règles de tag automatiques" diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig index 31931ca2..2b0b0828 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig @@ -47,6 +47,7 @@ {{ form_label(form.config.reading_speed) }} {{ form_errors(form.config.reading_speed) }} {{ form_widget(form.config.reading_speed) }} +

{% trans %}You can use online tools to estimate your reading speed{% endtrans %} ({% trans %}like this one{%endtrans%}).

-- 2.41.0