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 /tests/admin_views/templates | |
parent | d291c72bf24387e4abe8d9883ebe9c69abdd26d0 (diff) | |
download | django-35d36d946272bed06a3d7c7cd4e5b71b613e7a4f.tar.gz |
Refs #30585 -- Updated project templates and tests to use (block)translate tags.
Diffstat (limited to 'tests/admin_views/templates')
8 files changed, 12 insertions, 12 deletions
diff --git a/tests/admin_views/templates/admin/admin_views/article/actions.html b/tests/admin_views/templates/admin/admin_views/article/actions.html index 9aa238fd2a..d66ad304a2 100644 --- a/tests/admin_views/templates/admin/admin_views/article/actions.html +++ b/tests/admin_views/templates/admin/admin_views/article/actions.html @@ -2,5 +2,5 @@ {% load i18n %} {% block actions-submit %} -<button type="submit" class="button override-actions" title="{% trans "Run the selected action" %}" name="index" value="{{ action_index|default:0 }}">{% trans "Go" %}</button> +<button type="submit" class="button override-actions" title="{% translate "Run the selected action" %}" name="index" value="{{ action_index|default:0 }}">{% translate "Go" %}</button> {% endblock %} diff --git a/tests/admin_views/templates/admin/admin_views/article/change_form_object_tools.html b/tests/admin_views/templates/admin/admin_views/article/change_form_object_tools.html index 609974bb95..d141664daf 100644 --- a/tests/admin_views/templates/admin/admin_views/article/change_form_object_tools.html +++ b/tests/admin_views/templates/admin/admin_views/article/change_form_object_tools.html @@ -2,6 +2,6 @@ {% load i18n admin_urls %} {% block object-tools-items %} -<li><a href="#" id="change-form-export" class="override-change_form_object_tools change-form-object-tools-item">{% trans "Export" %}</a></li> +<li><a href="#" id="change-form-export" class="override-change_form_object_tools change-form-object-tools-item">{% translate "Export" %}</a></li> {{ block.super }} {% endblock %} diff --git a/tests/admin_views/templates/admin/admin_views/article/change_list_object_tools.html b/tests/admin_views/templates/admin/admin_views/article/change_list_object_tools.html index 1a9be91952..b366807da4 100644 --- a/tests/admin_views/templates/admin/admin_views/article/change_list_object_tools.html +++ b/tests/admin_views/templates/admin/admin_views/article/change_list_object_tools.html @@ -2,6 +2,6 @@ {% load i18n admin_urls %} {% block object-tools-items %} -<li><a href="#" id="change-list-export" class="override-change_list_object_tools change-list-object-tools-item">{% trans "Export" %}</a></li> +<li><a href="#" id="change-list-export" class="override-change_list_object_tools change-list-object-tools-item">{% translate "Export" %}</a></li> {{ block.super }} {% endblock %} diff --git a/tests/admin_views/templates/admin/admin_views/article/change_list_results.html b/tests/admin_views/templates/admin/admin_views/article/change_list_results.html index ceb581f8ef..ca36f3abcf 100644 --- a/tests/admin_views/templates/admin/admin_views/article/change_list_results.html +++ b/tests/admin_views/templates/admin/admin_views/article/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/tests/admin_views/templates/admin/admin_views/article/date_hierarchy.html b/tests/admin_views/templates/admin/admin_views/article/date_hierarchy.html index de1cb747b5..8f76bea8f9 100644 --- a/tests/admin_views/templates/admin/admin_views/article/date_hierarchy.html +++ b/tests/admin_views/templates/admin/admin_views/article/date_hierarchy.html @@ -5,5 +5,5 @@ <select id="date-selector" class="override-date_hierarchy">{% for choice in choices %} <option{% if choice.link %} value="{{ choice.link }}"{% endif %}>{{ choice.title }}</option> {% endfor %}</select> -<button id="date-selected">{% trans "Go" %}</button> +<button id="date-selected">{% translate "Go" %}</button> {% endblock %} diff --git a/tests/admin_views/templates/admin/admin_views/article/pagination.html b/tests/admin_views/templates/admin/admin_views/article/pagination.html index e072cacd3c..e712b7d2d7 100644 --- a/tests/admin_views/templates/admin/admin_views/article/pagination.html +++ b/tests/admin_views/templates/admin/admin_views/article/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/tests/admin_views/templates/admin/admin_views/article/search_form.html b/tests/admin_views/templates/admin/admin_views/article/search_form.html index 5b5e6a58f6..eef986cb30 100644 --- a/tests/admin_views/templates/admin/admin_views/article/search_form.html +++ b/tests/admin_views/templates/admin/admin_views/article/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/tests/admin_views/templates/admin/admin_views/article/submit_line.html b/tests/admin_views/templates/admin/admin_views/article/submit_line.html index 4a2ca08890..97554b5571 100644 --- a/tests/admin_views/templates/admin/admin_views/article/submit_line.html +++ b/tests/admin_views/templates/admin/admin_views/article/submit_line.html @@ -2,6 +2,6 @@ {% load i18n admin_urls %} {% block submit-row %} -{% if show_publish %}<input type="submit" value="{% trans 'Publish' %}" class="default" name="_publish" />{% endif %} +{% if show_publish %}<input type="submit" value="{% translate 'Publish' %}" class="default" name="_publish" />{% endif %} {{ block.super }} {% endblock %} |