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/contrib/admindocs/templates/admin_doc | |
| parent | d291c72bf24387e4abe8d9883ebe9c69abdd26d0 (diff) | |
Refs #30585 -- Updated project templates and tests to use (block)translate tags.
Diffstat (limited to 'django/contrib/admindocs/templates/admin_doc')
10 files changed, 85 insertions, 85 deletions
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 %} |
