diff options
author | Georg Brandl <georg@python.org> | 2008-08-10 10:00:20 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-08-10 10:00:20 +0000 |
commit | 74d36acbf787da74b0cade6406aa7569c7fd9da8 (patch) | |
tree | cd8a0be3659c5ea0a8b675d11e6b3191c1c20527 /sphinx/builder.py | |
parent | e9d3589140d44a38b4c7c891a3cbaf45bf290654 (diff) | |
download | sphinx-git-74d36acbf787da74b0cade6406aa7569c7fd9da8.tar.gz |
* Add more generated text to the automatic translation.
* Remove all locale-dependent text from sphinx.sty, put it into Python files
to enable message extraction and translation.
* Use babel in the LaTeX output.
* Centralize locations for labels used in every builder.
Diffstat (limited to 'sphinx/builder.py')
-rw-r--r-- | sphinx/builder.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sphinx/builder.py b/sphinx/builder.py index 89581c4ca..f3058bf5e 100644 --- a/sphinx/builder.py +++ b/sphinx/builder.py @@ -25,7 +25,7 @@ from docutils.utils import new_document from docutils.frontend import OptionParser from docutils.readers.doctree import Reader as DoctreeReader -from sphinx import addnodes, __version__ +from sphinx import addnodes, locale, __version__ from sphinx.util import ensuredir, relative_uri, SEP, os_path, json from sphinx.htmlhelp import build_hhx from sphinx.htmlwriter import HTMLWriter, HTMLTranslator, SmartyPantsHTMLTranslator @@ -184,6 +184,7 @@ class Builder(object): if self.translator is None: self.translator = gettext.NullTranslations() self.translator.install(unicode=True) + locale.init() # translate common labels def load_env(self): """Set up the build environment.""" @@ -1085,9 +1086,9 @@ class ChangesBuilder(Builder): apichanges.append((entry, docname, lineno)) elif descname or module: if not module: - module = 'Builtins' + module = _('Builtins') if not descname: - descname = 'Module level' + descname = _('Module level') if context: entry = '<b>%s</b>: <i>%s:</i> %s' % (descname, ttext, context) else: |