notifications: fix comments counter

This commit is contained in:
Mathieu Jaumotte 2022-02-01 14:56:50 +01:00
parent 460502a1f2
commit 2f5fecf414
2 changed files with 15 additions and 4 deletions

View File

@ -72,10 +72,13 @@
<div class="item-row separator">
<div class="item-col item-meta">
{# TODO twig extension to count comments #}
<div class="comment-counter visually-hidden">
<span class="counter">4 commentaires</span>
</div>
{% if c.notification.comments|length > 0 %}
<div class="comment-counter">
<span class="counter">
{{ 'notification.counter comments'|trans({'nb': c.notification.comments|length }) }}
</span>
</div>
{% endif %}
</div>
<div class="item-col">

View File

@ -29,3 +29,11 @@ notification:
few {# non-lues}
other {# non-lues}
}
counter comments: >-
{nb, plural,
=0 {Aucun commentaire}
one {# commentaire}
few {# commentaires}
other {# commentaires}
}