diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-06-01 12:06:36 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-06-01 12:06:36 +0200 |
| commit | 02fd87c821e02864cd14130350c6fd50e9f974db (patch) | |
| tree | 878fb4ed2a656a725255b4f35356f849d9279350 | |
| parent | f315693304865162d0b1bb8f913e9c5f14fb351e (diff) | |
Fixed #20540 -- Added more translatable strings to contrib.admindocs
Thanks lborgav for the initial patch.
9 files changed, 48 insertions, 50 deletions
diff --git a/django/contrib/admindocs/templates/admin_doc/index.html b/django/contrib/admindocs/templates/admin_doc/index.html index 5347341dc0..e80c62ea3a 100644 --- a/django/contrib/admindocs/templates/admin_doc/index.html +++ b/django/contrib/admindocs/templates/admin_doc/index.html @@ -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 %} diff --git a/django/contrib/admindocs/templates/admin_doc/missing_docutils.html b/django/contrib/admindocs/templates/admin_doc/missing_docutils.html index f8a68ce04c..bd790f779a 100644 --- a/django/contrib/admindocs/templates/admin_doc/missing_docutils.html +++ b/django/contrib/admindocs/templates/admin_doc/missing_docutils.html @@ -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 %} diff --git a/django/contrib/admindocs/templates/admin_doc/model_detail.html b/django/contrib/admindocs/templates/admin_doc/model_detail.html index 9fb4eeea14..c1e2bf1e22 100644 --- a/django/contrib/admindocs/templates/admin_doc/model_detail.html +++ b/django/contrib/admindocs/templates/admin_doc/model_detail.html @@ -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 %} diff --git a/django/contrib/admindocs/templates/admin_doc/model_index.html b/django/contrib/admindocs/templates/admin_doc/model_index.html index 7a8c69953e..d4cde8334f 100644 --- a/django/contrib/admindocs/templates/admin_doc/model_index.html +++ b/django/contrib/admindocs/templates/admin_doc/model_index.html @@ -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 %} diff --git a/django/contrib/admindocs/templates/admin_doc/template_detail.html b/django/contrib/admindocs/templates/admin_doc/template_detail.html index 27fca28b4b..9535724c24 100644 --- a/django/contrib/admindocs/templates/admin_doc/template_detail.html +++ b/django/contrib/admindocs/templates/admin_doc/template_detail.html @@ -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 %} 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 687ebbcfec..04aac39105 100644 --- a/django/contrib/admindocs/templates/admin_doc/template_filter_index.html +++ b/django/contrib/admindocs/templates/admin_doc/template_filter_index.html @@ -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> 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 c0fb243a99..a3c6eaadf4 100644 --- a/django/contrib/admindocs/templates/admin_doc/template_tag_index.html +++ b/django/contrib/admindocs/templates/admin_doc/template_tag_index.html @@ -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> diff --git a/django/contrib/admindocs/templates/admin_doc/view_detail.html b/django/contrib/admindocs/templates/admin_doc/view_detail.html index efe5fed9ed..698f307843 100644 --- a/django/contrib/admindocs/templates/admin_doc/view_detail.html +++ b/django/contrib/admindocs/templates/admin_doc/view_detail.html @@ -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 %} diff --git a/django/contrib/admindocs/templates/admin_doc/view_index.html b/django/contrib/admindocs/templates/admin_doc/view_index.html index 86342c6dd4..891eee7eec 100644 --- a/django/contrib/admindocs/templates/admin_doc/view_index.html +++ b/django/contrib/admindocs/templates/admin_doc/view_index.html @@ -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 %} - - |
