Commit 2dafe4ac authored by Jannis Leidel's avatar Jannis Leidel
Browse files

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
parent 0d2a24fd
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -1037,13 +1037,15 @@ class ModelAdmin(BaseModelAdmin):
        else:
            action_form = None

        if cl.result_count == 1:
            module_name = force_unicode(opts.verbose_name)
        else:
            module_name = force_unicode(opts.verbose_name_plural)
        selection_note = ungettext('of %(count)d selected',
            'of %(count)d selected', len(cl.result_list))
        selection_note_all = ungettext('%(total_count)s selected',
            'All %(total_count)s selected', cl.result_count)

        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,
            'is_popup': cl.is_popup,
            'cl': cl,
+3 −8
Original line number Diff line number Diff line
@@ -3,18 +3,13 @@
    {% 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>
    {% if actions_selection_counter %}
        <span class="action-counter">
            {% blocktrans with cl.result_count as total_count %}<span class="_acnt">0</span> of {{ total_count }} {{ module_name }} selected{% endblocktrans %}
        </span>
        <span class="action-counter"><span class="_acnt">0</span> {{ selection_note }}</span>
        {% if cl.result_count != cl.result_list|length %}
        <span class="all">
            {% blocktrans with cl.result_count as total_count %}All {{ total_count }} {{ module_name }} selected{% endblocktrans %}
        </span>
        <span class="all">{{ selection_note_all }}</span>
        <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 class="clear"><a href="javascript:;">{% trans "Clear selection" %}</a></span>
        {% endif %}
    {% endif %}
</div>