mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Fixed #20540 -- Added more translatable strings to contrib.admindocs
Thanks lborgav for the initial patch.
This commit is contained in:
parent
f315693304
commit
02fd87c821
@ -7,27 +7,27 @@
|
||||
› {% trans 'Documentation' %}</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}Documentation{% endblock %}
|
||||
{% block title %}{% trans 'Documentation' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Documentation</h1>
|
||||
<h1>{% trans 'Documentation' %}</h1>
|
||||
|
||||
<div id="content-main">
|
||||
<h3><a href="tags/">Tags</a></h3>
|
||||
<p>List of all the template tags and their functions.</p>
|
||||
<h3><a href="tags/">{% trans 'Tags</a></h3>
|
||||
<p>{% trans 'List of all the template tags and their functions.' %}</p>
|
||||
|
||||
<h3><a href="filters/">Filters</a></h3>
|
||||
<p>Filters are actions which can be applied to variables in a template to alter the output.</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="models/">Models</a></h3>
|
||||
<p>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/">{% 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="views/">Views</a></h3>
|
||||
<p>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/">{% 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="bookmarklets/">Bookmarklets</a></h3>
|
||||
<p>Tools for your browser to quickly access admin functionality.</p>
|
||||
<h3><a href="bookmarklets/">{% trans 'Bookmarklets</a></h3>
|
||||
<p>{% trans 'Tools for your browser to quickly access admin functionality.' %}</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -7,16 +7,16 @@
|
||||
› {% trans 'Documentation' %}</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}Please install docutils{% endblock %}
|
||||
{% block title %}{% trans 'Please install docutils' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Documentation</h1>
|
||||
<h1>{% trans 'Documentation' %}</h1>
|
||||
|
||||
<div id="content-main">
|
||||
<h3>The admin documentation system requires Python's <a href="http://docutils.sf.net/">docutils</a> library.</h3>
|
||||
<h3>{% blocktrans with "http://docutils.sf.net/" as link %}The admin documentation system requires Python's <a href="{{ link }}">docutils</a> library.{% endblocktrans %}</h3>
|
||||
|
||||
<p>Please ask your administrators to install <a href="http://docutils.sf.net/">docutils</a>.</p>
|
||||
<p>{% blocktrans with "http://docutils.sf.net/" as link %}Please ask your administrators to install <a href="{{ link }}">docutils</a>.{% endblocktrans %}</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}Model: {{ name }}{% endblock %}
|
||||
{% block title %}{% blocktrans %}Model: {{ name }}{% endblocktrans %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content-main">
|
||||
@ -32,9 +32,9 @@
|
||||
<table class="model">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>{% trans 'Field' %}</th>
|
||||
<th>{% trans 'Type' %}</th>
|
||||
<th>{% trans 'Description' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -49,6 +49,6 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p class="small"><a href="{% url 'django-admindocs-models-index' %}">‹ Back to Models Documentation</a></p>
|
||||
<p class="small"><a href="{% url 'django-admindocs-models-index' %}">‹ {% trans 'Back to Models Documentation' %}</a></p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -11,11 +11,11 @@
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}Models{% endblock %}
|
||||
{% block title %}{% trans 'Models' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Model documentation</h1>
|
||||
<h1>{% trans 'Model documentation' %}</h1>
|
||||
|
||||
{% regroup models by app_label as grouped_models %}
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
{% block sidebar %}
|
||||
<div id="content-related" class="sidebar">
|
||||
<div class="module">
|
||||
<h2>Model groups</h2>
|
||||
<h2>{% trans 'Model groups' %}</h2>
|
||||
<ul>
|
||||
{% regroup models by app_label as grouped_models %}
|
||||
{% for group in grouped_models %}
|
||||
|
@ -10,20 +10,20 @@
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}Template: {{ name }}{% endblock %}
|
||||
{% block title %}{% blocktrans %}Template: {{ name }}{% endblocktrans %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Template: "{{ name }}"</h1>
|
||||
<h1>{% blocktrans %}Template: "{{ name }}"{% endblocktrans %}</h1>
|
||||
|
||||
{% regroup templates|dictsort:"site_id" by site as templates_by_site %}
|
||||
{% for group in templates_by_site %}
|
||||
<h2>Search path for template "{{ name }}" on {{ group.grouper }}:</h2>
|
||||
<h2>{% blocktrans with group.grouper as grouper %}Search path for template "{{ name }}" on {{ grouper }}:{% endblocktrans %}</h2>
|
||||
<ol>
|
||||
{% for template in group.list|dictsort:"order" %}
|
||||
<li><code>{{ template.file }}</code>{% if not template.exists %} <em>(does not exist)</em>{% endif %}</li>
|
||||
<li><code>{{ template.file }}</code>{% if not template.exists %} <em>{% trans '(does not exist)' %}</em>{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% endfor %}
|
||||
|
||||
<p class="small"><a href="{% url 'django-admindocs-docroot' %}">‹ Back to Documentation</a></p>
|
||||
<p class="small"><a href="{% url 'django-admindocs-docroot' %}">‹ {% trans 'Back to Documentation' %}</a></p>
|
||||
{% endblock %}
|
||||
|
@ -9,18 +9,18 @@
|
||||
› {% trans 'Filters' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}Template filters{% endblock %}
|
||||
{% block title %}{% trans 'Template filters' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Template filter documentation</h1>
|
||||
<h1>{% trans '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">To use these filters, put <code>{% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %}</code> in your template before using the filter.</p><hr />{% endif %}
|
||||
<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 %}
|
||||
{% for filter in library.list|dictsort:"name" %}
|
||||
<h3 id="{{ library.grouper|default:"built_in" }}-{{ filter.name }}">{{ filter.name }}</h3>
|
||||
{{ filter.title }}
|
||||
@ -40,7 +40,7 @@
|
||||
{% 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>
|
||||
<h2>{% firstof library.grouper _("Built-in filters") %}</h2>
|
||||
<ul>
|
||||
{% for filter in library.list|dictsort:"name" %}
|
||||
<li><a href="#{{ library.grouper|default:"built_in" }}-{{ filter.name }}">{{ filter.name }}</a></li>
|
||||
|
@ -9,18 +9,18 @@
|
||||
› {% trans 'Tags' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}Template tags{% endblock %}
|
||||
{% block title %}{% trans 'Template tags' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Template tag documentation</h1>
|
||||
<h1>{% trans '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">To use these tags, put <code>{% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %}</code> in your template before using the tag.</p><hr />{% endif %}
|
||||
<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 %}
|
||||
{% for tag in library.list|dictsort:"name" %}
|
||||
<h3 id="{{ library.grouper|default:"built_in" }}-{{ tag.name }}">{{ tag.name }}</h3>
|
||||
<h4>{{ tag.title|striptags }}</h4>
|
||||
@ -40,7 +40,7 @@
|
||||
{% 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>
|
||||
<h2>{% firstof library.grouper _("Built-in tags") %}</h2>
|
||||
<ul>
|
||||
{% for tag in library.list|dictsort:"name" %}
|
||||
<li><a href="#{{ library.grouper|default:"built_in" }}-{{ tag.name }}">{{ tag.name }}</a></li>
|
||||
|
@ -9,7 +9,7 @@
|
||||
› {{ name }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}View: {{ name }}{% endblock %}
|
||||
{% block title %}{% trans 'View: {{ name }}' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
@ -20,14 +20,14 @@
|
||||
{{ body }}
|
||||
|
||||
{% if meta.Context %}
|
||||
<h3>Context:</h3>
|
||||
<h3>{% trans 'Context:' %}</h3>
|
||||
<p>{{ meta.Context }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if meta.Templates %}
|
||||
<h3>Templates:</h3>
|
||||
<h3>{% trans 'Templates:' %}</h3>
|
||||
<p>{{ meta.Templates }}</p>
|
||||
{% endif %}
|
||||
|
||||
<p class="small"><a href="{% url 'django-admindocs-views-index' %}">‹ Back to Views Documentation</a></p>
|
||||
<p class="small"><a href="{% url 'django-admindocs-views-index' %}">‹ {% trans 'Back to Views Documentation' %}</a></p>
|
||||
{% endblock %}
|
||||
|
@ -9,17 +9,17 @@
|
||||
› {% trans 'Views' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}Views{% endblock %}
|
||||
{% block title %}{% trans 'Views' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>View documentation</h1>
|
||||
<h1>{% trans 'View documentation' %}</h1>
|
||||
|
||||
{% regroup views|dictsort:"site_id" by site as views_by_site %}
|
||||
|
||||
<div id="content-related" class="sidebar">
|
||||
<div class="module">
|
||||
<h2>Jump to site</h2>
|
||||
<h2>{% trans 'Jump to site' %}</h2>
|
||||
<ul>
|
||||
{% for site_views in views_by_site %}
|
||||
<li><a href="#site{{ site_views.grouper.id }}">{{ site_views.grouper.name }}</a></li>
|
||||
@ -32,12 +32,12 @@
|
||||
|
||||
{% for site_views in views_by_site %}
|
||||
<div class="module">
|
||||
<h2 id="site{{ site_views.grouper.id }}">Views by URL on {{ site_views.grouper.name }}</h2>
|
||||
<h2 id="site{{ site_views.grouper.id }}">{% blocktrans with site_views.grouper.name as name %}Views by URL on {{ name }}{% endblocktrans %}</h2>
|
||||
|
||||
{% for view in site_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">View function: {{ view.full_name }}</p>
|
||||
<p class="small quiet">{% blocktrans with view.full_name as name %}View function: {{ name }}{% endblocktrans %}</p>
|
||||
<p>{{ view.title }}</p>
|
||||
<hr />
|
||||
{% endifchanged %}
|
||||
@ -46,5 +46,3 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user