From 02fd87c821e02864cd14130350c6fd50e9f974db Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 1 Jun 2013 12:06:36 +0200 Subject: [PATCH] Fixed #20540 -- Added more translatable strings to contrib.admindocs Thanks lborgav for the initial patch. --- .../admindocs/templates/admin_doc/index.html | 24 +++++++++---------- .../templates/admin_doc/missing_docutils.html | 8 +++---- .../templates/admin_doc/model_detail.html | 10 ++++---- .../templates/admin_doc/model_index.html | 6 ++--- .../templates/admin_doc/template_detail.html | 10 ++++---- .../admin_doc/template_filter_index.html | 10 ++++---- .../admin_doc/template_tag_index.html | 10 ++++---- .../templates/admin_doc/view_detail.html | 8 +++---- .../templates/admin_doc/view_index.html | 12 ++++------ 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' %} {% endblock %} -{% block title %}Documentation{% endblock %} +{% block title %}{% trans 'Documentation' %}{% endblock %} {% block content %} -

Documentation

+

{% trans 'Documentation' %}

-

Tags

-

List of all the template tags and their functions.

+

{% trans 'Tags

+

{% trans 'List of all the template tags and their functions.' %}

-

Filters

-

Filters are actions which can be applied to variables in a template to alter the output.

+

{% trans 'Filters

+

{% trans 'Filters are actions which can be applied to variables in a template to alter the output.' %}

-

Models

-

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.

+

{% trans 'Models

+

{% 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' %}.

-

Views

-

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.

+

{% trans 'Views

+

{% 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.' %}

-

Bookmarklets

-

Tools for your browser to quickly access admin functionality.

+

{% trans 'Bookmarklets

+

{% trans 'Tools for your browser to quickly access admin functionality.' %}

{% 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' %} {% endblock %} -{% block title %}Please install docutils{% endblock %} +{% block title %}{% trans 'Please install docutils' %}{% endblock %} {% block content %} -

Documentation

+

{% trans 'Documentation' %}

-

The admin documentation system requires Python's docutils library.

+

{% blocktrans with "http://docutils.sf.net/" as link %}The admin documentation system requires Python's docutils library.{% endblocktrans %}

-

Please ask your administrators to install docutils.

+

{% blocktrans with "http://docutils.sf.net/" as link %}Please ask your administrators to install docutils.{% endblocktrans %}

{% 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 @@ {% endblock %} -{% block title %}Model: {{ name }}{% endblock %} +{% block title %}{% blocktrans %}Model: {{ name }}{% endblocktrans %}{% endblock %} {% block content %}
@@ -32,9 +32,9 @@ - - - + + + @@ -49,6 +49,6 @@
FieldTypeDescription{% trans 'Field' %}{% trans 'Type' %}{% trans 'Description' %}
-

‹ Back to Models Documentation

+

‹ {% trans 'Back to Models Documentation' %}

{% 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 @@ {% endblock %} -{% block title %}Models{% endblock %} +{% block title %}{% trans 'Models' %}{% endblock %} {% block content %} -

Model documentation

+

{% trans 'Model documentation' %}

{% regroup models by app_label as grouped_models %} @@ -40,7 +40,7 @@ {% block sidebar %} {% endblock %} -{% block title %}Template filters{% endblock %} +{% block title %}{% trans 'Template filters' %}{% endblock %} {% block content %} -

Template filter documentation

+

{% trans 'Template filter documentation' %}

{% regroup filters|dictsort:"library" by library as filter_libraries %} {% for library in filter_libraries %}
-

{% firstof library.grouper "Built-in filters" %}

- {% if library.grouper %}

To use these filters, put {% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %} in your template before using the filter.


{% endif %} +

{% firstof library.grouper _("Built-in filters") %}

+ {% if library.grouper %}

{% blocktrans with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these filters, put {{ code }} in your template before using the filter.{% endblocktrans %}


{% endif %} {% for filter in library.list|dictsort:"name" %}

{{ filter.name }}

{{ filter.title }} @@ -40,7 +40,7 @@ {% regroup filters|dictsort:"library" by library as filter_libraries %} {% for library in filter_libraries %}
-

{% firstof library.grouper "Built-in filters" %}

+

{% firstof library.grouper _("Built-in filters") %}

    {% for filter in library.list|dictsort:"name" %}
  • {{ filter.name }}
  • 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' %}
{% endblock %} -{% block title %}Template tags{% endblock %} +{% block title %}{% trans 'Template tags' %}{% endblock %} {% block content %} -

Template tag documentation

+

{% trans 'Template tag documentation' %}

{% regroup tags|dictsort:"library" by library as tag_libraries %} {% for library in tag_libraries %}
-

{% firstof library.grouper "Built-in tags" %}

- {% if library.grouper %}

To use these tags, put {% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %} in your template before using the tag.


{% endif %} +

{% firstof library.grouper _("Built-in tags") %}

+ {% if library.grouper %}

{% blocktrans with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these tags, put {{ code }} in your template before using the tag.{% endblocktrans %}


{% endif %} {% for tag in library.list|dictsort:"name" %}

{{ tag.name }}

{{ tag.title|striptags }}

@@ -40,7 +40,7 @@ {% regroup tags|dictsort:"library" by library as tag_libraries %} {% for library in tag_libraries %}
-

{% firstof library.grouper "Built-in tags" %}

+

{% firstof library.grouper _("Built-in tags") %}

    {% for tag in library.list|dictsort:"name" %}
  • {{ tag.name }}
  • 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 }}
{% endblock %} -{% block title %}View: {{ name }}{% endblock %} +{% block title %}{% trans 'View: {{ name }}' %}{% endblock %} {% block content %} @@ -20,14 +20,14 @@ {{ body }} {% if meta.Context %} -

Context:

+

{% trans 'Context:' %}

{{ meta.Context }}

{% endif %} {% if meta.Templates %} -

Templates:

+

{% trans 'Templates:' %}

{{ meta.Templates }}

{% endif %} -

‹ Back to Views Documentation

+

‹ {% trans 'Back to Views Documentation' %}

{% 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' %}
{% endblock %} -{% block title %}Views{% endblock %} +{% block title %}{% trans 'Views' %}{% endblock %} {% block content %} -

View documentation

+

{% trans 'View documentation' %}

{% regroup views|dictsort:"site_id" by site as views_by_site %}