From f51205d0edce4ae96a4d123388871b0ae0a136e8 Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Thu, 1 Dec 2011 22:57:01 +0000 Subject: [PATCH] Updated uses of i18n.blocktrans template tag to use the new more compact syntax introduced in 1.3. Ref r14922. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17165 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- .../admin/templates/admin/auth/user/change_password.html | 4 ++-- django/contrib/admin/templates/admin/change_form.html | 2 +- .../contrib/admin/templates/admin/delete_confirmation.html | 6 +++--- .../contrib/admin/templates/admin/edit_inline/stacked.html | 2 +- .../contrib/admin/templates/admin/edit_inline/tabular.html | 2 +- django/contrib/admin/templates/admin/filter.html | 2 +- django/contrib/admin/templates/admin/index.html | 4 ++-- django/contrib/admin/templates/admin/login.html | 2 +- django/contrib/admin/templates/admin/search_form.html | 2 +- .../admin/templates/registration/password_change_form.html | 2 +- django/contrib/comments/templates/comments/preview.html | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/django/contrib/admin/templates/admin/auth/user/change_password.html b/django/contrib/admin/templates/admin/auth/user/change_password.html index c4ad02c665..6adfaed548 100644 --- a/django/contrib/admin/templates/admin/auth/user/change_password.html +++ b/django/contrib/admin/templates/admin/auth/user/change_password.html @@ -26,11 +26,11 @@ {% if is_popup %}{% endif %} {% if form.errors %}

- {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} + {% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}

{% endif %} -

{% blocktrans with original.username as username %}Enter a new password for the user {{ username }}.{% endblocktrans %}

+

{% blocktrans with username=original.username %}Enter a new password for the user {{ username }}.{% endblocktrans %}

diff --git a/django/contrib/admin/templates/admin/change_form.html b/django/contrib/admin/templates/admin/change_form.html index 14bc76d6be..de442986ff 100644 --- a/django/contrib/admin/templates/admin/change_form.html +++ b/django/contrib/admin/templates/admin/change_form.html @@ -43,7 +43,7 @@ {% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %} {% if errors %}

- {% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} + {% blocktrans count counter=errors|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}

{{ adminform.form.non_field_errors }} {% endif %} diff --git a/django/contrib/admin/templates/admin/delete_confirmation.html b/django/contrib/admin/templates/admin/delete_confirmation.html index f8b36e9c40..43440b2774 100644 --- a/django/contrib/admin/templates/admin/delete_confirmation.html +++ b/django/contrib/admin/templates/admin/delete_confirmation.html @@ -16,7 +16,7 @@ {% block content %} {% if perms_lacking or protected %} {% if perms_lacking %} -

{% blocktrans with object as escaped_object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}

+

{% blocktrans with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}

{% endif %} {% if protected %} -

{% blocktrans with object as escaped_object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktrans %}

+

{% blocktrans with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktrans %}

{% endif %} {% else %} -

{% blocktrans with object as escaped_object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}

+

{% blocktrans with escaped_object=object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}

{% csrf_token %}
diff --git a/django/contrib/admin/templates/admin/edit_inline/stacked.html b/django/contrib/admin/templates/admin/edit_inline/stacked.html index 476e2613c5..3ef5976f93 100644 --- a/django/contrib/admin/templates/admin/edit_inline/stacked.html +++ b/django/contrib/admin/templates/admin/edit_inline/stacked.html @@ -64,7 +64,7 @@ } $(rows).formset({ prefix: "{{ inline_admin_formset.formset.prefix }}", - addText: "{% blocktrans with inline_admin_formset.opts.verbose_name|title as verbose_name %}Add another {{ verbose_name }}{% endblocktrans %}", + addText: "{% blocktrans with verbose_name=inline_admin_formset.opts.verbose_name|title %}Add another {{ verbose_name }}{% endblocktrans %}", formCssClass: "dynamic-{{ inline_admin_formset.formset.prefix }}", deleteCssClass: "inline-deletelink", deleteText: "{% trans "Remove" %}", diff --git a/django/contrib/admin/templates/admin/edit_inline/tabular.html b/django/contrib/admin/templates/admin/edit_inline/tabular.html index b891a76a72..8a6578f4d3 100644 --- a/django/contrib/admin/templates/admin/edit_inline/tabular.html +++ b/django/contrib/admin/templates/admin/edit_inline/tabular.html @@ -112,7 +112,7 @@ } $(rows).formset({ prefix: "{{ inline_admin_formset.formset.prefix }}", - addText: "{% blocktrans with inline_admin_formset.opts.verbose_name|title as verbose_name %}Add another {{ verbose_name }}{% endblocktrans %}", + addText: "{% blocktrans with verbose_name=inline_admin_formset.opts.verbose_name|title %}Add another {{ verbose_name }}{% endblocktrans %}", formCssClass: "dynamic-{{ inline_admin_formset.formset.prefix }}", deleteCssClass: "inline-deletelink", deleteText: "{% trans "Remove" %}", diff --git a/django/contrib/admin/templates/admin/filter.html b/django/contrib/admin/templates/admin/filter.html index 9ef69ffda7..d4a61a1513 100644 --- a/django/contrib/admin/templates/admin/filter.html +++ b/django/contrib/admin/templates/admin/filter.html @@ -1,5 +1,5 @@ {% load i18n %} -

{% blocktrans with title as filter_title %} By {{ filter_title }} {% endblocktrans %}

+

{% blocktrans with filter_title=title %} By {{ filter_title }} {% endblocktrans %}

    {% for choice in choices %} diff --git a/django/contrib/admin/templates/admin/index.html b/django/contrib/admin/templates/admin/index.html index 86c795b249..b301edc5ba 100644 --- a/django/contrib/admin/templates/admin/index.html +++ b/django/contrib/admin/templates/admin/index.html @@ -15,8 +15,8 @@ {% if app_list %} {% for app in app_list %}
    - - +
    {% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}
    + {% for model in app.models %} {% if model.perms.change %} diff --git a/django/contrib/admin/templates/admin/login.html b/django/contrib/admin/templates/admin/login.html index dbaa119224..a6cd6a7d6c 100644 --- a/django/contrib/admin/templates/admin/login.html +++ b/django/contrib/admin/templates/admin/login.html @@ -14,7 +14,7 @@ {% block content %} {% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %}

    -{% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} +{% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}

    {% endif %} diff --git a/django/contrib/admin/templates/admin/search_form.html b/django/contrib/admin/templates/admin/search_form.html index 162b54addf..f5a9e7b8b9 100644 --- a/django/contrib/admin/templates/admin/search_form.html +++ b/django/contrib/admin/templates/admin/search_form.html @@ -6,7 +6,7 @@ {% if show_result_count %} - {% blocktrans count cl.result_count as counter %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %} ({% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}) + {% blocktrans count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %} ({% blocktrans with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktrans %}) {% endif %} {% for pair in cl.params.items %} {% ifnotequal pair.0 search_var %}{% endifnotequal %} diff --git a/django/contrib/admin/templates/registration/password_change_form.html b/django/contrib/admin/templates/registration/password_change_form.html index 0e4ea535af..ea8abb4112 100644 --- a/django/contrib/admin/templates/registration/password_change_form.html +++ b/django/contrib/admin/templates/registration/password_change_form.html @@ -18,7 +18,7 @@
    {% if form.errors %}

    - {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} + {% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}

    {% endif %} diff --git a/django/contrib/comments/templates/comments/preview.html b/django/contrib/comments/templates/comments/preview.html index b1607b90c2..882d0fe714 100644 --- a/django/contrib/comments/templates/comments/preview.html +++ b/django/contrib/comments/templates/comments/preview.html @@ -8,7 +8,7 @@ {% csrf_token %} {% if next %}
    {% endif %} {% if form.errors %} -

    {% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}

    +

    {% blocktrans count counter=form.errors|length %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}

    {% else %}

    {% trans "Preview your comment" %}

    {{ comment|linebreaks }}
    {% blocktrans with name=app.name %}{{ name }}{% endblocktrans %}