From: Victor Stinner Date: Fri, 22 Jan 2016 17:00:05 +0000 (+0100) Subject: doc: i18n HTML templates X-Git-Tag: v3.6.0a1~711^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=875f29aa6901378a64819851f42bc93b2b7647bc;p=thirdparty%2FPython%2Fcpython.git doc: i18n HTML templates Issue #25907: Use {% trans %} tags in HTML templates to ease the translation of the documentation. The tag comes from Jinja templating system, used by Sphinx. Patch written by Julien Palard. --- diff --git a/Doc/tools/templates/indexcontent.html b/Doc/tools/templates/indexcontent.html index 969099a00697..1076c1f51b7d 100644 --- a/Doc/tools/templates/indexcontent.html +++ b/Doc/tools/templates/indexcontent.html @@ -1,59 +1,59 @@ {% extends "defindex.html" %} {% block tables %} -

Parts of the documentation:

+

{% trans %}Parts of the documentation:{% endtrans %}

- - - - - - + + + + + + - - - - - + + + + +
-

Indices and tables:

+

{% trans %}Indices and tables:{% endtrans %}

- - - + + + - - + +
-

Meta information:

+

{% trans %}Meta information:{% endtrans %}

- - + + - - + +
{% endblock %} diff --git a/Doc/tools/templates/indexsidebar.html b/Doc/tools/templates/indexsidebar.html index 78e9c4f99ef0..bb449ef1cd30 100644 --- a/Doc/tools/templates/indexsidebar.html +++ b/Doc/tools/templates/indexsidebar.html @@ -1,17 +1,17 @@ -

Download

-

Download these documents

-

Docs for other versions

+

{% trans %}Download{% endtrans %}

+

{% trans %}Download these documents{% endtrans %}

+

{% trans %}Docs for other versions{% endtrans %}

-

Other resources

+

{% trans %}Other resources{% endtrans %}

diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html index 8ae6e23f80d2..1887b85b6073 100644 --- a/Doc/tools/templates/layout.html +++ b/Doc/tools/templates/layout.html @@ -6,7 +6,7 @@
  • {%- if versionswitcher is defined %} {{ release }} - Documentation{{ reldelim1 }} + {% trans %}Documentation {% endtrans %}{{ reldelim1 }} {%- else %} {{ shorttitle }}{{ reldelim1 }} {%- endif %} @@ -79,24 +79,24 @@ {% endblock %} {% block footer %} {% endblock %} {% block sidebarsourcelink %} {%- if show_source and has_source and sourcename %}

    {{ _('This Page') }}

    {%- endif %} {% endblock %}