mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
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``.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
<h1>{{ _('Welcome') }}</h1>
|
||||
<p>{%trans%}Sphinx {{ version }}{%endtrans%}</p>
|
||||
{% endblock %}
|
||||
@@ -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'
|
||||
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user