Fixed #12903 - Added plural forms to a few strings in the admin actions template.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0d2a24fd42
commit
2dafe4ac3a
|
@ -1037,13 +1037,15 @@ class ModelAdmin(BaseModelAdmin):
|
||||||
else:
|
else:
|
||||||
action_form = None
|
action_form = None
|
||||||
|
|
||||||
if cl.result_count == 1:
|
selection_note = ungettext('of %(count)d selected',
|
||||||
module_name = force_unicode(opts.verbose_name)
|
'of %(count)d selected', len(cl.result_list))
|
||||||
else:
|
selection_note_all = ungettext('%(total_count)s selected',
|
||||||
module_name = force_unicode(opts.verbose_name_plural)
|
'All %(total_count)s selected', cl.result_count)
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
'module_name': module_name,
|
'module_name': force_unicode(opts.verbose_name_plural),
|
||||||
|
'selection_note': selection_note % {'count': len(cl.result_list)},
|
||||||
|
'selection_note_all': selection_note_all % {'total_count': cl.result_count},
|
||||||
'title': cl.title,
|
'title': cl.title,
|
||||||
'is_popup': cl.is_popup,
|
'is_popup': cl.is_popup,
|
||||||
'cl': cl,
|
'cl': cl,
|
||||||
|
|
|
@ -3,18 +3,13 @@
|
||||||
{% for field in action_form %}{% if field.label %}<label>{{ field.label }} {% endif %}{{ field }}{% if field.label %}</label>{% endif %}{% endfor %}
|
{% for field in action_form %}{% if field.label %}<label>{{ field.label }} {% endif %}{{ field }}{% if field.label %}</label>{% endif %}{% endfor %}
|
||||||
<button type="submit" class="button" title="{% trans "Run the selected action" %}" name="index" value="{{ action_index|default:0 }}">{% trans "Go" %}</button>
|
<button type="submit" class="button" title="{% trans "Run the selected action" %}" name="index" value="{{ action_index|default:0 }}">{% trans "Go" %}</button>
|
||||||
{% if actions_selection_counter %}
|
{% if actions_selection_counter %}
|
||||||
<span class="action-counter">
|
<span class="action-counter"><span class="_acnt">0</span> {{ selection_note }}</span>
|
||||||
{% blocktrans with cl.result_count as total_count %}<span class="_acnt">0</span> of {{ total_count }} {{ module_name }} selected{% endblocktrans %}
|
|
||||||
</span>
|
|
||||||
{% if cl.result_count != cl.result_list|length %}
|
{% if cl.result_count != cl.result_list|length %}
|
||||||
<span class="all">
|
<span class="all">{{ selection_note_all }}</span>
|
||||||
{% blocktrans with cl.result_count as total_count %}All {{ total_count }} {{ module_name }} selected{% endblocktrans %}
|
|
||||||
</span>
|
|
||||||
<span class="question">
|
<span class="question">
|
||||||
<a href="javascript:;" title="{% trans "Click here to select all objects across all pages" %}">{% blocktrans with cl.result_count as total_count %}Select all {{ total_count }} {{ module_name }}{% endblocktrans %}</a>
|
<a href="javascript:;" title="{% trans "Click here to select the objects across all pages" %}">{% blocktrans with cl.result_count as total_count %}Select all {{ total_count }} {{ module_name }}{% endblocktrans %}</a>
|
||||||
</span>
|
</span>
|
||||||
<span class="clear"><a href="javascript:;">{% trans "Clear selection" %}</a></span>
|
<span class="clear"><a href="javascript:;">{% trans "Clear selection" %}</a></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue