From 74d36acbf787da74b0cade6406aa7569c7fd9da8 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 10 Aug 2008 10:00:20 +0000 Subject: [PATCH] * 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. --- doc/config.rst | 5 +- sphinx/builder.py | 7 +- sphinx/directives/desc.py | 110 ++++---- sphinx/directives/other.py | 44 ++-- sphinx/environment.py | 7 - sphinx/htmlhelp.py | 3 +- sphinx/htmlwriter.py | 19 +- sphinx/latexwriter.py | 63 +++-- sphinx/locale/__init__.py | 48 ++++ sphinx/locale/cs/LC_MESSAGES/sphinx.mo | Bin 4827 -> 7361 bytes sphinx/locale/cs/LC_MESSAGES/sphinx.po | 334 ++++++++++++++++++++++--- sphinx/locale/de/LC_MESSAGES/sphinx.mo | Bin 4932 -> 7616 bytes sphinx/locale/de/LC_MESSAGES/sphinx.po | 320 ++++++++++++++++++++--- sphinx/locale/sphinx.pot | 296 ++++++++++++++++++++-- sphinx/roles.py | 9 +- sphinx/texinputs/sphinx.sty | 173 ++----------- sphinx/textwriter.py | 43 ++-- sphinx/util/smartypants.py | 4 +- tests/test_i18n.py | 17 ++ 19 files changed, 1104 insertions(+), 398 deletions(-) create mode 100644 sphinx/locale/__init__.py create mode 100644 tests/test_i18n.py diff --git a/doc/config.rst b/doc/config.rst index 659111968..c3ef00e78 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -99,8 +99,9 @@ General configuration .. confval:: language The code for the language the docs are written in. Any text automatically - generated by Sphinx will be in that language. Default is ``None``, which - means that no translation will be done. + generated by Sphinx will be in that language. Also, in the LaTeX builder, a + suitable language will be selected as an option for the *Babel* package. + Default is ``None``, which means that no translation will be done. .. versionadded:: 0.5 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 = '%s: %s: %s' % (descname, ttext, context) else: diff --git a/sphinx/directives/desc.py b/sphinx/directives/desc.py index e1e73a871..880f8cd7a 100644 --- a/sphinx/directives/desc.py +++ b/sphinx/directives/desc.py @@ -23,14 +23,14 @@ ws_re = re.compile(r'\s+') def desc_index_text(desctype, module, name): if desctype == 'function': if not module: - return '%s() (built-in function)' % name - return '%s() (in module %s)' % (name, module) + return _('%s() (built-in function)') % name + return _('%s() (in module %s)') % (name, module) elif desctype == 'data': if not module: - return '%s (built-in variable)' % name - return '%s (in module %s)' % (name, module) + return _('%s (built-in variable)') % name + return _('%s (in module %s)') % (name, module) elif desctype == 'class': - return '%s (class in %s)' % (name, module) + return _('%s (class in %s)') % (name, module) elif desctype == 'exception': return name elif desctype == 'method': @@ -38,79 +38,83 @@ def desc_index_text(desctype, module, name): clsname, methname = name.rsplit('.', 1) except ValueError: if module: - return '%s() (in module %s)' % (name, module) + return _('%s() (in module %s)') % (name, module) else: return '%s()' % name if module: - return '%s() (%s.%s method)' % (methname, module, clsname) + return _('%s() (%s.%s method)') % (methname, module, clsname) else: - return '%s() (%s method)' % (methname, clsname) + return _('%s() (%s method)') % (methname, clsname) elif desctype == 'staticmethod': try: clsname, methname = name.rsplit('.', 1) except ValueError: if module: - return '%s() (in module %s)' % (name, module) + return _('%s() (in module %s)') % (name, module) else: return '%s()' % name if module: - return '%s() (%s.%s static method)' % (methname, module, clsname) + return _('%s() (%s.%s static method)') % (methname, module, clsname) else: - return '%s() (%s static method)' % (methname, clsname) + return _('%s() (%s static method)') % (methname, clsname) elif desctype == 'attribute': try: clsname, attrname = name.rsplit('.', 1) except ValueError: if module: - return '%s (in module %s)' % (name, module) + return _('%s (in module %s)') % (name, module) else: return name if module: - return '%s (%s.%s attribute)' % (attrname, module, clsname) + return _('%s (%s.%s attribute)') % (attrname, module, clsname) else: - return '%s (%s attribute)' % (attrname, clsname) + return _('%s (%s attribute)') % (attrname, clsname) elif desctype == 'cfunction': - return '%s (C function)' % name + return _('%s (C function)') % name elif desctype == 'cmember': - return '%s (C member)' % name + return _('%s (C member)') % name elif desctype == 'cmacro': - return '%s (C macro)' % name + return _('%s (C macro)') % name elif desctype == 'ctype': - return '%s (C type)' % name + return _('%s (C type)') % name elif desctype == 'cvar': - return '%s (C variable)' % name + return _('%s (C variable)') % name else: - raise ValueError("unhandled descenv: %s" % desctype) + raise ValueError('unhandled descenv: %s' % desctype) # ------ make field lists (like :param foo:) in desc bodies prettier +_ = lambda x: x # make gettext extraction in constants possible + doc_fields_with_arg = { - 'param': 'param', - 'parameter': 'param', - 'arg': 'param', - 'argument': 'param', - 'keyword': 'param', - 'kwarg': 'param', - 'kwparam': 'param', - 'type': 'type', - 'raises': 'Raises', + 'param': '%param', + 'parameter': '%param', + 'arg': '%param', + 'argument': '%param', + 'keyword': '%param', + 'kwarg': '%param', + 'kwparam': '%param', + 'type': '%type', + 'raises': _('Raises'), 'raise': 'Raises', 'exception': 'Raises', 'except': 'Raises', - 'var': 'Variable', + 'var': _('Variable'), 'ivar': 'Variable', 'cvar': 'Variable', - 'returns': 'Returns', + 'returns': _('Returns'), 'return': 'Returns', } doc_fields_without_arg = { 'returns': 'Returns', 'return': 'Returns', - 'rtype': 'Return type', + 'rtype': _('Return type'), } +del _ + def handle_doc_fields(node): # don't traverse, only handle field lists that are immediate children for child in node.children: @@ -124,16 +128,16 @@ def handle_doc_fields(node): fname, fbody = field try: typ, obj = fname.astext().split(None, 1) - typ = doc_fields_with_arg[typ] + typ = _(doc_fields_with_arg[typ]) if len(fbody.children) == 1 and \ isinstance(fbody.children[0], nodes.paragraph): children = fbody.children[0].children else: children = fbody.children - if typ == 'param': + if typ == '%param': if not params: pfield = nodes.field() - pfield += nodes.field_name('Parameters', 'Parameters') + pfield += nodes.field_name('', _('Parameters')) pfield += nodes.field_body() params = nodes.bullet_list() pfield[1] += params @@ -141,12 +145,12 @@ def handle_doc_fields(node): dlitem = nodes.list_item() dlpar = nodes.paragraph() dlpar += nodes.emphasis(obj, obj) - dlpar += nodes.Text(' -- ', ' -- ') + dlpar += nodes.Text('', ' -- ') dlpar += children param_nodes[obj] = dlpar dlitem += dlpar params += dlitem - elif typ == 'type': + elif typ == '%type': param_types[obj] = fbody.astext() else: fieldname = typ + ' ' + obj @@ -158,7 +162,7 @@ def handle_doc_fields(node): except (KeyError, ValueError): fnametext = fname.astext() try: - typ = doc_fields_without_arg[fnametext] + typ = _(doc_fields_without_arg[fnametext]) except KeyError: # at least capitalize the field name typ = fnametext.capitalize() @@ -299,7 +303,7 @@ def parse_c_signature(signode, sig, desctype): raise ValueError('no match') rettype, name, arglist, const = m.groups() - signode += addnodes.desc_type("", "") + signode += addnodes.desc_type('', '') parse_c_type(signode[-1], rettype) try: classname, funcname = name.split('::', 1) @@ -365,6 +369,7 @@ def parse_option_desc(signode, sig): def desc_directive(desctype, arguments, options, content, lineno, content_offset, block_text, state, state_machine): env = state.document.settings.env + inode = addnodes.index(entries=[]) node = addnodes.desc() node['desctype'] = desctype @@ -394,8 +399,10 @@ def desc_directive(desctype, arguments, options, content, lineno, targetname = 'cmdoption-' + optname signode['ids'].append(targetname) state.document.note_explicit_target(signode) - env.note_index_entry('pair', 'command line option; %s' % sig, + env.note_index_entry('pair', _('command line option; %s') % sig, targetname, targetname) + inode['entries'].append(('pair', _('command line option; %s') % sig, + targetname, targetname)) env.note_reftarget('option', optname, targetname) continue elif desctype == 'describe': @@ -417,7 +424,7 @@ def desc_directive(desctype, arguments, options, content, lineno, signode['ids'].append(targetname) state.document.note_explicit_target(signode) if indextemplate: - indexentry = indextemplate % (fullname,) + indexentry = _(indextemplate) % (fullname,) indextype = 'single' colon = indexentry.find(':') if colon != -1: @@ -425,6 +432,8 @@ def desc_directive(desctype, arguments, options, content, lineno, indexentry = indexentry[colon+1:].strip() env.note_index_entry(indextype, indexentry, targetname, targetname) + inode['entries'].append((indextype, indexentry, + targetname, targetname)) env.note_reftarget(rolename, fullname, targetname) # don't use object indexing below continue @@ -446,9 +455,9 @@ def desc_directive(desctype, arguments, options, content, lineno, env.note_descref(fullname, desctype, lineno) names.append(name) - env.note_index_entry('single', - desc_index_text(desctype, module, name), - fullname, fullname) + indextext = desc_index_text(desctype, module, name) + env.note_index_entry('single', indextext, fullname, fullname) + inode['entries'].append(('single', indextext, fullname, fullname)) subnode = addnodes.desc_content() # needed for automatic qualification of members @@ -469,7 +478,7 @@ def desc_directive(desctype, arguments, options, content, lineno, env.currclass = None env.currdesc = None node.append(subnode) - return [node] + return [inode, node] desc_directive.content = 1 desc_directive.arguments = (1, 0, 1) @@ -501,13 +510,17 @@ desctypes = [ for _name in desctypes: directives.register_directive(_name, desc_directive) +_ = lambda x: x + # Generic cross-reference types; they can be registered in the application; # the directives are either desc_directive or target_directive additional_xref_types = { # directive name: (role name, index text, function to parse the desc node) - 'envvar': ('envvar', 'environment variable; %s', None), + 'envvar': ('envvar', _('environment variable; %s'), None), } +del _ + # ------ target -------------------------------------------------------------------- @@ -521,6 +534,7 @@ def target_directive(targettype, arguments, options, content, lineno, targetname = '%s-%s' % (rolename, fullname) node = nodes.target('', '', ids=[targetname]) state.document.note_explicit_target(node) + ret = [node] if indextemplate: indexentry = indextemplate % (fullname,) indextype = 'single' @@ -529,8 +543,10 @@ def target_directive(targettype, arguments, options, content, lineno, indextype = indexentry[:colon].strip() indexentry = indexentry[colon+1:].strip() env.note_index_entry(indextype, indexentry, targetname, targetname) + inode = addnodes.index(entries=[(indextype, indexentry, targetname, targetname)]) + ret.insert(0, inode) env.note_reftarget(rolename, fullname, targetname) - return [node] + return ret target_directive.content = 0 target_directive.arguments = (1, 0, 1) diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index fab2f5462..b4ddf1d04 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -16,6 +16,7 @@ from docutils.parsers.rst import directives from sphinx import addnodes from sphinx.util import patfilter from sphinx.roles import caption_ref_re +from sphinx.locale import pairindextypes from sphinx.util.compat import make_admonition @@ -98,13 +99,16 @@ def module_directive(name, arguments, options, content, lineno, if 'platform' in options: modulenode['platform'] = options['platform'] node = nodes.paragraph() - node += nodes.emphasis('Platforms: ', 'Platforms: ') + node += nodes.emphasis('', _('Platforms: ')) node += nodes.Text(options['platform'], options['platform']) ret.append(node) # the synopsis isn't printed; in fact, it is only used in the modindex currently if not noindex: - env.note_index_entry('single', '%s (module)' % modname, - 'module-' + modname, modname) + indextext = _('%s (module)') % modname + env.note_index_entry('single', indextext, 'module-' + modname, modname) + inode = addnodes.index(entries=[('single', indextext, + 'module-' + modname, modname)]) + ret.insert(0, inode) return ret module_directive.arguments = (1, 0, 0) @@ -141,11 +145,11 @@ def author_directive(name, arguments, options, content, lineno, emph = nodes.emphasis() para += emph if name == 'sectionauthor': - text = 'Section author: ' + text = _('Section author: ') elif name == 'moduleauthor': - text = 'Module author: ' + text = _('Module author: ') else: - text = 'Author: ' + text = _('Author: ') emph += nodes.Text(text, text) inodes, messages = state.inline_text(arguments[0], lineno) emph.extend(inodes) @@ -158,9 +162,8 @@ directives.register_directive('moduleauthor', author_directive) # ------ index markup -------------------------------------------------------------- -entrytypes = [ - 'single', 'pair', 'triple', 'module', 'keyword', 'operator', - 'object', 'exception', 'statement', 'builtin', +indextypes = [ + 'single', 'pair', 'triple', ] def index_directive(name, arguments, options, content, lineno, @@ -175,17 +178,26 @@ def index_directive(name, arguments, options, content, lineno, indexnode['entries'] = ne = [] for entry in arguments: entry = entry.strip() - for type in entrytypes: + for type in pairindextypes: if entry.startswith(type+':'): value = entry[len(type)+1:].strip() + value = pairindextypes[type] + '; ' + value env.note_index_entry(type, value, targetid, value) ne.append((type, value, targetid, value)) break - # shorthand notation for single entries else: - for value in entry.split(','): - env.note_index_entry('single', value.strip(), targetid, value.strip()) - ne.append(('single', value.strip(), targetid, value.strip())) + for type in indextypes: + if entry.startswith(type+':'): + value = entry[len(type)+1:].strip() + env.note_index_entry(type, value, targetid, value) + ne.append((type, value, targetid, value)) + break + # shorthand notation for single entries + else: + for value in entry.split(','): + env.note_index_entry('single', value.strip(), + targetid, value.strip()) + ne.append(('single', value.strip(), targetid, value.strip())) return [indexnode, targetnode] index_directive.arguments = (1, 0, 1) @@ -223,7 +235,7 @@ directives.register_directive('versionchanged', version_directive) def seealso_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): rv = make_admonition( - addnodes.seealso, name, ['See also'], options, content, + addnodes.seealso, name, [_('See also')], options, content, lineno, content_offset, block_text, state, state_machine) return rv @@ -292,7 +304,7 @@ directives.register_directive('productionlist', productionlist_directive) def glossary_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): - """Glossary with cross-reference targets for :dfn: roles.""" + """Glossary with cross-reference targets for :term: roles.""" env = state.document.settings.env node = addnodes.glossary() state.nested_parse(content, content_offset, node) diff --git a/sphinx/environment.py b/sphinx/environment.py index 41e9ac97f..162ed6d44 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -1051,13 +1051,6 @@ class BuildEnvironment: add_entry(first, second+' '+third) add_entry(second, third+', '+first) add_entry(third, first+' '+second) - elif type in ('module', 'keyword', 'operator', 'object', - 'exception', 'statement'): - add_entry(string, type) - add_entry(type, string) - elif type == 'builtin': - add_entry(string, 'built-in function') - add_entry('built-in function', string) else: self.warn(fn, "unknown index entry type %r" % type) diff --git a/sphinx/htmlhelp.py b/sphinx/htmlhelp.py index a3ace5dd8..ea21d0ce1 100644 --- a/sphinx/htmlhelp.py +++ b/sphinx/htmlhelp.py @@ -152,7 +152,8 @@ def build_hhx(builder, outdir, outname): f.write('
  • ' + object_sitemap % (builder.config.html_short_title, 'index.html')) if builder.config.html_use_modindex: - f.write('
  • ' + object_sitemap % ('Global Module Index', 'modindex.html')) + f.write('
  • ' + object_sitemap % (_('Global Module Index'), + 'modindex.html')) # the TOC tocdoc = builder.env.get_and_resolve_doctree(builder.config.master_doc, builder, prune_toctrees=False) diff --git a/sphinx/htmlwriter.py b/sphinx/htmlwriter.py index 5fadcb1d6..8eb3dad4f 100644 --- a/sphinx/htmlwriter.py +++ b/sphinx/htmlwriter.py @@ -15,6 +15,7 @@ import posixpath from docutils import nodes from docutils.writers.html4css1 import Writer, HTMLTranslator as BaseTranslator +from sphinx.locale import admonitionlabels, versionlabels from sphinx.highlighting import PygmentsBridge from sphinx.util.smartypants import sphinx_smarty_pants @@ -38,12 +39,6 @@ class HTMLWriter(Writer): setattr(self, attr, getattr(visitor, attr, None)) -version_text = { - 'deprecated': 'Deprecated in version %s', - 'versionchanged': 'Changed in version %s', - 'versionadded': 'New in version %s', -} - class HTMLTranslator(BaseTranslator): """ Our custom HTML translator. @@ -74,7 +69,8 @@ class HTMLTranslator(BaseTranslator): def depart_desc_signature(self, node): if node['ids'] and self.builder.add_definition_links: self.body.append(u'\u00B6') + u'title="%s">\u00B6' % + _('Permalink to this definition')) self.body.append('\n') def visit_desc_addname(self, node): @@ -131,7 +127,7 @@ class HTMLTranslator(BaseTranslator): def visit_versionmodified(self, node): self.body.append(self.starttag(node, 'p')) - text = version_text[node['type']] % node['version'] + text = versionlabels[node['type']] % node['version'] if len(node): text += ': ' else: @@ -160,7 +156,7 @@ class HTMLTranslator(BaseTranslator): self.body.append(self.starttag( node, 'div', CLASS=('admonition ' + name))) if name and name != 'seealso': - node.insert(0, nodes.title(name, self.language.labels[name])) + node.insert(0, nodes.title(name, admonitionlabels[name])) self.set_first_last(node) def visit_seealso(self, node): @@ -379,11 +375,12 @@ class HTMLTranslator(BaseTranslator): aname = node.parent['ids'][0] # add permalink anchor self.body.append(u'\u00B6') + u'title="%s">\u00B6' % + _('Permalink to this headline')) BaseTranslator.depart_title(self, node) def unknown_visit(self, node): - raise NotImplementedError("Unknown node: " + node.__class__.__name__) + raise NotImplementedError('Unknown node: ' + node.__class__.__name__) class SmartyPantsHTMLTranslator(HTMLTranslator): diff --git a/sphinx/latexwriter.py b/sphinx/latexwriter.py index 2a073bc35..0f49d0c92 100644 --- a/sphinx/latexwriter.py +++ b/sphinx/latexwriter.py @@ -18,24 +18,35 @@ import time from os import path from docutils import nodes, writers +from docutils.writers.latex2e import Babel from sphinx import addnodes from sphinx import highlighting +from sphinx.locale import admonitionlabels, versionlabels from sphinx.util.smartypants import educateQuotesLatex HEADER = r'''%% Generated by Sphinx. -\documentclass[%(papersize)s,%(pointsize)s]{%(docclass)s} +\documentclass[%(papersize)s,%(pointsize)s%(classoptions)s]{%(docclass)s} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} +\usepackage{babel} \title{%(title)s} \date{%(date)s} \release{%(release)s} \author{%(author)s} \newcommand{\sphinxlogo}{%(logo)s} +\renewcommand{\releasename}{%(releasename)s} %(preamble)s \makeindex ''' +BEGIN_DOC = r''' +\begin{document} +\shorthandoff{"} +\maketitle +\tableofcontents +''' + FOOTER = r''' \printindex \end{document} @@ -121,9 +132,14 @@ class LaTeXTranslator(nodes.NodeVisitor): # if empty, the title is set to the first section title 'title': document.settings.title, 'release': builder.config.release, + 'releasename': _('Release'), 'logo': logo, 'date': date, + 'classoptions': '', } + if builder.config.language: + babel = Babel(builder.config.language) + self.options['classoptions'] += ',' + babel.get_language() self.highlighter = highlighting.PygmentsBridge( 'latex', builder.config.pygments_style) self.context = [] @@ -159,15 +175,15 @@ class LaTeXTranslator(nodes.NodeVisitor): '\n\n' + \ u''.join(self.body) + \ (self.options['modindex'] and - '\\renewcommand{\\indexname}{Module Index}' - '\\printmodindex' - '\\renewcommand{\\indexname}{Index}\n' or '') + \ + ('\\renewcommand{\\indexname}{%s}' % _('Module index') + + '\\printmodindex' + + '\\renewcommand{\\indexname}{%s}\n' % _('Index')) or '') + \ (FOOTER % self.options) def visit_document(self, node): if self.first_document == 1: # the first document is all the regular content ... - self.body.append('\\begin{document}\n\\maketitle\n\\tableofcontents\n') + self.body.append(BEGIN_DOC) self.first_document = 0 elif self.first_document == 0: # ... and all others are the appendices @@ -417,9 +433,9 @@ class LaTeXTranslator(nodes.NodeVisitor): pass def visit_seealso(self, node): - self.body.append("\n\n\\begin{seealso}\n") + self.body.append("\n\n\\strong{%s:}\n\n" % admonitionlabels['seealso']) def depart_seealso(self, node): - self.body.append("\n\\end{seealso}\n") + self.body.append("\n\n") def visit_rubric(self, node): if len(node.children) == 1 and node.children[0].astext() == 'Footnotes': @@ -715,7 +731,8 @@ class LaTeXTranslator(nodes.NodeVisitor): def _make_visit_admonition(name): def visit_admonition(self, node): - self.body.append('\n\\begin{notice}[%s]' % name) + self.body.append('\n\\begin{notice}{%s}{%s:}' % + (name, admonitionlabels[name])) return visit_admonition def _depart_named_admonition(self, node): self.body.append('\\end{notice}\n') @@ -740,19 +757,14 @@ class LaTeXTranslator(nodes.NodeVisitor): depart_warning = _depart_named_admonition def visit_versionmodified(self, node): - self.body.append('\\%s' % node['type']) - if node['type'] == 'deprecated': - self.body.append('{%s}{' % node['version']) - self.context.append('}') + intro = versionlabels[node['type']] % node['version'] + if node.children: + intro += ': ' else: - if len(node): - self.body.append('[') - self.context.append(']{%s}' % node['version']) - else: - self.body.append('{%s}' % node['version']) - self.context.append('') + intro += '.' + self.body.append(intro) def depart_versionmodified(self, node): - self.body.append(self.context.pop()) + pass def visit_target(self, node): def add_target(id): @@ -781,16 +793,6 @@ class LaTeXTranslator(nodes.NodeVisitor): def depart_attribution(self, node): self.body.append('\n\\end{flushright}\n') - indextype_map = { - 'module': 'refmodindex', - 'keyword': 'kwindex', - 'operator': 'opindex', - 'object': 'obindex', - 'exception': 'exindex', - 'statement': 'stindex', - 'builtin': 'bifuncindex', - } - def visit_index(self, node, scre=re.compile(r';\s*')): entries = node['entries'] for type, string, tid, _ in entries: @@ -802,9 +804,6 @@ class LaTeXTranslator(nodes.NodeVisitor): elif type == 'triple': parts = tuple(self.encode(x.strip()) for x in string.split(';', 2)) self.body.append(r'\indexiii{%s}{%s}{%s}' % parts) - elif type in self.indextype_map: - self.body.append(r'\%s{%s}' % (self.indextype_map[type], - self.encode(string))) else: self.builder.warn('unknown index entry type %s found' % type) raise nodes.SkipNode diff --git a/sphinx/locale/__init__.py b/sphinx/locale/__init__.py new file mode 100644 index 000000000..bedade3c9 --- /dev/null +++ b/sphinx/locale/__init__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +""" + sphinx.locale + ~~~~~~~~~~~~~ + + Locale utilities. + + :copyright: 2008 by Georg Brandl. + :license: BSD. +""" + +_ = lambda x: x + +admonitionlabels = { + 'attention': _('Attention'), + 'caution': _('Caution'), + 'danger': _('Danger'), + 'error': _('Error'), + 'hint': _('Hint'), + 'important': _('Important'), + 'note': _('Note'), + 'seealso': _('See Also'), + 'tip': _('Tip'), + 'warning': _('Warning'), +} + +versionlabels = { + 'versionadded': _('New in version %s'), + 'versionchanged': _('Changed in version %s'), + 'deprecated': _('Deprecated since version %s'), +} + +pairindextypes = { + 'module': _('module'), + 'keyword': _('keyword'), + 'operator': _('operator'), + 'object': _('object'), + 'exception': _('exception'), + 'statement': _('statement'), + 'builtin': _('built-in function'), +} + +del _ + +def init(): + for dct in (admonitionlabels, versionlabels, pairindextypes): + for key in dct: + dct[key] = _(dct[key]) diff --git a/sphinx/locale/cs/LC_MESSAGES/sphinx.mo b/sphinx/locale/cs/LC_MESSAGES/sphinx.mo index 2d9586a4ea0d193cdc950cceee70e256d56ded44..169bcad18bcc2e69c9c86b9067977fb349d5f54d 100644 GIT binary patch literal 7361 zcmd^@du(J?9m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qKWt7I`Bzqpky|@wOzH$TW-^<`x0^i|TT#t+Fhpfa| zB!{|)TvDF}{(#c)uP7_=7fK=0rYwCc$~UtKC4N8l;bXz|Ih5y)#bo~(yhcDeK9BOk z50RYe^C12ca;RT8N#YyGs;XA1jH89}acxDpz6)ig9F%-VaWgIi^Y>5+xKs`TpJEe% zD=1s=J4)qof^y?#wD2yJz1xej0tZkEb5OpGBFYLJ!40^Ga{t>XTkt-rt~;J|GupGW zy4U>OlrRfb>y9664w-Li;-)GxRJYT*Z{%UiN!#AIHq(*i8ht3Q9lNMgW>0PJ%8}Z! zkhxwr7vAN1ljeo`&h67htC&0FI%>F>*7@Mcf*LOAe96^Msgb-cxw)xAaMzwG*O{~m z+Ri&^v)r)HbVap!HQHk?N7pwxwr7oLD?K%?mFuPSv>AQ&>N~eu z{R7(u23B5dd_J^tusI$w^DTps{n-y*_GYAX^IOZCk^Od|Xy@&Wf69E)x@l!~{2?iN zgPCnBuNh8F+J{X%(Ov(5ovAGO%U01pm9>qXNOo6V(oQ;e_`jGMopI76u}U-Pj86GW zC4b5Dm(7Fip82Bv@uuCbV@(vY+VWV?%2LMdGfuKInXR0uoY&Tvf39fd#`3vRVbVVr Q^z%ou*YtEG%t*)hzc^>^E&u=k diff --git a/sphinx/locale/cs/LC_MESSAGES/sphinx.po b/sphinx/locale/cs/LC_MESSAGES/sphinx.po index e6eb29e67..783ca3bdf 100644 --- a/sphinx/locale/cs/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/cs/LC_MESSAGES/sphinx.po @@ -1,4 +1,4 @@ -# Translations template for Sphinx. +# Czech translations for Sphinx. # Copyright (C) 2008 ORGANIZATION # This file is distributed under the same license as the Sphinx project. # FIRST AUTHOR , 2008. @@ -8,55 +8,317 @@ msgstr "" "Project-Id-Version: Sphinx 0.5\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-08-08 12:39+0000\n" -"PO-Revision-Date: 2008-08-08 15:43+0100\n" +"PO-Revision-Date: 2008-08-10 11:43+0000\n" "Last-Translator: Pavel Kosina \n" "Language-Team: Pavel Kosina \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.3\n" -"X-Poedit-Language: Czech\n" -"X-Poedit-Country: CZECH REPUBLIC\n" -#: sphinx/builder.py:390 +#: sphinx/builder.py:391 #, python-format msgid "%b %d, %Y" msgstr "%d.%m.%Y" -#: sphinx/builder.py:409 -#: sphinx/templates/defindex.html:21 +#: sphinx/builder.py:410 sphinx/templates/defindex.html:21 msgid "General Index" msgstr "Generální index" -#: sphinx/builder.py:409 +#: sphinx/builder.py:410 msgid "index" msgstr "index" -#: sphinx/builder.py:411 -#: sphinx/templates/defindex.html:19 -#: sphinx/templates/modindex.html:2 +#: sphinx/builder.py:412 sphinx/htmlhelp.py:155 +#: sphinx/templates/defindex.html:19 sphinx/templates/modindex.html:2 #: sphinx/templates/modindex.html:12 msgid "Global Module Index" msgstr "Index modulů" -#: sphinx/builder.py:411 +#: sphinx/builder.py:412 msgid "modules" msgstr "moduly" -#: sphinx/builder.py:447 +#: sphinx/builder.py:448 msgid "next" msgstr "další" -#: sphinx/builder.py:454 +#: sphinx/builder.py:455 msgid "previous" msgstr "předchozí" -#: sphinx/environment.py:108 -#: sphinx/latexwriter.py:110 +#: sphinx/builder.py:1089 +msgid "Builtins" +msgstr "" + +#: sphinx/builder.py:1091 +#, fuzzy +msgid "Module level" +msgstr "moduly" + +#: sphinx/environment.py:108 sphinx/latexwriter.py:114 #, python-format msgid "%B %d, %Y" msgstr "%d.%m.%Y" +#: sphinx/htmlwriter.py:73 +msgid "Permalink to this definition" +msgstr "" + +#: sphinx/htmlwriter.py:379 +msgid "Permalink to this headline" +msgstr "" + +#: sphinx/latexwriter.py:128 +msgid "Release" +msgstr "" + +#: sphinx/latexwriter.py:171 +msgid "Module index" +msgstr "Index modulů" + +#: sphinx/latexwriter.py:173 sphinx/templates/genindex-single.html:2 +#: sphinx/templates/genindex-split.html:2 +#: sphinx/templates/genindex-split.html:5 sphinx/templates/genindex.html:2 +#: sphinx/templates/genindex.html:5 sphinx/templates/genindex.html:48 +msgid "Index" +msgstr "Index" + +#: sphinx/roles.py:52 sphinx/roles.py:55 sphinx/directives/desc.py:519 +#, python-format +msgid "environment variable; %s" +msgstr "" + +#: sphinx/roles.py:61 sphinx/roles.py:64 +#, python-format +msgid "Python Enhancement Proposals!PEP %s" +msgstr "" + +#: sphinx/textwriter.py:151 +#, python-format +msgid "Platform: %s" +msgstr "" + +#: sphinx/textwriter.py:353 +msgid "[image]" +msgstr "" + +#: sphinx/directives/desc.py:26 +#, python-format +msgid "%s() (built-in function)" +msgstr "" + +#: sphinx/directives/desc.py:27 sphinx/directives/desc.py:41 +#: sphinx/directives/desc.py:53 +#, python-format +msgid "%s() (in module %s)" +msgstr "" + +#: sphinx/directives/desc.py:30 +#, python-format +msgid "%s (built-in variable)" +msgstr "" + +#: sphinx/directives/desc.py:31 sphinx/directives/desc.py:65 +#, python-format +msgid "%s (in module %s)" +msgstr "" + +#: sphinx/directives/desc.py:33 +#, python-format +msgid "%s (class in %s)" +msgstr "" + +#: sphinx/directives/desc.py:45 +#, python-format +msgid "%s() (%s.%s method)" +msgstr "" + +#: sphinx/directives/desc.py:47 +#, python-format +msgid "%s() (%s method)" +msgstr "" + +#: sphinx/directives/desc.py:57 +#, python-format +msgid "%s() (%s.%s static method)" +msgstr "" + +#: sphinx/directives/desc.py:59 +#, python-format +msgid "%s() (%s static method)" +msgstr "" + +#: sphinx/directives/desc.py:69 +#, python-format +msgid "%s (%s.%s attribute)" +msgstr "" + +#: sphinx/directives/desc.py:71 +#, python-format +msgid "%s (%s attribute)" +msgstr "" + +#: sphinx/directives/desc.py:73 +#, python-format +msgid "%s (C function)" +msgstr "" + +#: sphinx/directives/desc.py:75 +#, python-format +msgid "%s (C member)" +msgstr "" + +#: sphinx/directives/desc.py:77 +#, python-format +msgid "%s (C macro)" +msgstr "" + +#: sphinx/directives/desc.py:79 +#, python-format +msgid "%s (C type)" +msgstr "" + +#: sphinx/directives/desc.py:81 +#, python-format +msgid "%s (C variable)" +msgstr "" + +#: sphinx/directives/desc.py:99 +msgid "Raises" +msgstr "" + +#: sphinx/directives/desc.py:103 +msgid "Variable" +msgstr "" + +#: sphinx/directives/desc.py:106 +msgid "Returns" +msgstr "" + +#: sphinx/directives/desc.py:113 +msgid "Return type" +msgstr "" + +#: sphinx/directives/desc.py:140 +msgid "Parameters" +msgstr "" + +#: sphinx/directives/desc.py:402 sphinx/directives/desc.py:404 +#, python-format +msgid "command line option; %s" +msgstr "" + +#: sphinx/directives/other.py:102 +msgid "Platforms: " +msgstr "" + +#: sphinx/directives/other.py:107 +#, python-format +msgid "%s (module)" +msgstr "%s (moduly)" + +#: sphinx/directives/other.py:148 +msgid "Section author: " +msgstr "" + +#: sphinx/directives/other.py:150 +msgid "Module author: " +msgstr "" + +#: sphinx/directives/other.py:152 +msgid "Author: " +msgstr "" + +#: sphinx/directives/other.py:238 +msgid "See also" +msgstr "" + +#: sphinx/locale/__init__.py:15 +msgid "Attention" +msgstr "" + +#: sphinx/locale/__init__.py:16 +msgid "Caution" +msgstr "" + +#: sphinx/locale/__init__.py:17 +msgid "Danger" +msgstr "" + +#: sphinx/locale/__init__.py:18 +msgid "Error" +msgstr "" + +#: sphinx/locale/__init__.py:19 +msgid "Hint" +msgstr "" + +#: sphinx/locale/__init__.py:20 +msgid "Important" +msgstr "" + +#: sphinx/locale/__init__.py:21 +msgid "Note" +msgstr "" + +#: sphinx/locale/__init__.py:22 +msgid "See Also" +msgstr "" + +#: sphinx/locale/__init__.py:23 +msgid "Tip" +msgstr "" + +#: sphinx/locale/__init__.py:24 +msgid "Warning" +msgstr "" + +#: sphinx/locale/__init__.py:28 +#, python-format +msgid "New in version %s" +msgstr "" + +#: sphinx/locale/__init__.py:29 +#, python-format +msgid "Changed in version %s" +msgstr "" + +#: sphinx/locale/__init__.py:30 +#, python-format +msgid "Deprecated since version %s" +msgstr "" + +#: sphinx/locale/__init__.py:34 +msgid "module" +msgstr "moduly" + +#: sphinx/locale/__init__.py:35 +msgid "keyword" +msgstr "" + +#: sphinx/locale/__init__.py:36 +msgid "operator" +msgstr "" + +#: sphinx/locale/__init__.py:37 +msgid "object" +msgstr "" + +#: sphinx/locale/__init__.py:38 +msgid "exception" +msgstr "" + +#: sphinx/locale/__init__.py:39 +msgid "statement" +msgstr "" + +#: sphinx/locale/__init__.py:40 +msgid "built-in function" +msgstr "" + #: sphinx/templates/defindex.html:2 msgid "Overview" msgstr "Přehled" @@ -89,28 +351,14 @@ msgstr "rychlý přístup ke všem modulům" msgid "all functions, classes, terms" msgstr "všechny funkce, třídy, termíny" -#: sphinx/templates/genindex-single.html:2 -#: sphinx/templates/genindex-split.html:2 -#: sphinx/templates/genindex-split.html:5 -#: sphinx/templates/genindex.html:2 -#: sphinx/templates/genindex.html:5 -#: sphinx/templates/genindex.html:48 -msgid "Index" -msgstr "Index" - #: sphinx/templates/genindex-single.html:5 #, python-format msgid "Index – %(key)s" msgstr "Index – %(key)s" -#: sphinx/templates/genindex-single.html:14 -msgid "Link" -msgstr "Odkaz" - #: sphinx/templates/genindex-single.html:44 #: sphinx/templates/genindex-split.html:14 -#: sphinx/templates/genindex-split.html:27 -#: sphinx/templates/genindex.html:54 +#: sphinx/templates/genindex-split.html:27 sphinx/templates/genindex.html:54 msgid "Full index on one page" msgstr "Plný index na jedné stránce" @@ -154,8 +402,7 @@ msgstr "Tato stránka" msgid "Suggest Change" msgstr "Návrh změnu" -#: sphinx/templates/layout.html:60 -#: sphinx/templates/layout.html:62 +#: sphinx/templates/layout.html:60 sphinx/templates/layout.html:62 msgid "Show Source" msgstr "Ukázat zdroj" @@ -192,8 +439,7 @@ msgstr "Celkový obsah" msgid "Global index" msgstr "Celkový index" -#: sphinx/templates/layout.html:131 -#: sphinx/templates/search.html:2 +#: sphinx/templates/layout.html:131 sphinx/templates/search.html:2 #: sphinx/templates/search.html:5 msgid "Search" msgstr "Hledání" @@ -219,8 +465,12 @@ msgstr "Naposledy aktualizováno dne %(last_updated)s." #: sphinx/templates/layout.html:186 #, python-format -msgid "Created using Sphinx %(sphinx_version)s." -msgstr "vytvořeno pomocí Sphinx %(sphinx_version)s." +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" +"vytvořeno pomocí Sphinx " +"%(sphinx_version)s." #: sphinx/templates/modindex.html:14 msgid "Most popular modules:" @@ -240,8 +490,14 @@ msgid "Search %(docstitle)s" msgstr "Prohledat %(docstitle)s" #: sphinx/templates/page.html:8 -msgid "Note: You requested an out-of-date URL from this server. We've tried to redirect you to the new location of this page, but it may not be the right one." -msgstr "Note: You requested an out-of-date URL from this server. We've tried to redirect you to the new location of this page, but it may not be the right one." +msgid "" +"Note: You requested an out-of-date URL from this server." +" We've tried to redirect you to the new location of this page, but it may" +" not be the right one." +msgstr "" +"Note: You requested an out-of-date URL from this server." +" We've tried to redirect you to the new location of this page, but it may" +" not be the right one." #: sphinx/templates/search.html:7 msgid "" diff --git a/sphinx/locale/de/LC_MESSAGES/sphinx.mo b/sphinx/locale/de/LC_MESSAGES/sphinx.mo index ce33ab0b3399ed89fbb67505c767532396a1b5cb..8fda8b6e3e8ceea5e0abd0160a2aadfbdc1d4f3c 100644 GIT binary patch literal 7616 zcmcJTTa0AKS;xz9aLAAl>=2vaIF#3(y~NwSyWSOS#=DE>wwv|t>`Z3HYvK#xbazen zVNRdZIhUE8Rp2Qo!I2_I5h4ymAh6|-JOIHEAy(ot2oXVeNFqdl_<>u1h>NV?L_7q3 z|2ow@J+qT2LSi)2zpgrUs=oSe_0_y|$E$zN@Uy|+Tlo9)Th-e6dGBkCIY9HL;A`P8 z2YwRXPWwgp{qRrV8{pr-*TJvC*TZkX?}4{{cm4bhcqi=x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Ch|$(3hKHm7{N8{!cbTw%KoyA8BY77o zMlPWia2YkBACTDcD>mXa)CB%QO|*mR+OZ3lj&a^;ZZzQ6?4k=-QO|e{^^ALo`W=p; zE=>&jXOfy?!j^FXWyqI^uLdZGtu=xKcb%1HPnYO zMEaU}5_$e)FKUa2aXTKuUATyPbZ;ZE<#X)C71U>F4YfnHWUKKbNX^n6qyOwBeN4ph zzTk^VWQ{zA+R_4Q>yM%aTteOGWHA3uF#iE+ob#yvsP9n|i!-UM--&vZcVZ8wGu&wF zRZZkM)QwJ}R`?p~!mk2XkeKo<>e>H-yk(V(w*DsS?~|07#1z_(;;Hb6lgjRPQd8Bd z;kJ-%tsCAn>g=B!b22&Cn=$rGoLS3O2MxVR`Quyr(|3|le3p1kJyo@v0p@c z>>tr&EaQ64v~hBk86$ZwYZh&>ahH9wvB_R&eAK35FNW_La_%17J2+VVES3yyOilNv zrtH=56ZTZoZ}!#Z(fF@5$J$8g3-|+7?W{Y<%(l+hN?DW2Rsq+LHYTxx(Qe diff --git a/sphinx/locale/de/LC_MESSAGES/sphinx.po b/sphinx/locale/de/LC_MESSAGES/sphinx.po index c55c93674..3cea82149 100644 --- a/sphinx/locale/de/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/de/LC_MESSAGES/sphinx.po @@ -1,14 +1,13 @@ # German translations for Sphinx. -# Copyright (C) 2008 ORGANIZATION -# This file is distributed under the same license as the PROJECT project. -# , 2008. +# Copyright (C) 2008 Translators. +# This file is distributed under the same license as the Sphinx project. # msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2008-08-07 21:40+0200\n" -"PO-Revision-Date: 2008-08-08 12:40+0000\n" +"PO-Revision-Date: 2008-08-10 11:43+0000\n" "Last-Translator: Horst Gutmann \n" "Language-Team: de \n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -17,40 +16,305 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.3\n" -#: sphinx/builder.py:390 -#, fuzzy, python-format +#: sphinx/builder.py:391 +#, python-format msgid "%b %d, %Y" -msgstr "%d.%b.%Y" +msgstr "%d. %m. %Y" -#: sphinx/builder.py:409 sphinx/templates/defindex.html:21 +#: sphinx/builder.py:410 sphinx/templates/defindex.html:21 msgid "General Index" msgstr "Allgemeiner Index" -#: sphinx/builder.py:409 +#: sphinx/builder.py:410 msgid "index" msgstr "Index" -#: sphinx/builder.py:411 sphinx/templates/defindex.html:19 -#: sphinx/templates/modindex.html:2 sphinx/templates/modindex.html:12 +#: sphinx/builder.py:412 sphinx/htmlhelp.py:155 +#: sphinx/templates/defindex.html:19 sphinx/templates/modindex.html:2 +#: sphinx/templates/modindex.html:12 msgid "Global Module Index" msgstr "Globaler Modulindex" -#: sphinx/builder.py:411 +#: sphinx/builder.py:412 msgid "modules" msgstr "Module" -#: sphinx/builder.py:447 +#: sphinx/builder.py:448 msgid "next" msgstr "weiter" -#: sphinx/builder.py:454 +#: sphinx/builder.py:455 msgid "previous" msgstr "zurück" -#: sphinx/environment.py:108 sphinx/latexwriter.py:110 +#: sphinx/builder.py:1089 +msgid "Builtins" +msgstr "Builtins" + +#: sphinx/builder.py:1091 +msgid "Module level" +msgstr "Modulebene" + +#: sphinx/environment.py:108 sphinx/latexwriter.py:114 #, python-format msgid "%B %d, %Y" -msgstr "%d.%b.%Y" +msgstr "%d. %m. %Y" + +#: sphinx/htmlwriter.py:73 +msgid "Permalink to this definition" +msgstr "Permalink zu dieser Definition" + +#: sphinx/htmlwriter.py:379 +msgid "Permalink to this headline" +msgstr "Permalink zu dieser Überschrift" + +#: sphinx/latexwriter.py:128 +msgid "Release" +msgstr "Release" + +#: sphinx/latexwriter.py:171 +msgid "Module index" +msgstr "Modulindex" + +#: sphinx/latexwriter.py:173 sphinx/templates/genindex-single.html:2 +#: sphinx/templates/genindex-split.html:2 +#: sphinx/templates/genindex-split.html:5 sphinx/templates/genindex.html:2 +#: sphinx/templates/genindex.html:5 sphinx/templates/genindex.html:48 +msgid "Index" +msgstr "Stichwortverzeichnis" + +#: sphinx/roles.py:52 sphinx/roles.py:55 sphinx/directives/desc.py:519 +#, python-format +msgid "environment variable; %s" +msgstr "Umgebungsvariable; %s" + +#: sphinx/roles.py:61 sphinx/roles.py:64 +#, python-format +msgid "Python Enhancement Proposals!PEP %s" +msgstr "Python Enhancement Proposals!PEP %s" + +#: sphinx/textwriter.py:151 +#, python-format +msgid "Platform: %s" +msgstr "Plattform: %s" + +#: sphinx/textwriter.py:353 +msgid "[image]" +msgstr "[Bild]" + +#: sphinx/directives/desc.py:26 +#, python-format +msgid "%s() (built-in function)" +msgstr "%s() (eingebaute Funktion)" + +#: sphinx/directives/desc.py:27 sphinx/directives/desc.py:41 +#: sphinx/directives/desc.py:53 +#, python-format +msgid "%s() (in module %s)" +msgstr "%s() (in Modul %s)" + +#: sphinx/directives/desc.py:30 +#, python-format +msgid "%s (built-in variable)" +msgstr "%s (eingebaute Variable)" + +#: sphinx/directives/desc.py:31 sphinx/directives/desc.py:65 +#, python-format +msgid "%s (in module %s)" +msgstr "%s (in Modul %s)" + +#: sphinx/directives/desc.py:33 +#, python-format +msgid "%s (class in %s)" +msgstr "%s (Klasse in %s)" + +#: sphinx/directives/desc.py:45 +#, python-format +msgid "%s() (%s.%s method)" +msgstr "%s() (Methode von %s.%s)" + +#: sphinx/directives/desc.py:47 +#, python-format +msgid "%s() (%s method)" +msgstr "%s() (Methode von %s)" + +#: sphinx/directives/desc.py:57 +#, python-format +msgid "%s() (%s.%s static method)" +msgstr "%s() (statische Methode von %s.%s)" + +#: sphinx/directives/desc.py:59 +#, python-format +msgid "%s() (%s static method)" +msgstr "%s() (statische Methode von %s)" + +#: sphinx/directives/desc.py:69 +#, python-format +msgid "%s (%s.%s attribute)" +msgstr "%s (Attribut von %s.%s)" + +#: sphinx/directives/desc.py:71 +#, python-format +msgid "%s (%s attribute)" +msgstr "%s (Attribut von %s)" + +#: sphinx/directives/desc.py:73 +#, python-format +msgid "%s (C function)" +msgstr "%s (C-Funktion)" + +#: sphinx/directives/desc.py:75 +#, python-format +msgid "%s (C member)" +msgstr "%s (C-Member)" + +#: sphinx/directives/desc.py:77 +#, python-format +msgid "%s (C macro)" +msgstr "%s (C-Makro)" + +#: sphinx/directives/desc.py:79 +#, python-format +msgid "%s (C type)" +msgstr "%s (C-Typ)" + +#: sphinx/directives/desc.py:81 +#, python-format +msgid "%s (C variable)" +msgstr "%s (C-Variable)" + +#: sphinx/directives/desc.py:99 +msgid "Raises" +msgstr "Verursacht:" + +#: sphinx/directives/desc.py:103 +msgid "Variable" +msgstr "Variable" + +#: sphinx/directives/desc.py:106 +msgid "Returns" +msgstr "Rückgabe" + +#: sphinx/directives/desc.py:113 +msgid "Return type" +msgstr "Rückgabetyp" + +#: sphinx/directives/desc.py:140 +msgid "Parameters" +msgstr "Parameter" + +#: sphinx/directives/desc.py:402 sphinx/directives/desc.py:404 +#, python-format +msgid "command line option; %s" +msgstr "Kommandozeilenoption; %s" + +#: sphinx/directives/other.py:102 +msgid "Platforms: " +msgstr "Plattformen: " + +#: sphinx/directives/other.py:107 +#, python-format +msgid "%s (module)" +msgstr "%s (Modul)" + +#: sphinx/directives/other.py:148 +msgid "Section author: " +msgstr "Autor des Abschnitts: " + +#: sphinx/directives/other.py:150 +msgid "Module author: " +msgstr "Autor des Moduls: " + +#: sphinx/directives/other.py:152 +msgid "Author: " +msgstr "Autor: " + +#: sphinx/directives/other.py:238 +msgid "See also" +msgstr "Siehe auch" + +#: sphinx/locale/__init__.py:15 +msgid "Attention" +msgstr "Achtung" + +#: sphinx/locale/__init__.py:16 +msgid "Caution" +msgstr "Vorsicht" + +#: sphinx/locale/__init__.py:17 +msgid "Danger" +msgstr "Gefahr" + +#: sphinx/locale/__init__.py:18 +msgid "Error" +msgstr "Fehler" + +#: sphinx/locale/__init__.py:19 +msgid "Hint" +msgstr "Hinweis" + +#: sphinx/locale/__init__.py:20 +msgid "Important" +msgstr "Wichtig" + +#: sphinx/locale/__init__.py:21 +msgid "Note" +msgstr "Bemerkung" + +#: sphinx/locale/__init__.py:22 +msgid "See Also" +msgstr "Siehe auch" + +#: sphinx/locale/__init__.py:23 +msgid "Tip" +msgstr "Tipp" + +#: sphinx/locale/__init__.py:24 +msgid "Warning" +msgstr "Warnung" + +#: sphinx/locale/__init__.py:28 +#, python-format +msgid "New in version %s" +msgstr "Neu in Version %s" + +#: sphinx/locale/__init__.py:29 +#, python-format +msgid "Changed in version %s" +msgstr "Geändert in Version %s" + +#: sphinx/locale/__init__.py:30 +#, python-format +msgid "Deprecated since version %s" +msgstr "Veraltet ab Version %s" + +#: sphinx/locale/__init__.py:34 +msgid "module" +msgstr "Module" + +#: sphinx/locale/__init__.py:35 +msgid "keyword" +msgstr "Schlüsselwort" + +#: sphinx/locale/__init__.py:36 +msgid "operator" +msgstr "Operator" + +#: sphinx/locale/__init__.py:37 +msgid "object" +msgstr "Objekt" + +#: sphinx/locale/__init__.py:38 +msgid "exception" +msgstr "Exception" + +#: sphinx/locale/__init__.py:39 +msgid "statement" +msgstr "Statement" + +#: sphinx/locale/__init__.py:40 +msgid "built-in function" +msgstr "eingebaute Funktion" #: sphinx/templates/defindex.html:2 msgid "Overview" @@ -84,22 +348,11 @@ msgstr "Schneller Zugriff auf alle Module" msgid "all functions, classes, terms" msgstr "Alle Funktionen, Klassen, Begriffe" -#: sphinx/templates/genindex-single.html:2 -#: sphinx/templates/genindex-split.html:2 -#: sphinx/templates/genindex-split.html:5 sphinx/templates/genindex.html:2 -#: sphinx/templates/genindex.html:5 sphinx/templates/genindex.html:48 -msgid "Index" -msgstr "Stichwortverzeichnis" - #: sphinx/templates/genindex-single.html:5 #, python-format msgid "Index – %(key)s" msgstr "Stichwortverzeichnis – %(key)s" -#: sphinx/templates/genindex-single.html:14 -msgid "Link" -msgstr "Link" - #: sphinx/templates/genindex-single.html:44 #: sphinx/templates/genindex-split.html:14 #: sphinx/templates/genindex-split.html:27 sphinx/templates/genindex.html:54 @@ -238,7 +491,10 @@ msgid "" "Note: You requested an out-of-date URL from this server." " We've tried to redirect you to the new location of this page, but it may" " not be the right one." -msgstr "Anmerkung: Du hast eine nicht länger gültige URL von diesem Server angefragt. Wir haben versucht dich auf die neue Adresse dieser Seite umzuleiten, aber dies muss nicht die richtige Seite sein." +msgstr "" +"Anmerkung: Du hast eine nicht länger gültige URL von " +"diesem Server angefragt. Wir haben versucht dich auf die neue Adresse " +"dieser Seite umzuleiten, aber dies muss nicht die richtige Seite sein." #: sphinx/templates/search.html:7 msgid "" @@ -246,7 +502,12 @@ msgid "" " words into the box below and click \"search\". Note that the search\n" " function will automatically search for all of the words. Pages\n" " containing less words won't appear in the result list." -msgstr "Von hier aus kannst du die Dokumentation durchsuchen. Gib deine Suchbegriffe in das untenstehende Feld ein und klicke auf \"suchen\". Bitte beachte, dass die Suchfunktion automatisch nach all diesen Worten suchen wird. Seiten, die nicht alle Worte enthalten, werden nicht in der Ergebnisliste erscheinen." +msgstr "" +"Von hier aus kannst du die Dokumentation durchsuchen. Gib deine " +"Suchbegriffe in das untenstehende Feld ein und klicke auf \"suchen\". " +"Bitte beachte, dass die Suchfunktion automatisch nach all diesen Worten " +"suchen wird. Seiten, die nicht alle Worte enthalten, werden nicht in der " +"Ergebnisliste erscheinen." #: sphinx/templates/search.html:14 msgid "search" @@ -287,3 +548,4 @@ msgstr "C API-Änderungen" #: sphinx/templates/changes/versionchanges.html:25 msgid "Other changes" msgstr "Andere Änderungen" + diff --git a/sphinx/locale/sphinx.pot b/sphinx/locale/sphinx.pot index 65cc1a645..097e5dc9e 100644 --- a/sphinx/locale/sphinx.pot +++ b/sphinx/locale/sphinx.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Sphinx 0.5\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2008-08-08 12:39+0000\n" +"POT-Creation-Date: 2008-08-10 11:43+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,41 +17,306 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.3\n" -#: sphinx/builder.py:390 +#: sphinx/builder.py:391 #, python-format msgid "%b %d, %Y" msgstr "" -#: sphinx/builder.py:409 sphinx/templates/defindex.html:21 +#: sphinx/builder.py:410 sphinx/templates/defindex.html:21 msgid "General Index" msgstr "" -#: sphinx/builder.py:409 +#: sphinx/builder.py:410 msgid "index" msgstr "" -#: sphinx/builder.py:411 sphinx/templates/defindex.html:19 -#: sphinx/templates/modindex.html:2 sphinx/templates/modindex.html:12 +#: sphinx/builder.py:412 sphinx/htmlhelp.py:155 +#: sphinx/templates/defindex.html:19 sphinx/templates/modindex.html:2 +#: sphinx/templates/modindex.html:12 msgid "Global Module Index" msgstr "" -#: sphinx/builder.py:411 +#: sphinx/builder.py:412 msgid "modules" msgstr "" -#: sphinx/builder.py:447 +#: sphinx/builder.py:448 msgid "next" msgstr "" -#: sphinx/builder.py:454 +#: sphinx/builder.py:455 msgid "previous" msgstr "" -#: sphinx/environment.py:108 sphinx/latexwriter.py:110 +#: sphinx/builder.py:1089 +msgid "Builtins" +msgstr "" + +#: sphinx/builder.py:1091 +msgid "Module level" +msgstr "" + +#: sphinx/environment.py:108 sphinx/latexwriter.py:114 #, python-format msgid "%B %d, %Y" msgstr "" +#: sphinx/htmlwriter.py:73 +msgid "Permalink to this definition" +msgstr "" + +#: sphinx/htmlwriter.py:379 +msgid "Permalink to this headline" +msgstr "" + +#: sphinx/latexwriter.py:128 +msgid "Release" +msgstr "" + +#: sphinx/latexwriter.py:171 +msgid "Module index" +msgstr "" + +#: sphinx/latexwriter.py:173 sphinx/templates/genindex-single.html:2 +#: sphinx/templates/genindex-split.html:2 +#: sphinx/templates/genindex-split.html:5 sphinx/templates/genindex.html:2 +#: sphinx/templates/genindex.html:5 sphinx/templates/genindex.html:48 +msgid "Index" +msgstr "" + +#: sphinx/roles.py:52 sphinx/roles.py:55 sphinx/directives/desc.py:519 +#, python-format +msgid "environment variable; %s" +msgstr "" + +#: sphinx/roles.py:61 sphinx/roles.py:64 +#, python-format +msgid "Python Enhancement Proposals!PEP %s" +msgstr "" + +#: sphinx/textwriter.py:151 +#, python-format +msgid "Platform: %s" +msgstr "" + +#: sphinx/textwriter.py:353 +msgid "[image]" +msgstr "" + +#: sphinx/directives/desc.py:26 +#, python-format +msgid "%s() (built-in function)" +msgstr "" + +#: sphinx/directives/desc.py:27 sphinx/directives/desc.py:41 +#: sphinx/directives/desc.py:53 +#, python-format +msgid "%s() (in module %s)" +msgstr "" + +#: sphinx/directives/desc.py:30 +#, python-format +msgid "%s (built-in variable)" +msgstr "" + +#: sphinx/directives/desc.py:31 sphinx/directives/desc.py:65 +#, python-format +msgid "%s (in module %s)" +msgstr "" + +#: sphinx/directives/desc.py:33 +#, python-format +msgid "%s (class in %s)" +msgstr "" + +#: sphinx/directives/desc.py:45 +#, python-format +msgid "%s() (%s.%s method)" +msgstr "" + +#: sphinx/directives/desc.py:47 +#, python-format +msgid "%s() (%s method)" +msgstr "" + +#: sphinx/directives/desc.py:57 +#, python-format +msgid "%s() (%s.%s static method)" +msgstr "" + +#: sphinx/directives/desc.py:59 +#, python-format +msgid "%s() (%s static method)" +msgstr "" + +#: sphinx/directives/desc.py:69 +#, python-format +msgid "%s (%s.%s attribute)" +msgstr "" + +#: sphinx/directives/desc.py:71 +#, python-format +msgid "%s (%s attribute)" +msgstr "" + +#: sphinx/directives/desc.py:73 +#, python-format +msgid "%s (C function)" +msgstr "" + +#: sphinx/directives/desc.py:75 +#, python-format +msgid "%s (C member)" +msgstr "" + +#: sphinx/directives/desc.py:77 +#, python-format +msgid "%s (C macro)" +msgstr "" + +#: sphinx/directives/desc.py:79 +#, python-format +msgid "%s (C type)" +msgstr "" + +#: sphinx/directives/desc.py:81 +#, python-format +msgid "%s (C variable)" +msgstr "" + +#: sphinx/directives/desc.py:99 +msgid "Raises" +msgstr "" + +#: sphinx/directives/desc.py:103 +msgid "Variable" +msgstr "" + +#: sphinx/directives/desc.py:106 +msgid "Returns" +msgstr "" + +#: sphinx/directives/desc.py:113 +msgid "Return type" +msgstr "" + +#: sphinx/directives/desc.py:140 +msgid "Parameters" +msgstr "" + +#: sphinx/directives/desc.py:402 sphinx/directives/desc.py:404 +#, python-format +msgid "command line option; %s" +msgstr "" + +#: sphinx/directives/other.py:102 +msgid "Platforms: " +msgstr "" + +#: sphinx/directives/other.py:107 +#, python-format +msgid "%s (module)" +msgstr "" + +#: sphinx/directives/other.py:148 +msgid "Section author: " +msgstr "" + +#: sphinx/directives/other.py:150 +msgid "Module author: " +msgstr "" + +#: sphinx/directives/other.py:152 +msgid "Author: " +msgstr "" + +#: sphinx/directives/other.py:238 +msgid "See also" +msgstr "" + +#: sphinx/locale/__init__.py:15 +msgid "Attention" +msgstr "" + +#: sphinx/locale/__init__.py:16 +msgid "Caution" +msgstr "" + +#: sphinx/locale/__init__.py:17 +msgid "Danger" +msgstr "" + +#: sphinx/locale/__init__.py:18 +msgid "Error" +msgstr "" + +#: sphinx/locale/__init__.py:19 +msgid "Hint" +msgstr "" + +#: sphinx/locale/__init__.py:20 +msgid "Important" +msgstr "" + +#: sphinx/locale/__init__.py:21 +msgid "Note" +msgstr "" + +#: sphinx/locale/__init__.py:22 +msgid "See Also" +msgstr "" + +#: sphinx/locale/__init__.py:23 +msgid "Tip" +msgstr "" + +#: sphinx/locale/__init__.py:24 +msgid "Warning" +msgstr "" + +#: sphinx/locale/__init__.py:28 +#, python-format +msgid "New in version %s" +msgstr "" + +#: sphinx/locale/__init__.py:29 +#, python-format +msgid "Changed in version %s" +msgstr "" + +#: sphinx/locale/__init__.py:30 +#, python-format +msgid "Deprecated since version %s" +msgstr "" + +#: sphinx/locale/__init__.py:34 +msgid "module" +msgstr "" + +#: sphinx/locale/__init__.py:35 +msgid "keyword" +msgstr "" + +#: sphinx/locale/__init__.py:36 +msgid "operator" +msgstr "" + +#: sphinx/locale/__init__.py:37 +msgid "object" +msgstr "" + +#: sphinx/locale/__init__.py:38 +msgid "exception" +msgstr "" + +#: sphinx/locale/__init__.py:39 +msgid "statement" +msgstr "" + +#: sphinx/locale/__init__.py:40 +msgid "built-in function" +msgstr "" + #: sphinx/templates/defindex.html:2 msgid "Overview" msgstr "" @@ -84,22 +349,11 @@ msgstr "" msgid "all functions, classes, terms" msgstr "" -#: sphinx/templates/genindex-single.html:2 -#: sphinx/templates/genindex-split.html:2 -#: sphinx/templates/genindex-split.html:5 sphinx/templates/genindex.html:2 -#: sphinx/templates/genindex.html:5 sphinx/templates/genindex.html:48 -msgid "Index" -msgstr "" - #: sphinx/templates/genindex-single.html:5 #, python-format msgid "Index – %(key)s" msgstr "" -#: sphinx/templates/genindex-single.html:14 -msgid "Link" -msgstr "" - #: sphinx/templates/genindex-single.html:44 #: sphinx/templates/genindex-split.html:14 #: sphinx/templates/genindex-split.html:27 sphinx/templates/genindex.html:54 diff --git a/sphinx/roles.py b/sphinx/roles.py index 2cfca3d8b..dcdaf9687 100644 --- a/sphinx/roles.py +++ b/sphinx/roles.py @@ -49,18 +49,19 @@ def indexmarkup_role(typ, rawtext, etext, lineno, inliner, options={}, content=[ inliner.document.note_explicit_target(targetnode) if typ == 'envvar': env.note_index_entry('single', text, targetid, text) - env.note_index_entry('single', 'environment variable; %s' % text, + env.note_index_entry('single', _('environment variable; %s') % text, targetid, text) indexnode['entries'] = [('single', text, targetid, text), - ('single', 'environment variable; %s' % text, + ('single', _('environment variable; %s') % text, targetid, text)] xref_nodes = xfileref_role(typ, rawtext, etext, lineno, inliner, options, content)[0] return [indexnode, targetnode] + xref_nodes, [] elif typ == 'pep': - env.note_index_entry('single', 'Python Enhancement Proposals!PEP %s' % text, + env.note_index_entry('single', _('Python Enhancement Proposals!PEP %s') % text, targetid, 'PEP %s' % text) - indexnode['entries'] = [('single', 'Python Enhancement Proposals!PEP %s' % text, + indexnode['entries'] = [('single', + _('Python Enhancement Proposals!PEP %s') % text, targetid, 'PEP %s' % text)] try: pepnum = int(text) diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 9c728b015..5eff6f8d5 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -198,15 +198,8 @@ } -% Lots of index-entry generation support. +% Index-entry generation support. % -% Command to wrap around stuff that refers to function / module / -% attribute names in the index. Default behavior: like \code{}. To -% just keep the index entries in the roman font, uncomment the second -% definition; it matches O'Reilly style more. -% -\newcommand{\py@idxcode}[1]{\texttt{#1}} -%\renewcommand{\py@idxcode}[1]{#1} % Command to generate two index entries (using subentries) \newcommand{\indexii}[2]{\index{#1!#2}\index{#2!#1}} @@ -222,23 +215,6 @@ \index{#4!#1 #2 #3} } -% Command to generate a reference to a function, statement, keyword, -% operator. -\newcommand{\kwindex}[1]{\indexii{keyword}{#1@{\py@idxcode{#1}}}} -\newcommand{\stindex}[1]{\indexii{statement}{#1@{\py@idxcode{#1}}}} -\newcommand{\opindex}[1]{\indexii{operator}{#1@{\py@idxcode{#1}}}} -\newcommand{\exindex}[1]{\indexii{exception}{#1@{\py@idxcode{#1}}}} -\newcommand{\obindex}[1]{\indexii{object}{#1}} -\newcommand{\bifuncindex}[1]{% - \index{#1@{\py@idxcode{#1()}} (built-in function)}} - -% Add an index entry for a module -\newcommand{\py@refmodule}[2]{\index{#1@{\py@idxcode{#1}} (#2module)}} -\newcommand{\refmodindex}[1]{\py@refmodule{#1}{}} -\newcommand{\refbimodindex}[1]{\py@refmodule{#1}{built-in }} -\newcommand{\refexmodindex}[1]{\py@refmodule{#1}{extension }} -\newcommand{\refstmodindex}[1]{\py@refmodule{#1}{standard }} - % support for the module index \newif\ifpy@UseModuleIndex \py@UseModuleIndexfalse @@ -256,7 +232,6 @@ % Add the defining entry for a module \newcommand{\py@modindex}[2]{% \renewcommand{\py@thismodule}{#1} - \index{#1@{\py@idxcode{#1}} (#2module)}% \ifpy@UseModuleIndex% \@ifundefined{py@modplat@\py@thismodulekey}{ \write\modindexfile{\protect\indexentry{#1@{\texttt{#1}}|hyperpage}{\thepage}}% @@ -273,12 +248,6 @@ \newcommand{\py@thismoduletype}{} \newcommand{\py@emptymodule}{} -% Module index types -\newcommand{\py@standardIndexModule}[1]{\py@modindex{#1}{standard }} -\newcommand{\py@builtinIndexModule}[1]{\py@modindex{#1}{built-in }} -\newcommand{\py@extensionIndexModule}[1]{\py@modindex{#1}{extension }} -\newcommand{\py@IndexModule}[1]{\py@modindex{#1}{}} - % \declaremodule[key]{type}{name} \newcommand{\declaremodule}[3][\py@modulebadkey]{ \renewcommand{\py@thismoduletype}{#2} @@ -287,12 +256,7 @@ \else \renewcommand{\py@thismodulekey}{#1} \fi - \@ifundefined{py@#2IndexModule}{% - \typeout{*** MACRO declaremodule called with unknown module type: `#2'} - \py@IndexModule{#3}% - }{% - \csname py@#2IndexModule\endcsname{#3}% - } + \py@modindex{#3}{} %\label{module-\py@thismodulekey} } @@ -415,40 +379,30 @@ % tools/anno-api.py; it pulls the value from the refcounts database. \newcommand{\cfuncline}[3]{ \py@sigline{\code{#1 \bfcode{#2}}}{#3}% - \index{#2@{\py@idxcode{#2()}}} } -\newenvironment{cfuncdesc}[4][\py@badkey]{ +\newenvironment{cfuncdesc}[3]{ \begin{fulllineitems} - \cfuncline{#2}{#3}{#4} - \ifx\@undefined#1\relax\else% - \emph{Return value: \textbf{#1}.}\\ - \fi + \cfuncline{#1}{#2}{#3} }{\end{fulllineitems}} % C variables ------------------------------------------------------------ % \begin{cvardesc}{type}{name} \newenvironment{cvardesc}[2]{ \begin{fulllineitems} - \item[\code{#1 \bfcode{#2}}\index{#2@{\py@idxcode{#2}}}] + \item[\code{#1 \bfcode{#2}}] }{\end{fulllineitems}} % C data types ----------------------------------------------------------- % \begin{ctypedesc}[index name]{typedef name} \newenvironment{ctypedesc}[2][\py@badkey]{ \begin{fulllineitems} - \item[\bfcode{#2}% - \ifx\@undefined#1\relax% - \index{#2@{\py@idxcode{#2}} (C type)} - \else% - \index{#2@{\py@idxcode{#1}} (C type)} - \fi] + \item[\bfcode{#2}] }{\end{fulllineitems}} % C type fields ---------------------------------------------------------- % \begin{cmemberdesc}{container type}{ctype}{membername} \newcommand{\cmemberline}[3]{ \item[\code{#2 \bfcode{#3}}] - \index{#3@{\py@idxcode{#3}} (#1 member)} } \newenvironment{cmemberdesc}[3]{ \begin{fulllineitems} @@ -460,18 +414,13 @@ % -- "simple" because it has no args; NOT for constant definitions! \newenvironment{csimplemacrodesc}[1]{ \begin{fulllineitems} - \item[\bfcode{#1}\index{#1@{\py@idxcode{#1}} (macro)}] + \item[\bfcode{#1}] }{\end{fulllineitems}} % simple functions (not methods) ----------------------------------------- % \begin{funcdesc}{name}{args} \newcommand{\funcline}[2]{% - \funclineni{#1}{#2}% - \ifx\py@thismodule\py@emptymodule% - \index{#1@{\py@idxcode{#1()}}}% - \else% - \index{#1@{\py@idxcode{#1()}} (in module \py@thismodule)}% - \fi} + \funclineni{#1}{#2}} \newenvironment{funcdesc}[2]{ \begin{fulllineitems} \funcline{#1}{#2} @@ -488,12 +437,7 @@ % classes ---------------------------------------------------------------- % \begin{classdesc}{name}{constructor args} \newcommand{\classline}[2]{ - \py@sigline{\strong{class }\bfcode{#1}}{#2}% - \ifx\py@thismodule\py@emptymodule% - \index{#1@{\py@idxcode{#1}} (class)}% - \else% - \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}% - \fi} + \py@sigline{\strong{class }\bfcode{#1}}{#2}} \newenvironment{classdesc}[2]{ % Using \renewcommand doesn't work for this, for unknown reasons: \global\def\py@thisclass{#1} @@ -515,12 +459,7 @@ % Using \renewcommand doesn't work for this, for unknown reasons: \global\def\py@thisclass{#1} \begin{fulllineitems} - \item[\strong{class }\code{\bfcode{#1}}% - \ifx\py@thismodule\py@emptymodule% - \index{#1@{\py@idxcode{#1}} (class)}% - \else% - \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}% - \fi] + \item[\strong{class }\code{\bfcode{#1}}] }{\end{fulllineitems}} % \begin{excclassdesc}{name}{constructor args} @@ -530,11 +469,6 @@ \global\def\py@thisclass{#1} \begin{fulllineitems} \py@sigline{\strong{exception }\bfcode{#1}}{#2}% - \ifx\py@thismodule\py@emptymodule% - \index{#1@{\py@idxcode{#1}} (exception)}% - \else% - \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}% - \fi }{\end{fulllineitems}} % There is no corresponding {excclassdesc*} environment. To describe @@ -547,11 +481,6 @@ % \begin{methoddesc}[classname]{methodname}{args} \newcommand{\methodline}[3][\@undefined]{ \methodlineni{#2}{#3} - \ifx\@undefined#1\relax - \index{#2@{\py@idxcode{#2()}} (\py@thisclass\ method)} - \else - \index{#2@{\py@idxcode{#2()}} (#1 method)} - \fi } \newenvironment{methoddesc}[3][\@undefined]{ \begin{fulllineitems} @@ -576,11 +505,6 @@ % \begin{staticmethoddesc}[classname]{methodname}{args} \newcommand{\staticmethodline}[3][\@undefined]{ \staticmethodlineni{#2}{#3} - \ifx\@undefined#1\relax - \index{#2@{\py@idxcode{#2()}} (\py@thisclass\ static method)} - \else - \index{#2@{\py@idxcode{#2()}} (#1 static method)} - \fi } \newenvironment{staticmethoddesc}[3][\@undefined]{ \begin{fulllineitems} @@ -606,10 +530,8 @@ \newcommand{\memberline}[2][\py@classbadkey]{% \ifx\@undefined#1\relax \memberlineni{#2} - \index{#2@{\py@idxcode{#2}} (\py@thisclass\ attribute)} \else \memberlineni{#2} - \index{#2@{\py@idxcode{#2}} (#1 attribute)} \fi } \newenvironment{memberdesc}[2][\py@classbadkey]{ @@ -635,22 +557,13 @@ % -- for constructor information, use excclassdesc instead \newenvironment{excdesc}[1]{ \begin{fulllineitems} - \item[\strong{exception }\bfcode{#1}% - \ifx\py@thismodule\py@emptymodule% - \index{#1@{\py@idxcode{#1}} (exception)}% - \else% - \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}% - \fi] + \item[\strong{exception }\bfcode{#1}] }{\end{fulllineitems}} % Module data or constants: ---------------------------------------------- % \begin{datadesc}{name} \newcommand{\dataline}[1]{% - \datalineni{#1}\ifx\py@thismodule\py@emptymodule% - \index{#1@{\py@idxcode{#1}} (data)}% - \else% - \index{#1@{\py@idxcode{#1}} (data in \py@thismodule)}% - \fi} + \datalineni{#1}} \newenvironment{datadesc}[1]{ \begin{fulllineitems} \dataline{#1} @@ -722,90 +635,32 @@ } % Some are quite plain: -\newcommand{\py@noticelabel@note}{Note:} \newcommand{\py@noticestart@note}{} \newcommand{\py@noticeend@note}{} -\newcommand{\py@noticelabel@hint}{Hint:} \newcommand{\py@noticestart@hint}{} \newcommand{\py@noticeend@hint}{} -\newcommand{\py@noticelabel@important}{Important:} \newcommand{\py@noticestart@important}{} \newcommand{\py@noticeend@important}{} -\newcommand{\py@noticelabel@tip}{Tip:} \newcommand{\py@noticestart@tip}{} \newcommand{\py@noticeend@tip}{} % Others gets more visible distinction: -\newcommand{\py@noticelabel@warning}{Warning:} \newcommand{\py@noticestart@warning}{\py@heavybox} \newcommand{\py@noticeend@warning}{\py@endheavybox} -\newcommand{\py@noticelabel@caution}{Caution:} \newcommand{\py@noticestart@caution}{\py@heavybox} \newcommand{\py@noticeend@caution}{\py@endheavybox} -\newcommand{\py@noticelabel@attention}{Attention:} \newcommand{\py@noticestart@attention}{\py@heavybox} \newcommand{\py@noticeend@attention}{\py@endheavybox} -\newcommand{\py@noticelabel@danger}{Danger:} \newcommand{\py@noticestart@danger}{\py@heavybox} \newcommand{\py@noticeend@danger}{\py@endheavybox} -\newcommand{\py@noticelabel@error}{Error:} \newcommand{\py@noticestart@error}{\py@heavybox} \newcommand{\py@noticeend@error}{\py@endheavybox} - -\newenvironment{notice}[1][note]{ +\newenvironment{notice}[2]{ \def\py@noticetype{#1} \csname py@noticestart@#1\endcsname - \par\strong{\csname py@noticelabel@#1\endcsname} + \par\strong{#2} }{\csname py@noticeend@\py@noticetype\endcsname} -\newcommand{\note}[1]{\strong{\py@noticelabel@note} #1} -\newcommand{\warning}[1]{\strong{\py@noticelabel@warning} #1} - -% Deprecation stuff. -% Should be extended to allow an index / list of deprecated stuff. But -% there's a lot of stuff that needs to be done to make that automatable. -% -% First parameter is the release number that deprecates the feature, the -% second is the action the should be taken by users of the feature. -% -% Example: -% \deprecated{1.5.1}{Use \method{frobnicate()} instead.} -% -\newcommand{\deprecated}[2]{% - \strong{Deprecated since release #1.} #2\par} - -% New stuff. -% This should be used to mark things which have been added to the -% development tree but that aren't in the release, but are documented. -% This allows release of documentation that already includes updated -% descriptions. Place at end of descriptor environment. -% -% Example: -% \versionadded{1.5.2} -% \versionchanged[short explanation]{2.0} -% -\newcommand{\versionadded}[2][\py@badkey]{% - \ifx\@undefined#1\relax% - { New in version #2. }% - \else% - { New in version #2:\ #1 }% - \fi% -} -\newcommand{\versionchanged}[2][\py@badkey]{% - \ifx\@undefined#1\relax% - { Changed in version #2. }% - \else% - { Changed in version #2:\ #1 }% - \fi% -} - - -% See-also environment -\newenvironment{seealso}{ - \par - \strong{See Also:} - \par -}{\par} % Allow the release number to be specified independently of the % \date{}. This allows the date to reflect the document's date and diff --git a/sphinx/textwriter.py b/sphinx/textwriter.py index 326042307..c0346da0f 100644 --- a/sphinx/textwriter.py +++ b/sphinx/textwriter.py @@ -15,6 +15,7 @@ import textwrap from docutils import nodes, writers from sphinx import addnodes +from sphinx.locale import admonitionlabels, versionlabels class TextWriter(writers.Writer): @@ -147,7 +148,7 @@ class TextTranslator(nodes.NodeVisitor): def visit_module(self, node): if node.has_key('platform'): self.new_state(0) - self.add_text('Platform: %s' % node['platform']) + self.add_text(_('Platform: %s') % node['platform']) self.end_state() raise nodes.SkipNode @@ -349,7 +350,7 @@ class TextTranslator(nodes.NodeVisitor): raise nodes.SkipNode def visit_image(self, node): - self.add_text('[image]') + self.add_text(_('[image]')) raise nodes.SkipNode def visit_transition(self, node): @@ -446,46 +447,38 @@ class TextTranslator(nodes.NodeVisitor): def depart_admonition(self, node): self.end_state() - def _make_visit_admonition(name): - def visit_admonition(self, node): - self.new_state(2) - return visit_admonition + def visit_admonition(self, node): + self.new_state(2) def _make_depart_admonition(name): def depart_admonition(self, node): - self.end_state(first=name.capitalize() + ': ') + self.end_state(first=admonitionlabels[name] + ': ') return depart_admonition - visit_attention = _make_visit_admonition('attention') + visit_attention = visit_admonition depart_attention = _make_depart_admonition('attention') - visit_caution = _make_visit_admonition('caution') + visit_caution = visit_admonition depart_caution = _make_depart_admonition('caution') - visit_danger = _make_visit_admonition('danger') + visit_danger = visit_admonition depart_danger = _make_depart_admonition('danger') - visit_error = _make_visit_admonition('error') + visit_error = visit_admonition depart_error = _make_depart_admonition('error') - visit_hint = _make_visit_admonition('hint') + visit_hint = visit_admonition depart_hint = _make_depart_admonition('hint') - visit_important = _make_visit_admonition('important') + visit_important = visit_admonition depart_important = _make_depart_admonition('important') - visit_note = _make_visit_admonition('note') + visit_note = visit_admonition depart_note = _make_depart_admonition('note') - visit_tip = _make_visit_admonition('tip') + visit_tip = visit_admonition depart_tip = _make_depart_admonition('tip') - visit_warning = _make_visit_admonition('warning') + visit_warning = visit_admonition depart_warning = _make_depart_admonition('warning') def visit_versionmodified(self, node): self.new_state(0) - if node['type'] == 'versionadded': - tmpl = 'Added in version %s' - elif node['type'] == 'versionchanged': - tmpl = 'Changed in version %s' - elif node['type'] == 'deprecated': - tmpl = 'Deprecated in version %s' if node.children: - self.add_text(tmpl % node['version'] + ': ') + self.add_text(versionlabels[node['type']] % node['version'] + ': ') else: - self.add_text(tmpl % node['version'] + '.') + self.add_text(versionlabels[node['type']] % node['version'] + '.') def depart_versionmodified(self, node): self.end_state() @@ -606,4 +599,4 @@ class TextTranslator(nodes.NodeVisitor): raise nodes.SkipNode def unknown_visit(self, node): - raise NotImplementedError("Unknown node: " + node.__class__.__name__) + raise NotImplementedError('Unknown node: ' + node.__class__.__name__) diff --git a/sphinx/util/smartypants.py b/sphinx/util/smartypants.py index 0c5cdabc3..42f20f366 100644 --- a/sphinx/util/smartypants.py +++ b/sphinx/util/smartypants.py @@ -189,7 +189,7 @@ def educateQuotes(s): return s.replace('"', "“") -def educateQuotesLatex(s): +def educateQuotesLatex(s, dquotes=("``", "''")): """ Parameter: String. @@ -227,7 +227,7 @@ def educateQuotesLatex(s): s = s.replace('"', "\x01") # Finally, replace all helpers with quotes. - return s.replace("\x01", "``").replace("\x02", "''").\ + return s.replace("\x01", dquotes[0]).replace("\x02", dquotes[1]).\ replace("\x03", "`").replace("\x04", "'") diff --git a/tests/test_i18n.py b/tests/test_i18n.py new file mode 100644 index 000000000..2e214ad87 --- /dev/null +++ b/tests/test_i18n.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +""" + test_i18n + ~~~~~~~~~ + + Test locale features. + + :copyright: 2008 by Georg Brandl. + :license: BSD. +""" + +from util import * + + +@with_testapp(confoverrides={'language': 'de'}) +def test_i18n(app): + app.builder.build_all()