From f37c9c3348c411cd1a4913b393f363c65a73a62d Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 18 Feb 2016 01:36:02 +0100 Subject: translate estimated time minutes --- .../CoreBundle/Resources/translations/messages.fr.yml | 3 ++- .../Resources/views/themes/baggy/Entry/entries.html.twig | 12 ++++++++++-- .../Resources/views/themes/material/Entry/entries.html.twig | 7 +++++-- 3 files changed, 17 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 67750bee..c42ac6d3 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -88,7 +88,8 @@ Rule: "Règle" FAQ: "FAQ" # Entries -'estimated reading time': 'durée de lecture' +"estimated reading time: %readingTime% min": "durée de lecture : %readingTime% min" +"estimated reading time: %inferior% 1 min": "durée de lecture : %inferior% 1 min" original: "original" Toggle mark as read: 'Marquer comme lu/non lu' Toggle favorite: 'Marquer comme favori' diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index abbcb389..7271bdaa 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -27,9 +27,17 @@

{{ entry.title|raw }}

{% if entry.readingTime > 0 %} -
{% trans %}estimated reading time :{% endtrans %} {{ entry.readingTime }} min
+
+ + {% trans with {'%readingTime%': entry.readingTime } %}estimated reading time: %readingTime% min{% endtrans %} + +
{% else %} -
{% trans %}estimated reading time :{% endtrans %} < 1 min
+
+ + {% trans with {'%inferior%': '<'} %}estimated reading time: %inferior% 1 min{% endtrans %} + +
{% endif %}