mirror of https://github.com/django/django.git
Fixed #20455 -- Do not use ngettext for undefined plurals
Using two separate translation strings instead of gettext plural when there is no reference to the number in the translated string. This prevents some translations like Russian and Latvian to use the singular form for 11 or 21.
This commit is contained in:
parent
c0439b6210
commit
b3bccce1a0
|
@ -24,7 +24,7 @@
|
||||||
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
|
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
|
||||||
{% if form.errors %}
|
{% if form.errors %}
|
||||||
<p class="errornote">
|
<p class="errornote">
|
||||||
{% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
{% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %}
|
{% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %}
|
||||||
{% if errors %}
|
{% if errors %}
|
||||||
<p class="errornote">
|
<p class="errornote">
|
||||||
{% blocktrans count counter=errors|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
{% if errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{{ adminform.form.non_field_errors }}
|
{{ adminform.form.non_field_errors }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% if cl.formset.errors %}
|
{% if cl.formset.errors %}
|
||||||
<p class="errornote">
|
<p class="errornote">
|
||||||
{% blocktrans count cl.formset.errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
{% if cl.formset.errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{{ cl.formset.non_form_errors }}
|
{{ cl.formset.non_form_errors }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %}
|
{% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %}
|
||||||
<p class="errornote">
|
<p class="errornote">
|
||||||
{% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<div>
|
<div>
|
||||||
{% if form.errors %}
|
{% if form.errors %}
|
||||||
<p class="errornote">
|
<p class="errornote">
|
||||||
{% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<form action="{% comment_form_target %}" method="post">{% csrf_token %}
|
<form action="{% comment_form_target %}" method="post">{% csrf_token %}
|
||||||
{% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
|
{% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
|
||||||
{% if form.errors %}
|
{% if form.errors %}
|
||||||
<h1>{% blocktrans count counter=form.errors|length %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}</h1>
|
<h1>{% if form.errors|length == 1 %}{% trans "Please correct the error below" %}{% else %}{% trans "Please correct the errors below" %}{% endif %}</h1>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h1>{% trans "Preview your comment" %}</h1>
|
<h1>{% trans "Preview your comment" %}</h1>
|
||||||
<blockquote>{{ comment|linebreaks }}</blockquote>
|
<blockquote>{{ comment|linebreaks }}</blockquote>
|
||||||
|
|
Loading…
Reference in New Issue