1
0
Fork 0

Consistent use of plurals

This commit is contained in:
Mouse Reeve 2022-07-05 14:44:15 -07:00
parent 7508ae9eae
commit e54c563865
4 changed files with 11 additions and 20 deletions

View file

@ -4,7 +4,7 @@
{% load utilities %}
{% block primary_link %}{% spaceless %}
{{ notification.related_user.local_path }}
{% url 'user-followers' request.user.localname %}
{% endspaceless %}{% endblock %}
{% block icon %}
@ -12,7 +12,6 @@
{% endblock %}
{% block description %}
{% if related_user_count == 1 %}
{% blocktrans trimmed %}
<a href="{{ related_user_link }}">{{ related_user }}</a> followed you
@ -24,8 +23,7 @@
{% endblocktrans %}
{% else %}
{% blocktrans trimmed %}
<a href="{{ related_user_link }}">{{ related_user }}</a>,
<a href="{{ second_user_link }}">{{ second_user }}</a>, and {{ other_user_display_count }} users followed you
<a href="{{ related_user_link }}">{{ related_user }}</a> and {{ other_user_display_count }} others followed you
{% endblocktrans %}
{% endif %}

View file

@ -2,7 +2,7 @@
{% load humanize %}
{% related_status notification as related_status %}
{% with related_users=notification.related_users.all %}
{% with related_users=notification.related_users.all.distinct %}
{% with related_user_count=notification.related_users.count %}
<div class="notification {% if notification.id in unread %}has-background-primary{% endif %}">
<div class="columns is-mobile {% if notification.id in unread %}has-text-white{% else %}has-text-more-muted{% endif %}">
@ -40,8 +40,8 @@
{% with related_user=related_users.first.display_name %}
{% with related_user_link=related_users.first.local_path %}
{% with second_user=related_users.all.1.display_name %}
{% with second_user_link=related_users.all.1.local_path %}
{% with second_user=related_users.1.display_name %}
{% with second_user_link=related_users.1.local_path %}
{% with other_user_count=related_user_count|add:"-1" %}
{% with other_user_display_count=other_user_count|intcomma %}
{% block description %}{% endblock %}
@ -63,3 +63,4 @@
</div>
</div>
{% endwith %}
{% endwith %}