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:
Vendored
+43
-43
@@ -1,87 +1,87 @@
|
||||
{% extends "layout.html" %}
|
||||
{% set title = 'Overview' %}
|
||||
{% set title = _('Overview') %}
|
||||
{% block body %}
|
||||
<h1>Welcome</h1>
|
||||
<h1>{{ _('Welcome') }}</h1>
|
||||
|
||||
<div class="quotebar">
|
||||
<p><em>What users say:</em></p>
|
||||
<p>“Cheers for a great tool that actually makes programmers <b>want</b>
|
||||
to write documentation!”</p>
|
||||
<p><em>{%trans%}What users say:{%endtrans%}</em></p>
|
||||
<p>{%trans%}“Cheers for a great tool that actually makes programmers <b>want</b>
|
||||
to write documentation!”{%endtrans%}</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<p>{%trans%}
|
||||
Sphinx is a tool that makes it easy to create intelligent and beautiful
|
||||
documentation, written by Georg Brandl and licensed under the BSD license.</p>
|
||||
<p>It was originally created for <a href="http://docs.python.org/">the
|
||||
documentation, written by Georg Brandl and licensed under the BSD license.{%endtrans%}</p>
|
||||
<p>{%trans%}It was originally created for <a href="http://docs.python.org/">the
|
||||
new Python documentation</a>, and it has excellent facilities for the
|
||||
documentation of Python projects, but C/C++ is already supported as well,
|
||||
and it is planned to add special support for other languages as well. Of
|
||||
course, this site is also created from reStructuredText sources using
|
||||
Sphinx! The following features should be highlighted:
|
||||
Sphinx! The following features should be highlighted:{%endtrans%}
|
||||
</p>
|
||||
<ul>
|
||||
<li><b>Output formats:</b> HTML (including Windows HTML Help), LaTeX (for
|
||||
printable PDF versions), Texinfo, manual pages, plain text</li>
|
||||
<li><b>Extensive cross-references:</b> semantic markup and automatic links
|
||||
<li>{%trans%}<b>Output formats:</b> HTML (including Windows HTML Help), LaTeX (for
|
||||
printable PDF versions), Texinfo, manual pages, plain text{%endtrans%}</li>
|
||||
<li>{%trans%}<b>Extensive cross-references:</b> semantic markup and automatic links
|
||||
for functions, classes, citations, glossary terms and similar pieces of
|
||||
information</li>
|
||||
<li><b>Hierarchical structure:</b> easy definition of a document tree, with
|
||||
automatic links to siblings, parents and children</li>
|
||||
<li><b>Automatic indices:</b> general index as well as a language-specific
|
||||
module indices</li>
|
||||
<li><b>Code handling:</b> automatic highlighting using the <a
|
||||
href="http://pygments.org">Pygments</a> highlighter</li>
|
||||
<li><b>Extensions:</b> automatic testing of code snippets, inclusion of
|
||||
information{%endtrans%}</li>
|
||||
<li>{%trans%}<b>Hierarchical structure:</b> easy definition of a document tree, with
|
||||
automatic links to siblings, parents and children{%endtrans%}</li>
|
||||
<li>{%trans%}<b>Automatic indices:</b> general index as well as a language-specific
|
||||
module indices{%endtrans%}</li>
|
||||
<li>{%trans%}<b>Code handling:</b> automatic highlighting using the <a
|
||||
href="http://pygments.org">Pygments</a> highlighter{%endtrans%}</li>
|
||||
<li>{%trans path=pathto('extensions')%}<b>Extensions:</b> automatic testing of code snippets, inclusion of
|
||||
docstrings from Python modules (API docs), and
|
||||
<a href="{{ pathto('extensions') }}#builtin-sphinx-extensions">more</a></li>
|
||||
<a href="{{ path }}#builtin-sphinx-extensions">more</a>{%endtrans%}</li>
|
||||
</ul>
|
||||
<p>
|
||||
<p>{%trans%}
|
||||
Sphinx uses <a href="http://docutils.sf.net/rst.html">reStructuredText</a>
|
||||
as its markup language, and many of its strengths come from the power and
|
||||
straightforwardness of reStructuredText and its parsing and translating
|
||||
suite, the <a href="http://docutils.sf.net/">Docutils</a>.
|
||||
suite, the <a href="http://docutils.sf.net/">Docutils</a>.{%endtrans%}
|
||||
</p>
|
||||
|
||||
<h2 style="margin-bottom: 0">Documentation</h2>
|
||||
<h2 style="margin-bottom: 0">{%trans%}Documentation{%endtrans%}</h2>
|
||||
|
||||
<table class="contentstable" align="center" style="margin-left: 30px"><tr>
|
||||
<td width="50%">
|
||||
<p class="biglink"><a class="biglink" href="{{ pathto("tutorial") }}">First steps with Sphinx</a><br/>
|
||||
<span class="linkdescr">overview of basic tasks</span></p>
|
||||
<p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">Contents</a><br/>
|
||||
<span class="linkdescr">for a complete overview</span></p>
|
||||
<p class="biglink"><a class="biglink" href="{{ pathto("tutorial") }}">{%trans%}First steps with Sphinx{%endtrans%}</a><br/>
|
||||
<span class="linkdescr">{%trans%}overview of basic tasks{%endtrans%}</span></p>
|
||||
<p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">{%trans%}Contents{%endtrans%}</a><br/>
|
||||
<span class="linkdescr">{%trans%}for a complete overview{%endtrans%}</span></p>
|
||||
</td><td width="50%">
|
||||
<p class="biglink"><a class="biglink" href="{{ pathto("search") }}">Search page</a><br/>
|
||||
<span class="linkdescr">search the documentation</span></p>
|
||||
<p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">General Index</a><br/>
|
||||
<span class="linkdescr">all functions, classes, terms</span></p>
|
||||
<p class="biglink"><a class="biglink" href="{{ pathto("search") }}">{%trans%}Search page{%endtrans%}</a><br/>
|
||||
<span class="linkdescr">{%trans%}search the documentation{%endtrans%}</span></p>
|
||||
<p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">{%trans%}General Index{%endtrans%}</a><br/>
|
||||
<span class="linkdescr">{%trans%}all functions, classes, terms{%endtrans%}</span></p>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<p>{%trans%}
|
||||
You can also download PDF versions of the Sphinx documentation:
|
||||
a <a href="http://sphinx-doc.org/sphinx.pdf">version</a> generated from
|
||||
the LaTeX Sphinx produces, and
|
||||
a <a href="http://sphinx-doc.org/sphinx-rst2pdf.pdf">version</a> generated
|
||||
by rst2pdf.
|
||||
by rst2pdf.{%endtrans%}
|
||||
</p>
|
||||
|
||||
<h2>Examples</h2>
|
||||
<p>Links to documentation generated with Sphinx can be found on the
|
||||
<a href="{{ pathto("examples") }}">Projects using Sphinx</a> page.
|
||||
<h2>{%trans%}Examples{%endtrans%}</h2>
|
||||
<p>{%trans path=pathto("examples")%}Links to documentation generated with Sphinx can be found on the
|
||||
<a href="{{ path }}">Projects using Sphinx</a> page.{%endtrans%}
|
||||
</p>
|
||||
<p>
|
||||
<p>{%trans%}
|
||||
For examples of how Sphinx source files look, use the “Show
|
||||
source” links on all pages of the documentation apart from this
|
||||
welcome page.
|
||||
welcome page.{%endtrans%}
|
||||
</p>
|
||||
|
||||
<p>You may also be interested in the very nice
|
||||
<p>{%trans%}You may also be interested in the very nice
|
||||
<a href="http://matplotlib.sourceforge.net/sampledoc/">tutorial</a> on how to
|
||||
create a customized documentation using Sphinx written by the matplotlib
|
||||
developers.</p>
|
||||
developers.{%endtrans%}</p>
|
||||
|
||||
<p>There is a <a href="http://sphinx-users.jp/doc10/">Japanese translation</a>
|
||||
of this documentation, thanks to Yoshiki Shibukawa.</p>
|
||||
<p>{%trans%}There is a <a href="http://sphinx-users.jp/doc10/">Japanese translation</a>
|
||||
of this documentation, thanks to Yoshiki Shibukawa.{%endtrans%}</p>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Vendored
+15
-15
@@ -1,32 +1,32 @@
|
||||
<p class="logo">A <a href="http://pocoo.org/">
|
||||
<img src="{{ pathto("_static/pocoo.png", 1) }}" /></a> project</a></p>
|
||||
<img src="{{ pathto("_static/pocoo.png", 1) }}" /></a> {%trans%}project{%endtrans%}</a></p>
|
||||
|
||||
<h3>Download</h3>
|
||||
{% if version.endswith('(hg)') %}
|
||||
<p>This documentation is for version <b>{{ version }}</b>, which is
|
||||
not released yet.</p>
|
||||
<p>You can use it from the
|
||||
<p>{%trans%}This documentation is for version <b>{{ version }}</b>, which is
|
||||
not released yet.{%endtrans%}</p>
|
||||
<p>{%trans%}You can use it from the
|
||||
<a href="http://bitbucket.org/birkenfeld/sphinx/">Mercurial repo</a> or look for
|
||||
released versions in the <a href="http://pypi.python.org/pypi/Sphinx">Python
|
||||
Package Index</a>.</p>
|
||||
Package Index</a>.{%endtrans%}</p>
|
||||
{% else %}
|
||||
<p>Current version: <b>{{ version }}</b></p>
|
||||
<p>Get Sphinx from the <a href="http://pypi.python.org/pypi/Sphinx">Python Package
|
||||
Index</a>, or install it with:</p>
|
||||
<p>{%trans%}Current version: <b>{{ version }}</b>{%endtrans%}</p>
|
||||
<p>{%trans%}Get Sphinx from the <a href="http://pypi.python.org/pypi/Sphinx">Python Package
|
||||
Index</a>, or install it with:{%endtrans%}</p>
|
||||
<pre>easy_install -U Sphinx</pre>
|
||||
<p>Latest <a href="http://sphinx-doc.org/latest/">development version docs</a>
|
||||
are also available.</p>
|
||||
<p>{%trans%}Latest <a href="http://sphinx-doc.org/latest/">development version docs</a>
|
||||
are also available.{%endtrans%}</p>
|
||||
{% endif %}
|
||||
|
||||
<h3>Questions? Suggestions?</h3>
|
||||
<h3>{%trans%}Questions? Suggestions?{%endtrans%}</h3>
|
||||
|
||||
<p>Join the <a href="http://groups.google.com/group/sphinx-users">Google group</a>:</p>
|
||||
<p>{%trans%}Join the <a href="http://groups.google.com/group/sphinx-users">Google group</a>:{%endtrans%}</p>
|
||||
<form action="http://groups.google.com/group/sphinx-users/boxsubscribe"
|
||||
style="padding-left: 0.5em">
|
||||
<input type="text" name="email" value="your@email" style="font-size: 90%; width: 120px"
|
||||
onfocus="$(this).val('');"/>
|
||||
<input type="submit" name="sub" value="Subscribe" style="font-size: 90%; width: 70px"/>
|
||||
</form>
|
||||
<p>or come to the <tt>#pocoo</tt> channel on FreeNode.</p>
|
||||
<p>You can also open an issue at the
|
||||
<a href="http://www.bitbucket.org/birkenfeld/sphinx/issues/">tracker</a>.</p>
|
||||
<p>{%trans%}or come to the <tt>#pocoo</tt> channel on FreeNode.{%endtrans%}</p>
|
||||
<p>{%trans%}You can also open an issue at the
|
||||
<a href="http://www.bitbucket.org/birkenfeld/sphinx/issues/">tracker</a>.{%endtrans%}</p>
|
||||
|
||||
Reference in New Issue
Block a user