diff options
| author | Mike Hansen <mike@rover.com> | 2019-09-23 08:31:21 -0700 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-12-18 13:15:38 +0100 |
| commit | 35d36d946272bed06a3d7c7cd4e5b71b613e7a4f (patch) | |
| tree | e6c774f841dc77ca311be6ecfad9c5d7ef790336 /django | |
| parent | d291c72bf24387e4abe8d9883ebe9c69abdd26d0 (diff) | |
Refs #30585 -- Updated project templates and tests to use (block)translate tags.
Diffstat (limited to 'django')
52 files changed, 256 insertions, 256 deletions
diff --git a/django/contrib/admin/templates/admin/404.html b/django/contrib/admin/templates/admin/404.html index 57b6d33780..19f07492cb 100644 --- a/django/contrib/admin/templates/admin/404.html +++ b/django/contrib/admin/templates/admin/404.html @@ -1,12 +1,12 @@ {% extends "admin/base_site.html" %} {% load i18n %} -{% block title %}{% trans 'Page not found' %}{% endblock %} +{% block title %}{% translate 'Page not found' %}{% endblock %} {% block content %} -<h2>{% trans 'Page not found' %}</h2> +<h2>{% translate 'Page not found' %}</h2> -<p>{% trans 'We’re sorry, but the requested page could not be found.' %}</p> +<p>{% translate 'We’re sorry, but the requested page could not be found.' %}</p> {% endblock %} diff --git a/django/contrib/admin/templates/admin/500.html b/django/contrib/admin/templates/admin/500.html index 89a6f65b38..b5ac5c3b6c 100644 --- a/django/contrib/admin/templates/admin/500.html +++ b/django/contrib/admin/templates/admin/500.html @@ -3,15 +3,15 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› {% trans 'Server error' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› {% translate 'Server error' %} </div> {% endblock %} -{% block title %}{% trans 'Server error (500)' %}{% endblock %} +{% block title %}{% translate 'Server error (500)' %}{% endblock %} {% block content %} -<h1>{% trans 'Server Error <em>(500)</em>' %}</h1> -<p>{% trans 'There’s been an error. It’s been reported to the site administrators via email and should be fixed shortly. Thanks for your patience.' %}</p> +<h1>{% translate 'Server Error <em>(500)</em>' %}</h1> +<p>{% translate 'There’s been an error. It’s been reported to the site administrators via email and should be fixed shortly. Thanks for your patience.' %}</p> {% endblock %} diff --git a/django/contrib/admin/templates/admin/actions.html b/django/contrib/admin/templates/admin/actions.html index ef2232e13f..b912d37396 100644 --- a/django/contrib/admin/templates/admin/actions.html +++ b/django/contrib/admin/templates/admin/actions.html @@ -5,7 +5,7 @@ {% for field in action_form %}{% if field.label %}<label>{{ field.label }} {% endif %}{{ field }}{% if field.label %}</label>{% endif %}{% endfor %} {% endblock %} {% block actions-submit %} - <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="{% translate "Run the selected action" %}" name="index" value="{{ action_index|default:0 }}">{% translate "Go" %}</button> {% endblock %} {% block actions-counter %} {% if actions_selection_counter %} @@ -13,9 +13,9 @@ {% if cl.result_count != cl.result_list|length %} <span class="all">{{ selection_note_all }}</span> <span class="question"> - <a href="#" 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> + <a href="#" title="{% translate "Click here to select the objects across all pages" %}">{% blocktranslate with cl.result_count as total_count %}Select all {{ total_count }} {{ module_name }}{% endblocktranslate %}</a> </span> - <span class="clear"><a href="#">{% trans "Clear selection" %}</a></span> + <span class="clear"><a href="#">{% translate "Clear selection" %}</a></span> {% endif %} {% endif %} {% endblock %} diff --git a/django/contrib/admin/templates/admin/app_index.html b/django/contrib/admin/templates/admin/app_index.html index 6868b497dd..886bf6ca00 100644 --- a/django/contrib/admin/templates/admin/app_index.html +++ b/django/contrib/admin/templates/admin/app_index.html @@ -6,7 +6,7 @@ {% if not is_popup %} {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> › {% for app in app_list %} {{ app.name }} diff --git a/django/contrib/admin/templates/admin/auth/user/add_form.html b/django/contrib/admin/templates/admin/auth/user/add_form.html index f12c66e30d..61cf5b1b40 100644 --- a/django/contrib/admin/templates/admin/auth/user/add_form.html +++ b/django/contrib/admin/templates/admin/auth/user/add_form.html @@ -3,8 +3,8 @@ {% block form_top %} {% if not is_popup %} - <p>{% trans 'First, enter a username and password. Then, you’ll be able to edit more user options.' %}</p> + <p>{% translate 'First, enter a username and password. Then, you’ll be able to edit more user options.' %}</p> {% else %} - <p>{% trans "Enter a username and password." %}</p> + <p>{% translate "Enter a username and password." %}</p> {% endif %} {% endblock %} 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 e2cacf88ef..2d723cf0d6 100644 --- a/django/contrib/admin/templates/admin/auth/user/change_password.html +++ b/django/contrib/admin/templates/admin/auth/user/change_password.html @@ -10,11 +10,11 @@ {% if not is_popup %} {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> › <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a> › <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a> › <a href="{% url opts|admin_urlname:'change' original.pk|admin_urlquote %}">{{ original|truncatewords:"18" }}</a> -› {% trans 'Change password' %} +› {% translate 'Change password' %} </div> {% endblock %} {% endif %} @@ -25,11 +25,11 @@ {% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %} {% if form.errors %} <p class="errornote"> - {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %} + {% if form.errors.items|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %} </p> {% endif %} -<p>{% blocktrans with username=original %}Enter a new password for the user <strong>{{ username }}</strong>.{% endblocktrans %}</p> +<p>{% blocktranslate with username=original %}Enter a new password for the user <strong>{{ username }}</strong>.{% endblocktranslate %}</p> <fieldset class="module aligned"> @@ -52,7 +52,7 @@ </fieldset> <div class="submit-row"> -<input type="submit" value="{% trans 'Change password' %}" class="default"> +<input type="submit" value="{% translate 'Change password' %}" class="default"> </div> </div> diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html index 2cf5137070..8d6425ad04 100644 --- a/django/contrib/admin/templates/admin/base.html +++ b/django/contrib/admin/templates/admin/base.html @@ -32,23 +32,23 @@ {% if has_permission %} <div id="user-tools"> {% block welcome-msg %} - {% trans 'Welcome,' %} + {% translate 'Welcome,' %} <strong>{% firstof user.get_short_name user.get_username %}</strong>. {% endblock %} {% block userlinks %} {% if site_url %} - <a href="{{ site_url }}">{% trans 'View site' %}</a> / + <a href="{{ site_url }}">{% translate 'View site' %}</a> / {% endif %} {% if user.is_active and user.is_staff %} {% url 'django-admindocs-docroot' as docsroot %} {% if docsroot %} - <a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / + <a href="{{ docsroot }}">{% translate 'Documentation' %}</a> / {% endif %} {% endif %} {% if user.has_usable_password %} - <a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> / + <a href="{% url 'admin:password_change' %}">{% translate 'Change password' %}</a> / {% endif %} - <a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a> + <a href="{% url 'admin:logout' %}">{% translate 'Log out' %}</a> {% endblock %} </div> {% endif %} @@ -58,7 +58,7 @@ <!-- END Header --> {% block breadcrumbs %} <div class="breadcrumbs"> - <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> + <a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> {% if title %} › {{ title }}{% endif %} </div> {% endblock %} diff --git a/django/contrib/admin/templates/admin/change_form.html b/django/contrib/admin/templates/admin/change_form.html index f99936d21f..f1f317806d 100644 --- a/django/contrib/admin/templates/admin/change_form.html +++ b/django/contrib/admin/templates/admin/change_form.html @@ -15,10 +15,10 @@ {% if not is_popup %} {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> › <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a> › {% if has_view_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %} -› {% if add %}{% blocktrans with name=opts.verbose_name %}Add {{ name }}{% endblocktrans %}{% else %}{{ original|truncatewords:"18" }}{% endif %} +› {% if add %}{% blocktranslate with name=opts.verbose_name %}Add {{ name }}{% endblocktranslate %}{% else %}{{ original|truncatewords:"18" }}{% endif %} </div> {% endblock %} {% endif %} @@ -40,7 +40,7 @@ {% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %} {% if errors %} <p class="errornote"> - {% if errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %} + {% if errors|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %} </p> {{ adminform.form.non_field_errors }} {% endif %} diff --git a/django/contrib/admin/templates/admin/change_form_object_tools.html b/django/contrib/admin/templates/admin/change_form_object_tools.html index 32487493a2..067ae83761 100644 --- a/django/contrib/admin/templates/admin/change_form_object_tools.html +++ b/django/contrib/admin/templates/admin/change_form_object_tools.html @@ -2,7 +2,7 @@ {% block object-tools-items %} <li> {% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %} - <a href="{% add_preserved_filters history_url %}" class="historylink">{% trans "History" %}</a> + <a href="{% add_preserved_filters history_url %}" class="historylink">{% translate "History" %}</a> </li> -{% if has_absolute_url %}<li><a href="{{ absolute_url }}" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif %} +{% if has_absolute_url %}<li><a href="{{ absolute_url }}" class="viewsitelink">{% translate "View on site" %}</a></li>{% endif %} {% endblock %} diff --git a/django/contrib/admin/templates/admin/change_list.html b/django/contrib/admin/templates/admin/change_list.html index e0dc285924..8b275362af 100644 --- a/django/contrib/admin/templates/admin/change_list.html +++ b/django/contrib/admin/templates/admin/change_list.html @@ -28,7 +28,7 @@ {% if not is_popup %} {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> › <a href="{% url 'admin:app_list' app_label=cl.opts.app_label %}">{{ cl.opts.app_config.verbose_name }}</a> › {{ cl.opts.verbose_name_plural|capfirst }} </div> @@ -48,7 +48,7 @@ {% endblock %} {% if cl.formset and cl.formset.errors %} <p class="errornote"> - {% if cl.formset.total_error_count == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %} + {% if cl.formset.total_error_count == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %} </p> {{ cl.formset.non_form_errors }} {% endif %} @@ -59,7 +59,7 @@ {% block filters %} {% if cl.has_filters %} <div id="changelist-filter"> - <h2>{% trans 'Filter' %}</h2> + <h2>{% translate 'Filter' %}</h2> {% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %} </div> {% endif %} diff --git a/django/contrib/admin/templates/admin/change_list_object_tools.html b/django/contrib/admin/templates/admin/change_list_object_tools.html index 5d6d458276..11cc6fa4ba 100644 --- a/django/contrib/admin/templates/admin/change_list_object_tools.html +++ b/django/contrib/admin/templates/admin/change_list_object_tools.html @@ -5,7 +5,7 @@ <li> {% url cl.opts|admin_urlname:'add' as add_url %} <a href="{% add_preserved_filters add_url is_popup to_field %}" class="addlink"> - {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %} + {% blocktranslate with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktranslate %} </a> </li> {% endif %} diff --git a/django/contrib/admin/templates/admin/change_list_results.html b/django/contrib/admin/templates/admin/change_list_results.html index 9b97b5b4f7..a4a2618e04 100644 --- a/django/contrib/admin/templates/admin/change_list_results.html +++ b/django/contrib/admin/templates/admin/change_list_results.html @@ -14,9 +14,9 @@ {% if header.sortable %} {% if header.sort_priority > 0 %} <div class="sortoptions"> - <a class="sortremove" href="{{ header.url_remove }}" title="{% trans "Remove from sorting" %}"></a> - {% if num_sorted_fields > 1 %}<span class="sortpriority" title="{% blocktrans with priority_number=header.sort_priority %}Sorting priority: {{ priority_number }}{% endblocktrans %}">{{ header.sort_priority }}</span>{% endif %} - <a href="{{ header.url_toggle }}" class="toggle {% if header.ascending %}ascending{% else %}descending{% endif %}" title="{% trans "Toggle sorting" %}"></a> + <a class="sortremove" href="{{ header.url_remove }}" title="{% translate "Remove from sorting" %}"></a> + {% if num_sorted_fields > 1 %}<span class="sortpriority" title="{% blocktranslate with priority_number=header.sort_priority %}Sorting priority: {{ priority_number }}{% endblocktranslate %}">{{ header.sort_priority }}</span>{% endif %} + <a href="{{ header.url_toggle }}" class="toggle {% if header.ascending %}ascending{% else %}descending{% endif %}" title="{% translate "Toggle sorting" %}"></a> </div> {% endif %} {% endif %} diff --git a/django/contrib/admin/templates/admin/delete_confirmation.html b/django/contrib/admin/templates/admin/delete_confirmation.html index 4a1c065cb2..bfece58ada 100644 --- a/django/contrib/admin/templates/admin/delete_confirmation.html +++ b/django/contrib/admin/templates/admin/delete_confirmation.html @@ -11,41 +11,41 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> › <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a> › <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a> › <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a> -› {% trans 'Delete' %} +› {% translate 'Delete' %} </div> {% endblock %} {% block content %} {% if perms_lacking %} - <p>{% 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 %}</p> + <p>{% blocktranslate 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:{% endblocktranslate %}</p> <ul> {% for obj in perms_lacking %} <li>{{ obj }}</li> {% endfor %} </ul> {% elif protected %} - <p>{% blocktrans with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktrans %}</p> + <p>{% blocktranslate with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktranslate %}</p> <ul> {% for obj in protected %} <li>{{ obj }}</li> {% endfor %} </ul> {% else %} - <p>{% 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 %}</p> + <p>{% blocktranslate 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:{% endblocktranslate %}</p> {% include "admin/includes/object_delete_summary.html" %} - <h2>{% trans "Objects" %}</h2> + <h2>{% translate "Objects" %}</h2> <ul>{{ deleted_objects|unordered_list }}</ul> <form method="post">{% csrf_token %} <div> <input type="hidden" name="post" value="yes"> {% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %} {% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}">{% endif %} - <input type="submit" value="{% trans 'Yes, I’m sure' %}"> - <a href="#" class="button cancel-link">{% trans "No, take me back" %}</a> + <input type="submit" value="{% translate 'Yes, I’m sure' %}"> + <a href="#" class="button cancel-link">{% translate "No, take me back" %}</a> </div> </form> {% endif %} diff --git a/django/contrib/admin/templates/admin/delete_selected_confirmation.html b/django/contrib/admin/templates/admin/delete_selected_confirmation.html index bab4cd31c2..346d280738 100644 --- a/django/contrib/admin/templates/admin/delete_selected_confirmation.html +++ b/django/contrib/admin/templates/admin/delete_selected_confirmation.html @@ -11,32 +11,32 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> › <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a> › <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a> -› {% trans 'Delete multiple objects' %} +› {% translate 'Delete multiple objects' %} </div> {% endblock %} {% block content %} {% if perms_lacking %} - <p>{% blocktrans %}Deleting the selected {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p> + <p>{% blocktranslate %}Deleting the selected {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktranslate %}</p> <ul> {% for obj in perms_lacking %} <li>{{ obj }}</li> {% endfor %} </ul> {% elif protected %} - <p>{% blocktrans %}Deleting the selected {{ objects_name }} would require deleting the following protected related objects:{% endblocktrans %}</p> + <p>{% blocktranslate %}Deleting the selected {{ objects_name }} would require deleting the following protected related objects:{% endblocktranslate %}</p> <ul> {% for obj in protected %} <li>{{ obj }}</li> {% endfor %} </ul> {% else %} - <p>{% blocktrans %}Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted:{% endblocktrans %}</p> + <p>{% blocktranslate %}Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted:{% endblocktranslate %}</p> {% include "admin/includes/object_delete_summary.html" %} - <h2>{% trans "Objects" %}</h2> + <h2>{% translate "Objects" %}</h2> {% for deletable_object in deletable_objects %} <ul>{{ deletable_object|unordered_list }}</ul> {% endfor %} @@ -47,8 +47,8 @@ {% endfor %} <input type="hidden" name="action" value="delete_selected"> <input type="hidden" name="post" value="yes"> - <input type="submit" value="{% trans 'Yes, I’m sure' %}"> - <a href="#" class="button cancel-link">{% trans "No, take me back" %}</a> + <input type="submit" value="{% translate 'Yes, I’m sure' %}"> + <a href="#" class="button cancel-link">{% translate "No, take me back" %}</a> </div> </form> {% endif %} diff --git a/django/contrib/admin/templates/admin/edit_inline/stacked.html b/django/contrib/admin/templates/admin/edit_inline/stacked.html index d9c27b1578..0fe7a0c0a2 100644 --- a/django/contrib/admin/templates/admin/edit_inline/stacked.html +++ b/django/contrib/admin/templates/admin/edit_inline/stacked.html @@ -9,9 +9,9 @@ {{ inline_admin_formset.formset.non_form_errors }} {% for inline_admin_form in inline_admin_formset %}<div class="inline-related{% if inline_admin_form.original or inline_admin_form.show_url %} has_original{% endif %}{% if forloop.last and inline_admin_formset.has_add_permission %} empty-form last-related{% endif %}" id="{{ inline_admin_formset.formset.prefix }}-{% if not forloop.last %}{{ forloop.counter0 }}{% else %}empty{% endif %}"> - <h3><b>{{ inline_admin_formset.opts.verbose_name|capfirst }}:</b> <span class="inline_label">{% if inline_admin_form.original %}{{ inline_admin_form.original }}{% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %} <a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{% if inline_admin_formset.has_change_permission %}inlinechangelink{% else %}inlineviewlink{% endif %}">{% if inline_admin_formset.has_change_permission %}{% trans "Change" %}{% else %}{% trans "View" %}{% endif %}</a>{% endif %} + <h3><b>{{ inline_admin_formset.opts.verbose_name|capfirst }}:</b> <span class="inline_label">{% if inline_admin_form.original %}{{ inline_admin_form.original }}{% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %} <a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{% if inline_admin_formset.has_change_permission %}inlinechangelink{% else %}inlineviewlink{% endif %}">{% if inline_admin_formset.has_change_permission %}{% translate "Change" %}{% else %}{% translate "View" %}{% endif %}</a>{% endif %} {% else %}#{{ forloop.counter }}{% endif %}</span> - {% if inline_admin_form.show_url %}<a href="{{ inline_admin_form.absolute_url }}">{% trans "View on site" %}</a>{% endif %} + {% if inline_admin_form.show_url %}<a href="{{ inline_admin_form.absolute_url }}">{% translate "View on site" %}</a>{% endif %} {% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission and inline_admin_form.original %}<span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>{% endif %} </h3> {% if inline_admin_form.form.non_field_errors %}{{ inline_admin_form.form.non_field_errors }}{% endif %} diff --git a/django/contrib/admin/templates/admin/edit_inline/tabular.html b/django/contrib/admin/templates/admin/edit_inline/tabular.html index 261592af6e..94f97d94b6 100644 --- a/django/contrib/admin/templates/admin/edit_inline/tabular.html +++ b/django/contrib/admin/templates/admin/edit_inline/tabular.html @@ -17,7 +17,7 @@ </th> {% endif %} {% endfor %} - {% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}<th>{% trans "Delete?" %}</th>{% endif %} + {% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}<th>{% translate "Delete?" %}</th>{% endif %} </tr></thead> <tbody> @@ -31,9 +31,9 @@ {% if inline_admin_form.original or inline_admin_form.show_url %}<p> {% if inline_admin_form.original %} {{ inline_admin_form.original }} - {% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %}<a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{% if inline_admin_formset.has_change_permission %}inlinechangelink{% else %}inlineviewlink{% endif %}">{% if inline_admin_formset.has_change_permission %}{% trans "Change" %}{% else %}{% trans "View" %}{% endif %}</a>{% endif %} + {% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %}<a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{% if inline_admin_formset.has_change_permission %}inlinechangelink{% else %}inlineviewlink{% endif %}">{% if inline_admin_formset.has_change_permission %}{% translate "Change" %}{% else %}{% translate "View" %}{% endif %}</a>{% endif %} {% endif %} - {% if inline_admin_form.show_url %}<a href="{{ inline_admin_form.absolute_url }}">{% trans "View on site" %}</a>{% endif %} + {% if inline_admin_form.show_url %}<a href="{{ inline_admin_form.absolute_url }}">{% translate "View on site" %}</a>{% endif %} </p>{% endif %} {% if inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %} {% if inline_admin_form.fk_field %}{{ inline_admin_form.fk_field.field }}{% endif %} diff --git a/django/contrib/admin/templates/admin/filter.html b/django/contrib/admin/templates/admin/filter.html index cd88652a62..35dc553bd8 100644 --- a/django/contrib/admin/templates/admin/filter.html +++ b/django/contrib/admin/templates/admin/filter.html @@ -1,5 +1,5 @@ {% load i18n %} -<h3>{% blocktrans with filter_title=title %} By {{ filter_title }} {% endblocktrans %}</h3> +<h3>{% blocktranslate with filter_title=title %} By {{ filter_title }} {% endblocktranslate %}</h3> <ul> {% for choice in choices %} <li{% if choice.selected %} class="selected"{% endif %}> diff --git a/django/contrib/admin/templates/admin/includes/object_delete_summary.html b/django/contrib/admin/templates/admin/includes/object_delete_summary.html index 6a8bf6542a..9ad97db2fc 100644 --- a/django/contrib/admin/templates/admin/includes/object_delete_summary.html +++ b/django/contrib/admin/templates/admin/includes/object_delete_summary.html @@ -1,5 +1,5 @@ {% load i18n %} -<h2>{% trans "Summary" %}</h2> +<h2>{% translate "Summary" %}</h2> <ul> {% for model_name, object_count in model_count %} <li>{{ model_name|capfirst }}: {{ object_count }}</li> diff --git a/django/contrib/admin/templates/admin/index.html b/django/contrib/admin/templates/admin/index.html index 746cdcdf60..221ddf2a0a 100644 --- a/django/contrib/admin/templates/admin/index.html +++ b/django/contrib/admin/templates/admin/index.html @@ -17,7 +17,7 @@ <div class="app-{{ app.app_label }} module"> <table> <caption> - <a href="{{ app.app_url }}" class="section" title="{% blocktrans with name=app.name %}Models in the {{ name }} application{% endblocktrans %}">{{ app.name }}</a> + <a href="{{ app.app_url }}" class="section" title="{% blocktranslate with name=app.name %}Models in the {{ name }} application{% endblocktranslate %}">{{ app.name }}</a> </caption> {% for model in app.models %} <tr class="model-{{ model.object_name|lower }}"> @@ -28,16 +28,16 @@ {% endif %} {% if model.add_url %} - <td><a href="{{ model.add_url }}" class="addlink">{% trans 'Add' %}</a></td> + <td><a href="{{ model.add_url }}" class="addlink">{% translate 'Add' %}</a></td> {% else %} <td> </td> {% endif %} {% if model.admin_url %} {% if model.view_only %} - <td><a href="{{ model.admin_url }}" class="viewlink">{% trans 'View' %}</a></td> + <td><a href="{{ model.admin_url }}" class="viewlink">{% translate 'View' %}</a></td> {% else %} - <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td> + <td><a href="{{ model.admin_url }}" class="changelink">{% translate 'Change' %}</a></td> {% endif %} {% else %} <td> </td> @@ -48,7 +48,7 @@ </div> {% endfor %} {% else %} - <p>{% trans 'You don’t have permission to view or edit anything.' %}</p> + <p>{% translate 'You don’t have permission to view or edit anything.' %}</p> {% endif %} </div> {% endblock %} @@ -56,12 +56,12 @@ {% block sidebar %} <div id="content-related"> <div class="module" id="recent-actions-module"> - <h2>{% trans 'Recent actions' %}</h2> - <h3>{% trans 'My actions' %}</h3> + <h2>{% translate 'Recent actions' %}</h2> + <h3>{% translate 'My actions' %}</h3> {% load log %} {% get_admin_log 10 as admin_log for_user user %} {% if not admin_log %} - <p>{% trans 'None available' %}</p> + <p>{% translate 'None available' %}</p> {% else %} <ul class="actionlist"> {% for entry in admin_log %} @@ -75,7 +75,7 @@ {% if entry.content_type %} <span class="mini quiet">{% filter capfirst %}{{ entry.content_type.name }}{% endfilter %}</span> {% else %} - <span class="mini quiet">{% trans 'Unknown content' %}</span> + <span class="mini quiet">{% translate 'Unknown content' %}</span> {% endif %} </li> {% endfor %} diff --git a/django/contrib/admin/templates/admin/invalid_setup.html b/django/contrib/admin/templates/admin/invalid_setup.html index c86ae31509..1ef7c71434 100644 --- a/django/contrib/admin/templates/admin/invalid_setup.html +++ b/django/contrib/admin/templates/admin/invalid_setup.html @@ -3,11 +3,11 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> › {{ title }} </div> {% endblock %} {% block content %} -<p>{% trans 'Something’s wrong with your database installation. Make sure the appropriate database tables have been created, and make sure the database is readable by the appropriate user.' %}</p> +<p>{% translate 'Something’s wrong with your database installation. Make sure the appropriate database tables have been created, and make sure the database is readable by the appropriate user.' %}</p> {% endblock %} diff --git a/django/contrib/admin/templates/admin/login.html b/django/contrib/admin/templates/admin/login.html index 396be276f9..bbcfe4d49a 100644 --- a/django/contrib/admin/templates/admin/login.html +++ b/django/contrib/admin/templates/admin/login.html @@ -18,7 +18,7 @@ {% block content %} {% if form.errors and not form.non_field_errors %} <p class="errornote"> -{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %} +{% if form.errors.items|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %} </p> {% endif %} @@ -34,10 +34,10 @@ {% if user.is_authenticated %} <p class="errornote"> -{% blocktrans trimmed %} +{% blocktranslate trimmed %} You are authenticated as {{ username }}, but are not authorized to access this page. Would you like to login to a different account? -{% endblocktrans %} +{% endblocktranslate %} </p> {% endif %} @@ -54,11 +54,11 @@ {% url 'admin_password_reset' as password_reset_url %} {% if password_reset_url %} <div class="password-reset-link"> - <a href="{{ password_reset_url }}">{% trans 'Forgotten your password or username?' %}</a> + <a href="{{ password_reset_url }}">{% translate 'Forgotten your password or username?' %}</a> </div> {% endif %} <div class="submit-row"> - <label> </label><input type="submit" value="{% trans 'Log in' %}"> + <label> </label><input type="submit" value="{% translate 'Log in' %}"> </div> </form> diff --git a/django/contrib/admin/templates/admin/object_history.html b/django/contrib/admin/templates/admin/object_history.html index 52b3c77051..3015f36c4a 100644 --- a/django/contrib/admin/templates/admin/object_history.html +++ b/django/contrib/admin/templates/admin/object_history.html @@ -3,11 +3,11 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> › <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a> › <a href="{% url opts|admin_urlname:'changelist' %}">{{ module_name }}</a> › <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a> -› {% trans 'History' %} +› {% translate 'History' %} </div> {% endblock %} @@ -19,9 +19,9 @@ <table id="change-history"> <thead> <tr> - <th scope="col">{% trans 'Date/time' %}</th> - <th scope="col">{% trans 'User' %}</th> - <th scope="col">{% trans 'Action' %}</th> + <th scope="col">{% translate 'Date/time' %}</th> + <th scope="col">{% translate 'User' %}</th> + <th scope="col">{% translate 'Action' %}</th> </tr> </thead> <tbody> @@ -35,7 +35,7 @@ </tbody> </table> {% else %} - <p>{% trans 'This object doesn’t have a change history. It probably wasn’t added via this admin site.' %}</p> + <p>{% translate 'This object doesn’t have a change history. It probably wasn’t added via this admin site.' %}</p> {% endif %} </div> </div> diff --git a/django/contrib/admin/templates/admin/pagination.html b/django/contrib/admin/templates/admin/pagination.html index bef843a444..d0ae8ba067 100644 --- a/django/contrib/admin/templates/admin/pagination.html +++ b/django/contrib/admin/templates/admin/pagination.html @@ -7,6 +7,6 @@ {% endfor %} {% endif %} {{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %} -{% if show_all_url %} <a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %} -{% if cl.formset and cl.result_count %}<input type="submit" name="_save" class="default" value="{% trans 'Save' %}">{% endif %} +{% if show_all_url %} <a href="{{ show_all_url }}" class="showall">{% translate 'Show all' %}</a>{% endif %} +{% if cl.formset and cl.result_count %}<input type="submit" name="_save" class="default" value="{% translate 'Save' %}">{% endif %} </p> diff --git a/django/contrib/admin/templates/admin/popup_response.html b/django/contrib/admin/templates/admin/popup_response.html index 509a81a7c2..57a1ae3661 100644 --- a/django/contrib/admin/templates/admin/popup_response.html +++ b/django/contrib/admin/templates/admin/popup_response.html @@ -1,6 +1,6 @@ {% load i18n static %}<!DOCTYPE html> <html> - <head><title>{% trans 'Popup closing…' %}</title></head> + <head><title>{% translate 'Popup closing…' %}</title></head> <body> <script id="django-admin-popup-response-constants" src="{% static "admin/js/popup_response.js" %}" diff --git a/django/contrib/admin/templates/admin/search_form.html b/django/contrib/admin/templates/admin/search_form.html index 3bb5cba52c..3ec37f2ef7 100644 --- a/django/contrib/admin/templates/admin/search_form.html +++ b/django/contrib/admin/templates/admin/search_form.html @@ -4,9 +4,9 @@ <div><!-- DIV needed for valid HTML --> <label for="searchbar"><img src="{% static "admin/img/search.svg" %}" alt="Search"></label> <input type="text" size="40" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar" autofocus> -<input type="submit" value="{% trans 'Search' %}"> +<input type="submit" value="{% translate 'Search' %}"> {% if show_result_count %} - <span class="small quiet">{% blocktrans count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% if cl.show_full_result_count %}{% blocktrans with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktrans %}{% else %}{% trans "Show all" %}{% endif %}</a>)</span> + <span class="small quiet">{% blocktranslate count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktranslate %} (<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% if cl.show_full_result_count %}{% blocktranslate with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktranslate %}{% else %}{% translate "Show all" %}{% endif %}</a>)</span> {% endif %} {% for pair in cl.params.items %} {% if pair.0 != search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}">{% endif %} diff --git a/django/contrib/admin/templates/admin/submit_line.html b/django/contrib/admin/templates/admin/submit_line.html index bb283fe9e0..f401f0d8aa 100644 --- a/django/contrib/admin/templates/admin/submit_line.html +++ b/django/contrib/admin/templates/admin/submit_line.html @@ -1,14 +1,14 @@ {% load i18n admin_urls %} <div class="submit-row"> {% block submit-row %} -{% if show_save %}<input type="submit" value="{% trans 'Save' %}" class="default" name="_save">{% endif %} +{% if show_save %}<input type="submit" value="{% translate 'Save' %}" class="default" name="_save">{% endif %} {% if show_delete_link and original %} {% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %} - <p class="deletelink-box"><a href="{% add_preserved_filters delete_url %}" class="deletelink">{% trans "Delete" %}</a></p> + <p class="deletelink-box"><a href="{% add_preserved_filters delete_url %}" class="deletelink">{% translate "Delete" %}</a></p> {% endif %} -{% if show_save_as_new %}<input type="submit" value="{% trans 'Save as new' %}" name="_saveasnew">{% endif %} -{% if show_save_and_add_another %}<input type="submit" value="{% trans 'Save and add another' %}" name="_addanother">{% endif %} -{% if show_save_and_continue %}<input type="submit" value="{% if can_change %}{% trans 'Save and continue editing' %}{% else %}{% trans 'Save and view' %}{% endif %}" name="_continue">{% endif %} -{% if show_close %}<a href="{% url opts|admin_urlname:'changelist' %}" class="closelink">{% trans 'Close' %}</a>{% endif %} +{% if show_save_as_new %}<input type="submit" value="{% translate 'Save as new' %}" name="_saveasnew">{% endif %} +{% if show_save_and_add_another %}<input type="submit" value="{% translate 'Save and add another' %}" name="_addanother">{% endif %} +{% if show_save_and_continue %}<input type="submit" value="{% if can_change %}{% translate 'Save and continue editing' %}{% else %}{% translate 'Save and view' %}{% endif %}" name="_continue">{% endif %} +{% if show_close %}<a href="{% url opts|admin_urlname:'changelist' %}" class="closelink">{% translate 'Close' %}</a>{% endif %} {% endblock %} </div> diff --git a/django/contrib/admin/templates/admin/widgets/related_widget_wrapper.html b/django/contrib/admin/templates/admin/widgets/related_widget_wrapper.html index 7cdcb334c9..a97bec16e3 100644 --- a/django/contrib/admin/templates/admin/widgets/related_widget_wrapper.html +++ b/django/contrib/admin/templates/admin/widgets/related_widget_wrapper.html @@ -7,22 +7,22 @@ {% if can_change_related %} <a class="related-widget-wrapper-link change-related" id="change_id_{{ name }}" data-href-template="{{ change_related_template_url }}?{{ url_params }}" - title="{% blocktrans %}Change selected {{ model }}{% endblocktrans %}"> - <img src="{% static 'admin/img/icon-changelink.svg' %}" alt="{% trans 'Change' %}"> + title="{% blocktranslate %}Change selected {{ model }}{% endblocktranslate %}"> + <img src="{% static 'admin/img/icon-changelink.svg' %}" alt="{% translate 'Change' %}"> </a> {% endif %} {% if can_add_related %} <a class="related-widget-wrapper-link add-related" id="add_id_{{ name }}" href="{{ add_related_url }}?{{ url_params }}" - title="{% blocktrans %}Add another {{ model }}{% endblocktrans %}"> - <img src="{% static 'admin/img/icon-addlink.svg' %}" alt="{% trans 'Add' %}"> + title="{% blocktranslate %}Add another {{ model }}{% endblocktranslate %}"> + <img src="{% static 'admin/img/icon-addlink.svg' %}" alt="{% translate 'Add' %}"> </a> {% endif %} {% if can_delete_related %} <a class="related-widget-wrapper-link delete-related" id="delete_id_{{ name }}" data-href-template="{{ delete_related_template_url }}?{{ url_params }}" - title="{% blocktrans %}Delete selected {{ model }}{% endblocktrans %}"> - <img src="{% static 'admin/img/icon-deletelink.svg' %}" alt="{% trans 'Delete' %}"> + title="{% blocktranslate %}Delete selected {{ model }}{% endblocktranslate %}"> + <img src="{% static 'admin/img/icon-deletelink.svg' %}" alt="{% translate 'Delete' %}"> </a> {% endif %} {% endif %} diff --git a/django/contrib/admin/templates/registration/logged_out.html b/django/contrib/admin/templates/registration/logged_out.html index 6a18186f7f..90bb8ee668 100644 --- a/django/contrib/admin/templates/registration/logged_out.html +++ b/django/contrib/admin/templates/registration/logged_out.html @@ -1,12 +1,12 @@ {% extends "admin/base_site.html" %} {% load i18n %} -{% block breadcrumbs %}<div class="breadcrumbs"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></div>{% endblock %} +{% block breadcrumbs %}<div class="breadcrumbs"><a href="{% url 'admin:index' %}">{% translate 'Home' %}</a></div>{% endblock %} {% block content %} -<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p> +<p>{% translate "Thanks for spending some quality time with the Web site today." %}</p> -<p><a href="{% url 'admin:index' %}">{% trans 'Log in again' %}</a></p> +<p><a href="{% url 'admin:index' %}">{% translate 'Log in again' %}</a></p> {% endblock %} diff --git a/django/contrib/admin/templates/registration/password_change_done.html b/django/contrib/admin/templates/registration/password_change_done.html index 3e557ebef3..9cc85f8361 100644 --- a/django/contrib/admin/templates/registration/password_change_done.html +++ b/django/contrib/admin/templates/registration/password_change_done.html @@ -1,15 +1,15 @@ {% extends "admin/base_site.html" %} {% load i18n %} -{% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}{% trans 'Change password' %} / <a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>{% endblock %} +{% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% translate 'Documentation' %}</a> / {% endif %}{% translate 'Change password' %} / <a href="{% url 'admin:logout' %}">{% translate 'Log out' %}</a>{% endblock %} {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› {% trans 'Password change' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› {% translate 'Password change' %} </div> {% endblock %} {% block title %}{{ title }}{% endblock %} {% block content_title %}<h1>{{ title }}</h1>{% endblock %} {% block content %} -<p>{% trans 'Your password was changed.' %}</p> +<p>{% translate 'Your password was changed.' %}</p> {% endblock %} diff --git a/django/contrib/admin/templates/registration/password_change_form.html b/django/contrib/admin/templates/registration/password_change_form.html index 2cc4dbec06..d3a9bf305d 100644 --- a/django/contrib/admin/templates/registration/password_change_form.html +++ b/django/contrib/admin/templates/registration/password_change_form.html @@ -1,11 +1,11 @@ {% extends "admin/base_site.html" %} {% load i18n static %} {% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">{% endblock %} -{% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %} {% trans 'Change password' %} / <a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>{% endblock %} +{% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% translate 'Documentation' %}</a> / {% endif %} {% translate 'Change password' %} / <a href="{% url 'admin:logout' %}">{% translate 'Log out' %}</a>{% endblock %} {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› {% trans 'Password change' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› {% translate 'Password change' %} </div> {% endblock %} @@ -18,12 +18,12 @@ <div> {% if form.errors %} <p class="errornote"> - {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %} + {% if form.errors.items|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %} </p> {% endif %} -<p>{% trans 'Please enter your old password, for security’s sake, and then enter your new password twice so we can verify you typed it in correctly.' %}</p> +<p>{% translate 'Please enter your old password, for security’s sake, and then enter your new password twice so we can verify you typed it in correctly.' %}</p> <fieldset class="module aligned wide"> @@ -51,7 +51,7 @@ </fieldset> <div class="submit-row"> - <input type="submit" value="{% trans 'Change my password' %}" class="default"> + <input type="submit" value="{% translate 'Change my password' %}" class="default"> </div> </div> diff --git a/django/contrib/admin/templates/registration/password_reset_complete.html b/django/contrib/admin/templates/registration/password_reset_complete.html index 19f87a5b76..396f339841 100644 --- a/django/contrib/admin/templates/registration/password_reset_complete.html +++ b/django/contrib/admin/templates/registration/password_reset_complete.html @@ -3,8 +3,8 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› {% trans 'Password reset' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› {% translate 'Password reset' %} </div> {% endblock %} @@ -13,8 +13,8 @@ {% block content %} -<p>{% trans "Your password has been set. You may go ahead and log in now." %}</p> +<p>{% translate "Your password has been set. You may go ahead and log in now." %}</p> -<p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p> +<p><a href="{{ login_url }}">{% translate 'Log in' %}</a></p> {% endblock %} diff --git a/django/contrib/admin/templates/registration/password_reset_confirm.html b/django/contrib/admin/templates/registration/password_reset_confirm.html index 8666fa903c..20ef252b95 100644 --- a/django/contrib/admin/templates/registration/password_reset_confirm.html +++ b/django/contrib/admin/templates/registration/password_reset_confirm.html @@ -4,8 +4,8 @@ {% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">{% endblock %} {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› {% trans 'Password reset confirmation' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› {% translate 'Password reset confirmation' %} </div> {% endblock %} @@ -15,27 +15,27 @@ {% if validlink %} -<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p> +<p>{% translate "Please enter your new password twice so we can verify you typed it in correctly." %}</p> <form method="post">{% csrf_token %} <fieldset class="module aligned"> <div class="form-row field-password1"> {{ form.new_password1.errors }} - <label for="id_new_password1">{% trans 'New password:' %}</label> + <label for="id_new_password1">{% translate 'New password:' %}</label> {{ form.new_password1 }} </div> <div class="form-row field-password2"> {{ form.new_password2.errors }} - <label for="id_new_password2">{% trans 'Confirm password:' %}</label> + <label for="id_new_password2">{% translate 'Confirm password:' %}</label> {{ form.new_password2 }} </div> - <input type="submit" value="{% trans 'Change my password' %}"> + <input type="submit" value="{% translate 'Change my password' %}"> </fieldset> </form> {% else %} -<p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p> +<p>{% translate "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p> {% endif %} diff --git a/django/contrib/admin/templates/registration/password_reset_done.html b/django/contrib/admin/templates/registration/password_reset_done.html index 99aaf7a75a..1f6e83aaaf 100644 --- a/django/contrib/admin/templates/registration/password_reset_done.html +++ b/django/contrib/admin/templates/registration/password_reset_done.html @@ -3,8 +3,8 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› {% trans 'Password reset' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› {% translate 'Password reset' %} </div> {% endblock %} @@ -12,8 +12,8 @@ {% block content_title %}<h1>{{ title }}</h1>{% endblock %} {% block content %} -<p>{% trans 'We’ve emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly.' %}</p> +<p>{% translate 'We’ve emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly.' %}</p> -<p>{% trans 'If you don’t receive an email, please make sure you’ve entered the address you registered with, and check your spam folder.' %}</p> +<p>{% translate 'If you don’t receive an email, please make sure you’ve entered the address you registered with, and check your spam folder.' %}</p> {% endblock %} diff --git a/django/contrib/admin/templates/registration/password_reset_email.html b/django/contrib/admin/templates/registration/password_reset_email.html index 9e1e94a781..64822091d1 100644 --- a/django/contrib/admin/templates/registration/password_reset_email.html +++ b/django/contrib/admin/templates/registration/password_reset_email.html @@ -1,14 +1,14 @@ {% load i18n %}{% autoescape off %} -{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} +{% blocktranslate %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktranslate %} -{% trans "Please go to the following page and choose a new password:" %} +{% translate "Please go to the following page and choose a new password:" %} {% block reset_link %} {{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} {% endblock %} -{% trans 'Your username, in case you’ve forgotten:' %} {{ user.get_username }} +{% translate 'Your username, in case you’ve forgotten:' %} {{ user.get_username }} -{% trans "Thanks for using our site!" %} +{% translate "Thanks for using our site!" %} -{% blocktrans %}The {{ site_name }} team{% endblocktrans %} +{% blocktranslate %}The {{ site_name }} team{% endblocktranslate %} {% endautoescape %} diff --git a/django/contrib/admin/templates/registration/password_reset_form.html b/django/contrib/admin/templates/registration/password_reset_form.html index dccf62f367..d5493d9d61 100644 --- a/django/contrib/admin/templates/registration/password_reset_form.html +++ b/django/contrib/admin/templates/registration/password_reset_form.html @@ -4,8 +4,8 @@ {% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">{% endblock %} {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› {% trans 'Password reset' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› {% translate 'Password reset' %} </div> {% endblock %} @@ -13,16 +13,16 @@ {% block content_title %}<h1>{{ title }}</h1>{% endblock %} {% block content %} -<p>{% trans 'Forgotten your password? Enter your email address below, and we’ll email instructions for setting a new one.' %}</p> +<p>{% translate 'Forgotten your password? Enter your email address below, and we’ll email instructions for setting a new one.' %}</p> <form method="post">{% csrf_token %} <fieldset class="module aligned"> <div class="form-row field-email"> {{ form.email.errors }} - <label for="id_email">{% trans 'Email address:' %}</label> + <label for="id_email">{% translate 'Email address:' %}</label> {{ form.email }} </div> - <input type="submit" value="{% trans 'Reset my password' %}"> + <input type="submit" value="{% translate 'Reset my password' %}"> </fieldset> </form> diff --git a/django/contrib/admindocs/templates/admin_doc/bookmarklets.html b/django/contrib/admindocs/templates/admin_doc/bookmarklets.html index de57e06945..adff7ed920 100644 --- a/django/contrib/admindocs/templates/admin_doc/bookmarklets.html +++ b/django/contrib/admindocs/templates/admin_doc/bookmarklets.html @@ -3,24 +3,24 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› <a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a> -› {% trans 'Bookmarklets' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a> +› {% translate 'Bookmarklets' %} </div> {% endblock %} -{% block title %}{% trans "Documentation bookmarklets" %}{% endblock %} +{% block title %}{% translate "Documentation bookmarklets" %}{% endblock %} {% block content %} -<p class="help">{% blocktrans trimmed %} +<p class="help">{% blocktranslate trimmed %} To install bookmarklets, drag the link to your bookmarks toolbar, or right-click the link and add it to your bookmarks. Now you can select the bookmarklet from any page in the site. -{% endblocktrans %}</p> +{% endblocktranslate %}</p> <div id="content-main"> - <h3><a href="javascript:(function(){if(typeof XMLHttpRequest!='undefined'){x=new XMLHttpRequest()}else{return;}x.open('HEAD',location.href,false);x.send(null);try{view=x.getResponseHeader('x-view');}catch(e){alert('No view found for this page');return;}if(view=='undefined'){alert('No view found for this page');}document.location='{% url 'django-admindocs-views-index' %}'+view+'/';})()">{% trans "Documentation for this page" %}</a></h3> - <p>{% trans "Jumps you from any page to the documentation for the view that generates that page." %}</p> + <h3><a href="javascript:(function(){if(typeof XMLHttpRequest!='undefined'){x=new XMLHttpRequest()}else{return;}x.open('HEAD',location.href,false);x.send(null);try{view=x.getResponseHeader('x-view');}catch(e){alert('No view found for this page');return;}if(view=='undefined'){alert('No view found for this page');}document.location='{% url 'django-admindocs-views-index' %}'+view+'/';})()">{% translate "Documentation for this page" %}</a></h3> + <p>{% translate "Jumps you from any page to the documentation for the view that generates that page." %}</p> </div> {% endblock %} diff --git a/django/contrib/admindocs/templates/admin_doc/index.html b/django/contrib/admindocs/templates/admin_doc/index.html index aa86a4b549..1be7873632 100644 --- a/django/contrib/admindocs/templates/admin_doc/index.html +++ b/django/contrib/admindocs/templates/admin_doc/index.html @@ -3,31 +3,31 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› {% trans 'Documentation' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› {% translate 'Documentation' %} </div> {% endblock %} -{% block title %}{% trans 'Documentation' %}{% endblock %} +{% block title %}{% translate 'Documentation' %}{% endblock %} {% block content %} -<h1>{% trans 'Documentation' %}</h1> +<h1>{% translate 'Documentation' %}</h1> <div id="content-main"> - <h3><a href="tags/">{% trans 'Tags' %}</a></h3> - <p>{% trans 'List of all the template tags and their functions.' %}</p> + <h3><a href="tags/">{% translate 'Tags' %}</a></h3> + <p>{% translate 'List of all the template tags and their functions.' %}</p> - <h3><a href="filters/">{% trans 'Filters' %}</a></h3> - <p>{% trans 'Filters are actions which can be applied to variables in a template to alter the output.' %}</p> + <h3><a href="filters/">{% translate 'Filters' %}</a></h3> + <p>{% translate 'Filters are actions which can be applied to variables in a template to alter the output.' %}</p> - <h3><a href="models/">{% trans 'Models' %}</a></h3> - <p>{% trans 'Models are descriptions of all the objects in the system and their associated fields. Each model has a list of fields which can be accessed as template variables' %}.</p> + <h3><a href="models/">{% translate 'Models' %}</a></h3> + <p>{% translate 'Models are descriptions of all the objects in the system and their associated fields. Each model has a list of fields which can be accessed as template variables' %}.</p> - <h3><a href="views/">{% trans 'Views' %}</a></h3> - <p>{% trans 'Each page on the public site is generated by a view. The view defines which template is used to generate the page and which objects are available to that template.' %}</p> + <h3><a href="views/">{% translate 'Views' %}</a></h3> + <p>{% translate 'Each page on the public site is generated by a view. The view defines which template is used to generate the page and which objects are available to that template.' %}</p> - <h3><a href="bookmarklets/">{% trans 'Bookmarklets' %}</a></h3> - <p>{% trans 'Tools for your browser to quickly access admin functionality.' %}</p> + <h3><a href="bookmarklets/">{% translate 'Bookmarklets' %}</a></h3> + <p>{% translate 'Tools for your browser to quickly access admin functionality.' %}</p> </div> {% endblock %} diff --git a/django/contrib/admindocs/templates/admin_doc/missing_docutils.html b/django/contrib/admindocs/templates/admin_doc/missing_docutils.html index 123668f732..984aea6278 100644 --- a/django/contrib/admindocs/templates/admin_doc/missing_docutils.html +++ b/django/contrib/admindocs/templates/admin_doc/missing_docutils.html @@ -3,20 +3,20 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› {% trans 'Documentation' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› {% translate 'Documentation' %} </div> {% endblock %} -{% block title %}{% trans 'Please install docutils' %}{% endblock %} +{% block title %}{% translate 'Please install docutils' %}{% endblock %} {% block content %} -<h1>{% trans 'Documentation' %}</h1> +<h1>{% translate 'Documentation' %}</h1> <div id="content-main"> - <h3>{% blocktrans with "http://docutils.sf.net/" as link %}The admin documentation system requires Python's <a href="{{ link }}">docutils</a> library.{% endblocktrans %}</h3> + <h3>{% blocktranslate with "http://docutils.sf.net/" as link %}The admin documentation system requires Python's <a href="{{ link }}">docutils</a> library.{% endblocktranslate %}</h3> - <p>{% blocktrans with "http://docutils.sf.net/" as link %}Please ask your administrators to install <a href="{{ link }}">docutils</a>.{% endblocktrans %}</p> + <p>{% blocktranslate with "http://docutils.sf.net/" as link %}Please ask your administrators to install <a href="{{ link }}">docutils</a>.{% endblocktranslate %}</p> </div> {% endblock %} diff --git a/django/contrib/admindocs/templates/admin_doc/model_detail.html b/django/contrib/admindocs/templates/admin_doc/model_detail.html index 9044099f70..8bde21e3ef 100644 --- a/django/contrib/admindocs/templates/admin_doc/model_detail.html +++ b/django/contrib/admindocs/templates/admin_doc/model_detail.html @@ -11,14 +11,14 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› <a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a> -› <a href="{% url 'django-admindocs-models-index' %}">{% trans 'Models' %}</a> +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a> +› <a href="{% url 'django-admindocs-models-index' %}">{% translate 'Models' %}</a> › {{ name }} </div> {% endblock %} -{% block title %}{% blocktrans %}Model: {{ name }}{% endblocktrans %}{% endblock %} +{% block title %}{% blocktranslate %}Model: {{ name }}{% endblocktranslate %}{% endblock %} {% block content %} <div id="content-main"> @@ -27,14 +27,14 @@ {{ description }} -<h3>{% trans 'Fields' %}</h3> +<h3>{% translate 'Fields' %}</h3> <div class="module"> <table class="model"> <thead> <tr> - <th>{% trans 'Field' %}</th> - <th>{% trans 'Type' %}</th> - <th>{% trans 'Description' %}</th> + <th>{% translate 'Field' %}</th> + <th>{% translate 'Type' %}</th> + <th>{% translate 'Description' %}</th> </tr> </thead> <tbody> @@ -50,14 +50,14 @@ </div> {% if methods %} -<h3>{% trans 'Methods with arguments' %}</h3> +<h3>{% translate 'Methods with arguments' %}</h3> <div class="module"> <table class="model"> <thead> <tr> - <th>{% trans 'Method' %}</th> - <th>{% trans 'Arguments' %}</th> - <th>{% trans 'Description' %}</th> + <th>{% translate 'Method' %}</th> + <th>{% translate 'Arguments' %}</th> + <th>{% translate 'Description' %}</th> </tr> </thead> <tbody> @@ -73,6 +73,6 @@ </div> {% endif %} -<p class="small"><a href="{% url 'django-admindocs-models-index' %}">‹ {% trans 'Back to Model documentation' %}</a></p> +<p class="small"><a href="{% url 'django-admindocs-models-index' %}">‹ {% translate 'Back to Model documentation' %}</a></p> </div> {% endblock %} diff --git a/django/contrib/admindocs/templates/admin_doc/model_index.html b/django/contrib/admindocs/templates/admin_doc/model_index.html index 4b897c318b..2342be4ba6 100644 --- a/django/contrib/admindocs/templates/admin_doc/model_index.html +++ b/django/contrib/admindocs/templates/admin_doc/model_index.html @@ -5,17 +5,17 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› <a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a> -› {% trans 'Models' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a> +› {% translate 'Models' %} </div> {% endblock %} -{% block title %}{% trans 'Models' %}{% endblock %} +{% block title %}{% translate 'Models' %}{% endblock %} {% block content %} -<h1>{% trans 'Model documentation' %}</h1> +<h1>{% translate 'Model documentation' %}</h1> {% regroup models by app_config as grouped_models %} @@ -40,7 +40,7 @@ {% block sidebar %} <div id="content-related" class="sidebar"> <div class="module"> -<h2>{% trans 'Model groups' %}</h2> +<h2>{% translate 'Model groups' %}</h2> <ul> {% regroup models by app_config as grouped_models %} {% for group in grouped_models %} diff --git a/django/contrib/admindocs/templates/admin_doc/template_detail.html b/django/contrib/admindocs/templates/admin_doc/template_detail.html index 1b95b25d39..3e2de222a8 100644 --- a/django/contrib/admindocs/templates/admin_doc/template_detail.html +++ b/django/contrib/admindocs/templates/admin_doc/template_detail.html @@ -3,25 +3,25 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› <a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a> -› {% trans 'Templates' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a> +› {% translate 'Templates' %} › {{ name }} </div> {% endblock %} -{% block title %}{% blocktrans %}Template: {{ name }}{% endblocktrans %}{% endblock %} +{% block title %}{% blocktranslate %}Template: {{ name }}{% endblocktranslate %}{% endblock %} {% block content %} -<h1>{% blocktrans %}Template: <q>{{ name }}</q>{% endblocktrans %}</h1> +<h1>{% blocktranslate %}Template: <q>{{ name }}</q>{% endblocktranslate %}</h1> {# Translators: Search is not a verb here, it qualifies path (a search path) #} -<h2>{% blocktrans %}Search path for template <q>{{ name }}</q>:{% endblocktrans %}</h2> +<h2>{% blocktranslate %}Search path for template <q>{{ name }}</q>:{% endblocktranslate %}</h2> <ol> {% for template in templates|dictsort:"order" %} - <li><code>{{ template.file }}</code>{% if not template.exists %} <em>{% trans '(does not exist)' %}</em>{% endif %}</li> + <li><code>{{ template.file }}</code>{% if not template.exists %} <em>{% translate '(does not exist)' %}</em>{% endif %}</li> {% endfor %} </ol> -<p class="small"><a href="{% url 'django-admindocs-docroot' %}">‹ {% trans 'Back to Documentation' %}</a></p> +<p class="small"><a href="{% url 'django-admindocs-docroot' %}">‹ {% translate 'Back to Documentation' %}</a></p> {% endblock %} diff --git a/django/contrib/admindocs/templates/admin_doc/template_filter_index.html b/django/contrib/admindocs/templates/admin_doc/template_filter_index.html index caf983ac6d..c66b7ed3d3 100644 --- a/django/contrib/admindocs/templates/admin_doc/template_filter_index.html +++ b/django/contrib/admindocs/templates/admin_doc/template_filter_index.html @@ -4,23 +4,23 @@ {% block coltype %}colSM{% endblock %} {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› <a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a> -› {% trans 'Filters' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a> +› {% translate 'Filters' %} </div> {% endblock %} -{% block title %}{% trans 'Template filters' %}{% endblock %} +{% block title %}{% translate 'Template filters' %}{% endblock %} {% block content %} -<h1>{% trans 'Template filter documentation' %}</h1> +<h1>{% translate 'Template filter documentation' %}</h1> <div id="content-main"> {% regroup filters|dictsort:"library" by library as filter_libraries %} {% for library in filter_libraries %} <div class="module"> <h2>{% firstof library.grouper _("Built-in filters") %}</h2> - {% if library.grouper %}<p class="small quiet">{% blocktrans with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these filters, put <code>{{ code }}</code> in your template before using the filter.{% endblocktrans %}</p><hr>{% endif %} + {% if library.grouper %}<p class="small quiet">{% blocktranslate with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these filters, put <code>{{ code }}</code> in your template before using the filter.{% endblocktranslate %}</p><hr>{% endif %} {% for filter in library.list|dictsort:"name" %} <h3 id="{{ library.grouper|default:"built_in" }}-{{ filter.name }}">{{ filter.name }}</h3> {{ filter.title }} diff --git a/django/contrib/admindocs/templates/admin_doc/template_tag_index.html b/django/contrib/admindocs/templates/admin_doc/template_tag_index.html index bb4f239147..17b930e337 100644 --- a/django/contrib/admindocs/templates/admin_doc/template_tag_index.html +++ b/django/contrib/admindocs/templates/admin_doc/template_tag_index.html @@ -4,23 +4,23 @@ {% block coltype %}colSM{% endblock %} {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› <a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a> -› {% trans 'Tags' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a> +› {% translate 'Tags' %} </div> {% endblock %} -{% block title %}{% trans 'Template tags' %}{% endblock %} +{% block title %}{% translate 'Template tags' %}{% endblock %} {% block content %} -<h1>{% trans 'Template tag documentation' %}</h1> +<h1>{% translate 'Template tag documentation' %}</h1> <div id="content-main"> {% regroup tags|dictsort:"library" by library as tag_libraries %} {% for library in tag_libraries %} <div class="module"> <h2>{% firstof library.grouper _("Built-in tags") %}</h2> - {% if library.grouper %}<p class="small quiet">{% blocktrans with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these tags, put <code>{{ code }}</code> in your template before using the tag.{% endblocktrans %}</p><hr>{% endif %} + {% if library.grouper %}<p class="small quiet">{% blocktranslate with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these tags, put <code>{{ code }}</code> in your template before using the tag.{% endblocktranslate %}</p><hr>{% endif %} {% for tag in library.list|dictsort:"name" %} <h3 id="{{ library.grouper|default:"built_in" }}-{{ tag.name }}">{{ tag.name }}</h3> <h4>{{ tag.title|striptags }}</h4> diff --git a/django/contrib/admindocs/templates/admin_doc/view_detail.html b/django/contrib/admindocs/templates/admin_doc/view_detail.html index 39ff0e1021..945f7fb690 100644 --- a/django/contrib/admindocs/templates/admin_doc/view_detail.html +++ b/django/contrib/admindocs/templates/admin_doc/view_detail.html @@ -3,13 +3,13 @@ {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› <a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a> -› <a href="{% url 'django-admindocs-views-index' %}">{% trans 'Views' %}</a> +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a> +› <a href="{% url 'django-admindocs-views-index' %}">{% translate 'Views' %}</a> › {{ name }} </div> {% endblock %} -{% block title %}{% blocktrans %}View: {{ name }}{% endblocktrans %}{% endblock %} +{% block title %}{% blocktranslate %}View: {{ name }}{% endblocktranslate %}{% endblock %} {% block content %} @@ -20,14 +20,14 @@ {{ body }} {% if meta.Context %} -<h3>{% trans 'Context:' %}</h3> +<h3>{% translate 'Context:' %}</h3> <p>{{ meta.Context }}</p> {% endif %} {% if meta.Templates %} -<h3>{% trans 'Templates:' %}</h3> +<h3>{% translate 'Templates:' %}</h3> <p>{{ meta.Templates }}</p> {% endif %} -<p class="small"><a href="{% url 'django-admindocs-views-index' %}">‹ {% trans 'Back to View documentation' %}</a></p> +<p class="small"><a href="{% url 'django-admindocs-views-index' %}">‹ {% translate 'Back to View documentation' %}</a></p> {% endblock %} diff --git a/django/contrib/admindocs/templates/admin_doc/view_index.html b/django/contrib/admindocs/templates/admin_doc/view_index.html index 77b3e40b1d..873303f2b2 100644 --- a/django/contrib/admindocs/templates/admin_doc/view_index.html +++ b/django/contrib/admindocs/templates/admin_doc/view_index.html @@ -4,27 +4,27 @@ {% block coltype %}colSM{% endblock %} {% block breadcrumbs %} <div class="breadcrumbs"> -<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> -› <a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a> -› {% trans 'Views' %} +<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> +› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a> +› {% translate 'Views' %} </div> {% endblock %} -{% block title %}{% trans 'Views' %}{% endblock %} +{% block title %}{% translate 'Views' %}{% endblock %} {% block content %} -<h1>{% trans 'View documentation' %}</h1> +<h1>{% translate 'View documentation' %}</h1> {% regroup views|dictsort:'namespace' by namespace as views_by_ns %} <div id="content-related" class="sidebar"> <div class="module"> -<h2>{% trans 'Jump to namespace' %}</h2> +<h2>{% translate 'Jump to namespace' %}</h2> <ul> {% for ns_views in views_by_ns %} <li><a href="#ns|{{ ns_views.grouper }}"> {% if ns_views.grouper %}{{ ns_views.grouper }} - {% else %}{% trans "Empty namespace" %}{% endif %} + {% else %}{% translate "Empty namespace" %}{% endif %} </a></li> {% endfor %} </ul> @@ -37,18 +37,18 @@ <div class="module"> <h2 id="ns|{{ ns_views.grouper }}"> {% if ns_views.grouper %} - {% blocktrans with ns_views.grouper as name %}Views by namespace {{ name }}{% endblocktrans %} + {% blocktranslate with ns_views.grouper as name %}Views by namespace {{ name }}{% endblocktranslate %} {% else %} - {% blocktrans %}Views by empty namespace{% endblocktrans %} + {% blocktranslate %}Views by empty namespace{% endblocktranslate %} {% endif %} </h2> {% for view in ns_views.list|dictsort:"url" %} {% ifchanged %} <h3><a href="{% url 'django-admindocs-views-detail' view=view.full_name %}">{{ view.url }}</a></h3> -<p class="small quiet">{% blocktrans with view.full_name as full_name and view.url_name as url_name %} +<p class="small quiet">{% blocktranslate with view.full_name as full_name and view.url_name as url_name %} View function: <code>{{ full_name }}</code>. Name: <code>{{ url_name }}</code>. -{% endblocktrans %}</p> +{% endblocktranslate %}</p> <p>{{ view.title }}</p> <hr> {% endifchanged %} diff --git a/django/contrib/auth/templates/registration/password_reset_subject.txt b/django/contrib/auth/templates/registration/password_reset_subject.txt index 45a354b999..eb30fcbabc 100644 --- a/django/contrib/auth/templates/registration/password_reset_subject.txt +++ b/django/contrib/auth/templates/registration/password_reset_subject.txt @@ -1,3 +1,3 @@ {% load i18n %}{% autoescape off %} -{% blocktrans %}Password reset on {{ site_name }}{% endblocktrans %} +{% blocktranslate %}Password reset on {{ site_name }}{% endblocktranslate %} {% endautoescape %}
\ No newline at end of file diff --git a/django/contrib/gis/templates/gis/admin/openlayers.html b/django/contrib/gis/templates/gis/admin/openlayers.html index cc9bea3efd..9ba1bd0c1e 100644 --- a/django/contrib/gis/templates/gis/admin/openlayers.html +++ b/django/contrib/gis/templates/gis/admin/openlayers.html @@ -32,9 +32,9 @@ </script> <div id="{{ id }}_map"{% if LANGUAGE_BIDI %} dir="ltr"{% endif %}></div> {% if editable %} -<a href="javascript:{{ module }}.clearFeatures()">{% trans "Delete all Features" %}</a> +<a href="javascript:{{ module }}.clearFeatures()">{% translate "Delete all Features" %}</a> {% endif %} -{% if display_wkt %}<p>{% trans "WKT debugging window:" %} </p>{% endif %} +{% if display_wkt %}<p>{% translate "WKT debugging window:" %} </p>{% endif %} <textarea id="{{ id }}" class="vWKTField required" cols="150" rows="10" name="{{ name }}">{{ wkt }}</textarea> <script>{% block init_function %}{{ module }}.init();{% endblock %}</script> </span> diff --git a/django/contrib/gis/templates/gis/openlayers.html b/django/contrib/gis/templates/gis/openlayers.html index 88288a3cb7..90ecf1b44b 100644 --- a/django/contrib/gis/templates/gis/openlayers.html +++ b/django/contrib/gis/templates/gis/openlayers.html @@ -9,8 +9,8 @@ <div id="{{ id }}_div_map"> <div id="{{ id }}_map"></div> - {% if not disabled %}<span class="clear_features"><a href="javascript:{{ module }}.clearFeatures()">{% trans "Delete all Features" %}</a></span>{% endif %} - {% if display_raw %}<p>{% trans "Debugging window (serialized value)" %}</p>{% endif %} + {% if not disabled %}<span class="clear_features"><a href="javascript:{{ module }}.clearFeatures()">{% translate "Delete all Features" %}</a></span>{% endif %} + {% if display_raw %}<p>{% translate "Debugging window (serialized value)" %}</p>{% endif %} <textarea id="{{ id }}" class="vSerializedField required" cols="150" rows="10" name="{{ name }}">{{ serialized }}</textarea> <script> {% block map_options %}var map_options = {};{% endblock %} diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py index d010bc7560..7ab21b320e 100644 --- a/django/template/defaulttags.py +++ b/django/template/defaulttags.py @@ -1418,10 +1418,10 @@ def widthratio(parser, token): (because 175/200 = .875; .875 * 100 = 87.5 which is rounded up to 88). In some cases you might want to capture the result of widthratio in a - variable. It can be useful for instance in a blocktrans like this:: + variable. It can be useful for instance in a blocktranslate like this:: {% widthratio this_value max_value max_width as width %} - {% blocktrans %}The width is: {{ width }}{% endblocktrans %} + {% blocktranslate %}The width is: {{ width }}{% endblocktranslate %} """ bits = token.split_contents() if len(bits) == 4: diff --git a/django/templatetags/i18n.py b/django/templatetags/i18n.py index 5618c88bd4..d0fda0797e 100644 --- a/django/templatetags/i18n.py +++ b/django/templatetags/i18n.py @@ -324,7 +324,7 @@ def do_translate(parser, token): Usage:: - {% trans "this is a test" %} + {% translate "this is a test" %} This marks the string for translation so it will be pulled out by makemessages into the .po files and runs the string through the translation @@ -332,7 +332,7 @@ def do_translate(parser, token): There is a second form:: - {% trans "this is a test" noop %} + {% translate "this is a test" noop %} This marks the string for translation, but returns the string unchanged. Use it when you need to store values into forms that should be translated @@ -341,19 +341,19 @@ def do_translate(parser, token): You can use variables instead of constant strings to translate stuff you marked somewhere else:: - {% trans variable %} + {% translate variable %} This tries to translate the contents of the variable ``variable``. Make sure that the string in there is something that is in the .po file. It is possible to store the translated string into a variable:: - {% trans "this is a test" as var %} + {% translate "this is a test" as var %} {{ var }} Contextual translations are also supported:: - {% trans "this is a test" context "greeting" %} + {% translate "this is a test" context "greeting" %} This is equivalent to calling pgettext instead of (u)gettext. """ @@ -417,37 +417,37 @@ def do_block_translate(parser, token): Usage:: - {% blocktrans with bar=foo|filter boo=baz|filter %} + {% blocktranslate with bar=foo|filter boo=baz|filter %} This is {{ bar }} and {{ boo }}. - {% endblocktrans %} + {% endblocktranslate %} Additionally, this supports pluralization:: - {% blocktrans count count=var|length %} + {% blocktranslate count count=var|length %} There is {{ count }} object. {% plural %} There are {{ count }} objects. - {% endblocktrans %} + {% endblocktranslate %} This is much like ngettext, only in template syntax. The "var as value" legacy format is still supported:: - {% blocktrans with foo|filter as bar and baz|filter as boo %} - {% blocktrans count var|length as count %} + {% blocktranslate with foo|filter as bar and baz|filter as boo %} + {% blocktranslate count var|length as count %} The translated string can be stored in a variable using `asvar`:: - {% blocktrans with bar=foo|filter boo=baz|filter asvar var %} + {% blocktranslate with bar=foo|filter boo=baz|filter asvar var %} This is {{ bar }} and {{ boo }}. - {% endblocktrans %} + {% endblocktranslate %} {{ var }} Contextual translations are supported:: - {% blocktrans with bar=foo|filter context "greeting" %} + {% blocktranslate with bar=foo|filter context "greeting" %} This is {{ bar }}. - {% endblocktrans %} + {% endblocktranslate %} This is equivalent to calling pgettext/npgettext instead of (u)gettext/(u)ngettext. diff --git a/django/views/static.py b/django/views/static.py index 541abc66c5..3477ca57b7 100644 --- a/django/views/static.py +++ b/django/views/static.py @@ -62,10 +62,10 @@ DEFAULT_DIRECTORY_INDEX_TEMPLATE = """ <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Language" content="en-us"> <meta name="robots" content="NONE,NOARCHIVE"> - <title>{% blocktrans %}Index of {{ directory }}{% endblocktrans %}</title> + <title>{% blocktranslate %}Index of {{ directory }}{% endblocktranslate %}</title> </head> <body> - <h1>{% blocktrans %}Index of {{ directory }}{% endblocktrans %}</h1> + <h1>{% blocktranslate %}Index of {{ directory }}{% endblocktranslate %}</h1> <ul> {% if directory != "/" %} <li><a href="../">../</a></li> diff --git a/django/views/templates/default_urlconf.html b/django/views/templates/default_urlconf.html index 0a79ea72aa..9a84063451 100644 --- a/django/views/templates/default_urlconf.html +++ b/django/views/templates/default_urlconf.html @@ -4,7 +4,7 @@ <html{% if LANGUAGE_BIDI %} dir="rtl"{% endif %}> <head> <meta charset="utf-8"> - <title>{% trans "Django: the Web framework for perfectionists with deadlines." %}</title> + <title>{% translate "Django: the Web framework for perfectionists with deadlines." %}</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" type="text/css" href="/static/admin/css/fonts.css"> <style type="text/css"> @@ -343,7 +343,7 @@ </a> </div> <div class="release-notes"> - <p>{% blocktrans %}View <a href="https://docs.djangoproject.com/en/{{ version }}/releases/" target="_blank" rel="noopener">release notes</a> for Django {{ version }}{% endblocktrans %}</p> + <p>{% blocktranslate %}View <a href="https://docs.djangoproject.com/en/{{ version }}/releases/" target="_blank" rel="noopener">release notes</a> for Django {{ version }}{% endblocktranslate %}</p> </div> </header> <main> @@ -365,8 +365,8 @@ <path class="flame" d="M 6.7 1.14 l 2.8 4.7 s 1.3 3 -1.82 3.22 l -5.4 0 s -3.28 -.14 -1.74 -3.26 l 2.76 -4.7 s 1.7 -2.3 3.4 0 z" fill="#AA2247"></path> </svg> </div> - <h2>{% trans "The install worked successfully! Congratulations!" %}</h2> - <p>{% blocktrans %}You are seeing this page because <a href="https://docs.djangoproject.com/en/{{ version }}/ref/settings/#debug" target="_blank" rel="noopener">DEBUG=True</a> is in your settings file and you have not configured any URLs.{% endblocktrans %}</p> + <h2>{% translate "The install worked successfully! Congratulations!" %}</h2> + <p>{% blocktranslate %}You are seeing this page because <a href="https://docs.djangoproject.com/en/{{ version }}/ref/settings/#debug" target="_blank" rel="noopener">DEBUG=True</a> is in your settings file and you have not configured any URLs.{% endblocktranslate %}</p> </main> <footer class="u-clearfix"> <a href="https://docs.djangoproject.com/en/{{ version }}/" target="_blank" rel="noopener"> @@ -381,8 +381,8 @@ <path clip-path="url(#b)" d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z"></path> </svg> <div> - <h4>{% trans "Django Documentation" %}</h4> - <p>{% trans 'Topics, references, & how-to’s' %}</p> + <h4>{% translate "Django Documentation" %}</h4> + <p>{% translate 'Topics, references, & how-to’s' %}</p> </div> </div> </a> @@ -393,8 +393,8 @@ <path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"></path> </svg> <div> - <h4>{% trans "Tutorial: A Polling App" %}</h4> - <p>{% trans "Get started with Django" %}</p> + <h4>{% translate "Tutorial: A Polling App" %}</h4> + <p>{% translate "Get started with Django" %}</p> </div> </div> </a> @@ -405,8 +405,8 @@ <path d="M16.5 13c-1.2 0-3.07.34-4.5 1-1.43-.67-3.3-1-4.5-1C5.33 13 1 14.08 1 16.25V19h22v-2.75c0-2.17-4.33-3.25-6.5-3.25zm-4 4.5h-10v-1.25c0-.54 2.56-1.75 5-1.75s5 1.21 5 1.75v1.25zm9 0H14v-1.25c0-.46-.2-.86-.52-1.22.88-.3 1.96-.53 3.02-.53 2.44 0 5 1.21 5 1.75v1.25zM7.5 12c1.93 0 3.5-1.57 3.5-3.5S9.43 5 7.5 5 4 6.57 4 8.5 5.57 12 7.5 12zm0-5.5c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 5.5c1.93 0 3.5-1.57 3.5-3.5S18.43 5 16.5 5 13 6.57 13 8.5s1.57 3.5 3.5 3.5zm0-5.5c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2z"></path> </svg> <div> - <h4>{% trans "Django Community" %}</h4> - <p>{% trans "Connect, get help, or contribute" %}</p> + <h4>{% translate "Django Community" %}</h4> + <p>{% translate "Connect, get help, or contribute" %}</p> </div> </div> </a> |
