aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2016-03-18 14:30:38 +0100
committerJeremy Benoist <j0k3r@users.noreply.github.com>2016-03-18 14:30:38 +0100
commitf39e94ace35c2a30e2079706bb3d27d8a16c91ec (patch)
tree2a149d5cd6486e7d07a8a912a14f47c9b94ac934 /src/Wallabag/CoreBundle/Resources
parentec7c67badc46aaf36205f97d3aa326dc72c777b7 (diff)
parent1b64a84b782090d8748bef0e9c390f491669e30c (diff)
downloadwallabag-f39e94ace35c2a30e2079706bb3d27d8a16c91ec.tar.gz
wallabag-f39e94ace35c2a30e2079706bb3d27d8a16c91ec.tar.zst
wallabag-f39e94ace35c2a30e2079706bb3d27d8a16c91ec.zip
Merge pull request #1767 from wallabag/v2-setting-for-reading-time
Setting for reading time
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources')
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml7
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig9
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig9
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig5
4 files changed, 28 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index b809f1ab..7c6ad07e 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -38,6 +38,7 @@ RSS: 'RSS'
38Add a user: 'Créer un compte' 38Add a user: 'Créer un compte'
39Theme: 'Thème' 39Theme: 'Thème'
40Items per page: "Nombre d'articles par page" 40Items per page: "Nombre d'articles par page"
41Reading speed: "Vitesse de lecture"
41Language: 'Langue' 42Language: 'Langue'
42Save: 'Enregistrer' 43Save: 'Enregistrer'
43RSS token: 'Jeton RSS' 44RSS token: 'Jeton RSS'
@@ -56,6 +57,12 @@ Repeat new password: 'Confirmez votre nouveau mot de passe'
56Username: "Nom d'utilisateur" 57Username: "Nom d'utilisateur"
57Two factor authentication: "Double authentification" 58Two factor authentication: "Double authentification"
58"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." 59"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."
60"I read ~100 words per minute": "Je lis environ 100 mots par minute"
61"I read ~200 words per minute": "Je lis environ 200 mots par minute"
62"I read ~300 words per minute": "Je lis environ 300 mots par minute"
63"I read ~400 words per minute": "Je lis environ 400 mots par minute"
64"You can use online tools to estimate your reading speed": "Vous pouvez utiliser un outil en ligne pour estimer votre vitesse de lecture"
65"like this one": "comme celui-ci"
59 66
60# Tagging rules 67# Tagging rules
61Tagging rules: "Règles de tag automatiques" 68Tagging rules: "Règles de tag automatiques"
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
index 6ac6decb..54faa788 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
@@ -26,6 +26,15 @@
26 26
27 <fieldset class="w500p inline"> 27 <fieldset class="w500p inline">
28 <div class="row"> 28 <div class="row">
29 {{ form_label(form.config.reading_speed) }}
30 {{ form_errors(form.config.reading_speed) }}
31 {{ form_widget(form.config.reading_speed) }}
32 <p>{% trans %}You can use online tools to estimate your reading speed{% endtrans %} (<a href="http://www.myreadspeed.com/calculate/">{% trans %}like this one{%endtrans%}</a>).</p>
33 </div>
34 </fieldset>
35
36 <fieldset class="w500p inline">
37 <div class="row">
29 {{ form_label(form.config.language) }} 38 {{ form_label(form.config.language) }}
30 {{ form_errors(form.config.language) }} 39 {{ form_errors(form.config.language) }}
31 {{ form_widget(form.config.language) }} 40 {{ form_widget(form.config.language) }}
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 e388f2c8..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
@@ -44,6 +44,15 @@
44 44
45 <div class="row"> 45 <div class="row">
46 <div class="input-field col s12"> 46 <div class="input-field col s12">
47 {{ form_label(form.config.reading_speed) }}
48 {{ form_errors(form.config.reading_speed) }}
49 {{ form_widget(form.config.reading_speed) }}
50 <p>{% trans %}You can use online tools to estimate your reading speed{% endtrans %} (<a href="http://www.myreadspeed.com/calculate/">{% trans %}like this one{%endtrans%}</a>).</p>
51 </div>
52 </div>
53
54 <div class="row">
55 <div class="input-field col s12">
47 {{ form_label(form.config.language) }} 56 {{ form_label(form.config.language) }}
48 {{ form_errors(form.config.language) }} 57 {{ form_errors(form.config.language) }}
49 {{ form_widget(form.config.language) }} 58 {{ form_widget(form.config.language) }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
index c3fd4d28..371992df 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
@@ -50,8 +50,9 @@
50 50
51 <div class="estimatedTime grey-text"> 51 <div class="estimatedTime grey-text">
52 <span class="tool reading-time"> 52 <span class="tool reading-time">
53 {% if entry.readingTime > 0 %} 53 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
54 {% trans with {'%readingTime%': entry.readingTime } %}estimated reading time: %readingTime% min{% endtrans %} 54 {% if readingTime > 0 %}
55 {% trans with {'%readingTime%': readingTime } %}estimated reading time: %readingTime% min{% endtrans %}
55 {% else %} 56 {% else %}
56 {% trans with {'%inferior%': '<small class="inferieur">&lt;</small>'} %}estimated reading time: %inferior% 1 min{% endtrans %} 57 {% trans with {'%inferior%': '<small class="inferieur">&lt;</small>'} %}estimated reading time: %inferior% 1 min{% endtrans %}
57 {% endif %} 58 {% endif %}