From 4e1be104ab59201e3d482e4fd31b69b76697fb9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 18 Aug 2016 15:23:19 +0200 Subject: Added creation date and reading time on article view Fix #2034 --- src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | 2 ++ src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | 2 ++ src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | 2 ++ src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | 2 ++ src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | 2 ++ src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | 2 ++ src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | 2 ++ src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | 2 ++ src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | 2 ++ src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | 2 ++ src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | 2 ++ .../CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig | 5 +++++ .../CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | 5 +++++ 13 files changed, 32 insertions(+) (limited to 'src/Wallabag/CoreBundle/Resources') diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 213d5790..5e7d8949 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml @@ -144,6 +144,8 @@ entry: reading_time: 'estimeret læsetid' reading_time_minutes: 'estimeret læsetid: %readingTime% min' reading_time_less_one_minute: 'estimeret læsetid: < 1 min' + reading_time_minutes_short: '%readingTime% min' + reading_time_less_one_minute_short: '< 1 min' original_article: 'original' toogle_as_read: 'Marker som læst' toogle_as_star: 'Skift favoritstatus' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index c98cf0fc..cb1644de 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml @@ -144,6 +144,8 @@ entry: reading_time: 'geschätzte Lesezeit' reading_time_minutes: 'geschätzte Lesezeit: %readingTime% min' reading_time_less_one_minute: 'geschätzte Lesezeit: < 1 min' + reading_time_minutes_short: '%readingTime% min' + reading_time_less_one_minute_short: '< 1 min' original_article: 'original' toogle_as_read: 'Gelesen-Status ändern' toogle_as_star: 'Favoriten-Status ändern' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index b65e4522..734f8533 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -144,6 +144,8 @@ entry: reading_time: 'estimated reading time' reading_time_minutes: 'estimated reading time: %readingTime% min' reading_time_less_one_minute: 'estimated reading time: < 1 min' + reading_time_minutes_short: '%readingTime% min' + reading_time_less_one_minute_short: '< 1 min' original_article: 'original' toogle_as_read: 'Toggle mark as read' toogle_as_star: 'Toggle favorite' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index 75978f16..582526ef 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml @@ -144,6 +144,8 @@ entry: reading_time: 'tiempo estimado de lectura' reading_time_minutes: 'tiempo estimado de lectura: %readingTime% min' reading_time_less_one_minute: 'tiempo estimado de lectura: < 1 min' + reading_time_minutes_short: '%readingTime% min' + reading_time_less_one_minute_short: '< 1 min' original_article: 'original' toogle_as_read: 'Marcar como leído/ no leído' toogle_as_star: 'Marcar como favorito/ no favorito' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index db6e5960..52b50ce9 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml @@ -144,6 +144,8 @@ entry: reading_time: 'زمان تخمینی برای خواندن' reading_time_minutes: 'زمان تخمینی برای خواندن: %readingTime% min' reading_time_less_one_minute: 'زمان تخمینی برای خواندن: < 1 min' + reading_time_minutes_short: '%readingTime% min' + reading_time_less_one_minute_short: '< 1 min' original_article: 'original' toogle_as_read: 'خوانده‌شده/خوانده‌نشده' toogle_as_star: 'برگزیده/نابرگزیده' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 94300596..cc460477 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -144,6 +144,8 @@ entry: reading_time: 'durée de lecture' reading_time_minutes: 'durée de lecture: %readingTime% min' reading_time_less_one_minute: 'durée de lecture: < 1 min' + reading_time_minutes_short: '%readingTime% min' + reading_time_less_one_minute_short: '< 1 min' original_article: 'original' toogle_as_read: 'Marquer comme lu/non lu' toogle_as_star: 'Marquer comme favori' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 00ed9c98..6d638e58 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml @@ -144,6 +144,8 @@ entry: reading_time: 'tempo di lettura stimato' reading_time_minutes: 'tempo di lettura stimato: %readingTime% min' reading_time_less_one_minute: 'tempo di lettura stimato: < 1 min' + reading_time_minutes_short: '%readingTime% min' + reading_time_less_one_minute_short: '< 1 min' original_article: 'originale' toogle_as_read: 'Segna come da leggere' toogle_as_star: 'Segna come non preferito' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index c81c852b..6fe2c4df 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml @@ -144,6 +144,8 @@ entry: reading_time: 'durada de lectura' reading_time_minutes: 'durada de lectura : %readingTime% min' reading_time_less_one_minute: 'durada de lectura : < 1 min' + reading_time_minutes_short: '%readingTime% min' + reading_time_less_one_minute_short: '< 1 min' original_article: 'original' toogle_as_read: 'Marcar coma legit/pas legit' toogle_as_star: 'Marcar coma favorit' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 3707a857..35108f22 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml @@ -144,6 +144,8 @@ entry: reading_time: 'szacunkowy czas czytania' reading_time_minutes: 'szacunkowy czas czytania: %readingTime% min' reading_time_less_one_minute: 'szacunkowy czas czytania: < 1 min' + reading_time_minutes_short: '%readingTime% min' + reading_time_less_one_minute_short: '< 1 min' original_article: 'oryginał' toogle_as_read: 'Oznacz jako przeczytane' toogle_as_star: 'Oznacz jako ulubione' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 27be1edc..2210d9e6 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml @@ -144,6 +144,8 @@ entry: reading_time: 'timp estimat de citire' reading_time_minutes: 'timp estimat de citire: %readingTime% min' reading_time_less_one_minute: 'timp estimat de citire: < 1 min' + reading_time_minutes_short: '%readingTime% min' + reading_time_less_one_minute_short: '< 1 min' original_article: 'original' toogle_as_read: 'Comută marcat ca citit' toogle_as_star: 'Comută marcat ca favorit' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 85ee7316..39f08ea3 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml @@ -144,6 +144,8 @@ entry: reading_time: 'tahmini okuma süresi' reading_time_minutes: 'tahmini okuma süresi: %readingTime% min' reading_time_less_one_minute: 'tahmini okuma süresi: < 1 min' + reading_time_minutes_short: '%readingTime% min' + reading_time_less_one_minute_short: '< 1 min' original_article: 'orijinal' toogle_as_read: 'Okundu/okunmadı olarak işaretle' toogle_as_star: 'Favorilere ekle/çıkar' diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index 5a800332..12b0bc53 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -29,6 +29,11 @@
  • {{ 'entry.view.left_menu.problem.label'|trans }}
  • + + {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} + {% set nbAnnotations = entry.annotations | length %} {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}