diff options
| author | shimizukawa <shimizukawa@gmail.com> | 2013-03-10 22:07:31 +0900 |
|---|---|---|
| committer | shimizukawa <shimizukawa@gmail.com> | 2013-03-10 22:07:31 +0900 |
| commit | e4ad1e0cc1f0970cf41e4515fcc61d0294157b21 (patch) | |
| tree | a13776d648c4b91648a12ee203f08d9c6e3a9a0c /tests/roots | |
| parent | 222605813861d4aad4eeeedae8413fe799af08fe (diff) | |
| download | sphinx-e4ad1e0cc1f0970cf41e4515fcc61d0294157b21.tar.gz | |
Add i18n capabilities for custom templates.
For example: The Sphinx reference documentation in doc directory provides
sphinx.pot file from ``doc/_templates/*.html`` by ``make gettext``.
Diffstat (limited to 'tests/roots')
| -rw-r--r-- | tests/roots/test-intl/_templates/index.html | 5 | ||||
| -rw-r--r-- | tests/roots/test-intl/conf.py | 3 | ||||
| -rw-r--r-- | tests/roots/test-intl/sphinx.po | 23 |
3 files changed, 31 insertions, 0 deletions
diff --git a/tests/roots/test-intl/_templates/index.html b/tests/roots/test-intl/_templates/index.html new file mode 100644 index 00000000..22bc0e83 --- /dev/null +++ b/tests/roots/test-intl/_templates/index.html @@ -0,0 +1,5 @@ +{% extends "layout.html" %} +{% block body %} + <h1>{{ _('Welcome') }}</h1> + <p>{%trans%}Sphinx {{ version }}{%endtrans%}</p> +{% endblock %} diff --git a/tests/roots/test-intl/conf.py b/tests/roots/test-intl/conf.py index 457c5056..59ce714d 100644 --- a/tests/roots/test-intl/conf.py +++ b/tests/roots/test-intl/conf.py @@ -5,3 +5,6 @@ import sys, os project = 'Sphinx intl <Tests>' source_suffix = '.txt' keep_warnings = True +templates_path = ['_templates'] +html_additional_pages = {'index': 'index.html'} +release = version = '2013.120' diff --git a/tests/roots/test-intl/sphinx.po b/tests/roots/test-intl/sphinx.po new file mode 100644 index 00000000..cac5d4ad --- /dev/null +++ b/tests/roots/test-intl/sphinx.po @@ -0,0 +1,23 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2012, foof +# This file is distributed under the same license as the foo package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: sphinx 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-11-22 08:28\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Welcome" +msgstr "WELCOME" + +msgid "Sphinx %(version)s" +msgstr "SPHINX %(version)s" |
