diff --git a/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig index e1f48789c..817f7e6a7 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Notification/_list_item.html.twig @@ -72,10 +72,13 @@
- {# TODO twig extension to count comments #} -
- 4 commentaires -
+ {% if c.notification.comments|length > 0 %} +
+ + {{ 'notification.counter comments'|trans({'nb': c.notification.comments|length }) }} + +
+ {% endif %}
diff --git a/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml index 7a5b328f4..4bb7a6340 100644 --- a/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillMainBundle/translations/messages+intl-icu.fr.yaml @@ -29,3 +29,11 @@ notification: few {# non-lues} other {# non-lues} } + + counter comments: >- + {nb, plural, + =0 {Aucun commentaire} + one {# commentaire} + few {# commentaires} + other {# commentaires} + } \ No newline at end of file