From 875f29aa6901378a64819851f42bc93b2b7647bc Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 22 Jan 2016 18:00:05 +0100 Subject: [PATCH] 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. --- Doc/tools/templates/indexcontent.html | 78 +++++++++++++-------------- Doc/tools/templates/indexsidebar.html | 22 ++++---- Doc/tools/templates/layout.html | 18 +++---- 3 files changed, 59 insertions(+), 59 deletions(-) diff --git a/Doc/tools/templates/indexcontent.html b/Doc/tools/templates/indexcontent.html index 969099a0069..1076c1f51b7 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 78e9c4f99ef..bb449ef1cd3 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 8ae6e23f80d..1887b85b607 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 %}