summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-08-05 00:04:39 +0200
committerGeorg Brandl <georg@python.org>2009-08-05 00:04:39 +0200
commita9a518474e8e1b03f60bd5186c4cd8404684fb99 (patch)
tree21a07a0946bfcbd4998733191af410ec9b51915f /sphinx
parent6e4fc36e06e3eebf906e2e4f14a61e9f2b591cd5 (diff)
parentd152a5ec24e65072108e1f0a87be70e231c54a72 (diff)
downloadsphinx-a9a518474e8e1b03f60bd5186c4cd8404684fb99.tar.gz
merge with 0.6
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/__init__.py4
-rw-r--r--sphinx/application.py114
-rw-r--r--sphinx/builder.py28
-rw-r--r--sphinx/builders/__init__.py76
-rw-r--r--sphinx/builders/changes.py1
-rw-r--r--sphinx/builders/devhelp.py136
-rw-r--r--sphinx/builders/html.py63
-rw-r--r--sphinx/config.py12
-rw-r--r--sphinx/directives/code.py11
-rw-r--r--sphinx/directives/desc.py462
-rw-r--r--sphinx/directives/other.py73
-rw-r--r--sphinx/domains.py779
-rw-r--r--sphinx/environment.py296
-rw-r--r--sphinx/ext/autodoc.py20
-rw-r--r--sphinx/ext/autosummary/__init__.py336
-rw-r--r--sphinx/ext/autosummary/generate.py404
-rw-r--r--sphinx/ext/autosummary/templates/autosummary/base.rst6
-rw-r--r--sphinx/ext/autosummary/templates/autosummary/class.rst30
-rw-r--r--sphinx/ext/autosummary/templates/autosummary/module.rst37
-rw-r--r--sphinx/ext/autosummary/templates/module39
-rw-r--r--sphinx/ext/coverage.py14
-rw-r--r--sphinx/ext/extlinks.py54
-rw-r--r--sphinx/ext/ifconfig.py3
-rw-r--r--sphinx/ext/inheritance_diagram.py1
-rw-r--r--sphinx/ext/todo.py2
-rw-r--r--sphinx/highlighting.py13
-rw-r--r--sphinx/jinja2glue.py4
-rw-r--r--sphinx/locale/__init__.py190
-rw-r--r--sphinx/locale/ca/LC_MESSAGES/sphinx.js1
-rw-r--r--sphinx/locale/ca/LC_MESSAGES/sphinx.mobin0 -> 8114 bytes
-rw-r--r--sphinx/locale/ca/LC_MESSAGES/sphinx.po606
-rw-r--r--sphinx/locale/cs/LC_MESSAGES/sphinx.po50
-rw-r--r--sphinx/locale/de/LC_MESSAGES/sphinx.mobin8240 -> 8240 bytes
-rw-r--r--sphinx/locale/de/LC_MESSAGES/sphinx.po50
-rw-r--r--sphinx/locale/es/LC_MESSAGES/sphinx.po50
-rw-r--r--sphinx/locale/fi/LC_MESSAGES/sphinx.js2
-rw-r--r--sphinx/locale/fi/LC_MESSAGES/sphinx.mobin7537 -> 7563 bytes
-rw-r--r--sphinx/locale/fi/LC_MESSAGES/sphinx.po55
-rw-r--r--sphinx/locale/fr/LC_MESSAGES/sphinx.po50
-rw-r--r--sphinx/locale/it/LC_MESSAGES/sphinx.po50
-rw-r--r--sphinx/locale/ja/LC_MESSAGES/sphinx.po50
-rw-r--r--sphinx/locale/nl/LC_MESSAGES/sphinx.po50
-rw-r--r--sphinx/locale/pl/LC_MESSAGES/sphinx.js2
-rw-r--r--sphinx/locale/pl/LC_MESSAGES/sphinx.mobin7174 -> 8107 bytes
-rw-r--r--sphinx/locale/pl/LC_MESSAGES/sphinx.po415
-rw-r--r--sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po50
-rw-r--r--sphinx/locale/ru/LC_MESSAGES/sphinx.po50
-rw-r--r--sphinx/locale/sl/LC_MESSAGES/sphinx.js2
-rw-r--r--sphinx/locale/sl/LC_MESSAGES/sphinx.mobin7208 -> 8010 bytes
-rw-r--r--sphinx/locale/sl/LC_MESSAGES/sphinx.po171
-rw-r--r--sphinx/locale/sphinx.pot144
-rw-r--r--sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po50
-rw-r--r--sphinx/locale/zh_CN/LC_MESSAGES/sphinx.js1
-rw-r--r--sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mobin0 -> 7906 bytes
-rw-r--r--sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po620
-rw-r--r--sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po50
-rw-r--r--sphinx/quickstart.py34
-rw-r--r--sphinx/roles.py230
-rw-r--r--sphinx/search.py40
-rw-r--r--sphinx/texinputs/sphinxhowto.cls (renamed from sphinx/texinputs/howto.cls)21
-rw-r--r--sphinx/texinputs/sphinxmanual.cls (renamed from sphinx/texinputs/manual.cls)24
-rw-r--r--sphinx/themes/basic/layout.html15
-rw-r--r--sphinx/themes/basic/static/basic.css2
-rw-r--r--sphinx/themes/basic/static/searchtools.js13
-rw-r--r--sphinx/themes/default/static/default.css_t9
-rw-r--r--sphinx/themes/default/theme.conf1
-rw-r--r--sphinx/themes/scrolls/artwork/logo.svg107
-rw-r--r--sphinx/themes/scrolls/genindex.html36
-rw-r--r--sphinx/themes/scrolls/layout.html96
-rw-r--r--sphinx/themes/scrolls/modindex.html43
-rw-r--r--sphinx/themes/scrolls/opensearch.xml9
-rw-r--r--sphinx/themes/scrolls/page.html4
-rw-r--r--sphinx/themes/scrolls/search.html35
-rw-r--r--sphinx/themes/scrolls/static/darkmetal.pngbin0 -> 44361 bytes
-rw-r--r--sphinx/themes/scrolls/static/headerbg.pngbin0 -> 298 bytes
-rw-r--r--sphinx/themes/scrolls/static/logo.pngbin0 -> 11078 bytes
-rw-r--r--sphinx/themes/scrolls/static/metal.pngbin0 -> 21543 bytes
-rw-r--r--sphinx/themes/scrolls/static/navigation.pngbin0 -> 217 bytes
-rw-r--r--sphinx/themes/scrolls/static/print.css5
-rw-r--r--sphinx/themes/scrolls/static/style.css_t398
-rw-r--r--sphinx/themes/scrolls/static/theme_extras.js26
-rw-r--r--sphinx/themes/scrolls/static/watermark.pngbin0 -> 107625 bytes
-rw-r--r--sphinx/themes/scrolls/static/watermark_blur.pngbin0 -> 14470 bytes
-rw-r--r--sphinx/themes/scrolls/theme.conf11
-rw-r--r--sphinx/theming.py2
-rw-r--r--sphinx/util/__init__.py62
-rw-r--r--sphinx/writers/latex.py23
-rw-r--r--sphinx/writers/text.py2
88 files changed, 4996 insertions, 2029 deletions
diff --git a/sphinx/__init__.py b/sphinx/__init__.py
index 17b37823..e3feebae 100644
--- a/sphinx/__init__.py
+++ b/sphinx/__init__.py
@@ -12,8 +12,8 @@
import sys
from os import path
-__version__ = '0.6.2+'
-__released__ = '0.6.2' # used when Sphinx builds its own docs
+__version__ = '1.0pre'
+__released__ = '1.0 (hg)' # used when Sphinx builds its own docs
package_dir = path.abspath(path.dirname(__file__))
diff --git a/sphinx/application.py b/sphinx/application.py
index 972c427c..ed17f1a6 100644
--- a/sphinx/application.py
+++ b/sphinx/application.py
@@ -14,18 +14,21 @@
import sys
import types
import posixpath
+from os import path
from cStringIO import StringIO
from docutils import nodes
from docutils.parsers.rst import directives, roles
import sphinx
-from sphinx.roles import xfileref_role, innernodetypes
+from sphinx import package_dir, locale
+from sphinx.roles import XRefRole
from sphinx.config import Config
from sphinx.errors import SphinxError, SphinxWarning, ExtensionError
+from sphinx.domains import all_domains
from sphinx.builders import BUILTIN_BUILDERS
from sphinx.directives import GenericDesc, Target, additional_xref_types
-from sphinx.environment import SphinxStandaloneReader
+from sphinx.environment import BuildEnvironment, SphinxStandaloneReader
from sphinx.util import pycompat
from sphinx.util.tags import Tags
from sphinx.util.compat import Directive, directive_dwim
@@ -49,6 +52,7 @@ events = {
}
CONFIG_FILENAME = 'conf.py'
+ENV_PICKLE_FILENAME = 'environment.pickle'
class Sphinx(object):
@@ -61,6 +65,7 @@ class Sphinx(object):
self._listeners = {}
self.builderclasses = BUILTIN_BUILDERS.copy()
self.builder = None
+ self.env = None
self.srcdir = srcdir
self.confdir = confdir
@@ -103,8 +108,62 @@ class Sphinx(object):
# now that we know all config values, collect them from conf.py
self.config.init_values()
+ # set up translation infrastructure
+ self._init_i18n()
+ # set up the build environment
+ self._init_env(freshenv)
+ # set up the builder
+ self._init_builder(buildername)
+
+ def _init_i18n(self):
+ """
+ Load translated strings from the configured localedirs if
+ enabled in the configuration.
+ """
+ if self.config.language is not None:
+ self.info(bold('loading translations [%s]... ' %
+ self.config.language), nonl=True)
+ locale_dirs = [None, path.join(package_dir, 'locale')] + \
+ [path.join(self.srcdir, x) for x in self.config.locale_dirs]
+ else:
+ locale_dirs = []
+ self.translator, has_translation = locale.init(locale_dirs,
+ self.config.language)
+ if self.config.language is not None:
+ if has_translation:
+ self.info('done')
+ else:
+ self.info('locale not available')
+
+ def _init_env(self, freshenv):
+ if freshenv:
+ self.env = BuildEnvironment(self.srcdir, self.doctreedir,
+ self.config)
+ self.env.find_files(self.config)
+ for domain in all_domains.keys():
+ self.env.domains[domain] = all_domains[domain](self.env)
+ else:
+ try:
+ self.info(bold('loading pickled environment... '), nonl=True)
+ self.env = BuildEnvironment.frompickle(self.config,
+ path.join(self.doctreedir, ENV_PICKLE_FILENAME))
+ self.env.domains = {}
+ for domain in all_domains.keys():
+ # this can raise if the data version doesn't fit
+ self.env.domains[domain] = all_domains[domain](self.env)
+ self.info('done')
+ except Exception, err:
+ if type(err) is IOError and err.errno == 2:
+ self.info('not yet created')
+ else:
+ self.info('failed: %s' % err)
+ return self._init_env(freshenv=True)
+
+ self.env.set_warnfunc(self.warn)
+
+ def _init_builder(self, buildername):
if buildername is None:
- print >>status, 'No builder selected, using default: html'
+ print >>self._status, 'No builder selected, using default: html'
buildername = 'html'
if buildername not in self.builderclasses:
raise SphinxError('Builder name %s not registered' % buildername)
@@ -115,9 +174,7 @@ class Sphinx(object):
mod, cls = builderclass
builderclass = getattr(
__import__('sphinx.builders.' + mod, None, None, [cls]), cls)
- self.builder = builderclass(self, freshenv=freshenv)
- self.builder.tags = self.tags
- self.builder.tags.add(self.builder.format)
+ self.builder = builderclass(self)
self.emit('builder-inited')
def build(self, all_files, filenames):
@@ -277,17 +334,21 @@ class Sphinx(object):
if depart:
setattr(translator, 'depart_'+node.__name__, depart)
- def add_directive(self, name, obj, content=None, arguments=None, **options):
+ def _directive_helper(self, obj, content=None, arguments=None, **options):
if isinstance(obj, clstypes) and issubclass(obj, Directive):
if content or arguments or options:
raise ExtensionError('when adding directive classes, no '
'additional arguments may be given')
- directives.register_directive(name, directive_dwim(obj))
+ return directive_dwim(obj)
else:
obj.content = content
obj.arguments = arguments
obj.options = options
- directives.register_directive(name, obj)
+ return obj
+
+ def add_directive(self, name, obj, content=None, arguments=None, **options):
+ directives.register_directive(
+ name, self._directive_helper(obj, content, arguments, **options))
def add_role(self, name, role):
roles.register_local_role(name, role)
@@ -298,23 +359,41 @@ class Sphinx(object):
role = roles.GenericRole(name, nodeclass)
roles.register_local_role(name, role)
+ def add_domain(self, domain):
+ # XXX needs to be documented
+ if domain.name in all_domains:
+ raise ExtensionError('domain %s already registered' % domain.name)
+ all_domains[domain.name] = domain
+
+ def add_directive_to_domain(self, domain, name, obj):
+ # XXX needs to be documented
+ if domain not in all_domains:
+ raise ExtensionError('domain %s not yet registered' % domain)
+ all_domains[domain].directives[name] = self._directive_helper(obj)
+
+ def add_role_to_domain(self, domain, name, role):
+ # XXX needs to be documented
+ if domain not in all_domains:
+ raise ExtensionError('domain %s not yet registered' % domain)
+ all_domains[domain].roles[name] = role
+
def add_description_unit(self, directivename, rolename, indextemplate='',
parse_node=None, ref_nodeclass=None):
additional_xref_types[directivename] = (rolename, indextemplate,
parse_node)
directives.register_directive(directivename,
directive_dwim(GenericDesc))
- roles.register_local_role(rolename, xfileref_role)
- if ref_nodeclass is not None:
- innernodetypes[rolename] = ref_nodeclass
+ # XXX support more options?
+ role_func = XRefRole(innernodeclass=ref_nodeclass)
+ roles.register_local_role(rolename, role_func)
def add_crossref_type(self, directivename, rolename, indextemplate='',
ref_nodeclass=None):
additional_xref_types[directivename] = (rolename, indextemplate, None)
directives.register_directive(directivename, directive_dwim(Target))
- roles.register_local_role(rolename, xfileref_role)
- if ref_nodeclass is not None:
- innernodetypes[rolename] = ref_nodeclass
+ # XXX support more options
+ role_func = XRefRole(innernodeclass=ref_nodeclass)
+ roles.register_local_role(rolename, role_func)
def add_transform(self, transform):
SphinxStandaloneReader.transforms.append(transform)
@@ -324,6 +403,11 @@ class Sphinx(object):
StandaloneHTMLBuilder.script_files.append(
posixpath.join('_static', filename))
+ def add_stylesheet(self, filename):
+ from sphinx.builders.html import StandaloneHTMLBuilder
+ StandaloneHTMLBuilder.css_files.append(
+ posixpath.join('_static', filename))
+
def add_lexer(self, alias, lexer):
from sphinx.highlighting import lexers
if lexers is None:
diff --git a/sphinx/builder.py b/sphinx/builder.py
deleted file mode 100644
index 13c56e18..00000000
--- a/sphinx/builder.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- sphinx.builder
- ~~~~~~~~~~~~~~
-
- .. warning::
-
- This module is only kept for API compatibility; new code should
- import these classes directly from the sphinx.builders package.
-
- :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
-
-import warnings
-
-from sphinx.builders import Builder
-from sphinx.builders.text import TextBuilder
-from sphinx.builders.html import StandaloneHTMLBuilder, WebHTMLBuilder, \
- PickleHTMLBuilder, JSONHTMLBuilder
-from sphinx.builders.latex import LaTeXBuilder
-from sphinx.builders.changes import ChangesBuilder
-from sphinx.builders.htmlhelp import HTMLHelpBuilder
-from sphinx.builders.linkcheck import CheckExternalLinksBuilder
-
-warnings.warn('The sphinx.builder module is deprecated; please import '
- 'builders from the respective sphinx.builders submodules.',
- DeprecationWarning, stacklevel=2)
diff --git a/sphinx/builders/__init__.py b/sphinx/builders/__init__.py
index 3fb0d469..08628c7b 100644
--- a/sphinx/builders/__init__.py
+++ b/sphinx/builders/__init__.py
@@ -15,9 +15,7 @@ from os import path
from docutils import nodes
-from sphinx import package_dir, locale
from sphinx.util import SEP, relative_uri
-from sphinx.environment import BuildEnvironment
from sphinx.util.console import bold, purple, darkgreen, term_width_line
# side effect: registers roles and directives
@@ -25,9 +23,6 @@ from sphinx import roles
from sphinx import directives
-ENV_PICKLE_FILENAME = 'environment.pickle'
-
-
class Builder(object):
"""
Builds target formats from the reST sources.
@@ -38,7 +33,8 @@ class Builder(object):
# builder's output format, or '' if no document output is produced
format = ''
- def __init__(self, app, env=None, freshenv=False):
+ def __init__(self, app):
+ self.env = app.env
self.srcdir = app.srcdir
self.confdir = app.confdir
self.outdir = app.outdir
@@ -50,21 +46,15 @@ class Builder(object):
self.warn = app.warn
self.info = app.info
self.config = app.config
-
- self.load_i18n()
+ self.tags = app.tags
+ self.tags.add(self.format)
# images that need to be copied over (source -> dest)
self.images = {}
- # if None, this is set in load_env()
- self.env = env
- self.freshenv = freshenv
-
self.init()
- self.load_env()
# helper methods
-
def init(self):
"""
Load necessary templates and perform initialization. The default
@@ -167,62 +157,6 @@ class Builder(object):
# build methods
- def load_i18n(self):
- """
- Load translated strings from the configured localedirs if
- enabled in the configuration.
- """
- self.translator = None
- if self.config.language is not None:
- self.info(bold('loading translations [%s]... ' %
- self.config.language), nonl=True)
- # the None entry is the system's default locale path
- locale_dirs = [None, path.join(package_dir, 'locale')] + \
- [path.join(self.srcdir, x) for x in self.config.locale_dirs]
- for dir_ in locale_dirs:
- try:
- trans = gettext.translation('sphinx', localedir=dir_,
- languages=[self.config.language])
- if self.translator is None:
- self.translator = trans
- else:
- self.translator._catalog.update(trans.catalog)
- except Exception:
- # Language couldn't be found in the specified path
- pass
- if self.translator is not None:
- self.info('done')
- else:
- self.info('locale not available')
- 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."""
- if self.env:
- return
- if not self.freshenv:
- try:
- self.info(bold('loading pickled environment... '), nonl=True)
- self.env = BuildEnvironment.frompickle(self.config,
- path.join(self.doctreedir, ENV_PICKLE_FILENAME))
- self.info('done')
- except Exception, err:
- if type(err) is IOError and err.errno == 2:
- self.info('not found')
- else:
- self.info('failed: %s' % err)
- self.env = BuildEnvironment(self.srcdir, self.doctreedir,
- self.config)
- self.env.find_files(self.config)
- else:
- self.env = BuildEnvironment(self.srcdir, self.doctreedir,
- self.config)
- self.env.find_files(self.config)
- self.env.set_warnfunc(self.warn)
-
def build_all(self):
"""Build all source files."""
self.build(None, summary='all source files', method='all')
@@ -302,6 +236,7 @@ class Builder(object):
if updated_docnames:
# save the environment
+ from sphinx.application import ENV_PICKLE_FILENAME
self.info(bold('pickling environment... '), nonl=True)
self.env.topickle(path.join(self.doctreedir, ENV_PICKLE_FILENAME))
self.info('done')
@@ -386,6 +321,7 @@ BUILTIN_BUILDERS = {
'json': ('html', 'JSONHTMLBuilder'),
'web': ('html', 'PickleHTMLBuilder'),
'htmlhelp': ('htmlhelp', 'HTMLHelpBuilder'),
+ 'devhelp': ('devhelp', 'DevhelpBuilder'),
'qthelp': ('qthelp', 'QtHelpBuilder'),
'latex': ('latex', 'LaTeXBuilder'),
'text': ('text', 'TextBuilder'),
diff --git a/sphinx/builders/changes.py b/sphinx/builders/changes.py
index e07b06d8..ad0b8d19 100644
--- a/sphinx/builders/changes.py
+++ b/sphinx/builders/changes.py
@@ -94,6 +94,7 @@ class ChangesBuilder(Builder):
'libchanges': sorted(libchanges.iteritems()),
'apichanges': sorted(apichanges),
'otherchanges': sorted(otherchanges.iteritems()),
+ 'show_copyright': self.config.html_show_copyright,
'show_sphinx': self.config.html_show_sphinx,
}
f = codecs.open(path.join(self.outdir, 'index.html'), 'w', 'utf8')
diff --git a/sphinx/builders/devhelp.py b/sphinx/builders/devhelp.py
new file mode 100644
index 00000000..e5a9a453
--- /dev/null
+++ b/sphinx/builders/devhelp.py
@@ -0,0 +1,136 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.builders.devhelp
+ ~~~~~~~~~~~~~~~~~~~~~~~
+
+ Build HTML documentation and Devhelp_ support files.
+
+ .. _Devhelp: http://live.gnome.org/devhelp
+
+ :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import os
+import re
+import cgi
+import sys
+from os import path
+
+from docutils import nodes
+
+from sphinx import addnodes
+from sphinx.builders.html import StandaloneHTMLBuilder
+
+try:
+ import xml.etree.ElementTree as etree
+except ImportError:
+ try:
+ import lxml.etree as etree
+ except ImportError:
+ try:
+ import elementtree.ElementTree as etree
+ except ImportError:
+ import cElementTree as etree
+
+try:
+ import gzip
+ def comp_open(filename, mode='rb'):
+ return gzip.open(filename + '.gz', mode)
+except ImportError:
+ def comp_open(filename, mode='rb'):
+ return open(filename, mode)
+
+
+class DevhelpBuilder(StandaloneHTMLBuilder):
+ """
+ Builder that also outputs GNOME Devhelp file.
+
+ """
+ name = 'devhelp'
+
+ # don't copy the reST source
+ copysource = False
+ supported_image_types = ['image/png', 'image/gif', 'image/jpeg']
+
+ # don't add links
+ add_permalinks = False
+ # don't add sidebar etc.
+ embedded = True
+
+ def init(self):
+ StandaloneHTMLBuilder.init(self)
+ self.out_suffix = '.html'
+
+ def handle_finish(self):
+ self.build_devhelp(self.outdir, self.config.devhelp_basename)
+
+ def build_devhelp(self, outdir, outname):
+ self.info('dumping devhelp index...')
+
+ # Basic info
+ root = etree.Element('book',
+ title=self.config.html_title,
+ name=self.config.project,
+ link="index.html",
+ version=self.config.version)
+ tree = etree.ElementTree(root)
+
+ # TOC
+ chapters = etree.SubElement(root, 'chapters')
+
+ tocdoc = self.env.get_and_resolve_doctree(
+ self.config.master_doc, self, prune_toctrees=False)
+
+ def write_toc(node, parent):
+ if isinstance(node, addnodes.compact_paragraph) or \
+ isinstance(node, nodes.bullet_list):
+ for subnode in node:
+ write_toc(subnode, parent)
+ elif isinstance(node, nodes.list_item):
+ item = etree.SubElement(parent, 'sub')
+ for subnode in node:
+ write_toc(subnode, item)
+ elif isinstance(node, nodes.reference):
+ parent.attrib['link'] = node['refuri']
+ parent.attrib['name'] = node.astext().encode('utf-8')
+
+ def istoctree(node):
+ return isinstance(node, addnodes.compact_paragraph) and \
+ node.has_key('toctree')
+
+ for node in tocdoc.traverse(istoctree):
+ write_toc(node, chapters)
+
+ # Index
+ functions = etree.SubElement(root, 'functions')
+ index = self.env.create_index(self)
+
+ def write_index(title, refs, subitems):
+ if len(refs) == 0:
+ pass
+ elif len(refs) == 1:
+ etree.SubElement(functions, 'function',
+ name=title, link=refs[0])
+ else:
+ for i, ref in enumerate(refs):
+ etree.SubElement(functions, 'function',
+ name="[%d] %s" % (i, title),
+ link=ref)
+
+ if subitems:
+ parent_title = re.sub(r'\s*\(.*\)\s*$', '', title)
+ for subitem in subitems:
+ write_index("%s %s" % (parent_title, subitem[0]),
+ subitem[1], [])
+
+ for (key, group) in index:
+ for title, (refs, subitems) in group:
+ write_index(title, refs, subitems)
+
+ # Dump the XML file
+ f = comp_open(path.join(outdir, outname + '.devhelp'), 'w')
+ try:
+ tree.write(f)
+ finally:
+ f.close()
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index c2b00fb5..02f62164 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -22,7 +22,7 @@ except ImportError:
from docutils import nodes
from docutils.io import DocTreeInput, StringOutput
-from docutils.core import publish_parts
+from docutils.core import Publisher, publish_parts
from docutils.utils import new_document
from docutils.frontend import OptionParser
from docutils.readers.doctree import Reader as DoctreeReader
@@ -33,7 +33,8 @@ from sphinx.util import SEP, os_path, relative_uri, ensuredir, \
from sphinx.errors import SphinxError
from sphinx.search import js_index
from sphinx.theming import Theme
-from sphinx.builders import Builder, ENV_PICKLE_FILENAME
+from sphinx.builders import Builder
+from sphinx.application import ENV_PICKLE_FILENAME
from sphinx.highlighting import PygmentsBridge
from sphinx.util.console import bold
from sphinx.writers.html import HTMLWriter, HTMLTranslator, \
@@ -71,6 +72,11 @@ class StandaloneHTMLBuilder(Builder):
# This is a class attribute because it is mutated by Sphinx.add_javascript.
script_files = ['_static/jquery.js', '_static/doctools.js']
+ # Dito for this one.
+ css_files = []
+
+ # cached publisher object for snippets
+ _publisher = None
def init(self):
# a hash of all config values that, if changed, cause a full rebuild
@@ -110,7 +116,8 @@ class StandaloneHTMLBuilder(Builder):
style = self.theme.get_confstr('theme', 'pygments_style', 'none')
else:
style = 'sphinx'
- self.highlighter = PygmentsBridge('html', style)
+ self.highlighter = PygmentsBridge('html', style,
+ self.config.trim_doctest_flags)
def init_translator_class(self):
if self.config.html_translator_class:
@@ -180,13 +187,24 @@ class StandaloneHTMLBuilder(Builder):
"""Utility: Render a lone doctree node."""
doc = new_document('<partial node>')
doc.append(node)
- return publish_parts(
- doc,
- source_class=DocTreeInput,
- reader=DoctreeReader(),
- writer=HTMLWriter(self),
- settings_overrides={'output_encoding': 'unicode'}
- )
+
+ if self._publisher is None:
+ self._publisher = Publisher(
+ source_class = DocTreeInput,
+ destination_class=StringOutput)
+ self._publisher.set_components('standalone',
+ 'restructuredtext', 'pseudoxml')
+
+ pub = self._publisher
+
+ pub.reader = DoctreeReader()
+ pub.writer = HTMLWriter(self)
+ pub.process_programmatic_settings(
+ None, {'output_encoding': 'unicode'}, None)
+ pub.set_source(doc, None)
+ pub.set_destination(None, None)
+ pub.publish()
+ return pub.writer.parts
def prepare_writing(self, docnames):
from sphinx.search import IndexBuilder
@@ -222,7 +240,9 @@ class StandaloneHTMLBuilder(Builder):
rellinks = []
if self.config.html_use_index:
rellinks.append(('genindex', _('General Index'), 'I', _('index')))
- if self.config.html_use_modindex and self.env.modules:
+ # XXX generalization of modindex?
+ if self.config.html_use_modindex and \
+ self.env.domaindata['py']['modules']:
rellinks.append(('modindex', _('Global Module Index'),
'M', _('modules')))
@@ -244,11 +264,13 @@ class StandaloneHTMLBuilder(Builder):
use_opensearch = self.config.html_use_opensearch,
docstitle = self.config.html_title,
shorttitle = self.config.html_short_title,
+ show_copyright = self.config.html_show_copyright,
show_sphinx = self.config.html_show_sphinx,
has_source = self.config.html_copy_source,
show_source = self.config.html_show_sourcelink,
file_suffix = self.out_suffix,
script_files = self.script_files,
+ css_files = self.css_files,
sphinx_version = __version__,
style = stylename,
rellinks = rellinks,
@@ -385,12 +407,13 @@ class StandaloneHTMLBuilder(Builder):
# the global module index
- if self.config.html_use_modindex and self.env.modules:
+ moduleindex = self.env.domaindata['py']['modules']
+ if self.config.html_use_modindex and moduleindex:
# the sorted list of all modules, for the global module index
modules = sorted(((mn, (self.get_relative_uri('modindex', fn) +
'#module-' + mn, sy, pl, dep))
for (mn, (fn, sy, pl, dep)) in
- self.env.modules.iteritems()),
+ moduleindex.iteritems()),
key=lambda x: x[0].lower())
# collect all platforms
platforms = set()
@@ -646,6 +669,7 @@ class StandaloneHTMLBuilder(Builder):
ctx['pathto'] = pathto
ctx['hasdoc'] = lambda name: name in self.env.all_docs
ctx['customsidebar'] = self.config.html_sidebars.get(pagename)
+ ctx['encoding'] = encoding = self.config.html_output_encoding
ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw)
ctx.update(addctx)
@@ -658,7 +682,7 @@ class StandaloneHTMLBuilder(Builder):
# outfilename's path is in general different from self.outdir
ensuredir(path.dirname(outfilename))
try:
- f = codecs.open(outfilename, 'w', 'utf-8')
+ f = codecs.open(outfilename, 'w', encoding)
try:
f.write(output)
finally:
@@ -689,14 +713,15 @@ class StandaloneHTMLBuilder(Builder):
self.info(bold('dumping object inventory... '), nonl=True)
f = open(path.join(self.outdir, INVENTORY_FILENAME), 'w')
try:
+ # XXX inventory version 2
f.write('# Sphinx inventory version 1\n')
f.write('# Project: %s\n' % self.config.project.encode('utf-8'))
f.write('# Version: %s\n' % self.config.version)
- for modname, info in self.env.modules.iteritems():
- f.write('%s mod %s\n' % (modname, self.get_target_uri(info[0])))
- for refname, (docname, desctype) in self.env.descrefs.iteritems():
- f.write('%s %s %s\n' % (refname, desctype,
- self.get_target_uri(docname)))
+ #for modname, info in self.env.modules.iteritems():
+ # f.write('%s mod %s\n' % (modname, self.get_target_uri(info[0])))
+ #for refname, (docname, desctype) in self.env.descrefs.iteritems():
+ # f.write('%s %s %s\n' % (refname, desctype,
+ # self.get_target_uri(docname)))
finally:
f.close()
self.info('done')
diff --git a/sphinx/config.py b/sphinx/config.py
index b9586c2d..dbe569fb 100644
--- a/sphinx/config.py
+++ b/sphinx/config.py
@@ -54,6 +54,8 @@ class Config(object):
keep_warnings = (False, 'env'),
modindex_common_prefix = ([], 'html'),
rst_epilog = (None, 'env'),
+ trim_doctest_flags = (True, 'env'),
+ default_domain = ('py', 'env'),
# HTML options
html_theme = ('default', 'html'),
@@ -82,8 +84,10 @@ class Config(object):
html_use_opensearch = ('', 'html'),
html_file_suffix = (None, 'html'),
html_link_suffix = (None, 'html'),
+ html_show_copyright = (True, 'html'),
html_show_sphinx = (True, 'html'),
html_context = ({}, 'html'),
+ html_output_encoding = ('utf-8', 'html'),
# HTML help only options
htmlhelp_basename = (lambda self: make_filename(self.project), None),
@@ -91,6 +95,9 @@ class Config(object):
# Qt help only options
qthelp_basename = (lambda self: make_filename(self.project), None),
+ # Devhelp only options
+ devhelp_basename = (lambda self: make_filename(self.project), None),
+
# LaTeX options
latex_documents = ([], None),
latex_logo = (None, None),
@@ -103,8 +110,13 @@ class Config(object):
latex_font_size = ('10pt', None),
latex_elements = ({}, None),
latex_additional_files = ([], None),
+ latex_docclass = ({}, None),
# now deprecated - use latex_elements
latex_preamble = ('', None),
+
+ # text options
+ text_sectionchars = ('*=-~"+`', 'text'),
+ text_windows_newlines = (False, 'text'),
)
def __init__(self, dirname, filename, overrides, tags):
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py
index 645bc784..2c70ada8 100644
--- a/sphinx/directives/code.py
+++ b/sphinx/directives/code.py
@@ -87,6 +87,8 @@ class LiteralInclude(Directive):
'lines': directives.unchanged_required,
'start-after': directives.unchanged_required,
'end-before': directives.unchanged_required,
+ 'prepend': directives.unchanged_required,
+ 'append': directives.unchanged_required,
}
def run(self):
@@ -144,7 +146,9 @@ class LiteralInclude(Directive):
lines = [lines[i] for i in linelist]
startafter = self.options.get('start-after')
- endbefore = self.options.get('end-before')
+ endbefore = self.options.get('end-before')
+ prepend = self.options.get('prepend')
+ append = self.options.get('append')
if startafter is not None or endbefore is not None:
use = not startafter
res = []
@@ -158,6 +162,11 @@ class LiteralInclude(Directive):
res.append(line)
lines = res
+ if prepend:
+ lines.insert(0, prepend + '\n')
+ if append:
+ lines.append(append + '\n')
+
text = ''.join(lines)
retnode = nodes.literal_block(text, text, source=fn)
retnode.line = 1
diff --git a/sphinx/directives/desc.py b/sphinx/directives/desc.py
index db261a87..06fc4c98 100644
--- a/sphinx/directives/desc.py
+++ b/sphinx/directives/desc.py
@@ -14,6 +14,7 @@ from docutils import nodes
from docutils.parsers.rst import directives
from sphinx import addnodes
+from sphinx.locale import l_
from sphinx.util import ws_re
from sphinx.util.compat import Directive, directive_dwim
@@ -31,39 +32,10 @@ def _is_only_paragraph(node):
return False
-# REs for Python signatures
-py_sig_re = re.compile(
- r'''^ ([\w.]*\.)? # class name(s)
- (\w+) \s* # thing name
- (?: \((.*)\) # optional: arguments
- (?:\s* -> \s* (.*))? # return annotation
- )? $ # and nothing more
- ''', re.VERBOSE)
-
-py_paramlist_re = re.compile(r'([\[\],])') # split at '[', ']' and ','
-
-# REs for C signatures
-c_sig_re = re.compile(
- r'''^([^(]*?) # return type
- ([\w:]+) \s* # thing name (colon allowed for C++ class names)
- (?: \((.*)\) )? # optionally arguments
- (\s+const)? $ # const specifier
- ''', re.VERBOSE)
-c_funcptr_sig_re = re.compile(
- r'''^([^(]+?) # return type
- (\( [^()]+ \)) \s* # name in parentheses
- \( (.*) \) # arguments
- (\s+const)? $ # const specifier
- ''', re.VERBOSE)
-c_funcptr_name_re = re.compile(r'^\(\s*\*\s*(.*?)\s*\)$')
-
# RE for option descriptions
option_desc_re = re.compile(
r'((?:/|-|--)[-_a-zA-Z0-9]+)(\s*.*?)(?=,\s+(?:/|-|--)|$)')
-# RE to split at word boundaries
-wsplit_re = re.compile(r'(\W+)')
-
# RE to strip backslash escapes
strip_backslash_re = re.compile(r'\\(?=[^\\])')
@@ -83,8 +55,6 @@ class DescDirective(Directive):
'module': directives.unchanged,
}
- _ = lambda x: x # make gettext extraction in constants possible
-
doc_fields_with_arg = {
'param': '%param',
'parameter': '%param',
@@ -94,23 +64,23 @@ class DescDirective(Directive):
'kwarg': '%param',
'kwparam': '%param',
'type': '%type',
- 'raises': _('Raises'),
- 'raise': 'Raises',
- 'exception': 'Raises',
- 'except': 'Raises',
- 'var': _('Variable'),
- 'ivar': 'Variable',
- 'cvar': 'Variable',
- 'returns': _('Returns'),
- 'return': 'Returns',
+ 'raises': l_('Raises'),
+ 'raise': l_('Raises'),
+ 'exception': l_('Raises'),
+ 'except': l_('Raises'),
+ 'var': l_('Variable'),
+ 'ivar': l_('Variable'),
+ 'cvar': l_('Variable'),
+ 'returns': l_('Returns'),
+ 'return': l_('Returns'),
}
doc_fields_with_linked_arg = ('raises', 'raise', 'exception', 'except')
doc_fields_without_arg = {
- 'returns': 'Returns',
- 'return': 'Returns',
- 'rtype': _('Return type'),
+ 'returns': l_('Returns'),
+ 'return': l_('Returns'),
+ 'rtype': l_('Return type'),
}
def handle_doc_fields(self, node):
@@ -131,7 +101,7 @@ class DescDirective(Directive):
fname, fbody = field
try:
typ, obj = fname.astext().split(None, 1)
- typdesc = _(self.doc_fields_with_arg[typ])
+ typdesc = self.doc_fields_with_arg[typ]
if _is_only_paragraph(fbody):
children = fbody.children[0].children
else:
@@ -175,7 +145,7 @@ class DescDirective(Directive):
except (KeyError, ValueError):
fnametext = fname.astext()
try:
- typ = _(self.doc_fields_without_arg[fnametext])
+ typ = self.doc_fields_without_arg[fnametext]
except KeyError:
# at least capitalize the field name
typ = fnametext.capitalize()
@@ -234,7 +204,10 @@ class DescDirective(Directive):
pass
def run(self):
- self.desctype = self.name
+ if ':' in self.name:
+ self.domain, self.desctype = self.name.split(':', 1)
+ else:
+ self.domain, self.desctype = '', self.name
self.env = self.state.document.settings.env
self.indexnode = addnodes.index(entries=[])
@@ -278,360 +251,6 @@ class DescDirective(Directive):
return [self.indexnode, node]
-class PythonDesc(DescDirective):
- """
- Description of a general Python object.
- """
-
- def get_signature_prefix(self, sig):
- """
- May return a prefix to put before the object name in the signature.
- """
- return ''
-
- def needs_arglist(self):
- """
- May return true if an empty argument list is to be generated even if
- the document contains none.
- """
- return False
-
- def parse_signature(self, sig, signode):
- """
- Transform a Python signature into RST nodes.
- Returns (fully qualified name of the thing, classname if any).
-
- If inside a class, the current class name is handled intelligently:
- * it is stripped from the displayed name if present
- * it is added to the full name (return value) if not present
- """
- m = py_sig_re.match(sig)
- if m is None:
- raise ValueError
- classname, name, arglist, retann = m.groups()
-
- if self.env.currclass:
- add_module = False
- if classname and classname.startswith(self.env.currclass):
- fullname = classname + name
- # class name is given again in the signature
- classname = classname[len(self.env.currclass):].lstrip('.')
- elif classname:
- # class name is given in the signature, but different
- # (shouldn't happen)
- fullname = self.env.currclass + '.' + classname + name
- else:
- # class name is not given in the signature
- fullname = self.env.currclass + '.' + name
- else:
- add_module = True
- fullname = classname and classname + name or name
-
- prefix = self.get_signature_prefix(sig)
- if prefix:
- signode += addnodes.desc_annotation(prefix, prefix)
-
- if classname:
- signode += addnodes.desc_addname(classname, classname)
- # exceptions are a special case, since they are documented in the
- # 'exceptions' module.
- elif add_module and self.env.config.add_module_names:
- modname = self.options.get('module', self.env.currmodule)
- if modname and modname != 'exceptions':
- nodetext = modname + '.'
- signode += addnodes.desc_addname(nodetext, nodetext)
-
- signode += addnodes.desc_name(name, name)
- if not arglist:
- if self.needs_arglist():
- # for callables, add an empty parameter list
- signode += addnodes.desc_parameterlist()
- if retann:
- signode += addnodes.desc_returns(retann, retann)
- return fullname, classname
- signode += addnodes.desc_parameterlist()
-
- stack = [signode[-1]]
- for token in py_paramlist_re.split(arglist):
- if token == '[':
- opt = addnodes.desc_optional()
- stack[-1] += opt
- stack.append(opt)
- elif token == ']':
- try:
- stack.pop()
- except IndexError:
- raise ValueError
- elif not token or token == ',' or token.isspace():
- pass
- else:
- token = token.strip()
- stack[-1] += addnodes.desc_parameter(token, token)
- if len(stack) != 1:
- raise ValueError
- if retann:
- signode += addnodes.desc_returns(retann, retann)
- return fullname, classname
-
- def get_index_text(self, modname, name):
- """
- Return the text for the index entry of the object.
- """
- raise NotImplementedError('must be implemented in subclasses')
-
- def add_target_and_index(self, name_cls, sig, signode):
- modname = self.options.get('module', self.env.currmodule)
- fullname = (modname and modname + '.' or '') + name_cls[0]
- # note target
- if fullname not in self.state.document.ids:
- signode['names'].append(fullname)
- signode['ids'].append(fullname)
- signode['first'] = (not self.names)
- self.state.document.note_explicit_target(signode)
- self.env.note_descref(fullname, self.desctype, self.lineno)
-
- indextext = self.get_index_text(modname, name_cls)
- if indextext:
- self.indexnode['entries'].append(('single', indextext,
- fullname, fullname))
-
- def before_content(self):
- # needed for automatic qualification of members (reset in subclasses)
- self.clsname_set = False
-
- def after_content(self):
- if self.clsname_set:
- self.env.currclass = None
-
-
-class ModulelevelDesc(PythonDesc):
- """
- Description of an object on module level (functions, data).
- """
-
- def needs_arglist(self):
- return self.desctype == 'function'
-
- def get_index_text(self, modname, name_cls):
- if self.desctype == 'function':
- if not modname:
- return _('%s() (built-in function)') % name_cls[0]
- return _('%s() (in module %s)') % (name_cls[0], modname)
- elif self.desctype == 'data':
- if not modname:
- return _('%s (built-in variable)') % name_cls[0]
- return _('%s (in module %s)') % (name_cls[0], modname)
- else:
- return ''
-
-
-class ClasslikeDesc(PythonDesc):
- """
- Description of a class-like object (classes, interfaces, exceptions).
- """
-
- def get_signature_prefix(self, sig):
- return self.desctype + ' '
-
- def get_index_text(self, modname, name_cls):
- if self.desctype == 'class':
- if not modname:
- return _('%s (built-in class)') % name_cls[0]
- return _('%s (class in %s)') % (name_cls[0], modname)
- elif self.desctype == 'exception':
- return name_cls[0]
- else:
- return ''
-
- def before_content(self):
- PythonDesc.before_content(self)
- if self.names:
- self.env.currclass = self.names[0][0]
- self.clsname_set = True
-
-
-class ClassmemberDesc(PythonDesc):
- """
- Description of a class member (methods, attributes).
- """
-
- def needs_arglist(self):
- return self.desctype.endswith('method')
-
- def get_signature_prefix(self, sig):
- if self.desctype == 'staticmethod':
- return 'static '
- elif self.desctype == 'classmethod':
- return 'classmethod '
- return ''
-
- def get_index_text(self, modname, name_cls):
- name, cls = name_cls
- add_modules = self.env.config.add_module_names
- if self.desctype == 'method':
- try:
- clsname, methname = name.rsplit('.', 1)
- except ValueError:
- if modname:
- return _('%s() (in module %s)') % (name, modname)
- else:
- return '%s()' % name
- if modname and add_modules:
- return _('%s() (%s.%s method)') % (methname, modname, clsname)
- else:
- return _('%s() (%s method)') % (methname, clsname)
- elif self.desctype == 'staticmethod':
- try:
- clsname, methname = name.rsplit('.', 1)
- except ValueError:
- if modname:
- return _('%s() (in module %s)') % (name, modname)
- else:
- return '%s()' % name
- if modname and add_modules:
- return _('%s() (%s.%s static method)') % (methname, modname,
- clsname)
- else:
- return _('%s() (%s static method)') % (methname, clsname)
- elif self.desctype == 'classmethod':
- try:
- clsname, methname = name.rsplit('.', 1)
- except ValueError:
- if modname:
- return '%s() (in module %s)' % (name, modname)
- else:
- return '%s()' % name
- if modname:
- return '%s() (%s.%s class method)' % (methname, modname,
- clsname)
- else:
- return '%s() (%s class method)' % (methname, clsname)
- elif self.desctype == 'attribute':
- try:
- clsname, attrname = name.rsplit('.', 1)
- except ValueError:
- if modname:
- return _('%s (in module %s)') % (name, modname)
- else:
- return name
- if modname and add_modules:
- return _('%s (%s.%s attribute)') % (attrname, modname, clsname)
- else:
- return _('%s (%s attribute)') % (attrname, clsname)
- else:
- return ''
-
- def before_content(self):
- PythonDesc.before_content(self)
- if self.names and self.names[-1][1] and not self.env.currclass:
- self.env.currclass = self.names[-1][1].strip('.')
- self.clsname_set = True
-
-
-class CDesc(DescDirective):
- """
- Description of a C language object.
- """
-
- # These C types aren't described anywhere, so don't try to create
- # a cross-reference to them
- stopwords = set(('const', 'void', 'char', 'int', 'long', 'FILE', 'struct'))
-
- def _parse_type(self, node, ctype):
- # add cross-ref nodes for all words
- for part in filter(None, wsplit_re.split(ctype)):
- tnode = nodes.Text(part, part)
- if part[0] in string.ascii_letters+'_' and \
- part not in self.stopwords:
- pnode = addnodes.pending_xref(
- '', reftype='ctype', reftarget=part,
- modname=None, classname=None)
- pnode += tnode
- node += pnode
- else:
- node += tnode
-
- def parse_signature(self, sig, signode):
- """Transform a C (or C++) signature into RST nodes."""
- # first try the function pointer signature regex, it's more specific
- m = c_funcptr_sig_re.match(sig)
- if m is None:
- m = c_sig_re.match(sig)
- if m is None:
- raise ValueError('no match')
- rettype, name, arglist, const = m.groups()
-
- signode += addnodes.desc_type('', '')
- self._parse_type(signode[-1], rettype)
- try:
- classname, funcname = name.split('::', 1)
- classname += '::'
- signode += addnodes.desc_addname(classname, classname)
- signode += addnodes.desc_name(funcname, funcname)
- # name (the full name) is still both parts
- except ValueError:
- signode += addnodes.desc_name(name, name)
- # clean up parentheses from canonical name
- m = c_funcptr_name_re.match(name)
- if m:
- name = m.group(1)
- if not arglist:
- if self.desctype == 'cfunction':
- # for functions, add an empty parameter list
- signode += addnodes.desc_parameterlist()
- if const:
- signode += addnodes.desc_addname(const, const)
- return name
-
- paramlist = addnodes.desc_parameterlist()
- arglist = arglist.replace('`', '').replace('\\ ', '') # remove markup
- # this messes up function pointer types, but not too badly ;)
- args = arglist.split(',')
- for arg in args:
- arg = arg.strip()
- param = addnodes.desc_parameter('', '', noemph=True)
- try:
- ctype, argname = arg.rsplit(' ', 1)
- except ValueError:
- # no argument name given, only the type
- self._parse_type(param, arg)
- else:
- self._parse_type(param, ctype)
- param += nodes.emphasis(' '+argname, ' '+argname)
- paramlist += param
- signode += paramlist
- if const:
- signode += addnodes.desc_addname(const, const)
- return name
-
- def get_index_text(self, name):
- if self.desctype == 'cfunction':
- return _('%s (C function)') % name
- elif self.desctype == 'cmember':
- return _('%s (C member)') % name
- elif self.desctype == 'cmacro':
- return _('%s (C macro)') % name
- elif self.desctype == 'ctype':
- return _('%s (C type)') % name
- elif self.desctype == 'cvar':
- return _('%s (C variable)') % name
- else:
- return ''
-
- def add_target_and_index(self, name, sig, signode):
- # note target
- if name not in self.state.document.ids:
- signode['names'].append(name)
- signode['ids'].append(name)
- signode['first'] = (not self.names)
- self.state.document.note_explicit_target(signode)
- self.env.note_descref(name, self.desctype, self.lineno)
-
- indextext = self.get_index_text(name)
- if indextext:
- self.indexnode['entries'].append(('single', indextext, name, name))
-
-
class CmdoptionDesc(DescDirective):
"""
Description of a command-line option (.. cmdoption).
@@ -691,7 +310,7 @@ class GenericDesc(DescDirective):
signode['ids'].append(targetname)
self.state.document.note_explicit_target(signode)
if indextemplate:
- indexentry = _(indextemplate) % (name,)
+ indexentry = indextemplate % (name,)
indextype = 'single'
colon = indexentry.find(':')
if colon != -1:
@@ -735,37 +354,36 @@ class Target(Directive):
env.note_reftarget(rolename, fullname, targetname)
return ret
+
+class DefaultDomain(Directive):
+ """
+ Directive to (re-)set the default domain for this source file.
+ """
+
+ has_content = False
+ required_arguments = 1
+ optional_arguments = 0
+ final_argument_whitespace = False
+ option_spec = {}
+
+ def run(self):
+ env = self.state.document.settings.env
+ domain_name = arguments[0]
+ env.default_domain = env.domains.get(domain_name)
+
+
# Note: the target directive is not registered here, it is used by the
# application when registering additional xref types.
-_ = 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', l_('environment variable; %s'), None),
}
-del _
-
+directives.register_directive('default-domain', directive_dwim(DefaultDomain))
directives.register_directive('describe', directive_dwim(DescDirective))
-
-directives.register_directive('function', directive_dwim(ModulelevelDesc))
-directives.register_directive('data', directive_dwim(ModulelevelDesc))
-directives.register_directive('class', directive_dwim(ClasslikeDesc))
-directives.register_directive('exception', directive_dwim(ClasslikeDesc))
-directives.register_directive('method', directive_dwim(ClassmemberDesc))
-directives.register_directive('classmethod', directive_dwim(ClassmemberDesc))
-directives.register_directive('staticmethod', directive_dwim(ClassmemberDesc))
-directives.register_directive('attribute', directive_dwim(ClassmemberDesc))
-
-directives.register_directive('cfunction', directive_dwim(CDesc))
-directives.register_directive('cmember', directive_dwim(CDesc))
-directives.register_directive('cmacro', directive_dwim(CDesc))
-directives.register_directive('ctype', directive_dwim(CDesc))
-directives.register_directive('cvar', directive_dwim(CDesc))
-
directives.register_directive('cmdoption', directive_dwim(CmdoptionDesc))
directives.register_directive('envvar', directive_dwim(GenericDesc))
diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py
index 5eefa48e..977b1691 100644
--- a/sphinx/directives/other.py
+++ b/sphinx/directives/other.py
@@ -33,6 +33,7 @@ class TocTree(Directive):
'glob': directives.flag,
'hidden': directives.flag,
'numbered': directives.flag,
+ 'titlesonly': directives.flag,
}
def run(self):
@@ -97,79 +98,11 @@ class TocTree(Directive):
subnode['glob'] = glob
subnode['hidden'] = 'hidden' in self.options
subnode['numbered'] = 'numbered' in self.options
+ subnode['titlesonly'] = 'titlesonly' in self.options
ret.append(subnode)
return ret
-class Module(Directive):
- """
- Directive to mark description of a new module.
- """
-
- has_content = False
- required_arguments = 1
- optional_arguments = 0
- final_argument_whitespace = False
- option_spec = {
- 'platform': lambda x: x,
- 'synopsis': lambda x: x,
- 'noindex': directives.flag,
- 'deprecated': directives.flag,
- }
-
- def run(self):
- env = self.state.document.settings.env
- modname = self.arguments[0].strip()
- noindex = 'noindex' in self.options
- env.currmodule = modname
- env.note_module(modname, self.options.get('synopsis', ''),
- self.options.get('platform', ''),
- 'deprecated' in self.options)
- modulenode = addnodes.module()
- modulenode['modname'] = modname
- modulenode['synopsis'] = self.options.get('synopsis', '')
- targetnode = nodes.target('', '', ids=['module-' + modname], ismod=True)
- self.state.document.note_explicit_target(targetnode)
- ret = [modulenode, targetnode]
- if 'platform' in self.options:
- platform = self.options['platform']
- modulenode['platform'] = platform
- node = nodes.paragraph()
- node += nodes.emphasis('', _('Platforms: '))
- node += nodes.Text(platform, platform)
- ret.append(node)
- # the synopsis isn't printed; in fact, it is only used in the
- # modindex currently
- if not noindex:
- indextext = _('%s (module)') % modname
- inode = addnodes.index(entries=[('single', indextext,
- 'module-' + modname, modname)])
- ret.insert(0, inode)
- return ret
-
-
-class CurrentModule(Directive):
- """
- This directive is just to tell Sphinx that we're documenting
- stuff in module foo, but links to module foo won't lead here.
- """
-
- has_content = False
- required_arguments = 1
- optional_arguments = 0
- final_argument_whitespace = False
- option_spec = {}
-
- def run(self):
- env = self.state.document.settings.env
- modname = self.arguments[0].strip()
- if modname == 'None':
- env.currmodule = None
- else:
- env.currmodule = modname
- return []
-
-
class Author(Directive):
"""
Directive to give the name of the author of the current document
@@ -558,8 +491,6 @@ class Only(Directive):
directives.register_directive('toctree', directive_dwim(TocTree))
-directives.register_directive('module', directive_dwim(Module))
-directives.register_directive('currentmodule', directive_dwim(CurrentModule))
directives.register_directive('sectionauthor', directive_dwim(Author))
directives.register_directive('moduleauthor', directive_dwim(Author))
directives.register_directive('program', directive_dwim(Program))
diff --git a/sphinx/domains.py b/sphinx/domains.py
new file mode 100644
index 00000000..6e00d540
--- /dev/null
+++ b/sphinx/domains.py
@@ -0,0 +1,779 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.domains
+ ~~~~~~~~~~~~~~
+
+ Support for domains, which are groupings of description directives
+ and roles describing e.g. constructs of one programming language.
+
+ :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import re
+import string
+
+from docutils import nodes
+from docutils.parsers.rst import directives
+
+from sphinx import addnodes
+from sphinx.roles import XRefRole
+from sphinx.directives import DescDirective
+from sphinx.util import make_refnode
+from sphinx.util.compat import Directive
+
+
+class Domain(object):
+ """
+ A Domain is meant to be a group of "object" description directives for
+ objects of a similar nature, and corresponding roles to create references to
+ them. Examples would be Python modules, classes, functions etc., elements
+ of a templating language, Sphinx roles and directives, etc.
+
+ Each domain has a separate storage for information about existing objects
+ and how to reference them in `data`, which must be a dictionary. It also
+ must implement several functions that expose the object information in a
+ uniform way to parts of Sphinx that allow the user to reference or search
+ for objects in a domain-agnostic way.
+
+ About `self.data`: since all object and cross-referencing information is
+ stored on a BuildEnvironment instance, the `domain.data` object is also
+ stored in the `env.domaindata` dict under the key `domain.name`. Before the
+ build process starts, every active domain is instantiated and given the
+ environment object; the `domaindata` dict must then either be nonexistent or
+ a dictionary whose 'version' key is equal to the domain class'
+ `data_version` attribute. Otherwise, `IOError` is raised and the pickled
+ environment is discarded.
+ """
+
+ name = ''
+ directives = {}
+ roles = {}
+ label = ''
+
+ # data value for a fresh environment
+ initial_data = {}
+ # data version
+ data_version = 0
+
+ def __init__(self, env):
+ self.env = env
+ if self.name not in env.domaindata:
+ assert isinstance(self.initial_data, dict)
+ new_data = self.initial_data.copy()
+ new_data['version'] = self.data_version
+ self.data = env.domaindata[self.name] = new_data
+ else:
+ self.data = env.domaindata[self.name]
+ if self.data['version'] != self.data_version:
+ raise IOError('data of %r domain out of date' % self.label)
+ self._role_cache = {}
+ self._directive_cache = {}
+
+ def clear_doc(self, docname):
+ """
+ Remove traces of a document in the domain-specific inventories.
+ """
+ pass
+
+ def role(self, name):
+ """
+ Return a role adapter function that always gives the registered
+ role its full name ('domain:name') as the first argument.
+ """
+ if name in self._role_cache:
+ return self._role_cache[name]
+ if name not in self.roles:
+ return None
+ fullname = '%s:%s' % (self.name, name)
+ def role_adapter(typ, rawtext, text, lineno, inliner,
+ options={}, content=[]):
+ return self.roles[name](fullname, rawtext, text, lineno,
+ inliner, options, content)
+ self._role_cache[name] = role_adapter
+ return role_adapter
+
+ def directive(self, name):
+ """
+ Return a directive adapter class that always gives the registered
+ directive its full name ('domain:name') as ``self.name``.
+ """
+ if name in self._directive_cache:
+ return self._directive_cache[name]
+ if name not in self.directives:
+ return None
+ fullname = '%s:%s' % (self.name, name)
+ # XXX what about function-style directives?
+ BaseDirective = self.directives[name]
+ class DirectiveAdapter(BaseDirective):
+ def run(self):
+ self.name = fullname
+ return BaseDirective.run(self)
+ self._directive_cache[name] = DirectiveAdapter
+ return DirectiveAdapter
+
+ def resolve_xref(self, typ, target, node, contnode):
+ """
+ Resolve the ``pending_xref`` *node* with the given *typ* and *target*.
+
+ This method should return a new node, to replace the xref node,
+ containing the *contnode* which is the markup content of the
+ cross-reference.
+
+ If no resolution can be found, None can be returned; the xref node will
+ then given to the 'missing-reference' event, and if that yields no
+ resolution, replaced by *contnode*.
+
+ The method can also raise `sphinx.environment.NoUri` to suppress the
+ 'missing-reference' event being emitted.
+ """
+ pass
+
+
+# REs for Python signatures
+py_sig_re = re.compile(
+ r'''^ ([\w.]*\.)? # class name(s)
+ (\w+) \s* # thing name
+ (?: \((.*)\) # optional: arguments
+ (?:\s* -> \s* (.*))? # return annotation
+ )? $ # and nothing more
+ ''', re.VERBOSE)
+
+py_paramlist_re = re.compile(r'([\[\],])') # split at '[', ']' and ','
+
+
+class PythonDesc(DescDirective):
+ """
+ Description of a general Python object.
+ """
+
+ def get_signature_prefix(self, sig):
+ """
+ May return a prefix to put before the object name in the signature.
+ """
+ return ''
+
+ def needs_arglist(self):
+ """
+ May return true if an empty argument list is to be generated even if
+ the document contains none.
+ """
+ return False
+
+ def parse_signature(self, sig, signode):
+ """
+ Transform a Python signature into RST nodes.
+ Returns (fully qualified name of the thing, classname if any).
+
+ If inside a class, the current class name is handled intelligently:
+ * it is stripped from the displayed name if present
+ * it is added to the full name (return value) if not present
+ """
+ m = py_sig_re.match(sig)
+ if m is None:
+ raise ValueError
+ classname, name, arglist, retann = m.groups()
+
+ if self.env.currclass:
+ add_module = False
+ if classname and classname.startswith(self.env.currclass):
+ fullname = classname + name
+ # class name is given again in the signature
+ classname = classname[len(self.env.currclass):].lstrip('.')
+ elif classname:
+ # class name is given in the signature, but different
+ # (shouldn't happen)
+ fullname = self.env.currclass + '.' + classname + name
+ else:
+ # class name is not given in the signature
+ fullname = self.env.currclass + '.' + name
+ else:
+ add_module = True
+ fullname = classname and classname + name or name
+
+ prefix = self.get_signature_prefix(sig)
+ if prefix:
+ signode += addnodes.desc_annotation(prefix, prefix)
+
+ if classname:
+ signode += addnodes.desc_addname(classname, classname)
+ # exceptions are a special case, since they are documented in the
+ # 'exceptions' module.
+ elif add_module and self.env.config.add_module_names:
+ modname = self.options.get('module', self.env.currmodule)
+ if modname and modname != 'exceptions':
+ nodetext = modname + '.'
+ signode += addnodes.desc_addname(nodetext, nodetext)
+
+ signode += addnodes.desc_name(name, name)
+ if not arglist:
+ if self.needs_arglist():
+ # for callables, add an empty parameter list
+ signode += addnodes.desc_parameterlist()
+ if retann:
+ signode += addnodes.desc_returns(retann, retann)
+ return fullname, classname
+ signode += addnodes.desc_parameterlist()
+
+ stack = [signode[-1]]
+ for token in py_paramlist_re.split(arglist):
+ if token == '[':
+ opt = addnodes.desc_optional()
+ stack[-1] += opt
+ stack.append(opt)
+ elif token == ']':
+ try:
+ stack.pop()
+ except IndexError:
+ raise ValueError
+ elif not token or token == ',' or token.isspace():
+ pass
+ else:
+ token = token.strip()
+ stack[-1] += addnodes.desc_parameter(token, token)
+ if len(stack) != 1:
+ raise ValueError
+ if retann:
+ signode += addnodes.desc_returns(retann, retann)
+ return fullname, classname
+
+ def get_index_text(self, modname, name):
+ """
+ Return the text for the index entry of the object.
+ """
+ raise NotImplementedError('must be implemented in subclasses')
+
+ def add_target_and_index(self, name_cls, sig, signode):
+ modname = self.options.get('module', self.env.currmodule)
+ fullname = (modname and modname + '.' or '') + name_cls[0]
+ # note target
+ if fullname not in self.state.document.ids:
+ signode['names'].append(fullname)
+ signode['ids'].append(fullname)
+ signode['first'] = (not self.names)
+ self.state.document.note_explicit_target(signode)
+ objects = self.env.domaindata['py']['objects']
+ if fullname in objects:
+ self.env.warn(
+ self.env.docname,
+ 'duplicate object description of %s, ' % fullname +
+ 'other instance in ' +
+ self.env.doc2path(objects[fullname][0]),
+ self.lineno)
+ objects[fullname] = (self.env.docname, self.desctype)
+
+ indextext = self.get_index_text(modname, name_cls)
+ if indextext:
+ self.indexnode['entries'].append(('single', indextext,
+ fullname, fullname))
+
+ def before_content(self):
+ # needed for automatic qualification of members (reset in subclasses)
+ self.clsname_set = False
+
+ def after_content(self):
+ if self.clsname_set:
+ self.env.currclass = None
+
+
+class ModulelevelDesc(PythonDesc):
+ """
+ Description of an object on module level (functions, data).
+ """
+
+ def needs_arglist(self):
+ return self.desctype == 'function'
+
+ def get_index_text(self, modname, name_cls):
+ if self.desctype == 'function':
+ if not modname:
+ return _('%s() (built-in function)') % name_cls[0]
+ return _('%s() (in module %s)') % (name_cls[0], modname)
+ elif self.desctype == 'data':
+ if not modname:
+ return _('%s (built-in variable)') % name_cls[0]
+ return _('%s (in module %s)') % (name_cls[0], modname)
+ else:
+ return ''
+
+
+class ClasslikeDesc(PythonDesc):
+ """
+ Description of a class-like object (classes, interfaces, exceptions).
+ """
+
+ def get_signature_prefix(self, sig):
+ return self.desctype + ' '
+
+ def get_index_text(self, modname, name_cls):
+ if self.desctype == 'class':
+ if not modname:
+ return _('%s (built-in class)') % name_cls[0]
+ return _('%s (class in %s)') % (name_cls[0], modname)
+ elif self.desctype == 'exception':
+ return name_cls[0]
+ else:
+ return ''
+
+ def before_content(self):
+ PythonDesc.before_content(self)
+ if self.names:
+ self.env.currclass = self.names[0][0]
+ self.clsname_set = True
+
+
+class ClassmemberDesc(PythonDesc):
+ """
+ Description of a class member (methods, attributes).
+ """
+
+ def needs_arglist(self):
+ return self.desctype.endswith('method')
+
+ def get_signature_prefix(self, sig):
+ if self.desctype == 'staticmethod':
+ return 'static '
+ elif self.desctype == 'classmethod':
+ return 'classmethod '
+ return ''
+
+ def get_index_text(self, modname, name_cls):
+ name, cls = name_cls
+ add_modules = self.env.config.add_module_names
+ if self.desctype == 'method':
+ try:
+ clsname, methname = name.rsplit('.', 1)
+ except ValueError:
+ if modname:
+ return _('%s() (in module %s)') % (name, modname)
+ else:
+ return '%s()' % name
+ if modname and add_modules:
+ return _('%s() (%s.%s method)') % (methname, modname, clsname)
+ else:
+ return _('%s() (%s method)') % (methname, clsname)
+ elif self.desctype == 'staticmethod':
+ try:
+ clsname, methname = name.rsplit('.', 1)
+ except ValueError:
+ if modname:
+ return _('%s() (in module %s)') % (name, modname)
+ else:
+ return '%s()' % name
+ if modname and add_modules:
+ return _('%s() (%s.%s static method)') % (methname, modname,
+ clsname)
+ else:
+ return _('%s() (%s static method)') % (methname, clsname)
+ elif self.desctype == 'classmethod':
+ try:
+ clsname, methname = name.rsplit('.', 1)
+ except ValueError:
+ if modname:
+ return _('%s() (in module %s)') % (name, modname)
+ else:
+ return '%s()' % name
+ if modname:
+ return _('%s() (%s.%s class method)') % (methname, modname,
+ clsname)
+ else:
+ return _('%s() (%s class method)') % (methname, clsname)
+ elif self.desctype == 'attribute':
+ try:
+ clsname, attrname = name.rsplit('.', 1)
+ except ValueError:
+ if modname:
+ return _('%s (in module %s)') % (name, modname)
+ else:
+ return name
+ if modname and add_modules:
+ return _('%s (%s.%s attribute)') % (attrname, modname, clsname)
+ else:
+ return _('%s (%s attribute)') % (attrname, clsname)
+ else:
+ return ''
+
+ def before_content(self):
+ PythonDesc.before_content(self)
+ if self.names and self.names[-1][1] and not self.env.currclass:
+ self.env.currclass = self.names[-1][1].strip('.')
+ self.clsname_set = True
+
+
+class PyModule(Directive):
+ """
+ Directive to mark description of a new module.
+ """
+
+ has_content = False
+ required_arguments = 1
+ optional_arguments = 0
+ final_argument_whitespace = False
+ option_spec = {
+ 'platform': lambda x: x,
+ 'synopsis': lambda x: x,
+ 'noindex': directives.flag,
+ 'deprecated': directives.flag,
+ }
+
+ def run(self):
+ env = self.state.document.settings.env
+ modname = self.arguments[0].strip()
+ noindex = 'noindex' in self.options
+ env.currmodule = modname
+ env.domaindata['py']['modules'][modname] = \
+ (env.docname, self.options.get('synopsis', ''),
+ self.options.get('platform', ''), 'deprecated' in self.options)
+ modulenode = addnodes.module()
+ modulenode['modname'] = modname
+ modulenode['synopsis'] = self.options.get('synopsis', '')
+ targetnode = nodes.target('', '', ids=['module-' + modname], ismod=True)
+ self.state.document.note_explicit_target(targetnode)
+ ret = [modulenode, targetnode]
+ if 'platform' in self.options:
+ platform = self.options['platform']
+ modulenode['platform'] = platform
+ node = nodes.paragraph()
+ node += nodes.emphasis('', _('Platforms: '))
+ node += nodes.Text(platform, platform)
+ ret.append(node)
+ # the synopsis isn't printed; in fact, it is only used in the
+ # modindex currently
+ if not noindex:
+ indextext = _('%s (module)') % modname
+ inode = addnodes.index(entries=[('single', indextext,
+ 'module-' + modname, modname)])
+ ret.insert(0, inode)
+ return ret
+
+
+class PyCurrentModule(Directive):
+ """
+ This directive is just to tell Sphinx that we're documenting
+ stuff in module foo, but links to module foo won't lead here.
+ """
+
+ has_content = False
+ required_arguments = 1
+ optional_arguments = 0
+ final_argument_whitespace = False
+ option_spec = {}
+
+ def run(self):
+ env = self.state.document.settings.env
+ modname = self.arguments[0].strip()
+ if modname == 'None':
+ env.currmodule = None
+ else:
+ env.currmodule = modname
+ return []
+
+
+class PyXRefRole(XRefRole):
+ def process_link(self, env, pnode, has_explicit_title, title, target):
+ pnode['modname'] = env.currmodule
+ pnode['classname'] = env.currclass
+ if not has_explicit_title:
+ title = title.lstrip('.') # only has a meaning for the target
+ target = target.lstrip('~') # only has a meaning for the title
+ # if the first character is a tilde, don't display the module/class
+ # parts of the contents
+ if title[0:1] == '~':
+ title = title[1:]
+ dot = title.rfind('.')
+ if dot != -1:
+ title = title[dot+1:]
+ # if the first character is a dot, search more specific namespaces first
+ # else search builtins first
+ if target[0:1] == '.':
+ target = target[1:]
+ pnode['refspecific'] = True
+ return title, target
+
+
+class PythonDomain(Domain):
+ """Python language domain."""
+ name = 'py'
+ label = 'Python'
+ directives = {
+ 'function': ModulelevelDesc,
+ 'data': ModulelevelDesc,
+ 'class': ClasslikeDesc,
+ 'exception': ClasslikeDesc,
+ 'method': ClassmemberDesc,
+ 'classmethod': ClassmemberDesc,
+ 'staticmethod': ClassmemberDesc,
+ 'attribute': ClassmemberDesc,
+ 'module': PyModule,
+ 'currentmodule': PyCurrentModule,
+ }
+ roles = {
+ 'data': PyXRefRole(),
+ 'exc': PyXRefRole(),
+ 'func': PyXRefRole(fix_parens=True),
+ 'class': PyXRefRole(),
+ 'const': PyXRefRole(),
+ 'attr': PyXRefRole(),
+ 'meth': PyXRefRole(fix_parens=True),
+ 'mod': PyXRefRole(),
+ 'obj': PyXRefRole(),
+ }
+ initial_data = {
+ 'objects': {}, # fullname -> docname, desctype
+ 'modules': {}, # modname -> docname, synopsis, platform, deprecated
+ }
+
+ def clear_doc(self, docname):
+ for fullname, (fn, _) in self.data['objects'].items():
+ if fn == docname:
+ del self.data['objects'][fullname]
+ for modname, (fn, _, _, _) in self.data['modules'].items():
+ if fn == docname:
+ del self.data['modules'][modname]
+
+ def find_desc(self, env, modname, classname, name, type, searchorder=0):
+ """
+ Find a Python object description for "name", perhaps using the given
+ module and/or classname.
+ """
+ # skip parens
+ if name[-2:] == '()':
+ name = name[:-2]
+
+ if not name:
+ return None, None
+
+ objects = self.data['objects']
+
+ newname = None
+ if searchorder == 1:
+ if modname and classname and \
+ modname + '.' + classname + '.' + name in objects:
+ newname = modname + '.' + classname + '.' + name
+ elif modname and modname + '.' + name in objects:
+ newname = modname + '.' + name
+ elif name in objects:
+ newname = name
+ else:
+ if name in objects:
+ newname = name
+ elif modname and modname + '.' + name in objects:
+ newname = modname + '.' + name
+ elif modname and classname and \
+ modname + '.' + classname + '.' + name in objects:
+ newname = modname + '.' + classname + '.' + name
+ # special case: builtin exceptions have module "exceptions" set
+ elif type == 'exc' and '.' not in name and \
+ 'exceptions.' + name in objects:
+ newname = 'exceptions.' + name
+ # special case: object methods
+ elif type in ('func', 'meth') and '.' not in name and \
+ 'object.' + name in objects:
+ newname = 'object.' + name
+ if newname is None:
+ return None, None
+ return newname, objects[newname]
+
+ def resolve_xref(self, env, fromdocname, builder,
+ typ, target, node, contnode):
+ if (typ == 'mod' or
+ typ == 'obj' and target in self.data['modules']):
+ docname, synopsis, platform, deprecated = \
+ self.data['modules'].get(target, ('','','', ''))
+ if not docname:
+ return None
+ elif docname == fromdocname:
+ # don't link to self
+ return contnode
+ else:
+ title = '%s%s%s' % ((platform and '(%s) ' % platform),
+ synopsis,
+ (deprecated and ' (deprecated)' or ''))
+ return make_refnode(builder, fromdocname, docname,
+ 'module-' + target, contnode, title)
+ else:
+ modname = node['modname']
+ clsname = node['classname']
+ searchorder = node.hasattr('refspecific') and 1 or 0
+ name, desc = self.find_desc(env, modname, clsname,
+ target, typ, searchorder)
+ if not desc:
+ return None
+ else:
+ return make_refnode(builder, fromdocname, desc[0], name,
+ contnode, name)
+
+
+
+# RE to split at word boundaries
+wsplit_re = re.compile(r'(\W+)')
+
+# REs for C signatures
+c_sig_re = re.compile(
+ r'''^([^(]*?) # return type
+ ([\w:]+) \s* # thing name (colon allowed for C++ class names)
+ (?: \((.*)\) )? # optionally arguments
+ (\s+const)? $ # const specifier
+ ''', re.VERBOSE)
+c_funcptr_sig_re = re.compile(
+ r'''^([^(]+?) # return type
+ (\( [^()]+ \)) \s* # name in parentheses
+ \( (.*) \) # arguments
+ (\s+const)? $ # const specifier
+ ''', re.VERBOSE)
+c_funcptr_name_re = re.compile(r'^\(\s*\*\s*(.*?)\s*\)$')
+
+
+class CDesc(DescDirective):
+ """
+ Description of a C language object.
+ """
+
+ # These C types aren't described anywhere, so don't try to create
+ # a cross-reference to them
+ stopwords = set(('const', 'void', 'char', 'int', 'long', 'FILE', 'struct'))
+
+ def _parse_type(self, node, ctype):
+ # add cross-ref nodes for all words
+ for part in filter(None, wsplit_re.split(ctype)):
+ tnode = nodes.Text(part, part)
+ if part[0] in string.ascii_letters+'_' and \
+ part not in self.stopwords:
+ pnode = addnodes.pending_xref(
+ '', refdomain='c', reftype='type', reftarget=part,
+ modname=None, classname=None)
+ pnode += tnode
+ node += pnode
+ else:
+ node += tnode
+
+ def parse_signature(self, sig, signode):
+ """Transform a C (or C++) signature into RST nodes."""
+ # first try the function pointer signature regex, it's more specific
+ m = c_funcptr_sig_re.match(sig)
+ if m is None:
+ m = c_sig_re.match(sig)
+ if m is None:
+ raise ValueError('no match')
+ rettype, name, arglist, const = m.groups()
+
+ signode += addnodes.desc_type('', '')
+ self._parse_type(signode[-1], rettype)
+ try:
+ classname, funcname = name.split('::', 1)
+ classname += '::'
+ signode += addnodes.desc_addname(classname, classname)
+ signode += addnodes.desc_name(funcname, funcname)
+ # name (the full name) is still both parts
+ except ValueError:
+ signode += addnodes.desc_name(name, name)
+ # clean up parentheses from canonical name
+ m = c_funcptr_name_re.match(name)
+ if m:
+ name = m.group(1)
+ if not arglist:
+ if self.desctype == 'cfunction':
+ # for functions, add an empty parameter list
+ signode += addnodes.desc_parameterlist()
+ if const:
+ signode += addnodes.desc_addname(const, const)
+ return name
+
+ paramlist = addnodes.desc_parameterlist()
+ arglist = arglist.replace('`', '').replace('\\ ', '') # remove markup
+ # this messes up function pointer types, but not too badly ;)
+ args = arglist.split(',')
+ for arg in args:
+ arg = arg.strip()
+ param = addnodes.desc_parameter('', '', noemph=True)
+ try:
+ ctype, argname = arg.rsplit(' ', 1)
+ except ValueError:
+ # no argument name given, only the type
+ self._parse_type(param, arg)
+ else:
+ self._parse_type(param, ctype)
+ param += nodes.emphasis(' '+argname, ' '+argname)
+ paramlist += param
+ signode += paramlist
+ if const:
+ signode += addnodes.desc_addname(const, const)
+ return name
+
+ def get_index_text(self, name):
+ if self.desctype == 'cfunction':
+ return _('%s (C function)') % name
+ elif self.desctype == 'cmember':
+ return _('%s (C member)') % name
+ elif self.desctype == 'cmacro':
+ return _('%s (C macro)') % name
+ elif self.desctype == 'ctype':
+ return _('%s (C type)') % name
+ elif self.desctype == 'cvar':
+ return _('%s (C variable)') % name
+ else:
+ return ''
+
+ def add_target_and_index(self, name, sig, signode):
+ # note target
+ if name not in self.state.document.ids:
+ signode['names'].append(name)
+ signode['ids'].append(name)
+ signode['first'] = (not self.names)
+ self.state.document.note_explicit_target(signode)
+ inv = self.env.domaindata['c']['objects']
+ if name in inv:
+ self.env.warn(
+ self.env.docname,
+ 'duplicate C object description of %s, ' % name +
+ 'other instance in ' + self.env.doc2path(inv[name][0]),
+ self.lineno)
+ inv[name] = (self.env.docname, self.desctype)
+
+ indextext = self.get_index_text(name)
+ if indextext:
+ self.indexnode['entries'].append(('single', indextext, name, name))
+
+
+class CDomain(Domain):
+ """C language domain."""
+ name = 'c'
+ label = 'C'
+ directives = {
+ 'function': CDesc,
+ 'member': CDesc,
+ 'macro': CDesc,
+ 'type': CDesc,
+ 'var': CDesc,
+ }
+ roles = {
+ 'member': XRefRole(),
+ 'macro': XRefRole(),
+ 'func' : XRefRole(fix_parens=True),
+ 'data': XRefRole(),
+ 'type': XRefRole(),
+ }
+ initial_data = {
+ 'objects': {}, # fullname -> docname, desctype
+ }
+
+ def clear_doc(self, docname):
+ for fullname, (fn, _) in self.data['objects'].items():
+ if fn == docname:
+ del self.data['objects'][fullname]
+
+ def resolve_xref(self, env, fromdocname, builder,
+ typ, target, node, contnode):
+ # strip pointer asterisk
+ target = target.rstrip(' *')
+ if target not in self.data:
+ return None
+ desc = self.data[target]
+ return make_refnode(builder, fromdocname, desc[0], contnode, target)
+
+
+# this contains all registered domains
+all_domains = {
+ 'py': PythonDomain,
+ 'c': CDomain,
+}
diff --git a/sphinx/environment.py b/sphinx/environment.py
index 4319b1c0..068aa2a9 100644
--- a/sphinx/environment.py
+++ b/sphinx/environment.py
@@ -33,7 +33,7 @@ from docutils.io import FileInput, NullOutput
from docutils.core import Publisher
from docutils.utils import Reporter, relative_path
from docutils.readers import standalone
-from docutils.parsers.rst import roles
+from docutils.parsers.rst import roles, directives
from docutils.parsers.rst.languages import en as english
from docutils.parsers.rst.directives.html import MetaBody
from docutils.writers import UnfilteredWriter
@@ -42,10 +42,13 @@ from docutils.transforms.parts import ContentsFilter
from sphinx import addnodes
from sphinx.util import movefile, get_matching_docs, SEP, ustrftime, \
- docname_join, FilenameUniqDict, url_re
+ docname_join, FilenameUniqDict, url_re, make_refnode
from sphinx.errors import SphinxError
from sphinx.directives import additional_xref_types
+orig_role_function = roles.role
+orig_directive_function = directives.directive
+
default_settings = {
'embed_stylesheet': False,
'cloak_email_addresses': True,
@@ -58,7 +61,7 @@ default_settings = {
# This is increased every time an environment attribute is added
# or changed to properly invalidate pickle files.
-ENV_VERSION = 30
+ENV_VERSION = 31
default_substitutions = set([
@@ -209,9 +212,9 @@ class BuildEnvironment:
env = pickle.load(picklefile)
finally:
picklefile.close()
- env.config.values = config.values
if env.version != ENV_VERSION:
raise IOError('env version not current')
+ env.config.values = config.values
return env
def topickle(self, filename):
@@ -220,6 +223,8 @@ class BuildEnvironment:
self.set_warnfunc(None)
values = self.config.values
del self.config.values
+ domains = self.domains
+ del self.domains
# first write to a temporary file, so that if dumping fails,
# the existing environment won't be overwritten
picklefile = open(filename + '.tmp', 'wb')
@@ -236,6 +241,7 @@ class BuildEnvironment:
picklefile.close()
movefile(filename + '.tmp', filename)
# reset attributes
+ self.domains = domains
self.config.values = values
self.set_warnfunc(warnfunc)
@@ -249,6 +255,9 @@ class BuildEnvironment:
# the application object; only set while update() runs
self.app = None
+ # all the registered domains, set by the application
+ self.domains = {}
+
# the docutils settings for building
self.settings = default_settings.copy()
self.settings['env'] = self
@@ -287,11 +296,10 @@ class BuildEnvironment:
self.glob_toctrees = set() # docnames that have :glob: toctrees
self.numbered_toctrees = set() # docnames that have :numbered: toctrees
+ # domain-specific inventories, here to be pickled
+ self.domaindata = {} # domainname -> domain-specific object
+
# X-ref target inventory
- self.descrefs = {} # fullname -> docname, desctype
- self.filemodules = {} # docname -> [modules]
- self.modules = {} # modname -> docname, synopsis,
- # platform, deprecated
self.labels = {} # labelname -> docname, labelid, sectionname
self.anonlabels = {} # labelname -> docname, labelid
self.progoptions = {} # (program, name) -> docname, labelid
@@ -310,6 +318,7 @@ class BuildEnvironment:
# These are set while parsing a file
self.docname = None # current document name
+ # XXX remove currmodule and currclass from here
self.currmodule = None # current module name
self.currclass = None # current class name
self.currdesc = None # current descref name
@@ -349,7 +358,6 @@ class BuildEnvironment:
self.toc_secnumbers.pop(docname, None)
self.toc_num_entries.pop(docname, None)
self.toctree_includes.pop(docname, None)
- self.filemodules.pop(docname, None)
self.indexentries.pop(docname, None)
self.glob_toctrees.discard(docname)
self.numbered_toctrees.discard(docname)
@@ -360,12 +368,6 @@ class BuildEnvironment:
fnset.discard(docname)
if not fnset:
del self.files_to_rebuild[subfn]
- for fullname, (fn, _) in self.descrefs.items():
- if fn == docname:
- del self.descrefs[fullname]
- for modname, (fn, _, _, _) in self.modules.items():
- if fn == docname:
- del self.modules[modname]
for labelname, (fn, _, _) in self.labels.items():
if fn == docname:
del self.labels[labelname]
@@ -379,6 +381,10 @@ class BuildEnvironment:
new = [change for change in changes if change[1] != docname]
changes[:] = new
+ # XXX why does this not work inside the if?
+ for domain in self.domains.values():
+ domain.clear_doc(docname)
+
def doc2path(self, docname, base=True, suffix=None):
"""
Return the filename for the document name.
@@ -558,6 +564,7 @@ class BuildEnvironment:
# remove all inventory entries for that file
if app:
app.emit('env-purge-doc', self, docname)
+
self.clear_doc(docname)
if src_path is None:
@@ -596,6 +603,44 @@ class BuildEnvironment:
else:
return data
+ # defaults to the global default, but can be re-set in a document
+ self.default_domain = self.domains.get(self.config.default_domain)
+
+ # monkey-patch, so that domain directives take precedence
+ def directive(directive_name, language_module, document):
+ directive_name = directive_name.lower()
+ if ':' in directive_name:
+ domain_name, directive_name = directive_name.split(':', 1)
+ if domain_name in self.domains:
+ domain = self.domains[domain_name]
+ directive = domain.directive(directive_name)
+ if directive is not None:
+ return directive, []
+ elif self.default_domain is not None:
+ directive = self.default_domain.directive(directive_name)
+ if directive is not None:
+ return directive, []
+ return orig_directive_function(directive_name, language_module,
+ document)
+ directives.directive = directive
+
+ def role(role_name, language_module, lineno, reporter):
+ role_name = role_name.lower()
+ if ':' in role_name:
+ domain_name, role_name = role_name.split(':', 1)
+ if domain_name in self.domains:
+ domain = self.domains[domain_name]
+ role = domain.role(role_name)
+ if role is not None:
+ return role, []
+ elif self.default_domain is not None:
+ role = self.default_domain.role(role_name)
+ if role is not None:
+ return role, []
+ return orig_role_function(role_name, language_module,
+ lineno, reporter)
+ roles.role = role
+
# publish manually
pub = Publisher(reader=SphinxStandaloneReader(),
writer=SphinxDummyWriter(),
@@ -641,6 +686,7 @@ class BuildEnvironment:
self.docname = None
self.currmodule = None
self.currclass = None
+ self.default_domain = None
self.gloss_entries = set()
if save_parsed:
@@ -950,19 +996,6 @@ class BuildEnvironment:
# -------
# these are called from docutils directives and therefore use self.docname
#
- def note_descref(self, fullname, desctype, line):
- if fullname in self.descrefs:
- self.warn(self.docname,
- 'duplicate canonical description name %s, ' % fullname +
- 'other instance in ' +
- self.doc2path(self.descrefs[fullname][0]),
- line)
- self.descrefs[fullname] = (self.docname, desctype)
-
- def note_module(self, modname, synopsis, platform, deprecated):
- self.modules[modname] = (self.docname, synopsis, platform, deprecated)
- self.filemodules.setdefault(self.docname, []).append(modname)
-
def note_progoption(self, optname, labelid):
self.progoptions[self.currprogram, optname] = (self.docname, labelid)
@@ -1136,6 +1169,8 @@ class BuildEnvironment:
return entries
maxdepth = maxdepth or toctree.get('maxdepth', -1)
+ if not titles_only and toctree.get('titlesonly', False):
+ titles_only = True
# NOTE: previously, this was separate=True, but that leads to artificial
# separation when two or more toctree entries form a logical unit, so
@@ -1158,11 +1193,8 @@ class BuildEnvironment:
docname, refnode['refuri']) + refnode['anchorname']
return newnode
- descroles = frozenset(('data', 'exc', 'func', 'class', 'const',
- 'attr', 'obj', 'meth', 'cfunc', 'cmember',
- 'cdata', 'ctype', 'cmacro'))
-
def resolve_references(self, doctree, fromdocname, builder):
+ # XXX remove this
reftarget_roles = set(('token', 'term', 'citation'))
# add all custom xref types too
reftarget_roles.update(i[0] for i in additional_xref_types.values())
@@ -1175,7 +1207,15 @@ class BuildEnvironment:
target = node['reftarget']
try:
- if typ == 'ref':
+ if node.has_key('refdomain'):
+ # let the domain try to resolve the reference
+ try:
+ domain = self.domains[node['refdomain']]
+ except KeyError:
+ raise NoUri
+ newnode = domain.resolve_xref(self, fromdocname, builder,
+ typ, target, node, contnode)
+ elif typ == 'ref':
if node['refcaption']:
# reference to anonymous label; the reference uses
# the supplied link caption
@@ -1240,13 +1280,8 @@ class BuildEnvironment:
#self.warn(fromdocname, 'unknown keyword: %s' % target)
newnode = contnode
else:
- newnode = nodes.reference('', '')
- if docname == fromdocname:
- newnode['refid'] = labelid
- else:
- newnode['refuri'] = builder.get_relative_uri(
- fromdocname, docname) + '#' + labelid
- newnode.append(contnode)
+ newnode = make_refnode(builder, fromdocname, docname,
+ labelid, contnode)
elif typ == 'option':
progname = node['refprogram']
docname, labelid = self.progoptions.get((progname, target),
@@ -1254,13 +1289,8 @@ class BuildEnvironment:
if not docname:
newnode = contnode
else:
- newnode = nodes.reference('', '')
- if docname == fromdocname:
- newnode['refid'] = labelid
- else:
- newnode['refuri'] = builder.get_relative_uri(
- fromdocname, docname) + '#' + labelid
- newnode.append(contnode)
+ newnode = make_refnode(builder, fromdocname, docname,
+ labelid, contnode)
elif typ in reftarget_roles:
docname, labelid = self.reftargets.get((typ, target),
('', ''))
@@ -1275,62 +1305,19 @@ class BuildEnvironment:
node.line)
newnode = contnode
else:
- newnode = nodes.reference('', '')
- if docname == fromdocname:
- newnode['refid'] = labelid
- else:
- newnode['refuri'] = builder.get_relative_uri(
- fromdocname, docname, typ) + '#' + labelid
- newnode.append(contnode)
- elif typ == 'mod' or \
- typ == 'obj' and target in self.modules:
- docname, synopsis, platform, deprecated = \
- self.modules.get(target, ('','','', ''))
- if not docname:
- newnode = builder.app.emit_firstresult(
- 'missing-reference', self, node, contnode)
- if not newnode:
- newnode = contnode
- elif docname == fromdocname:
- # don't link to self
- newnode = contnode
- else:
- newnode = nodes.reference('', '')
- newnode['refuri'] = builder.get_relative_uri(
- fromdocname, docname) + '#module-' + target
- newnode['reftitle'] = '%s%s%s' % (
- (platform and '(%s) ' % platform),
- synopsis, (deprecated and ' (deprecated)' or ''))
- newnode.append(contnode)
- elif typ in self.descroles:
- # "descrefs"
- modname = node['modname']
- clsname = node['classname']
- searchorder = node.hasattr('refspecific') and 1 or 0
- name, desc = self.find_desc(modname, clsname,
- target, typ, searchorder)
- if not desc:
- newnode = builder.app.emit_firstresult(
- 'missing-reference', self, node, contnode)
- if not newnode:
- newnode = contnode
- else:
- newnode = nodes.reference('', '')
- if desc[0] == fromdocname:
- newnode['refid'] = name
- else:
- newnode['refuri'] = (
- builder.get_relative_uri(fromdocname, desc[0])
- + '#' + name)
- newnode['reftitle'] = name
- newnode.append(contnode)
+ newnode = make_refnode(builder, fromdocname, docname,
+ labelid, contnode)
else:
raise RuntimeError('unknown xfileref node encountered: %s'
% node)
+
+ # no new node found? try the missing-reference event
+ if newnode is None:
+ newnode = builder.app.emit_firstresult(
+ 'missing-reference', self, node, contnode)
except NoUri:
newnode = contnode
- if newnode:
- node.replace_self(newnode)
+ node.replace_self(newnode or contnode)
for node in doctree.traverse(addnodes.only):
try:
@@ -1561,116 +1548,3 @@ class BuildEnvironment:
# the master file is not included anywhere ;)
continue
self.warn(docname, 'document isn\'t included in any toctree')
-
- # --------- QUERYING -------------------------------------------------------
-
- def find_desc(self, modname, classname, name, type, searchorder=0):
- """Find a description node matching "name", perhaps using
- the given module and/or classname."""
- # skip parens
- if name[-2:] == '()':
- name = name[:-2]
-
- if not name:
- return None, None
-
- # don't add module and class names for C things
- if type[0] == 'c' and type not in ('class', 'const'):
- # skip trailing star and whitespace
- name = name.rstrip(' *')
- if name in self.descrefs and self.descrefs[name][1][0] == 'c':
- return name, self.descrefs[name]
- return None, None
-
- newname = None
- if searchorder == 1:
- if modname and classname and \
- modname + '.' + classname + '.' + name in self.descrefs:
- newname = modname + '.' + classname + '.' + name
- elif modname and modname + '.' + name in self.descrefs:
- newname = modname + '.' + name
- elif name in self.descrefs:
- newname = name
- else:
- if name in self.descrefs:
- newname = name
- elif modname and modname + '.' + name in self.descrefs:
- newname = modname + '.' + name
- elif modname and classname and \
- modname + '.' + classname + '.' + name in self.descrefs:
- newname = modname + '.' + classname + '.' + name
- # special case: builtin exceptions have module "exceptions" set
- elif type == 'exc' and '.' not in name and \
- 'exceptions.' + name in self.descrefs:
- newname = 'exceptions.' + name
- # special case: object methods
- elif type in ('func', 'meth') and '.' not in name and \
- 'object.' + name in self.descrefs:
- newname = 'object.' + name
- if newname is None:
- return None, None
- return newname, self.descrefs[newname]
-
- def find_keyword(self, keyword, avoid_fuzzy=False, cutoff=0.6, n=20):
- """
- Find keyword matches for a keyword. If there's an exact match,
- just return it, else return a list of fuzzy matches if avoid_fuzzy
- isn't True.
-
- Keywords searched are: first modules, then descrefs.
-
- Returns: None if nothing found
- (type, docname, anchorname) if exact match found
- list of (quality, type, docname, anchorname, description)
- if fuzzy
- """
-
- if keyword in self.modules:
- docname, title, system, deprecated = self.modules[keyword]
- return 'module', docname, 'module-' + keyword
- if keyword in self.descrefs:
- docname, ref_type = self.descrefs[keyword]
- return ref_type, docname, keyword
- # special cases
- if '.' not in keyword:
- # exceptions are documented in the exceptions module
- if 'exceptions.'+keyword in self.descrefs:
- docname, ref_type = self.descrefs['exceptions.'+keyword]
- return ref_type, docname, 'exceptions.'+keyword
- # special methods are documented as object methods
- if 'object.'+keyword in self.descrefs:
- docname, ref_type = self.descrefs['object.'+keyword]
- return ref_type, docname, 'object.'+keyword
-
- if avoid_fuzzy:
- return
-
- # find fuzzy matches
- s = difflib.SequenceMatcher()
- s.set_seq2(keyword.lower())
-
- def possibilities():
- for title, (fn, desc, _, _) in self.modules.iteritems():
- yield ('module', fn, 'module-'+title, desc)
- for title, (fn, desctype) in self.descrefs.iteritems():
- yield (desctype, fn, title, '')
-
- def dotsearch(string):
- parts = string.lower().split('.')
- for idx in xrange(0, len(parts)):
- yield '.'.join(parts[idx:])
-
- result = []
- for type, docname, title, desc in possibilities():
- best_res = 0
- for part in dotsearch(title):
- s.set_seq1(part)
- if s.real_quick_ratio() >= cutoff and \
- s.quick_ratio() >= cutoff and \
- s.ratio() >= cutoff and \
- s.ratio() > best_res:
- best_res = s.ratio()
- if best_res:
- result.append((best_res, type, docname, title, desc))
-
- return heapq.nlargest(n, result)
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index c9a248a7..46b1e73b 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -372,6 +372,16 @@ class Documenter(object):
"""
return None
+ def format_name(self):
+ """
+ Format the name of *self.object*. This normally should be something
+ that can be parsed by the generated directive, but doesn't need to be
+ (Sphinx will display it unparsed then).
+ """
+ # normally the name doesn't contain the module (except for module
+ # directives of course)
+ return '.'.join(self.objpath) or self.modname
+
def format_signature(self):
"""
Format the signature (arguments and return annotation) of the object.
@@ -383,8 +393,7 @@ class Documenter(object):
else:
# try to introspect the signature
args = self.format_args()
- if args is None:
- return ''
+
retann = self.retann
result = self.env.app.emit_firstresult(
@@ -401,11 +410,8 @@ class Documenter(object):
def add_directive_header(self, sig):
"""Add the directive header and options to the generated content."""
directive = getattr(self, 'directivetype', self.objtype)
- # the name to put into the generated directive -- doesn't contain
- # the module (except for module directive of course)
- name_in_directive = '.'.join(self.objpath) or self.modname
- self.add_line(u'.. %s:: %s%s' % (directive, name_in_directive, sig),
- '<autodoc>')
+ name = self.format_name()
+ self.add_line(u'.. %s:: %s%s' % (directive, name, sig), '<autodoc>')
if self.options.noindex:
self.add_line(u' :noindex:', '<autodoc>')
if self.objpath:
diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py
index 3d260fd2..3c9ff466 100644
--- a/sphinx/ext/autosummary/__init__.py
+++ b/sphinx/ext/autosummary/__init__.py
@@ -101,13 +101,63 @@ def autosummary_toc_visit_html(self, node):
"""Hide autosummary toctree list in HTML output."""
raise nodes.SkipNode
-def autosummary_toc_visit_latex(self, node):
- """Show autosummary toctree (= put the referenced pages here) in Latex."""
+def autosummary_noop(self, node):
pass
-def autosummary_noop(self, node):
+
+# -- autosummary_table node ----------------------------------------------------
+
+class autosummary_table(nodes.comment):
pass
+def autosummary_table_visit_html(self, node):
+ """Make the first column of the table non-breaking."""
+ try:
+ tbody = node[0][0][-1]
+ for row in tbody:
+ col1_entry = row[0]
+ par = col1_entry[0]
+ for j, subnode in enumerate(list(par)):
+ if isinstance(subnode, nodes.Text):
+ new_text = unicode(subnode.astext())
+ new_text = new_text.replace(u" ", u"\u00a0")
+ par[j] = nodes.Text(new_text)
+ except IndexError:
+ pass
+
+
+# -- autodoc integration -------------------------------------------------------
+
+try:
+ ismemberdescriptor = inspect.ismemberdescriptor
+ isgetsetdescriptor = inspect.isgetsetdescriptor
+except AttributeError:
+ def ismemberdescriptor(obj):
+ return False
+ isgetsetdescriptor = ismemberdescriptor
+
+def get_documenter(obj):
+ """
+ Get an autodoc.Documenter class suitable for documenting the given object
+ """
+ import sphinx.ext.autodoc as autodoc
+
+ if inspect.isclass(obj):
+ if issubclass(obj, Exception):
+ return autodoc.ExceptionDocumenter
+ return autodoc.ClassDocumenter
+ elif inspect.ismodule(obj):
+ return autodoc.ModuleDocumenter
+ elif inspect.ismethod(obj) or inspect.ismethoddescriptor(obj):
+ return autodoc.MethodDocumenter
+ elif (ismemberdescriptor(obj) or isgetsetdescriptor(obj)
+ or inspect.isdatadescriptor(obj)):
+ return autodoc.AttributeDocumenter
+ elif inspect.isroutine(obj):
+ return autodoc.FunctionDocumenter
+ else:
+ return autodoc.DataDocumenter
+
# -- .. autosummary:: ----------------------------------------------------------
@@ -125,35 +175,38 @@ class Autosummary(Directive):
option_spec = {
'toctree': directives.unchanged,
'nosignatures': directives.flag,
+ 'template': directives.unchanged,
}
- def run(self):
- names = []
- names += [x.strip() for x in self.content if x.strip()]
+ def warn(self, msg):
+ self.warnings.append(self.state.document.reporter.warning(
+ msg, line=self.lineno))
- table, warnings, real_names = get_autosummary(
- names, self.state, 'nosignatures' in self.options)
- node = table
+ def run(self):
+ self.env = env = self.state.document.settings.env
+ self.genopt = {}
+ self.warnings = []
- env = self.state.document.settings.env
- suffix = env.config.source_suffix
- all_docnames = env.found_docs.copy()
- dirname = posixpath.dirname(env.docname)
+ names = [x.strip().split()[0] for x in self.content
+ if x.strip() and re.search(r'^[~a-zA-Z_]', x.strip()[0])]
+ items = self.get_items(names)
+ nodes = self.get_table(items)
if 'toctree' in self.options:
+ suffix = env.config.source_suffix
+ all_docnames = env.found_docs.copy()
+ dirname = posixpath.dirname(env.docname)
+
tree_prefix = self.options['toctree'].strip()
docnames = []
- for name in names:
- name = real_names.get(name, name)
-
- docname = posixpath.join(tree_prefix, name)
+ for name, sig, summary, real_name in items:
+ docname = posixpath.join(tree_prefix, real_name)
if docname.endswith(suffix):
docname = docname[:-len(suffix)]
docname = posixpath.normpath(posixpath.join(dirname, docname))
if docname not in env.found_docs:
- warnings.append(self.state.document.reporter.warning(
- 'toctree references unknown document %r' % docname,
- line=self.lineno))
+ self.warn('toctree references unknown document %r'
+ % docname)
docnames.append(docname)
tocnode = addnodes.toctree()
@@ -163,63 +216,167 @@ class Autosummary(Directive):
tocnode['glob'] = None
tocnode = autosummary_toc('', '', tocnode)
- return warnings + [node] + [tocnode]
- else:
- return warnings + [node]
+ nodes.append(tocnode)
+ return self.warnings + nodes
-def get_autosummary(names, state, no_signatures=False):
- """
- Generate a proper table node for autosummary:: directive.
+ def get_items(self, names):
+ """
+ Try to import the given names, and return a list of
+ ``[(name, signature, summary_string, real_name), ...]``.
+ """
+ env = self.state.document.settings.env
+
+ prefixes = ['']
+ if env.currmodule:
+ prefixes.insert(0, env.currmodule)
+
+ items = []
+
+ max_item_chars = 50
+
+ for name in names:
+ display_name = name
+ if name.startswith('~'):
+ name = name[1:]
+ display_name = name.split('.')[-1]
+
+ try:
+ obj, real_name = import_by_name(name, prefixes=prefixes)
+ except ImportError:
+ self.warn('failed to import %s' % name)
+ items.append((name, '', '', name))
+ continue
+
+ # NB. using real_name here is important, since Documenters
+ # handle module prefixes slightly differently
+ documenter = get_documenter(obj)(self, real_name)
+ if not documenter.parse_name():
+ self.warn('failed to parse name %s' % real_name)
+ items.append((display_name, '', '', real_name))
+ continue
+ if not documenter.import_object():
+ self.warn('failed to import object %s' % real_name)
+ items.append((display_name, '', '', real_name))
+ continue
+
+ # -- Grab the signature
+
+ sig = documenter.format_signature()
+ if not sig:
+ sig = ''
+ else:
+ max_chars = max(10, max_item_chars - len(display_name))
+ sig = mangle_signature(sig, max_chars=max_chars)
+ sig = sig.replace('*', r'\*')
+
+ # -- Grab the summary
+
+ doc = list(documenter.process_doc(documenter.get_doc()))
+
+ while doc and not doc[0].strip():
+ doc.pop(0)
+ m = re.search(r"^([A-Z][^A-Z]*?\.\s)", " ".join(doc).strip())
+ if m:
+ summary = m.group(1).strip()
+ elif doc:
+ summary = doc[0].strip()
+ else:
+ summary = ''
+
+ items.append((display_name, sig, summary, real_name))
+
+ return items
+
+ def get_table(self, items):
+ """
+ Generate a proper list of table nodes for autosummary:: directive.
+
+ *items* is a list produced by :meth:`get_items`.
+ """
+ table_spec = addnodes.tabular_col_spec()
+ table_spec['spec'] = 'LL'
+
+ table = autosummary_table('')
+ real_table = nodes.table('')
+ table.append(real_table)
+ group = nodes.tgroup('', cols=2)
+ real_table.append(group)
+ group.append(nodes.colspec('', colwidth=10))
+ group.append(nodes.colspec('', colwidth=90))
+ body = nodes.tbody('')
+ group.append(body)
+
+ def append_row(*column_texts):
+ row = nodes.row('')
+ for text in column_texts:
+ node = nodes.paragraph('')
+ vl = ViewList()
+ vl.append(text, '<autosummary>')
+ self.state.nested_parse(vl, 0, node)
+ try:
+ if isinstance(node[0], nodes.paragraph):
+ node = node[0]
+ except IndexError:
+ pass
+ row.append(nodes.entry('', node))
+ body.append(row)
+
+ for name, sig, summary, real_name in items:
+ qualifier = 'obj'
+ if 'nosignatures' not in self.options:
+ col1 = ':%s:`%s <%s>`\ %s' % (qualifier, name, real_name, sig)
+ else:
+ col1 = ':%s:`%s <%s>`' % (qualifier, name, real_name)
+ col2 = summary
+ append_row(col1, col2)
+
+ return [table_spec, table]
+
+def mangle_signature(sig, max_chars=30):
+ """Reformat a function signature to a more compact form."""
+ sig = re.sub(r"^\((.*)\)$", r"\1", sig) + ", "
+ r = re.compile(r"(?P<name>[a-zA-Z0-9_*]+)(?P<default>=.*?)?, ")
+ items = r.findall(sig)
- *names* is a list of names of Python objects to be imported and added to the
- table. *document* is the Docutils document object.
+ args = [name for name, default in items if not default]
+ opts = [name for name, default in items if default]
+ sig = limited_join(", ", args, max_chars=max_chars-2)
+ if opts:
+ if not sig:
+ sig = "[%s]" % limited_join(", ", opts, max_chars=max_chars-4)
+ elif len(sig) < max_chars - 4 - 2 - 3:
+ sig += "[, %s]" % limited_join(", ", opts,
+ max_chars=max_chars-len(sig)-4-2)
+
+ return u"(%s)" % sig
+
+def limited_join(sep, items, max_chars=30, overflow_marker="..."):
"""
- document = state.document
-
- real_names = {}
- warnings = []
-
- prefixes = ['']
- prefixes.insert(0, document.settings.env.currmodule)
-
- table = nodes.table('')
- group = nodes.tgroup('', cols=2)
- table.append(group)
- group.append(nodes.colspec('', colwidth=30))
- group.append(nodes.colspec('', colwidth=70))
- body = nodes.tbody('')
- group.append(body)
-
- def append_row(*column_texts):
- row = nodes.row('')
- for text in column_texts:
- node = nodes.paragraph('')
- vl = ViewList()
- vl.append(text, '<autosummary>')
- state.nested_parse(vl, 0, node)
- row.append(nodes.entry('', node))
- body.append(row)
-
- for name in names:
- try:
- obj, real_name = import_by_name(name, prefixes=prefixes)
- except ImportError:
- warnings.append(document.reporter.warning(
- 'failed to import %s' % name))
- append_row(':obj:`%s`' % name, '')
- continue
+ Join a number of strings to one, limiting the length to *max_chars*.
- real_names[name] = real_name
+ If the string overflows this limit, replace the last fitting item by
+ *overflow_marker*.
+
+ Returns: joined_string
+ """
+ full_str = sep.join(items)
+ if len(full_str) < max_chars:
+ return full_str
+
+ n_chars = 0
+ n_items = 0
+ for j, item in enumerate(items):
+ n_chars += len(item) + len(sep)
+ if n_chars < max_chars - len(overflow_marker):
+ n_items += 1
+ else:
+ break
- title = ''
- qualifier = 'obj'
- col1 = ':'+qualifier+':`%s <%s>`' % (name, real_name)
- col2 = title
- append_row(col1, col2)
+ return sep.join(list(items[:n_items]) + [overflow_marker])
- return table, warnings, real_names
+# -- Importing items -----------------------------------------------------------
def import_by_name(name, prefixes=[None]):
"""
@@ -241,14 +398,16 @@ def import_by_name(name, prefixes=[None]):
def _import_by_name(name):
"""Import a Python object given its full name."""
try:
- # try first interpret `name` as MODNAME.OBJ
name_parts = name.split('.')
- try:
- modname = '.'.join(name_parts[:-1])
- __import__(modname)
- return getattr(sys.modules[modname], name_parts[-1])
- except (ImportError, IndexError, AttributeError):
- pass
+
+ # try first interpret `name` as MODNAME.OBJ
+ modname = '.'.join(name_parts[:-1])
+ if modname:
+ try:
+ __import__(modname)
+ return getattr(sys.modules[modname], name_parts[-1])
+ except (ImportError, IndexError, AttributeError):
+ pass
# ... then as MODNAME, MODNAME.OBJ1, MODNAME.OBJ1.OBJ2, ...
last_j = 0
@@ -301,16 +460,25 @@ def autolink_role(typ, rawtext, etext, lineno, inliner,
def process_generate_options(app):
genfiles = app.config.autosummary_generate
+
+ ext = app.config.source_suffix
+
+ if genfiles and not hasattr(genfiles, '__len__'):
+ env = app.builder.env
+ genfiles = [x + ext for x in env.found_docs
+ if os.path.isfile(env.doc2path(x))]
+
if not genfiles:
return
+
from sphinx.ext.autosummary.generate import generate_autosummary_docs
- ext = app.config.source_suffix
- genfiles = [path.join(app.srcdir, genfile +
- (not genfile.endswith(ext) and ext or ''))
+ genfiles = [genfile + (not genfile.endswith(ext) and ext or '')
for genfile in genfiles]
- generate_autosummary_docs(genfiles, warn=app.warn, info=app.info,
- suffix=ext)
+
+ generate_autosummary_docs(genfiles, builder=app.builder,
+ warn=app.warn, info=app.info, suffix=ext,
+ base_path=app.srcdir)
def setup(app):
@@ -318,7 +486,11 @@ def setup(app):
app.setup_extension('sphinx.ext.autodoc')
app.add_node(autosummary_toc,
html=(autosummary_toc_visit_html, autosummary_noop),
- latex=(autosummary_toc_visit_latex, autosummary_noop),
+ latex=(autosummary_noop, autosummary_noop),
+ text=(autosummary_noop, autosummary_noop))
+ app.add_node(autosummary_table,
+ html=(autosummary_table_visit_html, autosummary_noop),
+ latex=(autosummary_noop, autosummary_noop),
text=(autosummary_noop, autosummary_noop))
app.add_directive('autosummary', Autosummary)
app.add_role('autolink', autolink_role)
diff --git a/sphinx/ext/autosummary/generate.py b/sphinx/ext/autosummary/generate.py
index 0a1e0406..568ee99f 100644
--- a/sphinx/ext/autosummary/generate.py
+++ b/sphinx/ext/autosummary/generate.py
@@ -20,219 +20,291 @@
import os
import re
import sys
-import getopt
+import optparse
import inspect
+import pydoc
-from jinja2 import Environment, PackageLoader
+from jinja2 import FileSystemLoader, TemplateNotFound
+from jinja2.sandbox import SandboxedEnvironment
-from sphinx.ext.autosummary import import_by_name
+from sphinx.ext.autosummary import import_by_name, get_documenter
from sphinx.util import ensuredir
+from sphinx.jinja2glue import BuiltinTemplateLoader
-# create our own templating environment, for module template only
-env = Environment(loader=PackageLoader('sphinx.ext.autosummary', 'templates'))
+def main(argv=sys.argv):
+ usage = """%prog [OPTIONS] SOURCEFILE ..."""
+ p = optparse.OptionParser(usage.strip())
+ p.add_option("-o", "--output-dir", action="store", type="string",
+ dest="output_dir", default=None,
+ help="Directory to place all output in")
+ p.add_option("-s", "--suffix", action="store", type="string",
+ dest="suffix", default="rst",
+ help="Default suffix for files (default: %default)")
+ p.add_option("-t", "--templates", action="store", type="string",
+ dest="templates", default=None,
+ help="Custom template directory (default: %default)")
+ options, args = p.parse_args(argv[1:])
+
+ if len(args) < 1:
+ p.error('no input files given')
+ generate_autosummary_docs(args, options.output_dir,
+ "." + options.suffix,
+ template_dir=options.templates)
def _simple_info(msg):
print msg
def _simple_warn(msg):
- print >>sys.stderr, 'WARNING: ' + msg
+ print >> sys.stderr, 'WARNING: ' + msg
+
+# -- Generating output ---------------------------------------------------------
+
+def generate_autosummary_docs(sources, output_dir=None, suffix='.rst',
+ warn=_simple_warn, info=_simple_info,
+ base_path=None, builder=None, template_dir=None):
+
+ showed_sources = list(sorted(sources))
+ if len(showed_sources) > 20:
+ showed_sources = showed_sources[:10] + ['...'] + showed_sources[-10:]
+ info('[autosummary] generating autosummary for: %s' %
+ ', '.join(showed_sources))
-def generate_autosummary_docs(sources, output_dir=None, suffix=None,
- warn=_simple_warn, info=_simple_info):
- info('generating autosummary for: %s' % ', '.join(sources))
if output_dir:
- info('writing to %s' % output_dir)
+ info('[autosummary] writing to %s' % output_dir)
+
+ if base_path is not None:
+ sources = [os.path.join(base_path, filename) for filename in sources]
+
+ # create our own templating environment
+ template_dirs = [os.path.join(os.path.dirname(__file__), 'templates')]
+ if builder is not None:
+ # allow the user to override the templates
+ template_loader = BuiltinTemplateLoader()
+ template_loader.init(builder, dirs=template_dirs)
+ else:
+ if template_dir:
+ template_dirs.insert(0, template_dir)
+ template_loader = FileSystemLoader(template_dirs)
+ template_env = SandboxedEnvironment(loader=template_loader)
+
# read
- names = {}
- for name, loc in get_documented(sources).items():
- for (filename, sec_title, keyword, toctree) in loc:
- if toctree is not None:
- path = os.path.join(os.path.dirname(filename), toctree)
- names[name] = os.path.abspath(path)
+ items = find_autosummary_in_files(sources)
+
+ # remove possible duplicates
+ items = dict([(item, True) for item in items]).keys()
+
+ # keep track of new files
+ new_files = []
# write
- for name, path in sorted(names.items()):
- path = output_dir or path
+ for name, path, template_name in sorted(items):
+ if path is None:
+ # The corresponding autosummary:: directive did not have
+ # a :toctree: option
+ continue
+
+ path = output_dir or os.path.abspath(path)
ensuredir(path)
try:
obj, name = import_by_name(name)
except ImportError, e:
- warn('failed to import %r: %s' % (name, e))
+ warn('[autosummary] failed to import %r: %s' % (name, e))
continue
- fn = os.path.join(path, name + (suffix or '.rst'))
+ fn = os.path.join(path, name + suffix)
+
# skip it if it exists
if os.path.isfile(fn):
continue
+ new_files.append(fn)
+
f = open(fn, 'w')
try:
- if inspect.ismodule(obj):
- # XXX replace this with autodoc's API?
- tmpl = env.get_template('module')
- functions = [getattr(obj, item).__name__
- for item in dir(obj)
- if inspect.isfunction(getattr(obj, item))]
- classes = [getattr(obj, item).__name__
- for item in dir(obj)
- if inspect.isclass(getattr(obj, item))
- and not issubclass(getattr(obj, item), Exception)]
- exceptions = [getattr(obj, item).__name__
- for item in dir(obj)
- if inspect.isclass(getattr(obj, item))
- and issubclass(getattr(obj, item), Exception)]
- rendered = tmpl.render(name=name,
- underline='='*len(name),
- functions=functions,
- classes=classes,
- exceptions=exceptions,
- len_functions=len(functions),
- len_classes=len(classes),
- len_exceptions=len(exceptions))
- f.write(rendered)
+ doc = get_documenter(obj)
+
+ if template_name is not None:
+ template = template_env.get_template(template_name)
else:
- f.write('%s\n%s\n\n' % (name, '='*len(name)))
-
- if inspect.isclass(obj):
- if issubclass(obj, Exception):
- f.write(format_modulemember(name, 'autoexception'))
- else:
- f.write(format_modulemember(name, 'autoclass'))
- elif inspect.ismethod(obj) or inspect.ismethoddescriptor(obj):
- f.write(format_classmember(name, 'automethod'))
- elif callable(obj):
- f.write(format_modulemember(name, 'autofunction'))
- elif hasattr(obj, '__get__'):
- f.write(format_classmember(name, 'autoattribute'))
- else:
- f.write(format_modulemember(name, 'autofunction'))
- finally:
- f.close()
+ try:
+ template = template_env.get_template('autosummary/%s.rst'
+ % doc.objtype)
+ except TemplateNotFound:
+ template = template_env.get_template('autosummary/base.rst')
+
+ def get_members(obj, typ, include_public=[]):
+ items = [
+ name for name in dir(obj)
+ if get_documenter(getattr(obj, name)).objtype == typ
+ ]
+ public = [x for x in items
+ if x in include_public or not x.startswith('_')]
+ return public, items
+
+ ns = {}
+
+ if doc.objtype == 'module':
+ ns['members'] = dir(obj)
+ ns['functions'], ns['all_functions'] = \
+ get_members(obj, 'function')
+ ns['classes'], ns['all_classes'] = \
+ get_members(obj, 'class')
+ ns['exceptions'], ns['all_exceptions'] = \
+ get_members(obj, 'exception')
+ elif doc.objtype == 'class':
+ ns['members'] = dir(obj)
+ ns['methods'], ns['all_methods'] = \
+ get_members(obj, 'method', ['__init__'])
+ ns['attributes'], ns['all_attributes'] = \
+ get_members(obj, 'attribute')
+
+ parts = name.split('.')
+ if doc.objtype in ('method', 'attribute'):
+ mod_name = '.'.join(parts[:-2])
+ cls_name = parts[-2]
+ obj_name = '.'.join(parts[-2:])
+ ns['class'] = cls_name
+ else:
+ mod_name, obj_name = '.'.join(parts[:-1]), parts[-1]
+ ns['fullname'] = name
+ ns['module'] = mod_name
+ ns['objname'] = obj_name
+ ns['name'] = parts[-1]
-def format_modulemember(name, directive):
- parts = name.split('.')
- mod, name = '.'.join(parts[:-1]), parts[-1]
- return '.. currentmodule:: %s\n\n.. %s:: %s\n' % (mod, directive, name)
+ ns['objtype'] = doc.objtype
+ ns['underline'] = len(name) * '='
+ rendered = template.render(**ns)
+ f.write(rendered)
+ finally:
+ f.close()
-def format_classmember(name, directive):
- parts = name.split('.')
- mod, name = '.'.join(parts[:-2]), '.'.join(parts[-2:])
- return '.. currentmodule:: %s\n\n.. %s:: %s\n' % (mod, directive, name)
+ # descend recursively to new files
+ if new_files:
+ generate_autosummary_docs(new_files, output_dir=output_dir,
+ suffix=suffix, warn=warn, info=info,
+ base_path=base_path, builder=builder,
+ template_dir=template_dir)
-title_underline_re = re.compile('^[-=*_^#]{3,}\s*$')
-autodoc_re = re.compile(r'.. auto(function|method|attribute|class|exception'
- '|module)::\s*([A-Za-z0-9_.]+)\s*$')
-autosummary_re = re.compile(r'^\.\.\s+autosummary::\s*')
-module_re = re.compile(r'^\.\.\s+(current)?module::\s*([a-zA-Z0-9_.]+)\s*$')
-autosummary_item_re = re.compile(r'^\s+([_a-zA-Z][a-zA-Z0-9_.]*)\s*')
-toctree_arg_re = re.compile(r'^\s+:toctree:\s*(.*?)\s*$')
+# -- Finding documented entries in files ---------------------------------------
-def get_documented(filenames):
+def find_autosummary_in_files(filenames):
"""
- Find out what items are documented in the given filenames.
-
- Returns a dict of list of (filename, title, keyword, toctree) Keys are
- documented names of objects. The value is a list of locations where the
- object was documented. Each location is a tuple of filename, the current
- section title, the name of the directive, and the value of the :toctree:
- argument (if present) of the directive.
+ Find out what items are documented in source/*.rst.
+ See `find_autosummary_in_lines`.
"""
-
- documented = {}
-
+ documented = []
for filename in filenames:
- current_title = []
- last_line = None
- toctree = None
- current_module = None
- in_autosummary = False
-
f = open(filename, 'r')
- for line in f:
- try:
- if in_autosummary:
- m = toctree_arg_re.match(line)
- if m:
- toctree = m.group(1)
- continue
-
- if line.strip().startswith(':'):
- continue # skip options
-
- m = autosummary_item_re.match(line)
-
- if m:
- name = m.group(1).strip()
- if current_module and \
- not name.startswith(current_module + '.'):
- name = '%s.%s' % (current_module, name)
- documented.setdefault(name, []).append(
- (filename, current_title, 'autosummary', toctree))
- continue
- if line.strip() == '':
- continue
- in_autosummary = False
-
- m = autosummary_re.match(line)
- if m:
- in_autosummary = True
- continue
-
- m = autodoc_re.search(line)
- if m:
- name = m.group(2).strip()
- # XXX look in newer generate.py
- if current_module and \
- not name.startswith(current_module + '.'):
- name = '%s.%s' % (current_module, name)
- if m.group(1) == 'module':
- current_module = name
- documented.setdefault(name, []).append(
- (filename, current_title, 'auto' + m.group(1), None))
- continue
-
- m = title_underline_re.match(line)
- if m and last_line:
- current_title = last_line.strip()
- continue
-
- m = module_re.match(line)
- if m:
- current_module = m.group(2)
- continue
- finally:
- last_line = line
+ lines = f.read().splitlines()
+ documented.extend(find_autosummary_in_lines(lines, filename=filename))
+ f.close()
return documented
-
-def main(argv=sys.argv):
- usage = 'usage: %s [-o output_dir] [-s suffix] sourcefile ...' % sys.argv[0]
+def find_autosummary_in_docstring(name, module=None, filename=None):
+ """
+ Find out what items are documented in the given object's docstring.
+ See `find_autosummary_in_lines`.
+ """
try:
- opts, args = getopt.getopt(argv[1:], 'o:s:')
- except getopt.error:
- print >>sys.stderr, usage
- return 1
-
- output_dir = None
- suffix = None
- for opt, val in opts:
- if opt == '-o':
- output_dir = val
- elif opt == '-s':
- suffix = val
+ obj, real_name = import_by_name(name)
+ lines = pydoc.getdoc(obj).splitlines()
+ return find_autosummary_in_lines(lines, module=name, filename=filename)
+ except AttributeError:
+ pass
+ except ImportError, e:
+ print "Failed to import '%s': %s" % (name, e)
+ return []
+
+def find_autosummary_in_lines(lines, module=None, filename=None):
+ """
+ Find out what items appear in autosummary:: directives in the given lines.
+
+ Returns a list of (name, toctree, template) where *name* is a name
+ of an object and *toctree* the :toctree: path of the corresponding
+ autosummary directive (relative to the root of the file name), and
+ *template* the value of the :template: option. *toctree* and
+ *template* ``None`` if the directive does not have the
+ corresponding options set.
+ """
+ autosummary_re = re.compile(r'^\s*\.\.\s+autosummary::\s*')
+ automodule_re = re.compile(
+ r'^\s*\.\.\s+automodule::\s*([A-Za-z0-9_.]+)\s*$')
+ module_re = re.compile(
+ r'^\s*\.\.\s+(current)?module::\s*([a-zA-Z0-9_.]+)\s*$')
+ autosummary_item_re = re.compile(
+ r'^\s+(~?[_a-zA-Z][a-zA-Z0-9_.]*)\s*.*?')
+ toctree_arg_re = re.compile(r'^\s+:toctree:\s*(.*?)\s*$')
+ template_arg_re = re.compile(r'^\s+:template:\s*(.*?)\s*$')
+
+ documented = []
+
+ toctree = None
+ template = None
+ current_module = module
+ in_autosummary = False
+
+ for line in lines:
+ if in_autosummary:
+ m = toctree_arg_re.match(line)
+ if m:
+ toctree = m.group(1)
+ if filename:
+ toctree = os.path.join(os.path.dirname(filename),
+ toctree)
+ continue
+
+ m = template_arg_re.match(line)
+ if m:
+ template = m.group(1).strip()
+ continue
+
+ if line.strip().startswith(':'):
+ continue # skip options
+
+ m = autosummary_item_re.match(line)
+ if m:
+ name = m.group(1).strip()
+ if name.startswith('~'):
+ name = name[1:]
+ if current_module and \
+ not name.startswith(current_module + '.'):
+ name = "%s.%s" % (current_module, name)
+ documented.append((name, toctree, template))
+ continue
+
+ if not line.strip():
+ continue
+
+ in_autosummary = False
+
+ m = autosummary_re.match(line)
+ if m:
+ in_autosummary = True
+ toctree = None
+ template = None
+ continue
- if len(args) < 1:
- print >>sys.stderr, usage
- return 1
+ m = automodule_re.search(line)
+ if m:
+ current_module = m.group(1).strip()
+ # recurse into the automodule docstring
+ documented.extend(find_autosummary_in_docstring(
+ current_module, filename=filename))
+ continue
+
+ m = module_re.match(line)
+ if m:
+ current_module = m.group(2)
+ continue
- generate_autosummary_docs(args, output_dir, suffix)
+ return documented
if __name__ == '__main__':
- main(sys.argv)
+ main()
diff --git a/sphinx/ext/autosummary/templates/autosummary/base.rst b/sphinx/ext/autosummary/templates/autosummary/base.rst
new file mode 100644
index 00000000..21a0ccd8
--- /dev/null
+++ b/sphinx/ext/autosummary/templates/autosummary/base.rst
@@ -0,0 +1,6 @@
+{{ fullname }}
+{{ underline }}
+
+.. currentmodule:: {{ module }}
+
+.. auto{{ objtype }}:: {{ objname }}
diff --git a/sphinx/ext/autosummary/templates/autosummary/class.rst b/sphinx/ext/autosummary/templates/autosummary/class.rst
new file mode 100644
index 00000000..40494dad
--- /dev/null
+++ b/sphinx/ext/autosummary/templates/autosummary/class.rst
@@ -0,0 +1,30 @@
+{{ fullname }}
+{{ underline }}
+
+.. currentmodule:: {{ module }}
+
+.. autoclass:: {{ objname }}
+
+ {% block methods %}
+ .. automethod:: __init__
+
+ {% if methods %}
+ .. rubric:: Methods
+
+ .. autosummary::
+ {% for item in methods %}
+ ~{{ name }}.{{ item }}
+ {%- endfor %}
+ {% endif %}
+ {% endblock %}
+
+ {% block attributes %}
+ {% if attributes %}
+ .. rubric:: Attributes
+
+ .. autosummary::
+ {% for item in attributes %}
+ ~{{ name }}.{{ item }}
+ {%- endfor %}
+ {% endif %}
+ {% endblock %}
diff --git a/sphinx/ext/autosummary/templates/autosummary/module.rst b/sphinx/ext/autosummary/templates/autosummary/module.rst
new file mode 100644
index 00000000..cc76c9e0
--- /dev/null
+++ b/sphinx/ext/autosummary/templates/autosummary/module.rst
@@ -0,0 +1,37 @@
+{{ fullname }}
+{{ underline }}
+
+.. automodule:: {{ fullname }}
+
+ {% block functions %}
+ {% if functions %}
+ .. rubric:: Functions
+
+ .. autosummary::
+ {% for item in functions %}
+ {{ item }}
+ {%- endfor %}
+ {% endif %}
+ {% endblock %}
+
+ {% block classes %}
+ {% if classes %}
+ .. rubric:: Classes
+
+ .. autosummary::
+ {% for item in classes %}
+ {{ item }}
+ {%- endfor %}
+ {% endif %}
+ {% endblock %}
+
+ {% block exceptions %}
+ {% if exceptions %}
+ .. rubric:: Exceptions
+
+ .. autosummary::
+ {% for item in classes %}
+ {{ item }}
+ {%- endfor %}
+ {% endif %}
+ {% endblock %}
diff --git a/sphinx/ext/autosummary/templates/module b/sphinx/ext/autosummary/templates/module
deleted file mode 100644
index 0cbc8266..00000000
--- a/sphinx/ext/autosummary/templates/module
+++ /dev/null
@@ -1,39 +0,0 @@
-:mod:`{{name}}`
-======{{ underline }}=
-
-
-.. automodule:: {{name}}
-
-{% if len_functions > 0 %}
-Functions
-----------
-{% for item in functions %}
-.. autofunction:: {{item}}
-{% endfor %}
-{% endif %}
-
-{% if len_classes > 0 %}
-Classes
---------
-{% for item in classes %}
-.. autoclass:: {{item}}
- :show-inheritance:
- :members:
- :inherited-members:
- :undoc-members:
-
-{% endfor %}
-{% endif %}
-
-{% if len_exceptions > 0 %}
-Exceptions
-------------
-{% for item in exceptions %}
-.. autoclass:: {{item}}
- :show-inheritance:
- :members:
- :inherited-members:
- :undoc-members:
-
-{% endfor %}
-{% endif %}
diff --git a/sphinx/ext/coverage.py b/sphinx/ext/coverage.py
index 964e58ee..ed5d92a4 100644
--- a/sphinx/ext/coverage.py
+++ b/sphinx/ext/coverage.py
@@ -79,6 +79,7 @@ class CoverageBuilder(Builder):
def build_c_coverage(self):
# Fetch all the info from the header files
+ c_objects = self.env.domaindata['c']['objects']
for filename in self.c_sourcefiles:
undoc = []
f = open(filename, 'r')
@@ -88,7 +89,7 @@ class CoverageBuilder(Builder):
match = regex.match(line)
if match:
name = match.groups()[0]
- if name not in self.env.descrefs:
+ if name not in c_objects:
for exp in self.c_ignorexps.get(key, ()):
if exp.match(name):
break
@@ -116,7 +117,10 @@ class CoverageBuilder(Builder):
op.close()
def build_py_coverage(self):
- for mod_name in self.env.modules:
+ objects = self.env.domaindata['py']['objects']
+ modules = self.env.domaindata['py']['modules']
+
+ for mod_name in modules:
ignore = False
for exp in self.mod_ignorexps:
if exp.match(mod_name):
@@ -151,7 +155,7 @@ class CoverageBuilder(Builder):
full_name = '%s.%s' % (mod_name, name)
if inspect.isfunction(obj):
- if full_name not in self.env.descrefs:
+ if full_name not in objects:
for exp in self.fun_ignorexps:
if exp.match(name):
break
@@ -162,7 +166,7 @@ class CoverageBuilder(Builder):
if exp.match(name):
break
else:
- if full_name not in self.env.descrefs:
+ if full_name not in objects:
# not documented at all
classes[name] = []
continue
@@ -176,7 +180,7 @@ class CoverageBuilder(Builder):
continue
full_attr_name = '%s.%s' % (full_name, attr_name)
- if full_attr_name not in self.env.descrefs:
+ if full_attr_name not in objects:
attrs.append(attr_name)
if attrs:
diff --git a/sphinx/ext/extlinks.py b/sphinx/ext/extlinks.py
new file mode 100644
index 00000000..8e68681b
--- /dev/null
+++ b/sphinx/ext/extlinks.py
@@ -0,0 +1,54 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.ext.extlinks
+ ~~~~~~~~~~~~~~~~~~~
+
+ Extension to save typing and prevent hard-coding of base URLs in the reST
+ files.
+
+ This adds a new config value called ``extlinks`` that is created like this::
+
+ extlinks = {'exmpl': ('http://example.com/', prefix), ...}
+
+ Now you can use e.g. :exmpl:`foo` in your documents. This will create a
+ link to ``http://example.com/foo``. The link caption depends on the
+ *prefix* value given:
+
+ - If it is ``None``, the caption will be the full URL.
+ - If it is a string (empty or not), the caption will be the prefix prepended
+ to the role content.
+
+ You can also give an explicit caption, e.g. :exmpl:`Foo <foo>`.
+
+ :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from docutils import nodes, utils
+
+from sphinx.util import split_explicit_title
+
+
+def make_link_role(base_url, prefix):
+ def role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
+ text = utils.unescape(text)
+ has_explicit_title, title, url = split_explicit_title(text)
+ # NOTE: not using urlparse.urljoin() here, to allow something like
+ # base_url = 'bugs.python.org/issue' and url = '1024'
+ full_url = base_url + url
+ if not has_explicit_title:
+ if prefix is None:
+ title = full_url
+ else:
+ title = prefix + url
+ pnode = nodes.reference(title, title, refuri=full_url)
+ return [pnode], []
+ return role
+
+def setup_link_roles(app):
+ for name, (base_url, prefix) in app.config.extlinks.iteritems():
+ app.add_role(name, make_link_role(base_url, prefix))
+
+def setup(app):
+ app.add_config_value('extlinks', {}, 'env')
+ app.connect('builder-inited', setup_link_roles)
diff --git a/sphinx/ext/ifconfig.py b/sphinx/ext/ifconfig.py
index 90cd2b2c..1bc66af8 100644
--- a/sphinx/ext/ifconfig.py
+++ b/sphinx/ext/ifconfig.py
@@ -41,7 +41,8 @@ class IfConfig(Directive):
node.document = self.state.document
node.line = self.lineno
node['expr'] = self.arguments[0]
- self.state.nested_parse(self.content, self.content_offset, node)
+ self.state.nested_parse(self.content, self.content_offset,
+ node, match_titles=1)
return [node]
diff --git a/sphinx/ext/inheritance_diagram.py b/sphinx/ext/inheritance_diagram.py
index 9c037c99..483c774a 100644
--- a/sphinx/ext/inheritance_diagram.py
+++ b/sphinx/ext/inheritance_diagram.py
@@ -49,6 +49,7 @@ except ImportError:
from docutils import nodes
from docutils.parsers.rst import directives
+# XXX needs to be adapted
from sphinx.roles import xfileref_role
from sphinx.ext.graphviz import render_dot_html, render_dot_latex
from sphinx.util.compat import Directive
diff --git a/sphinx/ext/todo.py b/sphinx/ext/todo.py
index e2a1bb4a..2bea562a 100644
--- a/sphinx/ext/todo.py
+++ b/sphinx/ext/todo.py
@@ -93,7 +93,7 @@ def process_todo_nodes(app, doctree, fromdocname):
content = []
for todo_info in env.todo_all_todos:
- para = nodes.paragraph()
+ para = nodes.paragraph(classes=['todo-source'])
filename = env.doc2path(todo_info['docname'], base=None)
description = (
_('(The original entry is located in %s, line %d and '
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
index 5bd0fe00..aa1cbd18 100644
--- a/sphinx/highlighting.py
+++ b/sphinx/highlighting.py
@@ -78,6 +78,7 @@ _LATEX_STYLES = r'''
\newcommand\PYGZrb{]}
'''
+doctestopt_re = re.compile(r'#\s*doctest:.+$', re.MULTILINE)
parsing_exceptions = (SyntaxError, UnicodeEncodeError)
if sys.version_info < (2, 5):
@@ -92,7 +93,8 @@ class PygmentsBridge(object):
html_formatter = HtmlFormatter
latex_formatter = LatexFormatter
- def __init__(self, dest='html', stylename='sphinx'):
+ def __init__(self, dest='html', stylename='sphinx',
+ trim_doctest_flags=False):
self.dest = dest
if not pygments:
return
@@ -106,6 +108,7 @@ class PygmentsBridge(object):
stylename)
else:
style = get_style_by_name(stylename)
+ self.trim_doctest_flags = trim_doctest_flags
if dest == 'html':
self.fmter = {False: self.html_formatter(style=style),
True: self.html_formatter(style=style, linenos=True)}
@@ -167,6 +170,8 @@ class PygmentsBridge(object):
source = source.decode()
if not pygments:
return self.unhighlighted(source)
+
+ # find out which lexer to use
if lang in ('py', 'python'):
if source.startswith('>>>'):
# interactive session
@@ -191,6 +196,12 @@ class PygmentsBridge(object):
else:
lexer = lexers[lang] = get_lexer_by_name(lang)
lexer.add_filter('raiseonerror')
+
+ # trim doctest options if wanted
+ if isinstance(lexer, PythonConsoleLexer) and self.trim_doctest_flags:
+ source = doctestopt_re.sub('', source)
+
+ # highlight via Pygments
try:
if self.dest == 'html':
return highlight(source, lexer, self.fmter[bool(linenos)])
diff --git a/sphinx/jinja2glue.py b/sphinx/jinja2glue.py
index c584a0cd..626e7f8a 100644
--- a/sphinx/jinja2glue.py
+++ b/sphinx/jinja2glue.py
@@ -94,7 +94,7 @@ class BuiltinTemplateLoader(TemplateBridge, BaseLoader):
# make the paths into loaders
self.loaders = map(SphinxFileSystemLoader, chain)
- use_i18n = builder.translator is not None
+ use_i18n = builder.app.translator is not None
extensions = use_i18n and ['jinja2.ext.i18n'] or []
self.environment = SandboxedEnvironment(loader=self,
extensions=extensions)
@@ -102,7 +102,7 @@ class BuiltinTemplateLoader(TemplateBridge, BaseLoader):
self.environment.globals['debug'] = contextfunction(pformat)
self.environment.globals['accesskey'] = contextfunction(accesskey)
if use_i18n:
- self.environment.install_gettext_translations(builder.translator)
+ self.environment.install_gettext_translations(builder.app.translator)
def render(self, template, context):
return self.environment.get_template(template).render(context)
diff --git a/sphinx/locale/__init__.py b/sphinx/locale/__init__.py
index 36fabc61..63b5caf0 100644
--- a/sphinx/locale/__init__.py
+++ b/sphinx/locale/__init__.py
@@ -8,41 +8,179 @@
:copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
+import gettext
+import UserString
+
+from sphinx import package_dir
+
+
+class _TranslationProxy(UserString.UserString, object):
+ """Class for proxy strings from gettext translations. This is a helper
+ for the lazy_* functions from this module.
+
+ The proxy implementation attempts to be as complete as possible, so that
+ the lazy objects should mostly work as expected, for example for sorting.
+
+ This inherits from UserString because some docutils versions use UserString
+ for their Text nodes, which then checks its argument for being either a
+ basestring or UserString, otherwise calls str() -- not unicode() -- on it.
+ This also inherits from object to make the __new__ method work.
+ """
+ __slots__ = ('_func', '_args')
+
+ def __new__(cls, func, *args):
+ if not args:
+ # not called with "function" and "arguments", but a plain string
+ return unicode(func)
+ return object.__new__(cls)
+
+ def __init__(self, func, *args):
+ self._func = func
+ self._args = args
+
+ data = property(lambda x: x._func(*x._args))
+
+ def __contains__(self, key):
+ return key in self.data
+
+ def __nonzero__(self):
+ return bool(self.data)
+
+ def __dir__(self):
+ return dir(unicode)
+
+ def __iter__(self):
+ return iter(self.data)
+
+ def __len__(self):
+ return len(self.data)
+
+ def __str__(self):
+ return str(self.data)
+
+ def __unicode__(self):
+ return unicode(self.data)
+
+ def __add__(self, other):
+ return self.data + other
+
+ def __radd__(self, other):
+ return other + self.data
+
+ def __mod__(self, other):
+ return self.data % other
+
+ def __rmod__(self, other):
+ return other % self.data
+
+ def __mul__(self, other):
+ return self.data * other
+
+ def __rmul__(self, other):
+ return other * self.data
+
+ def __lt__(self, other):
+ return self.data < other
+
+ def __le__(self, other):
+ return self.data <= other
+
+ def __eq__(self, other):
+ return self.data == other
+
+ def __ne__(self, other):
+ return self.data != other
+
+ def __gt__(self, other):
+ return self.data > other
+
+ def __ge__(self, other):
+ return self.data >= other
+
+ def __getattr__(self, name):
+ if name == '__members__':
+ return self.__dir__()
+ return getattr(self.data, name)
+
+ def __getstate__(self):
+ return self._func, self._args
+
+ def __setstate__(self, tup):
+ self._func, self._args = tup
+
+ def __getitem__(self, key):
+ return self.data[key]
+
+ def __copy__(self):
+ return self
+
+ def __repr__(self):
+ try:
+ return 'i' + repr(unicode(self.data))
+ except:
+ return '<%s broken>' % self.__class__.__name__
+
+def mygettext(string):
+ """Used instead of _ when creating TranslationProxies, because _ is
+ not bound yet at that time."""
+ return _(string)
+
+def lazy_gettext(string):
+ """A lazy version of `gettext`."""
+ #if isinstance(string, _TranslationProxy):
+ # return string
+ return _TranslationProxy(mygettext, string)
+
+l_ = lazy_gettext
-_ = 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'),
+ 'attention': l_('Attention'),
+ 'caution': l_('Caution'),
+ 'danger': l_('Danger'),
+ 'error': l_('Error'),
+ 'hint': l_('Hint'),
+ 'important': l_('Important'),
+ 'note': l_('Note'),
+ 'seealso': l_('See Also'),
+ 'tip': l_('Tip'),
+ 'warning': l_('Warning'),
}
versionlabels = {
- 'versionadded': _('New in version %s'),
- 'versionchanged': _('Changed in version %s'),
- 'deprecated': _('Deprecated since version %s'),
+ 'versionadded': l_('New in version %s'),
+ 'versionchanged': l_('Changed in version %s'),
+ 'deprecated': l_('Deprecated since version %s'),
}
pairindextypes = {
- 'module': _('module'),
- 'keyword': _('keyword'),
- 'operator': _('operator'),
- 'object': _('object'),
- 'exception': _('exception'),
- 'statement': _('statement'),
- 'builtin': _('built-in function'),
+ 'module': l_('module'),
+ 'keyword': l_('keyword'),
+ 'operator': l_('operator'),
+ 'object': l_('object'),
+ 'exception': l_('exception'),
+ 'statement': l_('statement'),
+ 'builtin': l_('built-in function'),
}
-del _
-def init():
- for dct in (admonitionlabels, versionlabels, pairindextypes):
- for key in dct:
- dct[key] = _(dct[key])
+def init(locale_dirs, language):
+ # the None entry is the system's default locale path
+ translator = None
+ has_translation = True
+ for dir_ in locale_dirs:
+ try:
+ trans = gettext.translation('sphinx', localedir=dir_,
+ languages=[language])
+ if translator is None:
+ translator = trans
+ else:
+ translator._catalog.update(trans.catalog)
+ except Exception:
+ # Language couldn't be found in the specified path
+ pass
+ if translator is None:
+ translator = gettext.NullTranslations()
+ has_translation = False
+ translator.install(unicode=True)
+ return translator, has_translation
diff --git a/sphinx/locale/ca/LC_MESSAGES/sphinx.js b/sphinx/locale/ca/LC_MESSAGES/sphinx.js
new file mode 100644
index 00000000..8ad043b0
--- /dev/null
+++ b/sphinx/locale/ca/LC_MESSAGES/sphinx.js
@@ -0,0 +1 @@
+Documentation.addTranslations({"locale": "ca", "plural_expr": "(n != 1)", "messages": {"Search Results": "Resultats de la Cerca", "Preparing search...": "Preparant la cerca...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "La teva cerca no ha donat resultats. Assegura't que totes les paraules estan ben escrites i que has seleccionat prou categories.", "Search finished, found %s page(s) matching the search query.": "Cerca finalitzada, s'han trobat %s p\u00e0gin(a/es) de resultats.", ", in ": ", a ", "Permalink to this headline": "Link permanent a aquest t\u00edtol", "Searching": "Cercant", "Permalink to this definition": "Link permanent a aquesta definici\u00f3", "module, in ": "m\u00f2dule, a ", "Hide Search Matches": "Oculta Resultats de Cerca"}}); \ No newline at end of file
diff --git a/sphinx/locale/ca/LC_MESSAGES/sphinx.mo b/sphinx/locale/ca/LC_MESSAGES/sphinx.mo
new file mode 100644
index 00000000..d9cc44ce
--- /dev/null
+++ b/sphinx/locale/ca/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/ca/LC_MESSAGES/sphinx.po b/sphinx/locale/ca/LC_MESSAGES/sphinx.po
new file mode 100644
index 00000000..440b0594
--- /dev/null
+++ b/sphinx/locale/ca/LC_MESSAGES/sphinx.po
@@ -0,0 +1,606 @@
+# Catalan translations for Sphinx.
+# Copyright (C) 2009 ORGANIZATION
+# This file is distributed under the same license as the Sphinx project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Sphinx 1.0\n"
+"Report-Msgid-Bugs-To: pau.fernandez@upc.edu\n"
+"POT-Creation-Date: 2009-05-22 18:51+0200\n"
+"PO-Revision-Date: 2009-06-07 14:20+0200\n"
+"Last-Translator: Pau Fernández <pau.fernandez@upc.edu>\n"
+"Language-Team: ca <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.4\n"
+
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
+#, python-format
+msgid "%B %d, %Y"
+msgstr "%d de %B de %Y"
+
+#: sphinx/environment.py:323 sphinx/themes/basic/genindex-single.html:2
+#: sphinx/themes/basic/genindex-split.html:2
+#: sphinx/themes/basic/genindex-split.html:5
+#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
+#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
+#: sphinx/writers/latex.py:190
+msgid "Index"
+msgstr "Índex"
+
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
+msgid "Module Index"
+msgstr "Índex de Mòduls"
+
+#: sphinx/environment.py:325 sphinx/themes/basic/defindex.html:16
+msgid "Search Page"
+msgstr "Pàgina de Cerca"
+
+#: sphinx/roles.py:55 sphinx/directives/desc.py:747
+#, python-format
+msgid "environment variable; %s"
+msgstr "variable d'entorn; %s"
+
+#: sphinx/roles.py:62
+#, python-format
+msgid "Python Enhancement Proposals!PEP %s"
+msgstr "Python Enhancement Proposals!PEP %s"
+
+#: sphinx/builders/changes.py:71
+msgid "Builtins"
+msgstr "Mòduls Interns"
+
+#: sphinx/builders/changes.py:73
+msgid "Module level"
+msgstr "Nivell de mòdul"
+
+#: sphinx/builders/html.py:219
+#, python-format
+msgid "%b %d, %Y"
+msgstr "%d %b, %Y"
+
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
+msgid "General Index"
+msgstr "Índex General"
+
+#: sphinx/builders/html.py:238
+msgid "index"
+msgstr "índex"
+
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
+#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
+msgid "Global Module Index"
+msgstr "Índex Global de Mòduls"
+
+#: sphinx/builders/html.py:241
+msgid "modules"
+msgstr "mòduls"
+
+#: sphinx/builders/html.py:296
+msgid "next"
+msgstr "següent"
+
+#: sphinx/builders/html.py:305
+msgid "previous"
+msgstr "anterior"
+
+#: sphinx/builders/latex.py:162
+msgid " (in "
+msgstr " (a "
+
+#: sphinx/directives/desc.py:97
+msgid "Raises"
+msgstr "Llença"
+
+#: sphinx/directives/desc.py:101
+msgid "Variable"
+msgstr "Variable"
+
+#: sphinx/directives/desc.py:104
+msgid "Returns"
+msgstr "Retorna"
+
+#: sphinx/directives/desc.py:113
+msgid "Return type"
+msgstr "Tipus de retorn"
+
+#: sphinx/directives/desc.py:186
+msgid "Parameter"
+msgstr "Paràmetre"
+
+#: sphinx/directives/desc.py:190
+msgid "Parameters"
+msgstr "Paràmetres"
+
+#: sphinx/directives/desc.py:418
+#, python-format
+msgid "%s() (built-in function)"
+msgstr "%s() (funció interna)"
+
+#: sphinx/directives/desc.py:419 sphinx/directives/desc.py:476
+#: sphinx/directives/desc.py:488
+#, python-format
+msgid "%s() (in module %s)"
+msgstr "%s() (al mòdul %s)"
+
+#: sphinx/directives/desc.py:422
+#, python-format
+msgid "%s (built-in variable)"
+msgstr "%s (variable interna)"
+
+#: sphinx/directives/desc.py:423 sphinx/directives/desc.py:514
+#, python-format
+msgid "%s (in module %s)"
+msgstr "%s (al mòdul %s)"
+
+#: sphinx/directives/desc.py:439
+#, python-format
+msgid "%s (built-in class)"
+msgstr "%s (classe interna)"
+
+#: sphinx/directives/desc.py:440
+#, python-format
+msgid "%s (class in %s)"
+msgstr "%s (class a %s)"
+
+#: sphinx/directives/desc.py:480
+#, python-format
+msgid "%s() (%s.%s method)"
+msgstr "%s() (mètode %s.%s)"
+
+#: sphinx/directives/desc.py:482
+#, python-format
+msgid "%s() (%s method)"
+msgstr "%s() (mètode %s)"
+
+#: sphinx/directives/desc.py:492
+#, python-format
+msgid "%s() (%s.%s static method)"
+msgstr "%s() (mètode estàtic %s.%s)"
+
+#: sphinx/directives/desc.py:495
+#, python-format
+msgid "%s() (%s static method)"
+msgstr "%s() (mètode estàtic %s)"
+
+#: sphinx/directives/desc.py:518
+#, python-format
+msgid "%s (%s.%s attribute)"
+msgstr "%s (atribut %s.%s)"
+
+#: sphinx/directives/desc.py:520
+#, python-format
+msgid "%s (%s attribute)"
+msgstr "%s (atribut %s)"
+
+#: sphinx/directives/desc.py:609
+#, python-format
+msgid "%s (C function)"
+msgstr "%s (funció de C)"
+
+#: sphinx/directives/desc.py:611
+#, python-format
+msgid "%s (C member)"
+msgstr "%s (membre de C)"
+
+#: sphinx/directives/desc.py:613
+#, python-format
+msgid "%s (C macro)"
+msgstr "%s (macro de C)"
+
+#: sphinx/directives/desc.py:615
+#, python-format
+msgid "%s (C type)"
+msgstr "%s (tipus de C)"
+
+#: sphinx/directives/desc.py:617
+#, python-format
+msgid "%s (C variable)"
+msgstr "%s (variable de C)"
+
+#: sphinx/directives/desc.py:665
+#, python-format
+msgid "%scommand line option; %s"
+msgstr "opció de línia de comandes %s; %s"
+
+#: sphinx/directives/other.py:138
+msgid "Platforms: "
+msgstr "Plataformes: "
+
+#: sphinx/directives/other.py:144
+#, python-format
+msgid "%s (module)"
+msgstr "%s (mòdul)"
+
+#: sphinx/directives/other.py:193
+msgid "Section author: "
+msgstr "Autor de la secció:"
+
+#: sphinx/directives/other.py:195
+msgid "Module author: "
+msgstr "Autor del mòdul: "
+
+#: sphinx/directives/other.py:197
+msgid "Author: "
+msgstr "Autor: "
+
+#: sphinx/directives/other.py:317
+msgid "See also"
+msgstr "Vegeu també"
+
+#: sphinx/ext/autodoc.py:888
+#, python-format
+msgid " Bases: %s"
+msgstr " Bases: %s"
+
+#: sphinx/ext/autodoc.py:919
+#, python-format
+msgid "alias of :class:`%s`"
+msgstr "àlies de :class:`%s`"
+
+#: sphinx/ext/todo.py:41
+msgid "Todo"
+msgstr "Pendent"
+
+#: sphinx/ext/todo.py:99
+#, python-format
+msgid "(The original entry is located in %s, line %d and can be found "
+msgstr "(La entrada original està a %s, línia %d i es pot trobar "
+
+#: sphinx/ext/todo.py:105
+msgid "here"
+msgstr "aquí"
+
+#: sphinx/locale/__init__.py:15
+msgid "Attention"
+msgstr "Atenció"
+
+#: sphinx/locale/__init__.py:16
+msgid "Caution"
+msgstr "Compte"
+
+#: sphinx/locale/__init__.py:17
+msgid "Danger"
+msgstr "Perill"
+
+#: sphinx/locale/__init__.py:18
+msgid "Error"
+msgstr "Error"
+
+#: sphinx/locale/__init__.py:19
+msgid "Hint"
+msgstr "Suggerència"
+
+#: sphinx/locale/__init__.py:20
+msgid "Important"
+msgstr "Important"
+
+#: sphinx/locale/__init__.py:21
+msgid "Note"
+msgstr "Nota"
+
+#: sphinx/locale/__init__.py:22
+msgid "See Also"
+msgstr "Vegeu També"
+
+#: sphinx/locale/__init__.py:23
+msgid "Tip"
+msgstr "Truc"
+
+#: sphinx/locale/__init__.py:24
+msgid "Warning"
+msgstr "Avís"
+
+#: sphinx/locale/__init__.py:28
+#, python-format
+msgid "New in version %s"
+msgstr "Novetat de la versió %s"
+
+#: sphinx/locale/__init__.py:29
+#, python-format
+msgid "Changed in version %s"
+msgstr "Canviat a la versió %s"
+
+#: sphinx/locale/__init__.py:30
+#, python-format
+msgid "Deprecated since version %s"
+msgstr "Obsolet desde la versió %s"
+
+#: sphinx/locale/__init__.py:34
+msgid "module"
+msgstr "mòdul"
+
+#: sphinx/locale/__init__.py:35
+msgid "keyword"
+msgstr "paraula clau"
+
+#: sphinx/locale/__init__.py:36
+msgid "operator"
+msgstr "operador"
+
+#: sphinx/locale/__init__.py:37
+msgid "object"
+msgstr "objecte"
+
+#: sphinx/locale/__init__.py:38
+msgid "exception"
+msgstr "excepció"
+
+#: sphinx/locale/__init__.py:39
+msgid "statement"
+msgstr "sentència"
+
+#: sphinx/locale/__init__.py:40
+msgid "built-in function"
+msgstr "funció interna"
+
+#: sphinx/themes/basic/defindex.html:2
+msgid "Overview"
+msgstr "Resum"
+
+#: sphinx/themes/basic/defindex.html:11
+msgid "Indices and tables:"
+msgstr "Índexs i taules:"
+
+#: sphinx/themes/basic/defindex.html:14
+msgid "Complete Table of Contents"
+msgstr "Taula de Contingut Completa"
+
+#: sphinx/themes/basic/defindex.html:15
+msgid "lists all sections and subsections"
+msgstr "llista totes les seccions i subseccions"
+
+#: sphinx/themes/basic/defindex.html:17
+msgid "search this documentation"
+msgstr "cerca aquesta documentació"
+
+#: sphinx/themes/basic/defindex.html:20
+msgid "quick access to all modules"
+msgstr "accés ràpid a tots els mòduls"
+
+#: sphinx/themes/basic/defindex.html:22
+msgid "all functions, classes, terms"
+msgstr "totes les funcions, classes, termes"
+
+#: sphinx/themes/basic/genindex-single.html:5
+#, python-format
+msgid "Index &ndash; %(key)s"
+msgstr "Índes &ndash; %(key)s"
+
+#: sphinx/themes/basic/genindex-single.html:44
+#: sphinx/themes/basic/genindex-split.html:14
+#: sphinx/themes/basic/genindex-split.html:27
+#: sphinx/themes/basic/genindex.html:54
+msgid "Full index on one page"
+msgstr "Índex complet en una pàgina"
+
+#: sphinx/themes/basic/genindex-split.html:7
+msgid "Index pages by letter"
+msgstr "Pàgines d'índex per lletra"
+
+#: sphinx/themes/basic/genindex-split.html:15
+msgid "can be huge"
+msgstr "pot ser gegant"
+
+#: sphinx/themes/basic/layout.html:10
+msgid "Navigation"
+msgstr "Navegació"
+
+#: sphinx/themes/basic/layout.html:42
+msgid "Table Of Contents"
+msgstr "Taula de Contingut"
+
+#: sphinx/themes/basic/layout.html:48
+msgid "Previous topic"
+msgstr "Tema anterior"
+
+#: sphinx/themes/basic/layout.html:50
+msgid "previous chapter"
+msgstr "capítol anterior"
+
+#: sphinx/themes/basic/layout.html:53
+msgid "Next topic"
+msgstr "Tema següent"
+
+#: sphinx/themes/basic/layout.html:55
+msgid "next chapter"
+msgstr "capítol següent"
+
+#: sphinx/themes/basic/layout.html:60
+msgid "This Page"
+msgstr "Aquesta Pàgina"
+
+#: sphinx/themes/basic/layout.html:63
+msgid "Show Source"
+msgstr "Mostra Codi Font"
+
+#: sphinx/themes/basic/layout.html:73
+msgid "Quick search"
+msgstr "Cerca ràpida"
+
+#: sphinx/themes/basic/layout.html:76
+msgid "Go"
+msgstr "Ves a"
+
+#: sphinx/themes/basic/layout.html:81
+msgid "Enter search terms or a module, class or function name."
+msgstr "Entra paraules de cerca o el nom d'un mòdul, classe o funció."
+
+#: sphinx/themes/basic/layout.html:119
+#, python-format
+msgid "Search within %(docstitle)s"
+msgstr "Cerca dins de %(docstitle)s"
+
+#: sphinx/themes/basic/layout.html:128
+msgid "About these documents"
+msgstr "Quant a aquests documents"
+
+#: sphinx/themes/basic/layout.html:134 sphinx/themes/basic/search.html:2
+#: sphinx/themes/basic/search.html:5
+msgid "Search"
+msgstr "Cerca"
+
+#: sphinx/themes/basic/layout.html:137
+msgid "Copyright"
+msgstr "Copyright"
+
+#: sphinx/themes/basic/layout.html:184
+#, python-format
+msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
+msgstr "&copy; <a href=\\\"%(path)s\\\">Copyright</a> %(copyright)s."
+
+#: sphinx/themes/basic/layout.html:186
+#, python-format
+msgid "&copy; Copyright %(copyright)s."
+msgstr "&copy; Copyright %(copyright)s."
+
+#: sphinx/themes/basic/layout.html:190
+#, python-format
+msgid "Last updated on %(last_updated)s."
+msgstr "Última actualització el %(last_updated)s."
+
+#: sphinx/themes/basic/layout.html:193
+#, python-format
+msgid ""
+"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
+"%(sphinx_version)s."
+msgstr ""
+"Creat amb <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
+"%(sphinx_version)s."
+
+#: sphinx/themes/basic/modindex.html:36
+msgid "Deprecated"
+msgstr "Obsolet"
+
+#: sphinx/themes/basic/opensearch.xml:4
+#, python-format
+msgid "Search %(docstitle)s"
+msgstr "Cercar a %(docstitle)s"
+
+#: sphinx/themes/basic/search.html:9
+msgid ""
+"Please activate JavaScript to enable the search\n"
+" functionality."
+msgstr ""
+"Activa JavaScript per utilitzar la funcionalitat\n"
+"de cerca."
+
+#: sphinx/themes/basic/search.html:14
+msgid ""
+"From here you can search these documents. Enter your search\n"
+" 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 fewer words won't appear in the result list."
+msgstr ""
+"Des d'aquí pots fer cerques en aquests documents. Entra les \n"
+"paraules de la teva cerca i clica el botó \"cerca\". Tingues en compte\n"
+"que la cerca inclourà totes les paraules que posis. Les pàgines que no\n"
+"tenen totes les paraules no sortiràn."
+
+#: sphinx/themes/basic/search.html:21
+msgid "search"
+msgstr "cerca"
+
+#: sphinx/themes/basic/search.html:25
+#: sphinx/themes/basic/static/searchtools.js:462
+msgid "Search Results"
+msgstr "Resultats de la Cerca"
+
+#: sphinx/themes/basic/search.html:27
+msgid "Your search did not match any results."
+msgstr "La teva cerca no té resultats."
+
+#: sphinx/themes/basic/changes/frameset.html:5
+#: sphinx/themes/basic/changes/versionchanges.html:12
+#, python-format
+msgid "Changes in Version %(version)s &mdash; %(docstitle)s"
+msgstr "Canvis a la Versió %(version)s &mdash; %(docstitle)s"
+
+#: sphinx/themes/basic/changes/rstsource.html:5
+#, python-format
+msgid "%(filename)s &mdash; %(docstitle)s"
+msgstr "%(filename)s &mdash; %(docstitle)s"
+
+#: sphinx/themes/basic/changes/versionchanges.html:17
+#, python-format
+msgid "Automatically generated list of changes in version %(version)s"
+msgstr "Llista de canvis de la versió %(version)s generada automàticament"
+
+#: sphinx/themes/basic/changes/versionchanges.html:18
+msgid "Library changes"
+msgstr "Canvis a la llibreria"
+
+#: sphinx/themes/basic/changes/versionchanges.html:23
+msgid "C API changes"
+msgstr "Canvis a la API de C"
+
+#: sphinx/themes/basic/changes/versionchanges.html:25
+msgid "Other changes"
+msgstr "Altres canvis"
+
+#: sphinx/themes/basic/static/doctools.js:139 sphinx/writers/html.py:473
+#: sphinx/writers/html.py:478
+msgid "Permalink to this headline"
+msgstr "Link permanent a aquest títol"
+
+#: sphinx/themes/basic/static/doctools.js:145 sphinx/writers/html.py:80
+msgid "Permalink to this definition"
+msgstr "Link permanent a aquesta definició"
+
+#: sphinx/themes/basic/static/doctools.js:174
+msgid "Hide Search Matches"
+msgstr "Oculta Resultats de Cerca"
+
+#: sphinx/themes/basic/static/searchtools.js:274
+msgid "Searching"
+msgstr "Cercant"
+
+#: sphinx/themes/basic/static/searchtools.js:279
+msgid "Preparing search..."
+msgstr "Preparant la cerca..."
+
+#: sphinx/themes/basic/static/searchtools.js:347
+msgid "module, in "
+msgstr "mòdule, a "
+
+#: sphinx/themes/basic/static/searchtools.js:356
+msgid ", in "
+msgstr ", a "
+
+#: sphinx/themes/basic/static/searchtools.js:464
+msgid ""
+"Your search did not match any documents. Please make sure that all words "
+"are spelled correctly and that you've selected enough categories."
+msgstr ""
+"La teva cerca no ha donat resultats. Assegura't que totes les paraules "
+"estan ben escrites i que has seleccionat prou categories."
+
+#: sphinx/themes/basic/static/searchtools.js:466
+#, python-format
+msgid "Search finished, found %s page(s) matching the search query."
+msgstr "Cerca finalitzada, s'han trobat %s pàgin(a/es) de resultats."
+
+#: sphinx/writers/latex.py:187
+msgid "Release"
+msgstr "Versió"
+
+#: sphinx/writers/latex.py:639
+msgid "continued from previous page"
+msgstr "ve de la pàgina anterior"
+
+#: sphinx/writers/latex.py:643
+msgid "Continued on next page"
+msgstr "Continua a la pàgina següent"
+
+#: sphinx/writers/text.py:166
+#, python-format
+msgid "Platform: %s"
+msgstr "Plataforma: %s"
+
+#: sphinx/writers/text.py:428
+msgid "[image]"
+msgstr "[imatge]"
+
diff --git a/sphinx/locale/cs/LC_MESSAGES/sphinx.po b/sphinx/locale/cs/LC_MESSAGES/sphinx.po
index 1f138ef0..fc2bcff7 100644
--- a/sphinx/locale/cs/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/cs/LC_MESSAGES/sphinx.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Sphinx 0.5\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2008-11-27 18:39+0100\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
"Last-Translator: Pavel Kosina <pavel.kosina@gmail.com>\n"
"Language-Team: Pavel Kosina <pavel.kosina@gmail.com>\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr "%d.%m.%Y"
@@ -28,11 +28,11 @@ msgstr "%d.%m.%Y"
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "Index"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "Rejstřík modulů "
@@ -58,34 +58,34 @@ msgstr "Vestavěné funkce "
msgid "Module level"
msgstr "Úroveň modulů"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%d.%m.%Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "Rejstřík indexů"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "index"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr "Celkový rejstřík modulů"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "moduly"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "další"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "předchozí"
@@ -234,12 +234,12 @@ msgstr "Autor: "
msgid "See also"
msgstr "Viz také"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -451,22 +451,22 @@ msgstr "Hledání"
msgid "Copyright"
msgstr "Veškerá práva vyhrazena"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Copyright %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Aktualizováno dne %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -507,7 +507,7 @@ msgid "search"
msgstr "hledej"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "Výsledky hledání"
@@ -564,15 +564,15 @@ msgstr "Hledám"
msgid "Preparing search..."
msgstr "Připravuji vyhledávání...."
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
msgid "module, in "
msgstr "modul, v"
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ", v"
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -580,20 +580,20 @@ msgstr ""
"Nenalezli jsme žádný dokument. Ujistěte se prosím, že všechna slova jsou "
"správně a že jste vybral dostatek kategorií."
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Vyhledávání skončilo, nalezeno %s stran."
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr "Vydání"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
#, fuzzy
msgid "Continued on next page"
msgstr "Plný index na jedné stránce"
diff --git a/sphinx/locale/de/LC_MESSAGES/sphinx.mo b/sphinx/locale/de/LC_MESSAGES/sphinx.mo
index a8905259..681091ce 100644
--- a/sphinx/locale/de/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/de/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/de/LC_MESSAGES/sphinx.po b/sphinx/locale/de/LC_MESSAGES/sphinx.po
index 3a08fe88..0c1b61d8 100644
--- a/sphinx/locale/de/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/de/LC_MESSAGES/sphinx.po
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr "%d. %m. %Y"
@@ -26,11 +26,11 @@ msgstr "%d. %m. %Y"
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "Stichwortverzeichnis"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "Modulindex"
@@ -56,34 +56,34 @@ msgstr "Builtins"
msgid "Module level"
msgstr "Modulebene"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%d. %m. %Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "Allgemeiner Index"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "Index"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr "Globaler Modulindex"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "Module"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "weiter"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "zurück"
@@ -231,12 +231,12 @@ msgstr "Autor: "
msgid "See also"
msgstr "Siehe auch"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr " Basisklassen: %s"
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr "Alias von :class:`%s`"
@@ -248,7 +248,7 @@ msgstr "Zu tun"
#: sphinx/ext/todo.py:99
#, python-format
msgid "(The original entry is located in %s, line %d and can be found "
-msgstr "(Der ursprüngliche Eintrag steht in %s, Zeile %s, siehe "
+msgstr "(Der ursprüngliche Eintrag steht in %s, Zeile %d, siehe "
#: sphinx/ext/todo.py:105
msgid "here"
@@ -447,22 +447,22 @@ msgstr "Suche"
msgid "Copyright"
msgstr "Copyright"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Copyright %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Zuletzt aktualisiert am %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -504,7 +504,7 @@ msgid "search"
msgstr "suchen"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "Suchergebnisse"
@@ -561,15 +561,15 @@ msgstr "Suche..."
msgid "Preparing search..."
msgstr "Suche wird vorbereitet..."
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
msgid "module, in "
msgstr "Modul, in "
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ", in "
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -577,20 +577,20 @@ msgstr ""
"Es wurden keine zutreffenden Dokumente gefunden. Haben Sie alle Suchbegriffe richtig "
"geschrieben und genügend Kategorien ausgewählt?"
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Suche beendet, %s zutreffende Seite(n) gefunden."
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr "Release"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr "Fortsetzung der vorherigen Seite"
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
msgid "Continued on next page"
msgstr "Fortsetzung auf der nächsten Seite"
diff --git a/sphinx/locale/es/LC_MESSAGES/sphinx.po b/sphinx/locale/es/LC_MESSAGES/sphinx.po
index ceee4ac8..f88b5e3d 100644
--- a/sphinx/locale/es/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/es/LC_MESSAGES/sphinx.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Sphinx 0.5\n"
"Report-Msgid-Bugs-To: guillem@torroja.dmt.upm.es\n"
"POT-Creation-Date: 2008-09-11 23:58+0200\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
"Last-Translator: Guillem Borrell <guillem@torroja.dmt.upm.es>\n"
"Language-Team: es <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, fuzzy, python-format
msgid "%B %d, %Y"
msgstr "%d de %B de %Y"
@@ -27,11 +27,11 @@ msgstr "%d de %B de %Y"
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "Índice"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "Índice de Módulos"
@@ -59,34 +59,34 @@ msgstr "Funciones de base"
msgid "Module level"
msgstr "Módulos"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%d %b, %Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "Índice General"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "índice"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr "Índice Global de Módulos"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "módulos"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "siguiente"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "anterior"
@@ -236,12 +236,12 @@ msgstr "Autor:"
msgid "See also"
msgstr "Ver también"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -454,22 +454,22 @@ msgstr "Búsqueda"
msgid "Copyright"
msgstr "Copyright"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\\\"%(path)s\\\">Copyright</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Copyright %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Actualizado por última vez en %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -511,7 +511,7 @@ msgid "search"
msgstr "buscar"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "Resultados de la búsqueda"
@@ -569,16 +569,16 @@ msgstr "Buscando"
msgid "Preparing search..."
msgstr "Preparando la búsqueda"
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
#, fuzzy
msgid "module, in "
msgstr "módulo"
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -587,23 +587,23 @@ msgstr ""
"todas las palabras correctamente y que ha seleccionado suficientes "
"categorías"
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr ""
"Búsqueda finalizada, se han encontrado %s página(s) que concuerdan con su"
" consulta"
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
#, fuzzy
msgid "Release"
msgstr "Versión"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
#, fuzzy
msgid "Continued on next page"
msgstr "Índice completo en una página"
diff --git a/sphinx/locale/fi/LC_MESSAGES/sphinx.js b/sphinx/locale/fi/LC_MESSAGES/sphinx.js
index f654e7e1..82f02c29 100644
--- a/sphinx/locale/fi/LC_MESSAGES/sphinx.js
+++ b/sphinx/locale/fi/LC_MESSAGES/sphinx.js
@@ -1 +1 @@
-Documentation.addTranslations({"locale": "fi", "plural_expr": "(n != 1)", "messages": {"module, in ": "", "Preparing search...": "Valmistellaan etsint\u00e4\u00e4...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Ei l\u00f6ytynyt yht\u00e4\u00e4n. Tarkista hakuehdot, sanahaku, ei sen osia", "Search finished, found %s page(s) matching the search query.": "Etsint\u00e4 tehty, l\u00f6ydetty %s sivu(a).", ", in ": "", "Permalink to this headline": "", "Searching": "Etsit\u00e4\u00e4n", "Permalink to this definition": "", "Hide Search Matches": "Piilota l\u00f6ydetyt", "Search Results": "Etsinn\u00e4n tulos"}}); \ No newline at end of file
+Documentation.addTranslations({"locale": "fi", "plural_expr": "(n != 1)", "messages": {"Search Results": "Etsinn\u00e4n tulos", "Preparing search...": "Valmistellaan etsint\u00e4\u00e4...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Ei l\u00f6ytynyt yht\u00e4\u00e4n. Tarkista hakuehdot, sanahaku, ei sen osia", "Search finished, found %s page(s) matching the search query.": "Etsint\u00e4 tehty, l\u00f6ydetty %s sivu(a).", ", in ": "", "Permalink to this headline": "", "Searching": "Etsit\u00e4\u00e4n", "Permalink to this definition": "", "module, in ": "", "Hide Search Matches": "Piilota l\u00f6ydetyt"}}); \ No newline at end of file
diff --git a/sphinx/locale/fi/LC_MESSAGES/sphinx.mo b/sphinx/locale/fi/LC_MESSAGES/sphinx.mo
index 44d19f8c..54b25dc8 100644
--- a/sphinx/locale/fi/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/fi/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/fi/LC_MESSAGES/sphinx.po b/sphinx/locale/fi/LC_MESSAGES/sphinx.po
index 4bfebbde..7be2e618 100644
--- a/sphinx/locale/fi/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/fi/LC_MESSAGES/sphinx.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Sphinx 0.6\n"
"Report-Msgid-Bugs-To: sphinx@awot.fi\n"
"POT-Creation-Date: 2009-01-24 18:39+0000\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
"Last-Translator: Jukka Inkeri <sphinx@awot.fi>\n"
"Language-Team: fi <sphinx@awot.fi>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr "%d.%m.%Y"
@@ -27,11 +27,11 @@ msgstr "%d.%m.%Y"
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "Sisällysluettelo"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "Moduuli sisällysluettelo"
@@ -57,34 +57,34 @@ msgstr ""
msgid "Module level"
msgstr "Moduulitaso"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%d.%m.%Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "Yleinen sisällysluettelo"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "hakemisto"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr "Yleinen moduulien sisällysluettelo"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "moduulit"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr ">"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "<"
@@ -232,12 +232,12 @@ msgstr "Tekijä: "
msgid "See also"
msgstr "Katso myös"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -448,22 +448,22 @@ msgstr "Etsi"
msgid "Copyright"
msgstr ""
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr ""
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr ""
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr ""
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -498,7 +498,7 @@ msgid "search"
msgstr "etsi"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "Etsinnän tulos"
@@ -555,34 +555,34 @@ msgstr "Etsitään"
msgid "Preparing search..."
msgstr "Valmistellaan etsintää..."
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
msgid "module, in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
msgstr "Ei löytynyt yhtään. Tarkista hakuehdot, sanahaku, ei sen osia"
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Etsintä tehty, löydetty %s sivu(a)."
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr ""
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
#, fuzzy
msgid "Continued on next page"
msgstr "Hakemisto yhtenä luettelona"
@@ -590,12 +590,9 @@ msgstr "Hakemisto yhtenä luettelona"
#: sphinx/writers/text.py:166
#, fuzzy, python-format
msgid "Platform: %s"
-msgstr "Ympäristö"
+msgstr "Ympäristö: %s"
#: sphinx/writers/text.py:428
msgid "[image]"
msgstr ""
-#~ msgid "Ympäristö: %s"
-#~ msgstr ""
-
diff --git a/sphinx/locale/fr/LC_MESSAGES/sphinx.po b/sphinx/locale/fr/LC_MESSAGES/sphinx.po
index 8274c76c..6b05c906 100644
--- a/sphinx/locale/fr/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/fr/LC_MESSAGES/sphinx.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: Sphinx 0.5\n"
"Report-Msgid-Bugs-To: larlet@gmail.com\n"
"POT-Creation-Date: 2008-08-08 12:39+0000\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
"Last-Translator: Sébastien Douche <sdouche@gmail.com>\n"
"Language-Team: French Translation Team <sphinx-dev@googlegroups.com>\n"
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr "%d %B %Y"
@@ -28,11 +28,11 @@ msgstr "%d %B %Y"
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "Index"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "Index du module"
@@ -58,34 +58,34 @@ msgstr "Fonctions de base"
msgid "Module level"
msgstr "Module"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%d %b %Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "Index général"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "index"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr "Index général des modules"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "modules"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "suivant"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "précédent"
@@ -234,12 +234,12 @@ msgstr "Auteur : "
msgid "See also"
msgstr "Voir aussi"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -451,22 +451,22 @@ msgstr "Recherche"
msgid "Copyright"
msgstr "Copyright"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Copyright %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Mis à jour le %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -511,7 +511,7 @@ msgid "search"
msgstr "rechercher"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "Résultats de la recherche"
@@ -568,15 +568,15 @@ msgstr "En cours de recherche"
msgid "Preparing search..."
msgstr "Préparation de la recherche..."
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
msgid "module, in "
msgstr "module, dans"
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ", dans"
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -585,20 +585,20 @@ msgstr ""
"des termes de recherche et que vous avez sélectionné suffisamment de "
"catégories."
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "La recherche est terminée, %s page(s) correspond(ent) à la requête."
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr "Version"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
#, fuzzy
msgid "Continued on next page"
msgstr "Index complet sur une seule page"
diff --git a/sphinx/locale/it/LC_MESSAGES/sphinx.po b/sphinx/locale/it/LC_MESSAGES/sphinx.po
index cdfa9b96..bd31d241 100644
--- a/sphinx/locale/it/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/it/LC_MESSAGES/sphinx.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: Sphinx 0.5\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2008-11-27 18:39+0100\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
"Last-Translator: Sandro Dentella <sandro@e-den.it>\n"
"Language-Team: <sphinx-dev@googlegroups.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr "%d %B %Y"
@@ -26,11 +26,11 @@ msgstr "%d %B %Y"
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "Indice"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "Indice dei Moduli"
@@ -56,34 +56,34 @@ msgstr "Builtin"
msgid "Module level"
msgstr "Modulo"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%d/%b/%Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "Indice generale"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "indice"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr "Indice dei moduli"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "moduli"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "successivo"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "precedente"
@@ -231,12 +231,12 @@ msgstr "Autore: "
msgid "See also"
msgstr "Vedi anche"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr "alias per :class:`%s`"
@@ -447,22 +447,22 @@ msgstr "Cerca"
msgid "Copyright"
msgstr "Copyright"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Copyright %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Ultimo Aggiornamento on %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -505,7 +505,7 @@ msgid "search"
msgstr "cerca"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "Risultati della ricerca"
@@ -562,15 +562,15 @@ msgstr "Ricerca in corso"
msgid "Preparing search..."
msgstr "Preparazione della ricerca"
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
msgid "module, in "
msgstr "modulo, in"
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ", in "
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -579,20 +579,20 @@ msgstr ""
"dei termini di ricerca e di avere selezionato un numero sufficiente di "
"categorie"
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Ricerca terminata, trovate %s pagine corrispondenti alla ricerca."
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr "Release"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
#, fuzzy
msgid "Continued on next page"
msgstr "Indice completo in una pagina"
diff --git a/sphinx/locale/ja/LC_MESSAGES/sphinx.po b/sphinx/locale/ja/LC_MESSAGES/sphinx.po
index 49c8a9d8..32001b01 100644
--- a/sphinx/locale/ja/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/ja/LC_MESSAGES/sphinx.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Sphinx 0.5\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2008-09-11 23:58+0200\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
"Last-Translator: Yasushi MASUDA <whosaysni@gmail.com>\n"
"Language-Team: ja <LL@li.org>\n"
"Plural-Forms: nplurals=1; plural=0\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr "%Y 年 %m 月 %d 日"
@@ -27,11 +27,11 @@ msgstr "%Y 年 %m 月 %d 日"
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "索引"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "モジュール索引"
@@ -57,34 +57,34 @@ msgstr "組み込み"
msgid "Module level"
msgstr "モジュールレベル"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%Y 年 %m 月 %d 日"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "総合索引"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "索引"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr "モジュール総索引"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "モジュール"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "次へ"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "前へ"
@@ -233,12 +233,12 @@ msgstr "作者: "
msgid "See also"
msgstr "参考"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -450,22 +450,22 @@ msgstr "検索"
msgid "Copyright"
msgstr "著作権"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Copyright %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "最終更新: %(last_updated)s"
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -503,7 +503,7 @@ msgid "search"
msgstr "検索"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "検索結果"
@@ -560,35 +560,35 @@ msgstr "検索中"
msgid "Preparing search..."
msgstr "検索の準備中..."
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
#, fuzzy
msgid "module, in "
msgstr "モジュール"
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
msgstr "検索条件に一致するドキュメントはありませんでした。検索したい言葉を正しいつづりで入力しているか確認してください。また、正しいカテゴリの検索を行っているか確認してください。"
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "検索が終了し、条件に一致するページが %s 個みつかりました。"
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr "リリース"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
#, fuzzy
msgid "Continued on next page"
msgstr "総索引"
diff --git a/sphinx/locale/nl/LC_MESSAGES/sphinx.po b/sphinx/locale/nl/LC_MESSAGES/sphinx.po
index d450aa70..df5722b9 100644
--- a/sphinx/locale/nl/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/nl/LC_MESSAGES/sphinx.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: Sphinx 0.5\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2008-09-11 23:58+0200\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: nl <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr "%d. %B %Y"
@@ -26,11 +26,11 @@ msgstr "%d. %B %Y"
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "Index"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "Module-index"
@@ -56,34 +56,34 @@ msgstr "Builtins"
msgid "Module level"
msgstr "Moduleniveau"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%d.%b.%Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "Algemene index"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "Index"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr "Globale Module-index"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "modules"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "volgende"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "vorige"
@@ -232,12 +232,12 @@ msgstr "Auteur: "
msgid "See also"
msgstr "Zie ook"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -449,22 +449,22 @@ msgstr "Zoeken"
msgid "Copyright"
msgstr "Copyright"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Copyright %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Laatste aanpassing op %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -508,7 +508,7 @@ msgid "search"
msgstr "zoeken"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "Zoekresultaten"
@@ -565,16 +565,16 @@ msgstr "Zoeken"
msgid "Preparing search..."
msgstr "Het zoeken wordt voorbereid"
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
#, fuzzy
msgid "module, in "
msgstr "module"
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -582,20 +582,20 @@ msgstr ""
"Uw zoekopdracht leverde geen resultaten op. Controleer of alle "
"woordencorrect gespeld zijn en dat u genoeg categoriën hebt geselecteerd."
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Zoeken voltooid, %s pagina(s) gevonden."
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr "Release"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
#, fuzzy
msgid "Continued on next page"
msgstr "Volledige index op een pagina"
diff --git a/sphinx/locale/pl/LC_MESSAGES/sphinx.js b/sphinx/locale/pl/LC_MESSAGES/sphinx.js
index ce79a179..a913d3d6 100644
--- a/sphinx/locale/pl/LC_MESSAGES/sphinx.js
+++ b/sphinx/locale/pl/LC_MESSAGES/sphinx.js
@@ -1 +1 @@
-Documentation.addTranslations({"locale": "pl", "plural_expr": "(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)", "messages": {"module, in ": "modu\u0142", "Preparing search...": "Przygotowanie wyszukiwania...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Nie znaleziono \u017cadnych pasuj\u0105cych dokument\u00f3w. Upewnij si\u0119, \u017ce wszystkie s\u0142owa s\u0105 poprawnie wpisane i \u017ce wybra\u0142e\u015b wystarczaj\u0105c\u0105liczb\u0119 kategorii.", "Search finished, found %s page(s) matching the search query.": "Przeszukiwanie zako\u0144czone, znaleziono %s pasuj\u0105cych stron.", ", in ": "", "Permalink to this headline": "Sta\u0142y odno\u015bnik do tego nag\u0142\u00f3wka", "Searching": "Wyszukiwanie", "Permalink to this definition": "Sta\u0142y odno\u015bnik do tej definicji", "Hide Search Matches": "Ukryj wyniki wyszukiwania", "Search Results": "Wyniki wyszukiwania"}}); \ No newline at end of file
+Documentation.addTranslations({"locale": "pl", "plural_expr": "(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)", "messages": {"module, in ": "modu\u0142, w ", "Preparing search...": "Przygotowanie wyszukiwania...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Nie znaleziono \u017cadnych pasuj\u0105cych dokument\u00f3w. Upewnij si\u0119, \u017ce wszystkie s\u0142owa s\u0105 poprawnie wpisane i \u017ce wybra\u0142e\u015b wystarczaj\u0105c\u0105liczb\u0119 kategorii.", "Search finished, found %s page(s) matching the search query.": "Przeszukiwanie zako\u0144czone, znaleziono %s pasuj\u0105cych stron.", ", in ": ", w ", "Permalink to this headline": "Sta\u0142y odno\u015bnik do tego nag\u0142\u00f3wka", "Searching": "Wyszukiwanie", "Permalink to this definition": "Sta\u0142y odno\u015bnik do tej definicji", "Hide Search Matches": "Ukryj wyniki wyszukiwania", "Search Results": "Wyniki wyszukiwania"}}); \ No newline at end of file
diff --git a/sphinx/locale/pl/LC_MESSAGES/sphinx.mo b/sphinx/locale/pl/LC_MESSAGES/sphinx.mo
index c53656a0..31e424d8 100644
--- a/sphinx/locale/pl/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/pl/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/pl/LC_MESSAGES/sphinx.po b/sphinx/locale/pl/LC_MESSAGES/sphinx.po
index 2b15a793..09832079 100644
--- a/sphinx/locale/pl/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/pl/LC_MESSAGES/sphinx.po
@@ -1,257 +1,269 @@
-
msgid ""
msgstr ""
"Project-Id-Version: Sphinx 0.5\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2008-08-10 11:43+0000\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 11:25+0100\n"
"Last-Translator: Michał Kandulski <Michal.Kandulski@poczta.onet.pl>\n"
"Language-Team: \n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && "
-"(n%100<10 || n%100>=20) ? 1 : 2)\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 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.4\n"
+"Generated-By: Babel 0.9.3\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104
+#: sphinx/writers/latex.py:170
#, python-format
msgid "%B %d, %Y"
msgstr "%B %d %Y"
-#: sphinx/environment.py:323 sphinx/themes/basic/genindex-single.html:2
-#: sphinx/themes/basic/genindex-split.html:2
-#: sphinx/themes/basic/genindex-split.html:5
-#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
-#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/environment.py:300
+#: 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
+#: sphinx/templates/layout.html:126
+#: sphinx/writers/latex.py:176
msgid "Index"
msgstr "Indeks"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:301
+#: sphinx/writers/latex.py:175
msgid "Module Index"
msgstr "Indeks modułów"
-#: sphinx/environment.py:325 sphinx/themes/basic/defindex.html:16
+#: sphinx/environment.py:302
+#: sphinx/templates/defindex.html:16
msgid "Search Page"
msgstr "Wyszukiwanie"
-#: sphinx/roles.py:55 sphinx/directives/desc.py:747
+#: sphinx/roles.py:53
+#: sphinx/directives/desc.py:580
#, python-format
msgid "environment variable; %s"
msgstr "zmienna środowiskowa; %s"
-#: sphinx/roles.py:62
+#: sphinx/roles.py:60
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
-#: sphinx/builders/changes.py:71
+#: sphinx/builders/changes.py:64
msgid "Builtins"
msgstr "Wbudowane"
-#: sphinx/builders/changes.py:73
+#: sphinx/builders/changes.py:66
msgid "Module level"
msgstr "Poziom modułu"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:118
#, python-format
msgid "%b %d, %Y"
msgstr "%b %d %Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:137
+#: sphinx/templates/defindex.html:21
msgid "General Index"
msgstr "Indeks ogólny"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:137
msgid "index"
msgstr "indeks"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
-#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
-#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
+#: sphinx/builders/html.py:139
+#: sphinx/builders/htmlhelp.py:182
+#: sphinx/builders/qthelp.py:131
+#: sphinx/templates/defindex.html:19
+#: sphinx/templates/modindex.html:2
+#: sphinx/templates/modindex.html:13
msgid "Global Module Index"
msgstr "Indeks modułów"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:139
msgid "modules"
msgstr "moduły"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:179
msgid "next"
msgstr "dalej"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:186
msgid "previous"
msgstr "wstecz"
-#: sphinx/builders/latex.py:162
+#: sphinx/builders/latex.py:155
+#: sphinx/builders/pdf.py:162
msgid " (in "
-msgstr ""
-
-#: sphinx/directives/desc.py:97
-msgid "Raises"
-msgstr "Wyrzuca"
-
-#: sphinx/directives/desc.py:101
-msgid "Variable"
-msgstr "Zmienna"
-
-#: sphinx/directives/desc.py:104
-msgid "Returns"
-msgstr "Zwraca"
-
-#: sphinx/directives/desc.py:113
-msgid "Return type"
-msgstr "Typ zwracany"
+msgstr " (w "
-#: sphinx/directives/desc.py:186
-#, fuzzy
-msgid "Parameter"
-msgstr "Parametry"
-
-#: sphinx/directives/desc.py:190
-msgid "Parameters"
-msgstr "Parametry"
-
-#: sphinx/directives/desc.py:418
+#: sphinx/directives/desc.py:25
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (funkcja wbudowana)"
-#: sphinx/directives/desc.py:419 sphinx/directives/desc.py:476
-#: sphinx/directives/desc.py:488
+#: sphinx/directives/desc.py:26
+#: sphinx/directives/desc.py:42
+#: sphinx/directives/desc.py:54
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (w module %s)"
-#: sphinx/directives/desc.py:422
+#: sphinx/directives/desc.py:29
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (zmienna wbudowana)"
-#: sphinx/directives/desc.py:423 sphinx/directives/desc.py:514
+#: sphinx/directives/desc.py:30
+#: sphinx/directives/desc.py:78
#, python-format
msgid "%s (in module %s)"
msgstr "%s (w module %s)"
-#: sphinx/directives/desc.py:439
-#, fuzzy, python-format
+#: sphinx/directives/desc.py:33
+#, python-format
msgid "%s (built-in class)"
-msgstr "%s (zmienna wbudowana)"
+msgstr "%s (klasa wbudowana)"
-#: sphinx/directives/desc.py:440
+#: sphinx/directives/desc.py:34
#, python-format
msgid "%s (class in %s)"
msgstr "%s (w klasie %s)"
-#: sphinx/directives/desc.py:480
+#: sphinx/directives/desc.py:46
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s metoda)"
-#: sphinx/directives/desc.py:482
+#: sphinx/directives/desc.py:48
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s metoda)"
-#: sphinx/directives/desc.py:492
+#: sphinx/directives/desc.py:58
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s statyczna metoda)"
-#: sphinx/directives/desc.py:495
+#: sphinx/directives/desc.py:60
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s statyczna metoda)"
-#: sphinx/directives/desc.py:518
+#: sphinx/directives/desc.py:82
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s atrybut)"
-#: sphinx/directives/desc.py:520
+#: sphinx/directives/desc.py:84
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s atrybut)"
-#: sphinx/directives/desc.py:609
+#: sphinx/directives/desc.py:86
#, python-format
msgid "%s (C function)"
msgstr "%s (funkcja C)"
-#: sphinx/directives/desc.py:611
+#: sphinx/directives/desc.py:88
#, python-format
msgid "%s (C member)"
msgstr "%s (pole C)"
-#: sphinx/directives/desc.py:613
+#: sphinx/directives/desc.py:90
#, python-format
msgid "%s (C macro)"
msgstr "%s (makro C)"
-#: sphinx/directives/desc.py:615
+#: sphinx/directives/desc.py:92
#, python-format
msgid "%s (C type)"
msgstr "%s (typ C)"
-#: sphinx/directives/desc.py:617
+#: sphinx/directives/desc.py:94
#, python-format
msgid "%s (C variable)"
msgstr "%s (zmienna C)"
-#: sphinx/directives/desc.py:665
-#, fuzzy, python-format
+#: sphinx/directives/desc.py:112
+msgid "Raises"
+msgstr "Wyrzuca"
+
+#: sphinx/directives/desc.py:116
+msgid "Variable"
+msgstr "Zmienna"
+
+#: sphinx/directives/desc.py:119
+msgid "Returns"
+msgstr "Zwraca"
+
+#: sphinx/directives/desc.py:128
+msgid "Return type"
+msgstr "Typ zwracany"
+
+#: sphinx/directives/desc.py:213
+msgid "Parameter"
+msgstr "Parametr"
+
+#: sphinx/directives/desc.py:217
+msgid "Parameters"
+msgstr "Parametry"
+
+#: sphinx/directives/desc.py:465
+#, python-format
msgid "%scommand line option; %s"
msgstr "%sopcja linii komend; %s"
-#: sphinx/directives/other.py:138
+#: sphinx/directives/other.py:101
msgid "Platforms: "
msgstr "Platformy: "
-#: sphinx/directives/other.py:144
+#: sphinx/directives/other.py:106
#, python-format
msgid "%s (module)"
msgstr "%s (moduł)"
-#: sphinx/directives/other.py:193
+#: sphinx/directives/other.py:146
msgid "Section author: "
msgstr "Autor rozdziału: "
-#: sphinx/directives/other.py:195
+#: sphinx/directives/other.py:148
msgid "Module author: "
msgstr "Autor modułu: "
-#: sphinx/directives/other.py:197
+#: sphinx/directives/other.py:150
msgid "Author: "
msgstr "Autor: "
-#: sphinx/directives/other.py:317
+#: sphinx/directives/other.py:249
msgid "See also"
msgstr "Zobacz także"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:442
#, python-format
msgid " Bases: %s"
-msgstr ""
+msgstr " Klasy bazowe: %s"
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:566
+#: sphinx/ext/autodoc.py:583
#, python-format
msgid "alias of :class:`%s`"
-msgstr ""
+msgstr "alias klasy :class:`%s`"
-#: sphinx/ext/todo.py:41
+#: sphinx/ext/todo.py:31
msgid "Todo"
-msgstr ""
+msgstr "Do zrobienia"
-#: sphinx/ext/todo.py:99
+#: sphinx/ext/todo.py:75
#, python-format
msgid "(The original entry is located in %s, line %d and can be found "
-msgstr ""
+msgstr "(Oryginalny wpis znajduje się w pliku %s, w linii %d i może być odnaleziony "
-#: sphinx/ext/todo.py:105
+#: sphinx/ext/todo.py:81
msgid "here"
-msgstr ""
+msgstr "tutaj"
#: sphinx/locale/__init__.py:15
msgid "Attention"
@@ -336,158 +348,197 @@ msgstr "instrukcja"
msgid "built-in function"
msgstr "funkcja wbudowana"
-#: sphinx/themes/basic/defindex.html:2
+#: sphinx/static/doctools.js:139
+#: sphinx/writers/html.py:425
+msgid "Permalink to this headline"
+msgstr "Stały odnośnik do tego nagłówka"
+
+#: sphinx/static/doctools.js:145
+#: sphinx/writers/html.py:80
+msgid "Permalink to this definition"
+msgstr "Stały odnośnik do tej definicji"
+
+#: sphinx/static/doctools.js:174
+msgid "Hide Search Matches"
+msgstr "Ukryj wyniki wyszukiwania"
+
+#: sphinx/static/searchtools.js:274
+msgid "Searching"
+msgstr "Wyszukiwanie"
+
+#: sphinx/static/searchtools.js:279
+msgid "Preparing search..."
+msgstr "Przygotowanie wyszukiwania..."
+
+#: sphinx/static/searchtools.js:338
+msgid "module, in "
+msgstr "moduł, w "
+
+#: sphinx/static/searchtools.js:347
+msgid ", in "
+msgstr ", w "
+
+#: sphinx/static/searchtools.js:453
+#: sphinx/templates/search.html:25
+msgid "Search Results"
+msgstr "Wyniki wyszukiwania"
+
+#: sphinx/static/searchtools.js:455
+msgid "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+msgstr "Nie znaleziono żadnych pasujących dokumentów. Upewnij się, że wszystkie słowa są poprawnie wpisane i że wybrałeś wystarczającąliczbę kategorii."
+
+#: sphinx/static/searchtools.js:457
+#, python-format
+msgid "Search finished, found %s page(s) matching the search query."
+msgstr "Przeszukiwanie zakończone, znaleziono %s pasujących stron."
+
+#: sphinx/templates/defindex.html:2
msgid "Overview"
msgstr "Przegląd"
-#: sphinx/themes/basic/defindex.html:11
+#: sphinx/templates/defindex.html:11
msgid "Indices and tables:"
msgstr "Indeksy i tablice:"
-#: sphinx/themes/basic/defindex.html:14
+#: sphinx/templates/defindex.html:14
msgid "Complete Table of Contents"
msgstr "Kompletny spis treści"
-#: sphinx/themes/basic/defindex.html:15
+#: sphinx/templates/defindex.html:15
msgid "lists all sections and subsections"
msgstr "wymień wszystkie rozdziały i podrozdziały"
-#: sphinx/themes/basic/defindex.html:17
+#: sphinx/templates/defindex.html:17
msgid "search this documentation"
msgstr "wyszukaj w dokumentacji"
-#: sphinx/themes/basic/defindex.html:20
+#: sphinx/templates/defindex.html:20
msgid "quick access to all modules"
msgstr "szybki dostęp do wszystkich modułów"
-#: sphinx/themes/basic/defindex.html:22
+#: sphinx/templates/defindex.html:22
msgid "all functions, classes, terms"
msgstr "wszystkie funkcje, klasy, terminy"
-#: sphinx/themes/basic/genindex-single.html:5
+#: sphinx/templates/genindex-single.html:5
#, python-format
msgid "Index &ndash; %(key)s"
msgstr "Indeks &ndash; %(key)s"
-#: sphinx/themes/basic/genindex-single.html:44
-#: sphinx/themes/basic/genindex-split.html:14
-#: sphinx/themes/basic/genindex-split.html:27
-#: sphinx/themes/basic/genindex.html:54
+#: sphinx/templates/genindex-single.html:44
+#: sphinx/templates/genindex-split.html:14
+#: sphinx/templates/genindex-split.html:27
+#: sphinx/templates/genindex.html:54
msgid "Full index on one page"
msgstr "Cały indeks na jednej stronie"
-#: sphinx/themes/basic/genindex-split.html:7
+#: sphinx/templates/genindex-split.html:7
msgid "Index pages by letter"
msgstr "Strony indeksu alfabetycznie"
-#: sphinx/themes/basic/genindex-split.html:15
+#: sphinx/templates/genindex-split.html:15
msgid "can be huge"
msgstr "może być ogromny"
-#: sphinx/themes/basic/layout.html:10
+#: sphinx/templates/layout.html:9
msgid "Navigation"
msgstr "Nawigacja"
-#: sphinx/themes/basic/layout.html:42
+#: sphinx/templates/layout.html:40
msgid "Table Of Contents"
msgstr "Spis treści"
-#: sphinx/themes/basic/layout.html:48
+#: sphinx/templates/layout.html:46
msgid "Previous topic"
msgstr "Poprzedni temat"
-#: sphinx/themes/basic/layout.html:50
+#: sphinx/templates/layout.html:48
msgid "previous chapter"
msgstr "poprzedni rozdział"
-#: sphinx/themes/basic/layout.html:53
+#: sphinx/templates/layout.html:51
msgid "Next topic"
msgstr "Następny temat"
-#: sphinx/themes/basic/layout.html:55
+#: sphinx/templates/layout.html:53
msgid "next chapter"
msgstr "następny rozdział"
-#: sphinx/themes/basic/layout.html:60
+#: sphinx/templates/layout.html:58
msgid "This Page"
msgstr "Ta strona"
-#: sphinx/themes/basic/layout.html:63
+#: sphinx/templates/layout.html:61
msgid "Show Source"
msgstr "Pokaż źródło"
-#: sphinx/themes/basic/layout.html:73
+#: sphinx/templates/layout.html:71
msgid "Quick search"
msgstr "Szybkie wyszukiwanie"
-#: sphinx/themes/basic/layout.html:76
+#: sphinx/templates/layout.html:74
msgid "Go"
msgstr "Szukaj"
-#: sphinx/themes/basic/layout.html:81
-#, fuzzy
+#: sphinx/templates/layout.html:78
msgid "Enter search terms or a module, class or function name."
-msgstr "Wprowadź nazwę modułu, klasy lub funkcji."
+msgstr "Wprowadź szukany termin lub nazwę modułu, klasy lub funkcji."
-#: sphinx/themes/basic/layout.html:119
+#: sphinx/templates/layout.html:115
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Szukaj pośród %(docstitle)s"
-#: sphinx/themes/basic/layout.html:128
+#: sphinx/templates/layout.html:124
msgid "About these documents"
msgstr "O tych dokumentach"
-#: sphinx/themes/basic/layout.html:134 sphinx/themes/basic/search.html:2
-#: sphinx/themes/basic/search.html:5
+#: sphinx/templates/layout.html:127
+#: sphinx/templates/search.html:2
+#: sphinx/templates/search.html:5
msgid "Search"
msgstr "Szukaj"
-#: sphinx/themes/basic/layout.html:137
+#: sphinx/templates/layout.html:129
msgid "Copyright"
msgstr "Copyright"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/templates/layout.html:174
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/templates/layout.html:176
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Copyright %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/templates/layout.html:179
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Ostatnia modyfikacja %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/templates/layout.html:182
#, python-format
-msgid ""
-"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
-"%(sphinx_version)s."
-msgstr ""
-"Utworzone przy pomocy <a href=\"http://sphinx.pocoo.org/\">Sphinx</a>'a "
-"%(sphinx_version)s."
+msgid "Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)s."
+msgstr "Utworzone przy pomocy <a href=\"http://sphinx.pocoo.org/\">Sphinx</a>'a %(sphinx_version)s."
-#: sphinx/themes/basic/modindex.html:36
+#: sphinx/templates/modindex.html:36
msgid "Deprecated"
msgstr "Niezalecane"
-#: sphinx/themes/basic/opensearch.xml:4
+#: sphinx/templates/opensearch.xml:4
#, python-format
msgid "Search %(docstitle)s"
msgstr "Przeszukaj %(docstitle)s"
-#: sphinx/themes/basic/search.html:9
+#: sphinx/templates/search.html:9
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
-msgstr ""
+msgstr "Aby umożliwić wuszukiwanie, proszę włączyć JavaScript."
-#: sphinx/themes/basic/search.html:14
-#, fuzzy
+#: sphinx/templates/search.html:14
msgid ""
"From here you can search these documents. Enter your search\n"
" words into the box below and click \"search\". Note that the search\n"
@@ -496,113 +547,55 @@ msgid ""
msgstr ""
"Stąd możesz przeszukać dokumentację. Wprowadź szukane\n"
" słowa w poniższym okienku i kliknij \"Szukaj\". Zwróć uwagę, że\n"
-" funkcja szukająca będzie automatycznie szukała wszystkich słów. "
-"Strony nie zawierające wszystkich słów nie znajdą się na wynikowej "
-"liście."
+" funkcja szukająca będzie automatycznie szukała wszystkich słów. Strony\n"
+" nie zawierające wszystkich wpisanych słów nie znajdą się na wynikowej liście."
-#: sphinx/themes/basic/search.html:21
+#: sphinx/templates/search.html:21
msgid "search"
msgstr "Szukaj"
-#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
-msgid "Search Results"
-msgstr "Wyniki wyszukiwania"
-
-#: sphinx/themes/basic/search.html:27
+#: sphinx/templates/search.html:27
msgid "Your search did not match any results."
msgstr "Nie znaleziono żadnych pasujących stron."
-#: sphinx/themes/basic/changes/frameset.html:5
-#: sphinx/themes/basic/changes/versionchanges.html:12
+#: sphinx/templates/changes/frameset.html:5
+#: sphinx/templates/changes/versionchanges.html:12
#, python-format
msgid "Changes in Version %(version)s &mdash; %(docstitle)s"
msgstr "Zmiany w wesji %(version)s &mdash; %(docstitle)s"
-#: sphinx/themes/basic/changes/rstsource.html:5
+#: sphinx/templates/changes/rstsource.html:5
#, python-format
msgid "%(filename)s &mdash; %(docstitle)s"
msgstr "%(filename)s &mdash; %(docstitle)s"
-#: sphinx/themes/basic/changes/versionchanges.html:17
+#: sphinx/templates/changes/versionchanges.html:17
#, python-format
msgid "Automatically generated list of changes in version %(version)s"
msgstr "Automatycznie wygenerowana lista zmian w wersji %(version)s"
-#: sphinx/themes/basic/changes/versionchanges.html:18
+#: sphinx/templates/changes/versionchanges.html:18
msgid "Library changes"
msgstr "Zmiany w bibliotekach"
-#: sphinx/themes/basic/changes/versionchanges.html:23
+#: sphinx/templates/changes/versionchanges.html:23
msgid "C API changes"
msgstr "Zmiany w C API"
-#: sphinx/themes/basic/changes/versionchanges.html:25
+#: sphinx/templates/changes/versionchanges.html:25
msgid "Other changes"
msgstr "Inne zmiany"
-#: sphinx/themes/basic/static/doctools.js:139 sphinx/writers/html.py:473
-#: sphinx/writers/html.py:478
-msgid "Permalink to this headline"
-msgstr "Stały odnośnik do tego nagłówka"
-
-#: sphinx/themes/basic/static/doctools.js:145 sphinx/writers/html.py:80
-msgid "Permalink to this definition"
-msgstr "Stały odnośnik do tej definicji"
-
-#: sphinx/themes/basic/static/doctools.js:174
-msgid "Hide Search Matches"
-msgstr "Ukryj wyniki wyszukiwania"
-
-#: sphinx/themes/basic/static/searchtools.js:274
-msgid "Searching"
-msgstr "Wyszukiwanie"
-
-#: sphinx/themes/basic/static/searchtools.js:279
-msgid "Preparing search..."
-msgstr "Przygotowanie wyszukiwania..."
-
-#: sphinx/themes/basic/static/searchtools.js:338
-#, fuzzy
-msgid "module, in "
-msgstr "moduł"
-
-#: sphinx/themes/basic/static/searchtools.js:347
-msgid ", in "
-msgstr ""
-
-#: sphinx/themes/basic/static/searchtools.js:455
-msgid ""
-"Your search did not match any documents. Please make sure that all words "
-"are spelled correctly and that you've selected enough categories."
-msgstr ""
-"Nie znaleziono żadnych pasujących dokumentów. Upewnij się, że wszystkie "
-"słowa są poprawnie wpisane i że wybrałeś wystarczającąliczbę kategorii."
-
-#: sphinx/themes/basic/static/searchtools.js:457
-#, python-format
-msgid "Search finished, found %s page(s) matching the search query."
-msgstr "Przeszukiwanie zakończone, znaleziono %s pasujących stron."
-
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:173
msgid "Release"
msgstr "Wydanie"
-#: sphinx/writers/latex.py:637
-msgid "continued from previous page"
-msgstr ""
-
-#: sphinx/writers/latex.py:641
-#, fuzzy
-msgid "Continued on next page"
-msgstr "Cały indeks na jednej stronie"
-
#: sphinx/writers/text.py:166
#, python-format
msgid "Platform: %s"
msgstr "Platforma: %s"
-#: sphinx/writers/text.py:428
+#: sphinx/writers/text.py:427
msgid "[image]"
msgstr "[obrazek]"
diff --git a/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po b/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po
index 8f5b3989..9d5b7cd4 100644
--- a/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Sphinx 0.5\n"
"Report-Msgid-Bugs-To: roger.demetrescu@gmail.com\n"
"POT-Creation-Date: 2008-11-09 19:46+0100\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
"Last-Translator: Roger Demetrescu <roger.demetrescu@gmail.com>\n"
"Language-Team: pt_BR <roger.demetrescu@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr "%d/%m/%Y"
@@ -27,11 +27,11 @@ msgstr "%d/%m/%Y"
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "Índice"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "Índice do Módulo"
@@ -57,34 +57,34 @@ msgstr "Internos"
msgid "Module level"
msgstr "Módulo"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%d/%m/%Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "Índice Geral"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "índice"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr "Índice Global de Módulos"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "módulos"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "próximo"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "anterior"
@@ -233,12 +233,12 @@ msgstr "Autor: "
msgid "See also"
msgstr "Veja também"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -450,22 +450,22 @@ msgstr "Pesquisar"
msgid "Copyright"
msgstr "Copyright"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Copyright %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Última atualização em %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -509,7 +509,7 @@ msgid "search"
msgstr "pesquisar"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "Resultados da Pesquisa"
@@ -566,15 +566,15 @@ msgstr "Pesquisando"
msgid "Preparing search..."
msgstr "Preparando pesquisa..."
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
msgid "module, in "
msgstr "módulo, em "
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ", em "
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -583,22 +583,22 @@ msgstr ""
" todas as palavras foram digitadas corretamente e de que você tenha "
"selecionado o mínimo de categorias."
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr ""
"Pesquisa finalizada, foram encontrada(s) %s página(s) que conferem com o "
"critério de pesquisa."
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr "Versão"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
#, fuzzy
msgid "Continued on next page"
msgstr "Índice completo em uma página"
diff --git a/sphinx/locale/ru/LC_MESSAGES/sphinx.po b/sphinx/locale/ru/LC_MESSAGES/sphinx.po
index a1e2e3fc..72c9629e 100644
--- a/sphinx/locale/ru/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/ru/LC_MESSAGES/sphinx.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: Sphinx 0.6b1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2009-01-24 18:39+0000\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
"Last-Translator: alexander smishlajev <alex@tycobka.lv>\n"
"Language-Team: ru <LL@li.org>\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr "%d %B %Y"
@@ -27,11 +27,11 @@ msgstr "%d %B %Y"
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "Алфавитный указатель"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "Состав модуля"
@@ -57,34 +57,34 @@ msgstr "Встроенные функции"
msgid "Module level"
msgstr "Модуль"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%d %b %Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "Словарь-указатель"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "словарь"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr "Алфавитный указатель модулей"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "модули"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "следующий"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "предыдущий"
@@ -232,12 +232,12 @@ msgstr "Автор: "
msgid "See also"
msgstr "См.также"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr " Базовые классы: %s"
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr "псевдоним класса :class:`%s`"
@@ -448,22 +448,22 @@ msgstr "Поиск"
msgid "Copyright"
msgstr "Copyright"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Copyright %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Дата последнего обновления: %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -505,7 +505,7 @@ msgid "search"
msgstr "искать"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "Результаты поиска"
@@ -562,15 +562,15 @@ msgstr "Поиск"
msgid "Preparing search..."
msgstr "Подготовка к поиску..."
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
msgid "module, in "
msgstr ", модуль в "
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ", в "
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -578,20 +578,20 @@ msgstr ""
"Нет документов, соответствующих вашему запросу. Проверьте, правильно ли "
"выбраны категории и нет ли опечаток в запросе."
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Поиск окончен, найдено страниц: %s."
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr "Выпуск"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
#, fuzzy
msgid "Continued on next page"
msgstr "Полный алфавитный указатель на одной странице"
diff --git a/sphinx/locale/sl/LC_MESSAGES/sphinx.js b/sphinx/locale/sl/LC_MESSAGES/sphinx.js
index e00eb23b..a0936a57 100644
--- a/sphinx/locale/sl/LC_MESSAGES/sphinx.js
+++ b/sphinx/locale/sl/LC_MESSAGES/sphinx.js
@@ -1 +1 @@
-Documentation.addTranslations({"locale": "sl", "plural_expr": "0", "messages": {"module, in ": "modul, v ", "Preparing search...": "Pripravljam iskanje...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Za va\u0161e iskanje ni rezultatov. Prosimo preglejte ali so vse besede pravilno \u010drkovane in ali ste izbrali dovolj kategorij.", "Search finished, found %s page(s) matching the search query.": "Iskanje kon\u010dano, najdeno %s strani, ki ustrezajo iskalnemu nizu.", ", in ": ", v ", "Permalink to this headline": "Povezava na naslov", "Searching": "I\u0161\u010dem", "Permalink to this definition": "Povezava na to definicijo", "Hide Search Matches": "Skrij Resultate Iskanja", "Search Results": "Rezultati Iskanja"}}); \ No newline at end of file
+Documentation.addTranslations({"locale": "sl", "plural_expr": "0", "messages": {"Search Results": "Rezultati Iskanja", "Preparing search...": "Pripravljam iskanje...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Za va\u0161e iskanje ni rezultatov. Prosimo preglejte ali so vse besede pravilno \u010drkovane in ali ste izbrali dovolj kategorij.", "Search finished, found %s page(s) matching the search query.": "Iskanje kon\u010dano, najdeno %s strani, ki ustrezajo iskalnemu nizu.", ", in ": ", v ", "Permalink to this headline": "Povezava na naslov", "Searching": "I\u0161\u010dem", "Permalink to this definition": "Povezava na to definicijo", "module, in ": "modul, v ", "Hide Search Matches": "Skrij resultate iskanja"}}); \ No newline at end of file
diff --git a/sphinx/locale/sl/LC_MESSAGES/sphinx.mo b/sphinx/locale/sl/LC_MESSAGES/sphinx.mo
index e7d1e830..c8e1e0a4 100644
--- a/sphinx/locale/sl/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/sl/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/sl/LC_MESSAGES/sphinx.po b/sphinx/locale/sl/LC_MESSAGES/sphinx.po
index d33cec31..5b6a9cfd 100644
--- a/sphinx/locale/sl/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/sl/LC_MESSAGES/sphinx.po
@@ -1,11 +1,10 @@
-
msgid ""
msgstr ""
-"Project-Id-Version: Sphinx\n"
+"Project-Id-Version: Sphinx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2008-09-11 23:58+0200\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
-"Last-Translator: Rok Garbas <rok.garbas@gmail.com>\n"
+"PO-Revision-Date: 2009-05-29 19:16+0100\n"
+"Last-Translator: Domen Kožar <domen@dev.si>\n"
"Language-Team: Rok Garbas <rok.garbas@gmail.com>\n"
"Plural-Forms: nplurals=1; plural=0\n"
"MIME-Version: 1.0\n"
@@ -13,32 +12,39 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104
+#: sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr "%d %B, %Y"
-#: sphinx/environment.py:323 sphinx/themes/basic/genindex-single.html:2
+#: sphinx/environment.py:323
+#: sphinx/themes/basic/genindex-single.html:2
#: sphinx/themes/basic/genindex-split.html:2
#: sphinx/themes/basic/genindex-split.html:5
-#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
-#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/themes/basic/genindex.html:2
+#: sphinx/themes/basic/genindex.html:5
+#: sphinx/themes/basic/genindex.html:48
+#: sphinx/themes/basic/layout.html:131
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "Abecedni seznam"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324
+#: sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "Seznam modulov"
-#: sphinx/environment.py:325 sphinx/themes/basic/defindex.html:16
+#: sphinx/environment.py:325
+#: sphinx/themes/basic/defindex.html:16
msgid "Search Page"
-msgstr "Iskalna stran"
+msgstr "Iskalnik"
-#: sphinx/roles.py:55 sphinx/directives/desc.py:747
+#: sphinx/roles.py:55
+#: sphinx/directives/desc.py:747
#, python-format
msgid "environment variable; %s"
-msgstr "globalna spremenljivka; %s"
+msgstr "okoljska spremenljivka; %s"
#: sphinx/roles.py:62
#, python-format
@@ -53,44 +59,48 @@ msgstr "Vgrajeni deli"
msgid "Module level"
msgstr "Nivo modula"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%d %b, %Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238
+#: sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "Splošni abecedni seznam"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "abecedni seznam"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
-#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
-#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
+#: sphinx/builders/html.py:240
+#: sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/qthelp.py:132
+#: sphinx/themes/basic/defindex.html:19
+#: sphinx/themes/basic/modindex.html:2
+#: sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
-msgstr "Splošen Seznam Modulov"
+msgstr "Splošen seznam modulov"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "Moduli"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "naprej"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "nazaj"
#: sphinx/builders/latex.py:162
msgid " (in "
-msgstr "(v "
+msgstr " (v "
#: sphinx/directives/desc.py:97
msgid "Raises"
-msgstr "Javi"
+msgstr "Sproži izjemo"
#: sphinx/directives/desc.py:101
msgid "Variable"
@@ -105,9 +115,8 @@ msgid "Return type"
msgstr "Vrne tip"
#: sphinx/directives/desc.py:186
-#, fuzzy
msgid "Parameter"
-msgstr "Parametri"
+msgstr "Parameter"
#: sphinx/directives/desc.py:190
msgid "Parameters"
@@ -118,7 +127,8 @@ msgstr "Parametri"
msgid "%s() (built-in function)"
msgstr "%s() (vgrajene funkcije)"
-#: sphinx/directives/desc.py:419 sphinx/directives/desc.py:476
+#: sphinx/directives/desc.py:419
+#: sphinx/directives/desc.py:476
#: sphinx/directives/desc.py:488
#, python-format
msgid "%s() (in module %s)"
@@ -129,7 +139,8 @@ msgstr "%s() (v modulu %s)"
msgid "%s (built-in variable)"
msgstr "%s (vgrajene spremenljivke)"
-#: sphinx/directives/desc.py:423 sphinx/directives/desc.py:514
+#: sphinx/directives/desc.py:423
+#: sphinx/directives/desc.py:514
#, python-format
msgid "%s (in module %s)"
msgstr "%s (v modulu %s)"
@@ -202,11 +213,11 @@ msgstr "%s (C spremenljivka)"
#: sphinx/directives/desc.py:665
#, python-format
msgid "%scommand line option; %s"
-msgstr "%sopcija komandne linije; %s"
+msgstr "%scommand line parameter; %s"
#: sphinx/directives/other.py:138
msgid "Platforms: "
-msgstr "Platforma:"
+msgstr "Platforme:"
#: sphinx/directives/other.py:144
#, python-format
@@ -227,26 +238,26 @@ msgstr "Avtor:"
#: sphinx/directives/other.py:317
msgid "See also"
-msgstr "Poglej tudi"
+msgstr "Poglej Tudi"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
-msgstr ""
+msgstr " Osnove: %s"
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
-msgstr ""
+msgstr "vzdevek za :class:`%s`"
#: sphinx/ext/todo.py:41
msgid "Todo"
-msgstr "Naredi"
+msgstr "Todo"
#: sphinx/ext/todo.py:99
#, python-format
msgid "(The original entry is located in %s, line %d and can be found "
-msgstr "(Originalen vnos se nahajana v %s, vrstica %d in jo je moč poiskati "
+msgstr "(Originalen vnos se nahaja v %s, v vrstici %d, in ga je moč poiskati "
#: sphinx/ext/todo.py:105
msgid "here"
@@ -262,7 +273,7 @@ msgstr "Previdno"
#: sphinx/locale/__init__.py:17
msgid "Danger"
-msgstr "Navarno"
+msgstr "Nevarno"
#: sphinx/locale/__init__.py:18
msgid "Error"
@@ -300,7 +311,7 @@ msgstr "Novo v verziji %s"
#: sphinx/locale/__init__.py:29
#, python-format
msgid "Changed in version %s"
-msgstr "Spemenjeno v verziji %s"
+msgstr "Spremenjeno v verziji %s"
#: sphinx/locale/__init__.py:30
#, python-format
@@ -313,7 +324,7 @@ msgstr "modul"
#: sphinx/locale/__init__.py:35
msgid "keyword"
-msgstr "kllučna beseda"
+msgstr "ključna beseda"
#: sphinx/locale/__init__.py:36
msgid "operator"
@@ -341,7 +352,7 @@ msgstr "Pregled"
#: sphinx/themes/basic/defindex.html:11
msgid "Indices and tables:"
-msgstr "Kazalo in tabele:"
+msgstr "Kazalo in seznami:"
#: sphinx/themes/basic/defindex.html:14
msgid "Complete Table of Contents"
@@ -353,7 +364,7 @@ msgstr "prikazi vse sekcije in podsekcije"
#: sphinx/themes/basic/defindex.html:17
msgid "search this documentation"
-msgstr "isči po dokumentaciji"
+msgstr "išči po dokumentaciji"
#: sphinx/themes/basic/defindex.html:20
msgid "quick access to all modules"
@@ -361,7 +372,7 @@ msgstr "hiter dostop do vseh modulov"
#: sphinx/themes/basic/defindex.html:22
msgid "all functions, classes, terms"
-msgstr "vse funkcije, rezredi, termini"
+msgstr "vse funkcije, razredi, izrazi"
#: sphinx/themes/basic/genindex-single.html:5
#, python-format
@@ -409,7 +420,7 @@ msgstr "naslednje poglavje"
#: sphinx/themes/basic/layout.html:60
msgid "This Page"
-msgstr "Ta stran"
+msgstr "Trenutna stran"
#: sphinx/themes/basic/layout.html:63
msgid "Show Source"
@@ -424,9 +435,8 @@ msgid "Go"
msgstr "Potrdi"
#: sphinx/themes/basic/layout.html:81
-#, fuzzy
msgid "Enter search terms or a module, class or function name."
-msgstr "Vnesi ime mudla, razreda ali funkcije."
+msgstr "Vnesi ime modula, razreda ali funkcije."
#: sphinx/themes/basic/layout.html:119
#, python-format
@@ -435,9 +445,10 @@ msgstr "Išči med %(docstitle)s"
#: sphinx/themes/basic/layout.html:128
msgid "About these documents"
-msgstr "O teh dokumentih"
+msgstr "O dokumentih"
-#: sphinx/themes/basic/layout.html:134 sphinx/themes/basic/search.html:2
+#: sphinx/themes/basic/layout.html:134
+#: sphinx/themes/basic/search.html:2
#: sphinx/themes/basic/search.html:5
msgid "Search"
msgstr "Išči"
@@ -446,29 +457,25 @@ msgstr "Išči"
msgid "Copyright"
msgstr "Vse pravice pridržane"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Vse pravice pridržane</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Vse pravice pridržane %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
-msgstr "Zadnjič posodobljeno na %(last_updated)s."
+msgstr "Zadnjič posodobljeno %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
-msgid ""
-"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
-"%(sphinx_version)s."
-msgstr ""
-"Narejeno s <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
-"%(sphinx_version)s."
+msgid "Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)s."
+msgstr "Narejeno s <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)s."
#: sphinx/themes/basic/modindex.html:36
msgid "Deprecated"
@@ -484,16 +491,17 @@ msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr ""
+"Prosimo omogočite JavaScript\n"
+" za delovanje iskalnika."
#: sphinx/themes/basic/search.html:14
-#, fuzzy
msgid ""
"From here you can search these documents. Enter your search\n"
" 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 fewer words won't appear in the result list."
msgstr ""
-"O tukaj lahko isčete dokumente. Vnesite iskalni\n"
+"Tukaj lahko iščete dokumente. Vnesite iskalni\n"
" niz v polje spodaj in pritisnite \"išči\". Sproženo iskanje\n"
" bo iskalo po vseh besedah v iskalnem nizu. Strani, ki ne\n"
" vsebujejo vseh besed ne bodo prikazane na seznamu rezultatov."
@@ -503,7 +511,7 @@ msgid "search"
msgstr "išči"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "Rezultati Iskanja"
@@ -539,18 +547,20 @@ msgstr "C API spremembe"
msgid "Other changes"
msgstr "Ostale spremembe"
-#: sphinx/themes/basic/static/doctools.js:139 sphinx/writers/html.py:473
+#: sphinx/themes/basic/static/doctools.js:139
+#: sphinx/writers/html.py:473
#: sphinx/writers/html.py:478
msgid "Permalink to this headline"
msgstr "Povezava na naslov"
-#: sphinx/themes/basic/static/doctools.js:145 sphinx/writers/html.py:80
+#: sphinx/themes/basic/static/doctools.js:145
+#: sphinx/writers/html.py:80
msgid "Permalink to this definition"
msgstr "Povezava na to definicijo"
#: sphinx/themes/basic/static/doctools.js:174
msgid "Hide Search Matches"
-msgstr "Skrij Resultate Iskanja"
+msgstr "Skrij resultate iskanja"
#: sphinx/themes/basic/static/searchtools.js:274
msgid "Searching"
@@ -560,39 +570,34 @@ msgstr "Iščem"
msgid "Preparing search..."
msgstr "Pripravljam iskanje..."
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
msgid "module, in "
msgstr "modul, v "
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ", v "
-#: sphinx/themes/basic/static/searchtools.js:455
-msgid ""
-"Your search did not match any documents. Please make sure that all words "
-"are spelled correctly and that you've selected enough categories."
-msgstr ""
-"Za vaše iskanje ni rezultatov. Prosimo preglejte ali so vse besede "
-"pravilno črkovane in ali ste izbrali dovolj kategorij."
+#: sphinx/themes/basic/static/searchtools.js:464
+msgid "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+msgstr "Za vaše iskanje ni rezultatov. Prosimo preglejte ali so vse besede pravilno črkovane in ali ste izbrali dovolj kategorij."
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Iskanje končano, najdeno %s strani, ki ustrezajo iskalnemu nizu."
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr "Izdaja"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
-msgstr ""
+msgstr "nadaljevanje prejšnje strani"
-#: sphinx/writers/latex.py:641
-#, fuzzy
+#: sphinx/writers/latex.py:643
msgid "Continued on next page"
-msgstr "Poln indeks na eni strani"
+msgstr "Nadaljevanje na naslednji strani"
#: sphinx/writers/text.py:166
#, python-format
diff --git a/sphinx/locale/sphinx.pot b/sphinx/locale/sphinx.pot
index 68a03a50..e12c1a4e 100644
--- a/sphinx/locale/sphinx.pot
+++ b/sphinx/locale/sphinx.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: Sphinx 0.6.1+\n"
+"Project-Id-Version: Sphinx 1.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2009-05-22 18:18+0200\n"
+"POT-Creation-Date: 2009-07-03 13:36+0200\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"
@@ -17,29 +17,29 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:107 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr ""
-#: sphinx/environment.py:323 sphinx/themes/basic/genindex-single.html:2
+#: sphinx/environment.py:327 sphinx/themes/basic/genindex-single.html:2
#: sphinx/themes/basic/genindex-split.html:2
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
-#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:134
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr ""
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:328 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr ""
-#: sphinx/environment.py:325 sphinx/themes/basic/defindex.html:16
+#: sphinx/environment.py:329 sphinx/themes/basic/defindex.html:16
msgid "Search Page"
msgstr ""
-#: sphinx/roles.py:55 sphinx/directives/desc.py:747
+#: sphinx/roles.py:55 sphinx/directives/desc.py:763
#, python-format
msgid "environment variable; %s"
msgstr ""
@@ -57,34 +57,35 @@ msgstr ""
msgid "Module level"
msgstr ""
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:222
#, python-format
msgid "%b %d, %Y"
msgstr ""
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:241 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr ""
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:241
msgid "index"
msgstr ""
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:243 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
+#: sphinx/themes/scrolls/modindex.html:2 sphinx/themes/scrolls/modindex.html:13
msgid "Global Module Index"
msgstr ""
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:244
msgid "modules"
msgstr ""
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:300
msgid "next"
msgstr ""
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:309
msgid "previous"
msgstr ""
@@ -92,15 +93,18 @@ msgstr ""
msgid " (in "
msgstr ""
-#: sphinx/directives/desc.py:97
+#: sphinx/directives/desc.py:97 sphinx/directives/desc.py:98
+#: sphinx/directives/desc.py:99 sphinx/directives/desc.py:100
msgid "Raises"
msgstr ""
-#: sphinx/directives/desc.py:101
+#: sphinx/directives/desc.py:101 sphinx/directives/desc.py:102
+#: sphinx/directives/desc.py:103
msgid "Variable"
msgstr ""
-#: sphinx/directives/desc.py:104
+#: sphinx/directives/desc.py:104 sphinx/directives/desc.py:105
+#: sphinx/directives/desc.py:111 sphinx/directives/desc.py:112
msgid "Returns"
msgstr ""
@@ -122,7 +126,7 @@ msgid "%s() (built-in function)"
msgstr ""
#: sphinx/directives/desc.py:419 sphinx/directives/desc.py:476
-#: sphinx/directives/desc.py:488
+#: sphinx/directives/desc.py:488 sphinx/directives/desc.py:501
#, python-format
msgid "%s() (in module %s)"
msgstr ""
@@ -167,6 +171,16 @@ msgstr ""
msgid "%s() (%s static method)"
msgstr ""
+#: sphinx/directives/desc.py:505
+#, python-format
+msgid "%s() (%s.%s class method)"
+msgstr ""
+
+#: sphinx/directives/desc.py:508
+#, python-format
+msgid "%s() (%s class method)"
+msgstr ""
+
#: sphinx/directives/desc.py:518
#, python-format
msgid "%s (%s.%s attribute)"
@@ -207,37 +221,37 @@ msgstr ""
msgid "%scommand line option; %s"
msgstr ""
-#: sphinx/directives/other.py:138
+#: sphinx/directives/other.py:140
msgid "Platforms: "
msgstr ""
-#: sphinx/directives/other.py:144
+#: sphinx/directives/other.py:146
#, python-format
msgid "%s (module)"
msgstr ""
-#: sphinx/directives/other.py:193
+#: sphinx/directives/other.py:195
msgid "Section author: "
msgstr ""
-#: sphinx/directives/other.py:195
+#: sphinx/directives/other.py:197
msgid "Module author: "
msgstr ""
-#: sphinx/directives/other.py:197
+#: sphinx/directives/other.py:199
msgid "Author: "
msgstr ""
-#: sphinx/directives/other.py:317
+#: sphinx/directives/other.py:319
msgid "See also"
msgstr ""
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:895
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:926
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -255,86 +269,86 @@ msgstr ""
msgid "here"
msgstr ""
-#: sphinx/locale/__init__.py:15
+#: sphinx/locale/__init__.py:138
msgid "Attention"
msgstr ""
-#: sphinx/locale/__init__.py:16
+#: sphinx/locale/__init__.py:139
msgid "Caution"
msgstr ""
-#: sphinx/locale/__init__.py:17
+#: sphinx/locale/__init__.py:140
msgid "Danger"
msgstr ""
-#: sphinx/locale/__init__.py:18
+#: sphinx/locale/__init__.py:141
msgid "Error"
msgstr ""
-#: sphinx/locale/__init__.py:19
+#: sphinx/locale/__init__.py:142
msgid "Hint"
msgstr ""
-#: sphinx/locale/__init__.py:20
+#: sphinx/locale/__init__.py:143
msgid "Important"
msgstr ""
-#: sphinx/locale/__init__.py:21
+#: sphinx/locale/__init__.py:144
msgid "Note"
msgstr ""
-#: sphinx/locale/__init__.py:22
+#: sphinx/locale/__init__.py:145
msgid "See Also"
msgstr ""
-#: sphinx/locale/__init__.py:23
+#: sphinx/locale/__init__.py:146
msgid "Tip"
msgstr ""
-#: sphinx/locale/__init__.py:24
+#: sphinx/locale/__init__.py:147
msgid "Warning"
msgstr ""
-#: sphinx/locale/__init__.py:28
+#: sphinx/locale/__init__.py:151
#, python-format
msgid "New in version %s"
msgstr ""
-#: sphinx/locale/__init__.py:29
+#: sphinx/locale/__init__.py:152
#, python-format
msgid "Changed in version %s"
msgstr ""
-#: sphinx/locale/__init__.py:30
+#: sphinx/locale/__init__.py:153
#, python-format
msgid "Deprecated since version %s"
msgstr ""
-#: sphinx/locale/__init__.py:34
+#: sphinx/locale/__init__.py:157
msgid "module"
msgstr ""
-#: sphinx/locale/__init__.py:35
+#: sphinx/locale/__init__.py:158
msgid "keyword"
msgstr ""
-#: sphinx/locale/__init__.py:36
+#: sphinx/locale/__init__.py:159
msgid "operator"
msgstr ""
-#: sphinx/locale/__init__.py:37
+#: sphinx/locale/__init__.py:160
msgid "object"
msgstr ""
-#: sphinx/locale/__init__.py:38
+#: sphinx/locale/__init__.py:161
msgid "exception"
msgstr ""
-#: sphinx/locale/__init__.py:39
+#: sphinx/locale/__init__.py:162
msgid "statement"
msgstr ""
-#: sphinx/locale/__init__.py:40
+#: sphinx/locale/__init__.py:163
msgid "built-in function"
msgstr ""
@@ -430,47 +444,47 @@ msgstr ""
msgid "Enter search terms or a module, class or function name."
msgstr ""
-#: sphinx/themes/basic/layout.html:119
+#: sphinx/themes/basic/layout.html:122
#, python-format
msgid "Search within %(docstitle)s"
msgstr ""
-#: sphinx/themes/basic/layout.html:128
+#: sphinx/themes/basic/layout.html:131
msgid "About these documents"
msgstr ""
-#: sphinx/themes/basic/layout.html:134 sphinx/themes/basic/search.html:2
+#: sphinx/themes/basic/layout.html:137 sphinx/themes/basic/search.html:2
#: sphinx/themes/basic/search.html:5
msgid "Search"
msgstr ""
-#: sphinx/themes/basic/layout.html:137
+#: sphinx/themes/basic/layout.html:140
msgid "Copyright"
msgstr ""
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:187 sphinx/themes/scrolls/layout.html:83
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr ""
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:189 sphinx/themes/scrolls/layout.html:85
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr ""
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:193 sphinx/themes/scrolls/layout.html:89
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr ""
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:196 sphinx/themes/scrolls/layout.html:92
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
"%(sphinx_version)s."
msgstr ""
-#: sphinx/themes/basic/modindex.html:36
+#: sphinx/themes/basic/modindex.html:36 sphinx/themes/scrolls/modindex.html:37
msgid "Deprecated"
msgstr ""
@@ -498,7 +512,7 @@ msgid "search"
msgstr ""
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr ""
@@ -555,34 +569,34 @@ msgstr ""
msgid "Preparing search..."
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
msgid "module, in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr ""
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr ""
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:644
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:648
msgid "Continued on next page"
msgstr ""
diff --git a/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po b/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po
index 38f838ca..2e8861ba 100644
--- a/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Sphinx 0.6\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2008-12-28 23:40+0100\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
"Last-Translator: Petro Sasnyk <petro@sasnyk.name>\n"
"Language-Team: uk_UA <LL@li.org>\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr ""
@@ -28,11 +28,11 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "Індекс"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "Індекс модулів"
@@ -58,34 +58,34 @@ msgstr "Вбудовані елементи"
msgid "Module level"
msgstr "Рівень модуля"
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%b %d, %Y"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "Загальний індекс"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "індекс"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr "Загальний індекс модулів"
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "модулі"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "наступний"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "попередній"
@@ -233,12 +233,12 @@ msgstr "Автор: "
msgid "See also"
msgstr "Дивись також"
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr " Базовий: %s"
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr "синонім :class:`%s`"
@@ -449,22 +449,22 @@ msgstr "Пошук"
msgid "Copyright"
msgstr "Авторські права"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Copyright %(copyright)s."
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Востаннє оновлено %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -508,7 +508,7 @@ msgid "search"
msgstr "пошук"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "Результати пошуку"
@@ -565,15 +565,15 @@ msgstr "Шукаю"
msgid "Preparing search..."
msgstr "Підготовка до пошуку..."
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
msgid "module, in "
msgstr "модуль, в "
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ", в "
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -581,20 +581,20 @@ msgstr ""
"Ваш пошук не виявив жодного співпадіння. Будь-ласка переконайтеся що всі "
"слова набрані правильно і ви обрали достатньо категорій."
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Пошук закінчено, знайдено %s сторінок які співпали з пошуковим запитом."
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr "Реліз"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
#, fuzzy
msgid "Continued on next page"
msgstr "Повний індекс на одній сторінці"
diff --git a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.js b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.js
new file mode 100644
index 00000000..911a8f26
--- /dev/null
+++ b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.js
@@ -0,0 +1 @@
+Documentation.addTranslations({"locale": "zh_CN", "plural_expr": "0", "messages": {"module, in ": "\u6a21\u5757\uff0c\u4f4d\u4e8e", "Preparing search...": "\u51c6\u5907\u641c\u7d22...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "\u4f60\u7684\u641c\u7d22\u6ca1\u6709\u5339\u914d\u5230\u4efb\u4f55\u6587\u6863\u3002\u8bf7\u786e\u8ba4\u4f60\u6240\u641c\u7d22\u7684\u5173\u952e\u5b57.", "Search finished, found %s page(s) matching the search query.": "\u641c\u7d22\u5b8c\u6210\uff0c \u627e\u5230\u4e86 %s \u9875\u5339\u914d\u6240\u641c\u7d22\u7684\u5173\u952e\u5b57", ", in ": ", \u4f4d\u4e8e", "Permalink to this headline": "\u6c38\u4e45\u94fe\u63a5\u81f3\u6807\u9898", "Searching": "\u641c\u7d22\u4e2d", "Permalink to this definition": "\u6c38\u4e45\u94fe\u63a5\u81f3\u76ee\u6807", "Hide Search Matches": "\u9690\u85cf\u641c\u7d22\u7ed3\u679c", "Search Results": "\u641c\u7d22\u7ed3\u679c"}}); \ No newline at end of file
diff --git a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo
new file mode 100644
index 00000000..8d8fbefa
--- /dev/null
+++ b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po
new file mode 100644
index 00000000..39ec72d2
--- /dev/null
+++ b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po
@@ -0,0 +1,620 @@
+# Chinese (Simplified Chinese) translations for Sphinx.
+# Copyright (C) 2009 Tower Joo
+# This file is distributed under the same license as the Sphinx project.
+# Tower Joo<zhutao.iscas@gmail.com>, 2009.
+# My homepage is at http://sites.google.com/site/towerjooeng
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Sphinx 0.6\n"
+"Report-Msgid-Bugs-To: zhutao.iscas@gmail.com\n"
+"POT-Creation-Date: 2009-03-09 19:46+0120\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
+"Last-Translator: Tower Joo<zhutao.iscas@gmail.com>\n"
+"Language-Team: cn <LL@li.org>\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.4\n"
+
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
+#, python-format
+msgid "%B %d, %Y"
+msgstr "%Y 年 %m 月 %d 日"
+
+#: sphinx/environment.py:323 sphinx/themes/basic/genindex-single.html:2
+#: sphinx/themes/basic/genindex-split.html:2
+#: sphinx/themes/basic/genindex-split.html:5
+#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
+#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
+#: sphinx/writers/latex.py:190
+msgid "Index"
+msgstr "索引"
+
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
+msgid "Module Index"
+msgstr "模块索引"
+
+#: sphinx/environment.py:325 sphinx/themes/basic/defindex.html:16
+msgid "Search Page"
+msgstr "搜索页面"
+
+#: sphinx/roles.py:55 sphinx/directives/desc.py:747
+#, python-format
+msgid "environment variable; %s"
+msgstr "环境变量; %s"
+
+#: sphinx/roles.py:62
+#, python-format
+msgid "Python Enhancement Proposals!PEP %s"
+msgstr "Python 建议文件!PEP %s"
+
+#: sphinx/builders/changes.py:71
+msgid "Builtins"
+msgstr "内置"
+
+#: sphinx/builders/changes.py:73
+msgid "Module level"
+msgstr "模块级别"
+
+#: sphinx/builders/html.py:219
+#, python-format
+msgid "%b %d, %Y"
+msgstr "%Y 年 %m 月 %d 日"
+
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
+msgid "General Index"
+msgstr "总目录"
+
+#: sphinx/builders/html.py:238
+msgid "index"
+msgstr "索引"
+
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
+#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
+msgid "Global Module Index"
+msgstr "全局模块索引"
+
+#: sphinx/builders/html.py:241
+msgid "modules"
+msgstr "模块"
+
+#: sphinx/builders/html.py:296
+msgid "next"
+msgstr "下一页"
+
+#: sphinx/builders/html.py:305
+msgid "previous"
+msgstr "上一页"
+
+#: sphinx/builders/latex.py:162
+msgid " (in "
+msgstr ""
+
+#: sphinx/directives/desc.py:97
+msgid "Raises"
+msgstr "引发"
+
+#: sphinx/directives/desc.py:101
+msgid "Variable"
+msgstr "变量"
+
+#: sphinx/directives/desc.py:104
+msgid "Returns"
+msgstr "返回"
+
+#: sphinx/directives/desc.py:113
+msgid "Return type"
+msgstr "返回类型"
+
+#: sphinx/directives/desc.py:186
+#, fuzzy
+msgid "Parameter"
+msgstr "参数"
+
+#: sphinx/directives/desc.py:190
+msgid "Parameters"
+msgstr "参数"
+
+#: sphinx/directives/desc.py:418
+#, python-format
+msgid "%s() (built-in function)"
+msgstr "%s() (內置函数)"
+
+#: sphinx/directives/desc.py:419 sphinx/directives/desc.py:476
+#: sphinx/directives/desc.py:488
+#, python-format
+msgid "%s() (in module %s)"
+msgstr "%s() (在 %s 模块中)"
+
+#: sphinx/directives/desc.py:422
+#, python-format
+msgid "%s (built-in variable)"
+msgstr "%s (內置变量)"
+
+#: sphinx/directives/desc.py:423 sphinx/directives/desc.py:514
+#, python-format
+msgid "%s (in module %s)"
+msgstr "%s() (在 %s 模块中)"
+
+#: sphinx/directives/desc.py:439
+#, python-format
+msgid "%s (built-in class)"
+msgstr "%s (內置类)"
+
+#: sphinx/directives/desc.py:440
+#, python-format
+msgid "%s (class in %s)"
+msgstr ""
+
+#: sphinx/directives/desc.py:480
+#, python-format
+msgid "%s() (%s.%s method)"
+msgstr "%s() (%s.%s 方法)"
+
+#: sphinx/directives/desc.py:482
+#, python-format
+msgid "%s() (%s method)"
+msgstr "%s() (%s 方法)"
+
+#: sphinx/directives/desc.py:492
+#, python-format
+msgid "%s() (%s.%s static method)"
+msgstr "%s() (%s.%s 静态方法)"
+
+#: sphinx/directives/desc.py:495
+#, python-format
+msgid "%s() (%s static method)"
+msgstr "%s() (%s 静态方法)"
+
+#: sphinx/directives/desc.py:518
+#, python-format
+msgid "%s (%s.%s attribute)"
+msgstr "%s (%s.%s 属性)"
+
+#: sphinx/directives/desc.py:520
+#, python-format
+msgid "%s (%s attribute)"
+msgstr "%s (%s 属性)"
+
+#: sphinx/directives/desc.py:609
+#, python-format
+msgid "%s (C function)"
+msgstr "%s (C 函数)"
+
+#: sphinx/directives/desc.py:611
+#, python-format
+msgid "%s (C member)"
+msgstr "%s (C 成员)"
+
+#: sphinx/directives/desc.py:613
+#, python-format
+msgid "%s (C macro)"
+msgstr "%s (C 宏)"
+
+#: sphinx/directives/desc.py:615
+#, python-format
+msgid "%s (C type)"
+msgstr "%s (C 类型)"
+
+#: sphinx/directives/desc.py:617
+#, python-format
+msgid "%s (C variable)"
+msgstr "%s (C 变量)"
+
+#: sphinx/directives/desc.py:665
+#, python-format
+msgid "%scommand line option; %s"
+msgstr "%s命令行选项; %s"
+
+#: sphinx/directives/other.py:138
+msgid "Platforms: "
+msgstr "平台"
+
+#: sphinx/directives/other.py:144
+#, python-format
+msgid "%s (module)"
+msgstr "%s (模块)"
+
+#: sphinx/directives/other.py:193
+msgid "Section author: "
+msgstr "Section 作者:"
+
+#: sphinx/directives/other.py:195
+msgid "Module author: "
+msgstr "模块作者:"
+
+#: sphinx/directives/other.py:197
+msgid "Author: "
+msgstr "作者:"
+
+#: sphinx/directives/other.py:317
+msgid "See also"
+msgstr "也可以参考"
+
+#: sphinx/ext/autodoc.py:888
+#, python-format
+msgid " Bases: %s"
+msgstr ""
+
+#: sphinx/ext/autodoc.py:919
+#, python-format
+msgid "alias of :class:`%s`"
+msgstr ""
+
+#: sphinx/ext/todo.py:41
+msgid "Todo"
+msgstr "待处理"
+
+#: sphinx/ext/todo.py:99
+#, python-format
+msgid "(The original entry is located in %s, line %d and can be found "
+msgstr "(最初的入口位于%s 的第%d行"
+
+#: sphinx/ext/todo.py:105
+msgid "here"
+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 "%s 新版功能"
+
+#: sphinx/locale/__init__.py:29
+#, python-format
+msgid "Changed in version %s"
+msgstr "在 %s 版更改"
+
+#: sphinx/locale/__init__.py:30
+#, python-format
+msgid "Deprecated since version %s"
+msgstr "%s 版后已移除"
+
+#: 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/themes/basic/defindex.html:2
+msgid "Overview"
+msgstr "概述"
+
+#: sphinx/themes/basic/defindex.html:11
+msgid "Indices and tables:"
+msgstr "索引和表格"
+
+#: sphinx/themes/basic/defindex.html:14
+msgid "Complete Table of Contents"
+msgstr "完整的内容表"
+
+#: sphinx/themes/basic/defindex.html:15
+msgid "lists all sections and subsections"
+msgstr "列出所有的章节和部分"
+
+#: sphinx/themes/basic/defindex.html:17
+msgid "search this documentation"
+msgstr "搜索文档"
+
+#: sphinx/themes/basic/defindex.html:20
+msgid "quick access to all modules"
+msgstr "快速查看所有的模块"
+
+#: sphinx/themes/basic/defindex.html:22
+msgid "all functions, classes, terms"
+msgstr "所的函数,类,术语"
+
+#: sphinx/themes/basic/genindex-single.html:5
+#, python-format
+msgid "Index &ndash; %(key)s"
+msgstr "索引 &ndash; %(key)s"
+
+#: sphinx/themes/basic/genindex-single.html:44
+#: sphinx/themes/basic/genindex-split.html:14
+#: sphinx/themes/basic/genindex-split.html:27
+#: sphinx/themes/basic/genindex.html:54
+msgid "Full index on one page"
+msgstr "一页的全部索引"
+
+#: sphinx/themes/basic/genindex-split.html:7
+msgid "Index pages by letter"
+msgstr "按照字母的索引页"
+
+#: sphinx/themes/basic/genindex-split.html:15
+msgid "can be huge"
+msgstr "可能会很多"
+
+#: sphinx/themes/basic/layout.html:10
+msgid "Navigation"
+msgstr "导航"
+
+#: sphinx/themes/basic/layout.html:42
+msgid "Table Of Contents"
+msgstr "內容目录"
+
+#: sphinx/themes/basic/layout.html:48
+msgid "Previous topic"
+msgstr "上一个主题"
+
+#: sphinx/themes/basic/layout.html:50
+msgid "previous chapter"
+msgstr "上一章"
+
+#: sphinx/themes/basic/layout.html:53
+msgid "Next topic"
+msgstr "下一个主题"
+
+#: sphinx/themes/basic/layout.html:55
+msgid "next chapter"
+msgstr "下一章"
+
+#: sphinx/themes/basic/layout.html:60
+msgid "This Page"
+msgstr "本页"
+
+#: sphinx/themes/basic/layout.html:63
+msgid "Show Source"
+msgstr "显示源代码"
+
+#: sphinx/themes/basic/layout.html:73
+msgid "Quick search"
+msgstr "快速搜索"
+
+#: sphinx/themes/basic/layout.html:76
+msgid "Go"
+msgstr "搜索"
+
+#: sphinx/themes/basic/layout.html:81
+msgid "Enter search terms or a module, class or function name."
+msgstr "输入相关的模块,术语,类或者函数名称进行搜索"
+
+#: sphinx/themes/basic/layout.html:119
+#, python-format
+msgid "Search within %(docstitle)s"
+msgstr "在 %(docstitle)s 中搜索"
+
+#: sphinx/themes/basic/layout.html:128
+msgid "About these documents"
+msgstr "关于这些文档"
+
+#: sphinx/themes/basic/layout.html:134 sphinx/themes/basic/search.html:2
+#: sphinx/themes/basic/search.html:5
+msgid "Search"
+msgstr "搜索"
+
+#: sphinx/themes/basic/layout.html:137
+msgid "Copyright"
+msgstr "版权所有"
+
+#: sphinx/themes/basic/layout.html:184
+#, python-format
+msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
+msgstr "&copy; <a href=\"%(path)s\">版权所有</a> % (copyright)s."
+
+#: sphinx/themes/basic/layout.html:186
+#, python-format
+msgid "&copy; Copyright %(copyright)s."
+msgstr "&copy; 版权所有 %(copyright)s."
+
+#: sphinx/themes/basic/layout.html:190
+#, python-format
+msgid "Last updated on %(last_updated)s."
+msgstr "最后更新日期是 %(last_updated)s."
+
+#: sphinx/themes/basic/layout.html:193
+#, python-format
+msgid ""
+"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
+"%(sphinx_version)s."
+msgstr "使用 <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)s."
+
+#: sphinx/themes/basic/modindex.html:36
+msgid "Deprecated"
+msgstr "已移除"
+
+#: sphinx/themes/basic/opensearch.xml:4
+#, python-format
+msgid "Search %(docstitle)s"
+msgstr "搜索 %(docstitle)s"
+
+#: sphinx/themes/basic/search.html:9
+msgid ""
+"Please activate JavaScript to enable the search\n"
+" functionality."
+msgstr ""
+
+#: sphinx/themes/basic/search.html:14
+msgid ""
+"From here you can search these documents. Enter your search\n"
+" 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 fewer words won't appear in the result list."
+msgstr "在这儿,你可以对这些文档进行搜索。向搜索框中输入你所要搜索的关键字并点击\"搜索\"。注意:搜索引擎会自动搜索所有的关键字。将不会搜索到部分关键字的页面."
+
+#: sphinx/themes/basic/search.html:21
+msgid "search"
+msgstr "搜索"
+
+#: sphinx/themes/basic/search.html:25
+#: sphinx/themes/basic/static/searchtools.js:462
+msgid "Search Results"
+msgstr "搜索结果"
+
+#: sphinx/themes/basic/search.html:27
+msgid "Your search did not match any results."
+msgstr "你的搜索没有找到任何的结果."
+
+#: sphinx/themes/basic/changes/frameset.html:5
+#: sphinx/themes/basic/changes/versionchanges.html:12
+#, python-format
+msgid "Changes in Version %(version)s &mdash; %(docstitle)s"
+msgstr "更改发生在版本 %(version)s &mdash; %(docstitle)s"
+
+#: sphinx/themes/basic/changes/rstsource.html:5
+#, python-format
+msgid "%(filename)s &mdash; %(docstitle)s"
+msgstr ""
+
+#: sphinx/themes/basic/changes/versionchanges.html:17
+#, python-format
+msgid "Automatically generated list of changes in version %(version)s"
+msgstr "自动生成的版本 %(version)s中的更改列表"
+
+#: sphinx/themes/basic/changes/versionchanges.html:18
+msgid "Library changes"
+msgstr "库更改"
+
+#: sphinx/themes/basic/changes/versionchanges.html:23
+msgid "C API changes"
+msgstr "C API 更改"
+
+#: sphinx/themes/basic/changes/versionchanges.html:25
+msgid "Other changes"
+msgstr "其他更改"
+
+#: sphinx/themes/basic/static/doctools.js:139 sphinx/writers/html.py:473
+#: sphinx/writers/html.py:478
+msgid "Permalink to this headline"
+msgstr "永久链接至标题"
+
+#: sphinx/themes/basic/static/doctools.js:145 sphinx/writers/html.py:80
+msgid "Permalink to this definition"
+msgstr "永久链接至目标"
+
+#: sphinx/themes/basic/static/doctools.js:174
+msgid "Hide Search Matches"
+msgstr "隐藏搜索结果"
+
+#: sphinx/themes/basic/static/searchtools.js:274
+msgid "Searching"
+msgstr "搜索中"
+
+#: sphinx/themes/basic/static/searchtools.js:279
+msgid "Preparing search..."
+msgstr "准备搜索..."
+
+#: sphinx/themes/basic/static/searchtools.js:347
+msgid "module, in "
+msgstr "模块,位于"
+
+#: sphinx/themes/basic/static/searchtools.js:356
+msgid ", in "
+msgstr ", 位于"
+
+#: sphinx/themes/basic/static/searchtools.js:464
+msgid ""
+"Your search did not match any documents. Please make sure that all words "
+"are spelled correctly and that you've selected enough categories."
+msgstr "你的搜索没有匹配到任何文档。请确认你所搜索的关键字."
+
+#: sphinx/themes/basic/static/searchtools.js:466
+#, python-format
+msgid "Search finished, found %s page(s) matching the search query."
+msgstr "搜索完成, 找到了 %s 页匹配所搜索的关键字"
+
+#: sphinx/writers/latex.py:187
+msgid "Release"
+msgstr "发布"
+
+#: sphinx/writers/latex.py:639
+msgid "continued from previous page"
+msgstr ""
+
+#: sphinx/writers/latex.py:643
+#, fuzzy
+msgid "Continued on next page"
+msgstr "一页的全部索引"
+
+#: sphinx/writers/text.py:166
+#, python-format
+msgid "Platform: %s"
+msgstr "平台:%s"
+
+#: sphinx/writers/text.py:428
+msgid "[image]"
+msgstr "[图片]"
+
+#~ msgid "Suggest Change"
+#~ msgstr "建议更改"
+
+#~ msgid "Keyword search"
+#~ msgstr "关键字搜索"
+
+#~ msgid "Most popular modules:"
+#~ msgstr "最流行的模块"
+
+#~ msgid "Show modules only available on these platforms"
+#~ msgstr "显示只在这些平台上可用的模块"
+
+#~ msgid ""
+#~ "<strong>Note:</strong> 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 "<strong>注意:</strong> 你向服务器请求了一个过时的链接。 我们试图将你重定向到本页的新位置,但是它可能并非你所期望的位置"
+
diff --git a/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po b/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po
index d50cd4aa..85621c55 100644
--- a/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Sphinx 0.5\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2008-11-09 19:46+0100\n"
-"PO-Revision-Date: 2009-05-22 18:19+0200\n"
+"PO-Revision-Date: 2009-05-22 18:51+0200\n"
"Last-Translator: Fred Lin <gasolin@gmail.com>\n"
"Language-Team: tw <LL@li.org>\n"
"Plural-Forms: nplurals=1; plural=0\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.4\n"
-#: sphinx/environment.py:104 sphinx/writers/latex.py:182
+#: sphinx/environment.py:104 sphinx/writers/latex.py:184
#, python-format
msgid "%B %d, %Y"
msgstr "%Y 年 %m 月 %d 日"
@@ -27,11 +27,11 @@ msgstr "%Y 年 %m 月 %d 日"
#: sphinx/themes/basic/genindex-split.html:5
#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:131
-#: sphinx/writers/latex.py:188
+#: sphinx/writers/latex.py:190
msgid "Index"
msgstr "索引"
-#: sphinx/environment.py:324 sphinx/writers/latex.py:187
+#: sphinx/environment.py:324 sphinx/writers/latex.py:189
msgid "Module Index"
msgstr "模組索引"
@@ -57,34 +57,34 @@ msgstr ""
msgid "Module level"
msgstr ""
-#: sphinx/builders/html.py:205
+#: sphinx/builders/html.py:219
#, python-format
msgid "%b %d, %Y"
msgstr "%Y 年 %m 月 %d 日"
-#: sphinx/builders/html.py:224 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:238 sphinx/themes/basic/defindex.html:21
msgid "General Index"
msgstr "總索引"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:238
msgid "index"
msgstr "索引"
-#: sphinx/builders/html.py:226 sphinx/builders/htmlhelp.py:184
+#: sphinx/builders/html.py:240 sphinx/builders/htmlhelp.py:184
#: sphinx/builders/qthelp.py:132 sphinx/themes/basic/defindex.html:19
#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
msgid "Global Module Index"
msgstr ""
-#: sphinx/builders/html.py:227
+#: sphinx/builders/html.py:241
msgid "modules"
msgstr "模組"
-#: sphinx/builders/html.py:281
+#: sphinx/builders/html.py:296
msgid "next"
msgstr "下一頁"
-#: sphinx/builders/html.py:290
+#: sphinx/builders/html.py:305
msgid "previous"
msgstr "上一頁"
@@ -233,12 +233,12 @@ msgstr "作者:"
msgid "See also"
msgstr ""
-#: sphinx/ext/autodoc.py:889
+#: sphinx/ext/autodoc.py:888
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:920
+#: sphinx/ext/autodoc.py:919
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -450,22 +450,22 @@ msgstr "搜尋"
msgid "Copyright"
msgstr "版權所有"
-#: sphinx/themes/basic/layout.html:183
+#: sphinx/themes/basic/layout.html:184
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr ""
-#: sphinx/themes/basic/layout.html:185
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr ""
-#: sphinx/themes/basic/layout.html:188
+#: sphinx/themes/basic/layout.html:190
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "最後更新日期是 %(last_updated)s."
-#: sphinx/themes/basic/layout.html:191
+#: sphinx/themes/basic/layout.html:193
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
@@ -500,7 +500,7 @@ msgid "search"
msgstr "搜尋"
#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:453
+#: sphinx/themes/basic/static/searchtools.js:462
msgid "Search Results"
msgstr "搜尋結果"
@@ -557,34 +557,34 @@ msgstr "搜尋中"
msgid "Preparing search..."
msgstr "準備搜尋..."
-#: sphinx/themes/basic/static/searchtools.js:338
+#: sphinx/themes/basic/static/searchtools.js:347
msgid "module, in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:347
+#: sphinx/themes/basic/static/searchtools.js:356
msgid ", in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:455
+#: sphinx/themes/basic/static/searchtools.js:464
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:457
+#: sphinx/themes/basic/static/searchtools.js:466
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr ""
-#: sphinx/writers/latex.py:185
+#: sphinx/writers/latex.py:187
msgid "Release"
msgstr "釋出"
-#: sphinx/writers/latex.py:637
+#: sphinx/writers/latex.py:639
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:643
msgid "Continued on next page"
msgstr ""
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index 4a3c453d..0df0979d 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -56,7 +56,7 @@ templates_path = ['%(dot)stemplates']
source_suffix = '%(suffix)s'
# The encoding of source files.
-#source_encoding = 'utf-8'
+#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = '%(master_str)s'
@@ -174,6 +174,12 @@ html_static_path = ['%(dot)sstatic']
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
@@ -274,7 +280,9 @@ help:
\t@echo " json to make JSON files"
\t@echo " htmlhelp to make HTML files and a HTML help project"
\t@echo " qthelp to make HTML files and a qthelp project"
+\t@echo " devhelp to make HTML files and a Devhelp project"
\t@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+\t@echo " latexpdf to make LaTeX files and run them through pdflatex"
\t@echo " changes to make an overview of all changed/added/deprecated items"
\t@echo " linkcheck to check all external links for integrity"
\t@echo " doctest to run all doctests embedded in the documentation \
@@ -318,6 +326,16 @@ qthelp:
\t@echo "To view the help file:"
\t@echo "# assistant -collectionFile %(rbuilddir)s/qthelp/%(project_fn)s.qhc"
+devhelp:
+\t$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) %(rbuilddir)s/devhelp
+\t@echo
+\t@echo "Build finished."
+\t@echo "To view the help file:"
+\t@echo "# mkdir -p $$HOME/.local/share/devhelp/%(project_fn)s"
+\t@echo "# ln -s %(rbuilddir)s/devhelp \
+$$HOME/.local/share/devhelp/%(project_fn)s"
+\t@echo "# devhelp"
+
latex:
\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) %(rbuilddir)s/latex
\t@echo
@@ -325,6 +343,12 @@ latex:
\t@echo "Run \\`make all-pdf' or \\`make all-ps' in that directory to" \\
\t "run these through (pdf)latex."
+latexpdf: latex
+\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) %(rbuilddir)s/latex
+\t@echo "Running LaTeX files through pdflatex..."
+\tmake -C %(rbuilddir)s/latex all-pdf
+\t@echo "pdflatex finished; the PDF files are in %(rbuilddir)s/latex."
+
changes:
\t$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) %(rbuilddir)s/changes
\t@echo
@@ -364,6 +388,7 @@ if "%%1" == "help" (
\techo. json to make JSON files
\techo. htmlhelp to make HTML files and a HTML help project
\techo. qthelp to make HTML files and a qthelp project
+\techo. devhelp to make HTML files and a Devhelp project
\techo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
\techo. changes to make an overview over all changed/added/deprecated items
\techo. linkcheck to check all external links for integrity
@@ -424,6 +449,13 @@ if "%%1" == "qthelp" (
\tgoto end
)
+if "%%1" == "devhelp" (
+\t%%SPHINXBUILD%% -b devhelp %%ALLSPHINXOPTS%% %(rbuilddir)s/devhelp
+\techo.
+\techo.Build finished.
+\tgoto end
+)
+
if "%%1" == "latex" (
\t%%SPHINXBUILD%% -b latex %%ALLSPHINXOPTS%% %(rbuilddir)s/latex
\techo.
diff --git a/sphinx/roles.py b/sphinx/roles.py
index cf04c095..61d80922 100644
--- a/sphinx/roles.py
+++ b/sphinx/roles.py
@@ -15,7 +15,7 @@ from docutils import nodes, utils
from docutils.parsers.rst import roles
from sphinx import addnodes
-from sphinx.util import ws_re, caption_ref_re
+from sphinx.util import ws_re, split_explicit_title
generic_docroles = {
@@ -54,6 +54,7 @@ def indexmarkup_role(typ, rawtext, etext, lineno, inliner,
indexnode['entries'] = [('single', text, targetid, text),
('single', _('environment variable; %s') % text,
targetid, text)]
+ # XXX needs to be adapted
xref_nodes = xfileref_role(typ, rawtext, etext, lineno, inliner,
options, content)[0]
return [indexnode, targetnode] + xref_nodes, []
@@ -94,125 +95,11 @@ roles.register_local_role('pep', indexmarkup_role)
roles.register_local_role('rfc', indexmarkup_role)
-# default is `literal`
-innernodetypes = {
- 'ref': nodes.emphasis,
- 'term': nodes.emphasis,
- 'token': nodes.strong,
- 'envvar': nodes.strong,
- 'download': nodes.strong,
- 'option': addnodes.literal_emphasis,
-}
-
-def _fix_parens(typ, text, env):
- if typ in ('func', 'meth', 'cfunc'):
- if text.endswith('()'):
- # remove parentheses
- text = text[:-2]
- if env.config.add_function_parentheses:
- # add them back to all occurrences if configured
- text += '()'
- return text
-
-def xfileref_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
- env = inliner.document.settings.env
- if not typ:
- typ = env.config.default_role
- else:
- typ = typ.lower()
- text = utils.unescape(text)
- # if the first character is a bang, don't cross-reference at all
- if text[0:1] == '!':
- text = _fix_parens(typ, text[1:], env)
- return [innernodetypes.get(typ, nodes.literal)(
- rawtext, text, classes=['xref'])], []
- # we want a cross-reference, create the reference node
- nodeclass = (typ == 'download') and addnodes.download_reference or \
- addnodes.pending_xref
- pnode = nodeclass(rawtext, reftype=typ, refcaption=False,
- modname=env.currmodule, classname=env.currclass)
- # we may need the line number for warnings
- pnode.line = lineno
- # the link title may differ from the target, but by default
- # they are the same
- title = target = text
- titleistarget = True
- # look if explicit title and target are given with `foo <bar>` syntax
- brace = text.find('<')
- if brace != -1:
- titleistarget = False
- pnode['refcaption'] = True
- m = caption_ref_re.match(text)
- if m:
- target = m.group(2)
- title = m.group(1)
- else:
- # fallback: everything after '<' is the target
- target = text[brace+1:]
- title = text[:brace]
- # special target for Python object cross-references
- if typ in ('data', 'exc', 'func', 'class', 'const', 'attr',
- 'meth', 'mod', 'obj'):
- # fix-up parentheses in link title
- if titleistarget:
- title = title.lstrip('.') # only has a meaning for the target
- target = target.lstrip('~') # only has a meaning for the title
- title = _fix_parens(typ, title, env)
- # if the first character is a tilde, don't display the module/class
- # parts of the contents
- if title[0:1] == '~':
- title = title[1:]
- dot = title.rfind('.')
- if dot != -1:
- title = title[dot+1:]
- # remove parentheses from the target too
- if target.endswith('()'):
- target = target[:-2]
- # if the first character is a dot, search more specific namespaces first
- # else search builtins first
- if target[0:1] == '.':
- target = target[1:]
- pnode['refspecific'] = True
- # some other special cases for the target
- elif typ == 'option':
- program = env.currprogram
- if titleistarget:
- if ' ' in title and not (title.startswith('/') or
- title.startswith('-')):
- program, target = re.split(' (?=-|--|/)', title, 1)
- program = ws_re.sub('-', program)
- target = target.strip()
- elif ' ' in target:
- program, target = re.split(' (?=-|--|/)', target, 1)
- program = ws_re.sub('-', program)
- pnode['refprogram'] = program
- elif typ == 'term':
- # normalize whitespace in definition terms (if the term reference is
- # broken over a line, a newline will be in target)
- target = ws_re.sub(' ', target).lower()
- elif typ == 'ref':
- # reST label names are always lowercased
- target = ws_re.sub('', target).lower()
- elif typ == 'cfunc':
- # fix-up parens for C functions too
- if titleistarget:
- title = _fix_parens(typ, title, env)
- # remove parentheses from the target too
- if target.endswith('()'):
- target = target[:-2]
- else:
- # remove all whitespace to avoid referencing problems
- target = ws_re.sub('', target)
- pnode['reftarget'] = target
- pnode += innernodetypes.get(typ, nodes.literal)(rawtext, title,
- classes=['xref'])
- return [pnode], []
-
-
def menusel_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
return [nodes.emphasis(
rawtext,
utils.unescape(text).replace('-->', u'\N{TRIANGULAR BULLET}'))], []
+ return role
_litvar_re = re.compile('{([^}]+)}')
@@ -245,30 +132,93 @@ def abbr_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
return [addnodes.abbreviation(abbr, abbr, explanation=expl)], []
+# -- generic cross-reference roles ---------------------------------------------
+
+class XRefRole(object):
+ nodeclass = addnodes.pending_xref
+ innernodeclass = nodes.literal
+
+ def __init__(self, fix_parens=False, lowercase=False,
+ nodeclass=None, innernodeclass=None):
+ self.fix_parens = fix_parens
+ if nodeclass is not None:
+ self.nodeclass = nodeclass
+ if innernodeclass is not None:
+ self.innernodeclass = innernodeclass
+
+ def process_link(self, env, pnode, has_explicit_title, title, target):
+ return title, ws_re.sub(' ', target)
+
+ def normalize_func_parens(self, env, has_explicit_title, title, target):
+ if not has_explicit_title:
+ if title.endswith('()'):
+ # remove parentheses
+ title = title[:-2]
+ if env.config.add_function_parentheses:
+ # add them back to all occurrences if configured
+ title += '()'
+ # remove parentheses from the target too
+ if target.endswith('()'):
+ target = target[:-2]
+ return title, target
+
+ def __call__(self, typ, rawtext, text, lineno, inliner,
+ options={}, content=[]):
+ env = inliner.document.settings.env
+ if not typ:
+ typ = env.config.default_role
+ else:
+ typ = typ.lower()
+ if ':' not in typ:
+ domain, role = '', typ
+ else:
+ domain, role = typ.split(':', 1)
+ text = utils.unescape(text)
+ # if the first character is a bang, don't cross-reference at all
+ if text[0:1] == '!':
+ if self.fix_parens:
+ text, _ = self.normalize_func_parens(env, False, text[1:], "")
+ return [self.innernodeclass(rawtext, text, classes=['xref'])], []
+ # split title and target in role content
+ has_explicit_title, title, target = split_explicit_title(text)
+ # we want a cross-reference, create the reference node
+ pnode = self.nodeclass(rawtext, reftype=role, refdomain=domain,
+ refcaption=has_explicit_title)
+ # we may need the line number for warnings
+ pnode.line = lineno
+ title, target = self.process_link(env, pnode,
+ has_explicit_title, title, target)
+ pnode['reftarget'] = target
+ pnode += self.innernodeclass(rawtext, title, classes=['xref'])
+ return [pnode], []
+
+
+class OptionXRefRole(XRefRole):
+ innernodeclass = addnodes.literal_emphasis
+
+ def process_link(self, env, pnode, has_explicit_title, title, target):
+ program = env.currprogram
+ if not has_explicit_title:
+ if ' ' in title and not (title.startswith('/') or
+ title.startswith('-')):
+ program, target = re.split(' (?=-|--|/)', title, 1)
+ program = ws_re.sub('-', program)
+ target = target.strip()
+ elif ' ' in target:
+ program, target = re.split(' (?=-|--|/)', target, 1)
+ program = ws_re.sub('-', program)
+ pnode['refprogram'] = program
+ return title, target
+
+
specific_docroles = {
- 'data': xfileref_role,
- 'exc': xfileref_role,
- 'func': xfileref_role,
- 'class': xfileref_role,
- 'const': xfileref_role,
- 'attr': xfileref_role,
- 'meth': xfileref_role,
- 'obj': xfileref_role,
- 'cfunc' : xfileref_role,
- 'cmember': xfileref_role,
- 'cdata': xfileref_role,
- 'ctype': xfileref_role,
- 'cmacro': xfileref_role,
-
- 'mod': xfileref_role,
-
- 'keyword': xfileref_role,
- 'ref': xfileref_role,
- 'token': xfileref_role,
- 'term': xfileref_role,
- 'option': xfileref_role,
- 'doc': xfileref_role,
- 'download': xfileref_role,
+ 'keyword': XRefRole(),
+ 'ref': XRefRole(lowercase=True, innernodeclass=nodes.emphasis),
+ 'token': XRefRole(),
+ 'term': XRefRole(lowercase=True, innernodeclass=nodes.emphasis),
+ 'option': OptionXRefRole(innernodeclass=addnodes.literal_emphasis),
+ 'doc': XRefRole(),
+ 'download': XRefRole(nodeclass=addnodes.download_reference),
'menuselection': menusel_role,
'file': emph_literal_role,
@@ -278,3 +228,5 @@ specific_docroles = {
for rolename, func in specific_docroles.iteritems():
roles.register_local_role(rolename, func)
+
+
diff --git a/sphinx/search.py b/sphinx/search.py
index f6e3ef3f..f283881f 100644
--- a/sphinx/search.py
+++ b/sphinx/search.py
@@ -14,8 +14,14 @@ from cStringIO import StringIO
from docutils.nodes import comment, Text, NodeVisitor, SkipNode
-from sphinx.util.stemmer import PorterStemmer
from sphinx.util import jsdump, rpartition
+try:
+ # http://bitbucket.org/methane/porterstemmer/
+ from porterstemmer import Stemmer as CStemmer
+ CSTEMMER = True
+except ImportError:
+ from sphinx.util.stemmer import PorterStemmer
+ CSTEMMER = False
word_re = re.compile(r'\w+(?u)')
@@ -62,15 +68,23 @@ class _JavaScriptIndex(object):
js_index = _JavaScriptIndex()
-class Stemmer(PorterStemmer):
- """
- All those porter stemmer implementations look hideous.
- make at least the stem method nicer.
- """
+if CSTEMMER:
+ class Stemmer(CStemmer):
+
+ def stem(self, word):
+ return self(word.lower())
+
+else:
+ class Stemmer(PorterStemmer):
+ """
+ All those porter stemmer implementations look hideous.
+ make at least the stem method nicer.
+ """
+
+ def stem(self, word):
+ word = word.lower()
+ return PorterStemmer.stem(self, word, 0, len(word) - 1)
- def stem(self, word):
- word = word.lower()
- return PorterStemmer.stem(self, word, 0, len(word) - 1)
class WordCollector(NodeVisitor):
@@ -135,6 +149,8 @@ class IndexBuilder(object):
def get_modules(self, fn2index):
rv = {}
+ # XXX implement search capability
+ return rv
for name, (doc, _, _, _) in self.env.modules.iteritems():
if doc in fn2index:
rv[name] = fn2index[doc]
@@ -143,6 +159,8 @@ class IndexBuilder(object):
def get_descrefs(self, fn2index):
rv = {}
dt = self._desctypes
+ # XXX implement search capability
+ return rv
for fullname, (doc, desctype) in self.env.descrefs.iteritems():
if doc not in fn2index:
continue
@@ -198,11 +216,11 @@ class IndexBuilder(object):
visitor = WordCollector(doctree)
doctree.walk(visitor)
- def add_term(word, prefix='', stem=self._stemmer.stem):
+ def add_term(word, stem=self._stemmer.stem):
word = stem(word)
if len(word) < 3 or word in stopwords or word.isdigit():
return
- self._mapping.setdefault(prefix + word, set()).add(filename)
+ self._mapping.setdefault(word, set()).add(filename)
for word in word_re.findall(title):
add_term(word)
diff --git a/sphinx/texinputs/howto.cls b/sphinx/texinputs/sphinxhowto.cls
index 87d207d1..204d7063 100644
--- a/sphinx/texinputs/howto.cls
+++ b/sphinx/texinputs/sphinxhowto.cls
@@ -1,14 +1,25 @@
%
-% howto.cls for Sphinx
+% sphinxhowto.cls for Sphinx (http://sphinx.pocoo.org/)
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesClass{howto}[2008/10/18 Document class (Sphinx HOWTO)]
+\ProvidesClass{sphinxhowto}[2009/06/02 Document class (Sphinx HOWTO)]
-% Pass all given class options to the parent class.
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+% 'oneside' option overriding the 'twoside' default
+\newif\if@oneside
+\DeclareOption{oneside}{\@onesidetrue}
+% Pass remaining document options to the parent class.
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\sphinxdocclass}}
\ProcessOptions\relax
-\LoadClass[twoside]{article}
+
+% Default to two-side document
+\if@oneside
+% nothing to do (oneside is the default)
+\else
+\PassOptionsToClass{twoside}{\sphinxdocclass}
+\fi
+
+\LoadClass{\sphinxdocclass}
% Set some sane defaults for section numbering depth and TOC depth. You can
% reset these counters in your preamble.
diff --git a/sphinx/texinputs/manual.cls b/sphinx/texinputs/sphinxmanual.cls
index f94ee6d6..da805cdc 100644
--- a/sphinx/texinputs/manual.cls
+++ b/sphinx/texinputs/sphinxmanual.cls
@@ -1,14 +1,28 @@
%
-% manual.cls for Sphinx
+% sphinxmanual.cls for Sphinx (http://sphinx.pocoo.org/)
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesClass{manual}[2008/10/18 Document class (Sphinx manual)]
+\ProvidesClass{sphinxmanual}[2009/06/02 Document class (Sphinx manual)]
-% Pass all given class options to the parent class.
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
+% chapters starting at odd pages (overridden by 'openany' document option)
+\PassOptionsToClass{openright}{\sphinxdocclass}
+
+% 'oneside' option overriding the 'twoside' default
+\newif\if@oneside
+\DeclareOption{oneside}{\@onesidetrue}
+% Pass remaining document options to the parent class.
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\sphinxdocclass}}
\ProcessOptions\relax
-\LoadClass[twoside,openright]{report}
+
+% Defaults two-side document
+\if@oneside
+% nothing to do (oneside is the default)
+\else
+\PassOptionsToClass{twoside}{\sphinxdocclass}
+\fi
+
+\LoadClass{\sphinxdocclass}
% Set some sane defaults for section numbering depth and TOC depth. You can
% reset these counters in your preamble.
diff --git a/sphinx/themes/basic/layout.html b/sphinx/themes/basic/layout.html
index dd2e2d51..2f643c5d 100644
--- a/sphinx/themes/basic/layout.html
+++ b/sphinx/themes/basic/layout.html
@@ -91,7 +91,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
{{ metatags }}
{%- if not embedded %}
{%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
@@ -101,6 +101,9 @@
<title>{{ title|striptags }}{{ titlesuffix }}</title>
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
+ {%- for cssfile in css_files %}
+ <link rel="stylesheet" href="{{ pathto('_static/' + cssfile, 1) }}" type="text/css" />
+ {%- endfor %}
{%- if not embedded %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
@@ -179,10 +182,12 @@
{%- block footer %}
<div class="footer">
- {%- if hasdoc('copyright') %}
- {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
- {%- else %}
- {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
+ {%- if show_copyright %}
+ {%- if hasdoc('copyright') %}
+ {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
+ {%- else %}
+ {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
+ {%- endif %}
{%- endif %}
{%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
diff --git a/sphinx/themes/basic/static/basic.css b/sphinx/themes/basic/static/basic.css
index 68cae4fc..faebf312 100644
--- a/sphinx/themes/basic/static/basic.css
+++ b/sphinx/themes/basic/static/basic.css
@@ -252,7 +252,7 @@ table.docutils {
}
table.docutils td, table.docutils th {
- padding: 1px 8px 1px 0;
+ padding: 1px 8px 1px 5px;
border-top: 0;
border-left: 0;
border-right: 0;
diff --git a/sphinx/themes/basic/static/searchtools.js b/sphinx/themes/basic/static/searchtools.js
index e0226258..36acb12e 100644
--- a/sphinx/themes/basic/static/searchtools.js
+++ b/sphinx/themes/basic/static/searchtools.js
@@ -287,8 +287,13 @@ var Search = {
},
query : function(query) {
- // stem the searchterms and add them to the
- // correct list
+ var stopwords = ['and', 'then', 'into', 'it', 'as', 'are', 'in',
+ 'if', 'for', 'no', 'there', 'their', 'was', 'is',
+ 'be', 'to', 'that', 'but', 'they', 'not', 'such',
+ 'with', 'by', 'a', 'on', 'these', 'of', 'will',
+ 'this', 'near', 'the', 'or', 'at'];
+
+ // stem the searchterms and add them to the correct list
var stemmer = new PorterStemmer();
var searchterms = [];
var excluded = [];
@@ -296,6 +301,10 @@ var Search = {
var tmp = query.split(/\s+/);
var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;
for (var i = 0; i < tmp.length; i++) {
+ if (stopwords.indexOf(tmp[i]) != -1 || tmp[i].match(/^\d+$/)) {
+ // skip this word
+ continue;
+ }
// stem the word
var word = stemmer.stemWord(tmp[i]).toLowerCase();
// select the correct list
diff --git a/sphinx/themes/default/static/default.css_t b/sphinx/themes/default/static/default.css_t
index a363167a..fbfd64a8 100644
--- a/sphinx/themes/default/static/default.css_t
+++ b/sphinx/themes/default/static/default.css_t
@@ -147,6 +147,11 @@ a {
text-decoration: none;
}
+a:visited {
+ color: {{ theme_visitedlinkcolor }};
+ text-decoration: none;
+}
+
a:hover {
text-decoration: underline;
}
@@ -241,3 +246,7 @@ tt {
padding: 0 1px 0 1px;
font-size: 0.95em;
}
+
+th {
+ background-color: #ede;
+}
diff --git a/sphinx/themes/default/theme.conf b/sphinx/themes/default/theme.conf
index 812330f8..5035fae5 100644
--- a/sphinx/themes/default/theme.conf
+++ b/sphinx/themes/default/theme.conf
@@ -21,6 +21,7 @@ headbgcolor = #f2f2f2
headtextcolor = #20435c
headlinkcolor = #c60f0f
linkcolor = #355f7c
+visitedlinkcolor = #355f7c
codebgcolor = #eeffcc
codetextcolor = #333333
diff --git a/sphinx/themes/scrolls/artwork/logo.svg b/sphinx/themes/scrolls/artwork/logo.svg
new file mode 100644
index 00000000..0907a4ea
--- /dev/null
+++ b/sphinx/themes/scrolls/artwork/logo.svg
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="200"
+ height="80"
+ id="svg2766"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ version="1.0"
+ sodipodi:docname="logo.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs2768">
+ <linearGradient
+ id="linearGradient6558">
+ <stop
+ style="stop-color:#575757;stop-opacity:1;"
+ offset="0"
+ id="stop6560" />
+ <stop
+ style="stop-color:#2f2f2f;stop-opacity:1;"
+ offset="1"
+ id="stop6562" />
+ </linearGradient>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective2774" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6558"
+ id="radialGradient2797"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.7160081,0,0,0.6767021,-34.98413,-3.3035294e-2)"
+ cx="61.297766"
+ cy="60.910986"
+ fx="61.297766"
+ fy="60.910986"
+ r="44.688254" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="6.1848684"
+ inkscape:cx="95.923838"
+ inkscape:cy="34.518668"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1440"
+ inkscape:window-height="852"
+ inkscape:window-x="0"
+ inkscape:window-y="0" />
+ <metadata
+ id="metadata2771">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <path
+ style="opacity:1;fill:url(#radialGradient2797);fill-opacity:1;fill-rule:evenodd;stroke:#323232;stroke-width:0.71600807000000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 72.4375 8.6875 L 3.0625 18.71875 L 20.84375 29.0625 L 20.6875 44.09375 L 7.75 36.1875 L 8.40625 71.75 L 17.125 65.625 L 29.09375 67.5625 L 33.15625 39.90625 L 25.875 43.78125 L 26.1875 33.59375 L 46.875 31.34375 L 47.21875 42.96875 L 39.28125 40.5625 L 42.6875 67.71875 L 52.375 66.75 L 60.3125 71.75 L 62.90625 33.4375 L 53.03125 43.625 L 53.03125 28.25 L 72.4375 8.6875 z M 48.03125 22.125 L 47.0625 26.46875 L 28.46875 28.09375 L 28.46875 25.1875 L 48.03125 22.125 z M 58.375 45.0625 L 57.40625 62.875 L 51.40625 60.59375 L 45.90625 61.71875 L 43 46.21875 L 53.84375 49.9375 L 58.375 45.0625 z M 12.125 46.53125 L 22 49.75 L 26.53125 47.03125 L 25.21875 62.0625 L 16.96875 60.4375 L 12.125 63.65625 L 12.125 46.53125 z "
+ id="path2783" />
+ <path
+ style="opacity:1;fill:#e7eef6;fill-opacity:1;fill-rule:nonzero;stroke:#e1e8f3;stroke-width:0.52748101999999997;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 75.632462,22.265877 L 64.489624,64.880679 L 92.7889,40.941187 L 91.373937,61.872575 L 128.87048,23.519253 L 116.84328,58.36312 L 144.25821,44.450641 L 145.49631,65.632704 L 169.02007,38.183758 L 170.78877,60.493861 L 193.07447,18.631085 L 176.09491,36.554369 L 176.44864,19.633786 L 152.0405,44.701316 L 156.81601,27.655396 L 128.87048,44.325304 L 137.00652,14.494942 L 99.863721,44.325304 L 100.74807,27.028707 L 76.163076,45.829355 L 75.632462,22.265877 z"
+ id="path2804" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;opacity:1;fill:#1752b4;fill-opacity:1;fill-rule:nonzero;stroke:#28437f;stroke-width:0.71600807000000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Bitstream Vera Sans"
+ x="68.40242"
+ y="54.03759"
+ id="text2800"><tspan
+ sodipodi:role="line"
+ id="tspan2802"
+ x="68.40242"
+ y="54.03759"
+ style="font-size:36px;fill:#1752b4;fill-opacity:1;fill-rule:nonzero;stroke:#28437f;stroke-width:0.71600807000000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate">Project</tspan></text>
+ </g>
+</svg>
diff --git a/sphinx/themes/scrolls/genindex.html b/sphinx/themes/scrolls/genindex.html
new file mode 100644
index 00000000..9add6e95
--- /dev/null
+++ b/sphinx/themes/scrolls/genindex.html
@@ -0,0 +1,36 @@
+{% extends "layout.html" %}
+{% set title = 'Index' %}
+{% block body %}
+
+ <h1 id="index">Index</h1>
+
+ {% for key, dummy in genindexentries -%}
+ <a href="#{{ key }}"><strong>{{ key }}</strong></a> {% if not loop.last %}| {% endif %}
+ {%- endfor %}
+ <hr>
+
+ {% for key, entries in genindexentries %}
+ <h2 id="{{ key }}">{{ key }}</h2>
+ <table class="indextable"><tr>
+ {%- for column in entries|slice(2) if column %}
+ <td><dl>
+ {%- for entryname, (links, subitems) in column %}
+ <dt>{% if links %}<a href="{{ links[0] }}">{{ entryname|e }}</a>
+ {% for link in links[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor %}
+ {%- else %}{{ entryname|e }}{% endif %}</dt>
+ {%- if subitems %}
+ <dd><dl>
+ {%- for subentryname, subentrylinks in subitems %}
+ <dt><a href="{{ subentrylinks[0] }}">{{ subentryname|e }}</a>
+ {%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[Link]</a>{% endfor -%}
+ </dt>
+ {%- endfor %}
+ </dl></dd>
+ {%- endif -%}
+ {%- endfor %}
+ </dl></td>
+ {%- endfor %}
+ </tr></table>
+ {% endfor %}
+
+{% endblock %}
diff --git a/sphinx/themes/scrolls/layout.html b/sphinx/themes/scrolls/layout.html
new file mode 100644
index 00000000..d1c66ae2
--- /dev/null
+++ b/sphinx/themes/scrolls/layout.html
@@ -0,0 +1,96 @@
+<!doctype html>
+<html>
+ <head>
+ {%- if not embedded %}
+ {%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
+ {%- else %}
+ {%- set titlesuffix = "" %}
+ {%- endif %}
+ <title>{{ title|striptags }}{{ titlesuffix }}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <link rel="stylesheet" href="{{ pathto('_static/style.css', 1) }}" type="text/css">
+ <link rel="stylesheet" href="{{ pathto('_static/print.css', 1) }}" type="text/css" media="print">
+ <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css">
+ {%- if builder != 'htmlhelp' %}
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '{{ pathto("", 1) }}',
+ VERSION: '{{ release|e }}',
+ COLLAPSE_MODINDEX: false,
+ FILE_SUFFIX: '{{ file_suffix }}',
+ HAS_SOURCE: {{ has_source|lower }}
+ };
+ </script>
+ <script type="text/javascript" src="{{ pathto('_static/jquery.js', 1) }}"></script>
+ <script type="text/javascript" src="{{ pathto('_static/interface.js', 1) }}"></script>
+ <script type="text/javascript" src="{{ pathto('_static/doctools.js', 1) }}"></script>
+ <script type="text/javascript" src="{{ pathto('_static/theme_extras.js', 1) }}"></script>
+ {%- endif %}
+ {%- if use_opensearch and builder != 'htmlhelp' %}
+ <link rel="search" type="application/opensearchdescription+xml"
+ title="Search within {{ docstitle }}"
+ href="{{ pathto('_static/opensearch.xml', 1) }}">
+ {%- endif %}
+ {%- if hasdoc('about') %}
+ <link rel="author" title="About these documents" href="{{ pathto('about') }}">
+ {%- endif %}
+ <link rel="contents" title="Global table of contents" href="{{ pathto('contents') }}">
+ <link rel="index" title="Global index" href="{{ pathto('genindex') }}">
+ <link rel="search" title="Search" href="{{ pathto('search') }}">
+ {%- if hasdoc('copyright') %}
+ <link rel="copyright" title="Copyright" href="{{ pathto('copyright') }}">
+ {%- endif %}
+ <link rel="top" title="{{ docstitle }}" href="{{ pathto('index') }}">
+ {%- if parents %}
+ <link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}">
+ {%- endif %}
+ {%- if next %}
+ <link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}">
+ {%- endif %}
+ {%- if prev %}
+ <link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}">
+ {%- endif %}
+ {% block extrahead %}{% endblock %}
+ </head>
+ <body>
+ <div id="content">
+ <div class="header">
+ <h1 class="heading"><a href="{{ pathto('index') }}"
+ title="back to the documentation overview"><span>{{ title|striptags }}</span></a></h1>
+ </div>
+ <div class="relnav">
+ {%- if prev %}
+ <a href="{{ prev.link|e }}">&laquo; {{ prev.title }}</a> |
+ {%- endif %}
+ <a href="{{ pathto(current_page_name) if current_page_name else '#' }}">{{ title }}</a>
+ {%- if next %}
+ | <a href="{{ next.link|e }}">{{ next.title }} &raquo;</a>
+ {%- endif %}
+ </div>
+ <div id="contentwrapper">
+ {%- if display_toc %}
+ <div id="toc">
+ <h3>Table Of Contents</h3>
+ {{ toc }}
+ </div>
+ {%- endif %}
+ {% block body %}{% endblock %}
+ </div>
+ </div>
+ <div class="footer">
+ {%- if show_copyright %}
+ {%- if hasdoc('copyright') %}
+ {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
+ {%- else %}
+ {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
+ {%- endif %}
+ {%- endif %}
+ {%- if last_updated %}
+ {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
+ {%- endif %}
+ {%- if show_sphinx %}
+ {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
+ {%- endif %}
+ </div>
+ </body>
+</html>
diff --git a/sphinx/themes/scrolls/modindex.html b/sphinx/themes/scrolls/modindex.html
new file mode 100644
index 00000000..314ebdd9
--- /dev/null
+++ b/sphinx/themes/scrolls/modindex.html
@@ -0,0 +1,43 @@
+{% extends "layout.html" %}
+{% set title = _('Global Module Index') %}
+{% block extrahead %}
+{{ super() }}
+{% if not embedded and collapse_modindex %}
+ <script type="text/javascript">
+ DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX = true;
+ </script>
+{% endif %}
+{% endblock %}
+{% block body %}
+
+ <h1 id="global-module-index">{{ _('Global Module Index') }}</h1>
+
+ <div class="modindex-jumpbox">
+ {%- for letter in letters %}
+ <a href="#cap-{{ letter }}"><strong>{{ letter }}</strong></a> {% if not loop.last %}| {% endif %}
+ {%- endfor %}
+ </div>
+
+ <table class="modindextable">
+ {%- for modname, collapse, cgroup, indent, fname, synops, pform, dep, stripped in modindexentries %}
+ {%- if not modname -%}
+ <tr class="pcap"><td></td><td>&nbsp;</td><td></td></tr>
+ <tr class="cap"><td></td><td><a name="cap-{{ fname }}"><strong>{{ fname }}</strong></a></td><td></td></tr>
+ {%- else -%}
+ <tr{% if indent %} class="cg-{{ cgroup }}"{% endif %}>
+ <td>{% if collapse -%}
+ <img src="{{ pathto('_static/minus.png', 1) }}" id="toggle-{{ cgroup }}"
+ class="toggler" style="display: none" alt="-" />
+ {%- endif %}</td>
+ <td>{% if indent %}&nbsp;&nbsp;&nbsp;{% endif %}
+ {% if fname %}<a href="{{ fname }}">{% endif -%}
+ <tt class="xref">{{ stripped|e }}{{ modname|e }}</tt>
+ {%- if fname %}</a>{% endif %}
+ {%- if pform and pform[0] %} <em>({{ pform|join(', ') }})</em>{% endif -%}
+ </td><td>{% if dep %}<strong>{{ _('Deprecated')}}:</strong>{% endif %}
+ <em>{{ synops|e }}</em></td></tr>
+ {%- endif -%}
+ {% endfor %}
+ </table>
+
+{% endblock %}
diff --git a/sphinx/themes/scrolls/opensearch.xml b/sphinx/themes/scrolls/opensearch.xml
new file mode 100644
index 00000000..9f2fa427
--- /dev/null
+++ b/sphinx/themes/scrolls/opensearch.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
+ <ShortName>{{ project }}</ShortName>
+ <Description>Search {{ docstitle }}</Description>
+ <InputEncoding>utf-8</InputEncoding>
+ <Url type="text/html" method="get"
+ template="{{ use_opensearch }}/{{ pathto('search') }}?q={searchTerms}&amp;check_keywords=yes&amp;area=default"/>
+ <LongName>{{ docstitle }}</LongName>
+</OpenSearchDescription>
diff --git a/sphinx/themes/scrolls/page.html b/sphinx/themes/scrolls/page.html
new file mode 100644
index 00000000..ee6cad3d
--- /dev/null
+++ b/sphinx/themes/scrolls/page.html
@@ -0,0 +1,4 @@
+{% extends 'layout.html' %}
+{% block body %}
+ {{ body }}
+{% endblock %}
diff --git a/sphinx/themes/scrolls/search.html b/sphinx/themes/scrolls/search.html
new file mode 100644
index 00000000..0c942b70
--- /dev/null
+++ b/sphinx/themes/scrolls/search.html
@@ -0,0 +1,35 @@
+{% extends "layout.html" %}
+{% set title = 'Search' %}
+{% block extrahead %}
+ <script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
+{% endblock %}
+{% block body %}
+ <h1 id="search-documentation">Search</h1>
+ <p>
+ From here you can search these documents. Enter your search
+ words into the box below and click "search". Note that the search
+ function will automatically search for all of the words. Pages
+ containing less words won't appear in the result list.
+ </p>
+ <form action="" method="get"><p>
+ <input type="text" name="q" value="">
+ <input type="submit" value="search">
+ </p></form>
+ {% if search_performed %}
+ <h2>Search Results</h2>
+ {% if not search_results %}
+ <p>Your search did not match any results.</p>
+ {% endif %}
+ {% endif %}
+ <div id="search-results">
+ {% if search_results %}
+ <ul>
+ {% for href, caption, context in search_results %}
+ <li><a href="{{ pathto(item.href) }}">{{ caption }}</a>
+ <div class="context">{{ context|e }}</div>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </div>
+{% endblock %}
diff --git a/sphinx/themes/scrolls/static/darkmetal.png b/sphinx/themes/scrolls/static/darkmetal.png
new file mode 100644
index 00000000..e8c9ff62
--- /dev/null
+++ b/sphinx/themes/scrolls/static/darkmetal.png
Binary files differ
diff --git a/sphinx/themes/scrolls/static/headerbg.png b/sphinx/themes/scrolls/static/headerbg.png
new file mode 100644
index 00000000..0c5b3657
--- /dev/null
+++ b/sphinx/themes/scrolls/static/headerbg.png
Binary files differ
diff --git a/sphinx/themes/scrolls/static/logo.png b/sphinx/themes/scrolls/static/logo.png
new file mode 100644
index 00000000..d1961cf0
--- /dev/null
+++ b/sphinx/themes/scrolls/static/logo.png
Binary files differ
diff --git a/sphinx/themes/scrolls/static/metal.png b/sphinx/themes/scrolls/static/metal.png
new file mode 100644
index 00000000..97166f13
--- /dev/null
+++ b/sphinx/themes/scrolls/static/metal.png
Binary files differ
diff --git a/sphinx/themes/scrolls/static/navigation.png b/sphinx/themes/scrolls/static/navigation.png
new file mode 100644
index 00000000..1e248d4d
--- /dev/null
+++ b/sphinx/themes/scrolls/static/navigation.png
Binary files differ
diff --git a/sphinx/themes/scrolls/static/print.css b/sphinx/themes/scrolls/static/print.css
new file mode 100644
index 00000000..fb633d87
--- /dev/null
+++ b/sphinx/themes/scrolls/static/print.css
@@ -0,0 +1,5 @@
+div.header, div.relnav, #toc { display: none; }
+#contentwrapper { padding: 0; margin: 0; border: none; }
+body { color: black; background-color: white; }
+div.footer { border-top: 1px solid #888; color: #888; margin-top: 1cm; }
+div.footer a { text-decoration: none; }
diff --git a/sphinx/themes/scrolls/static/style.css_t b/sphinx/themes/scrolls/static/style.css_t
new file mode 100644
index 00000000..0c346d04
--- /dev/null
+++ b/sphinx/themes/scrolls/static/style.css_t
@@ -0,0 +1,398 @@
+body {
+ background-color: #222;
+ margin: 0;
+ padding: 0;
+ font-family: 'Georgia', serif;
+ font-size: 15px;
+ color: #eee;
+}
+
+div.footer {
+ border-top: 1px solid #111;
+ padding: 8px;
+ font-size: 11px;
+ text-align: center;
+ letter-spacing: 0.5px;
+}
+
+div.footer a {
+ color: #eee;
+}
+
+div.header {
+ margin: 0 -15px 0 -15px;
+ background: url(headerbg.png) repeat-x;
+ border-top: 6px solid {{ theme_headerbordercolor }};
+}
+
+div.relnav {
+ border-bottom: 1px solid #111;
+ background: url(navigation.png);
+ margin: 0 -15px 0 -15px;
+ padding: 2px 20px 0 28px;
+ line-height: 25px;
+ color: #aaa;
+ font-size: 12px;
+ text-align: center;
+}
+
+div.relnav a {
+ color: #eee;
+ font-weight: bold;
+ text-decoration: none;
+}
+
+div.relnav a:hover {
+ text-decoration: underline;
+}
+
+#content {
+ background-color: white;
+ color: #111;
+ border-bottom: 1px solid black;
+ background: url(watermark.png) center 0;
+ padding: 0 15px 0 15px;
+ margin: 0;
+}
+
+h1 {
+ margin: 0;
+ padding: 15px 0 0 0;
+}
+
+h1.heading {
+ margin: 0;
+ padding: 0;
+ height: 80px;
+}
+
+h1.heading:hover {
+ background: #222;
+}
+
+h1.heading a {
+ background: url({{ logo if logo else 'logo.png' }}) no-repeat center 0;
+ display: block;
+ width: 100%;
+ height: 80px;
+}
+
+h1.heading a:focus {
+ -moz-outline: none;
+ outline: none;
+}
+
+h1.heading span {
+ display: none;
+}
+
+#jinjalogo {
+ background-image: url(jinjalogo.png);
+ background-repeat: no-repeat;
+ width: 400px;
+ height: 160px;
+}
+
+#contentwrapper {
+ max-width: 680px;
+ padding: 0 18px 20px 18px;
+ margin: 0 auto 0 auto;
+ border-right: 1px solid #eee;
+ border-left: 1px solid #eee;
+ background: url(watermark_blur.png) center -114px;
+}
+
+#contentwrapper h2,
+#contentwrapper h2 a {
+ color: #222;
+ font-size: 24px;
+ margin: 20px 0 0 0;
+}
+
+#contentwrapper h3,
+#contentwrapper h3 a {
+ color: {{ theme_subheadlinecolor }};
+ font-size: 20px;
+ margin: 20px 0 0 0;
+}
+
+table.docutils {
+ border-collapse: collapse;
+ border: 2px solid #aaa;
+ margin: 0.5em 1.5em 0.5em 1.5em;
+}
+
+table.docutils td {
+ padding: 2px;
+ border: 1px solid #ddd;
+}
+
+p, li, dd, dt, blockquote {
+ color: #333;
+}
+
+blockquote {
+ margin: 10px 0 10px 20px;
+}
+
+p {
+ line-height: 20px;
+ margin-bottom: 0;
+ margin-top: 10px;
+}
+
+hr {
+ border-top: 1px solid #ccc;
+ border-bottom: 0;
+ border-right: 0;
+ border-left: 0;
+ margin-bottom: 10px;
+ margin-top: 20px;
+}
+
+dl {
+ margin-left: 10px;
+}
+
+li, dt {
+ margin-top: 5px;
+}
+
+dt {
+ font-weight: bold;
+ color: #000;
+}
+
+dd {
+ margin-top: 10px;
+ line-height: 20px;
+}
+
+th {
+ text-align: left;
+ padding: 3px;
+ background-color: #f2f2f2;
+}
+
+a {
+ color: {{ theme_linkcolor }};
+}
+
+a:hover {
+ color: {{ theme_visitedlinkcolor }};
+}
+
+pre {
+ background: #ededed url(metal.png);
+ border-top: 1px solid #ccc;
+ border-bottom: 1px solid #ccc;
+ padding: 5px;
+ font-size: 13px;
+ font-family: 'Bitstream Vera Sans Mono', 'Monaco', monospace;
+}
+
+tt {
+ font-size: 13px;
+ font-family: 'Bitstream Vera Sans Mono', 'Monaco', monospace;
+ color: black;
+ padding: 1px 2px 1px 2px;
+ background-color: #fafafa;
+ border-bottom: 1px solid #eee;
+}
+
+a.reference:hover tt {
+ border-bottom-color: #aaa;
+}
+
+cite {
+ /* abusing <cite>, it's generated by ReST for `x` */
+ font-size: 13px;
+ font-family: 'Bitstream Vera Sans Mono', 'Monaco', monospace;
+ font-weight: bold;
+ font-style: normal;
+}
+
+div.admonition {
+ margin: 10px 0 10px 0;
+ padding: 10px;
+ border: 1px solid #ccc;
+}
+
+div.admonition p.admonition-title {
+ background-color: {{ theme_admonitioncolor }};
+ color: white;
+ margin: -10px -10px 10px -10px;
+ padding: 4px 10px 4px 10px;
+ font-weight: bold;
+ font-size: 15px;
+}
+
+div.admonition p.admonition-title a {
+ color: white!important;
+}
+
+a.headerlink {
+ color: #B4B4B4!important;
+ font-size: 0.8em;
+ padding: 0 4px 0 4px;
+ text-decoration: none!important;
+ visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink,
+dt:hover > a.headerlink {
+ visibility: visible;
+}
+
+a.headerlink:hover {
+ background-color: #B4B4B4;
+ color: #F0F0F0!important;
+}
+
+table.indextable {
+ width: 100%;
+}
+
+table.indextable td {
+ vertical-align: top;
+ width: 50%;
+}
+
+table.indextable dl dd {
+ font-size: 11px;
+}
+
+table.indextable dl dd a {
+ color: #000;
+}
+
+div.modindex-jumpbox {
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ margin: 1em 0 1em 0;
+ padding: 0.4em;
+}
+
+table.modindextable {
+ width: 100%;
+ border: none;
+}
+
+table.modindextable img.toggler {
+ margin-right: 10px;
+}
+
+dl.function dt,
+dl.class dt,
+dl.exception dt,
+dl.method dt,
+dl.attribute dt {
+ font-weight: normal;
+}
+
+dt .descname {
+ font-weight: bold;
+ margin-right: 4px;
+}
+
+dt .descname, dt .descclassname {
+ padding: 0;
+ background: transparent;
+ border-bottom: 1px solid #111;
+}
+
+dt .descclassname {
+ margin-left: 2px;
+}
+
+dl dt big {
+ font-size: 100%;
+}
+
+ul.search {
+ margin: 10px 0 0 30px;
+ padding: 0;
+}
+
+ul.search li {
+ margin: 10px 0 0 0;
+ padding: 0;
+}
+
+ul.search div.context {
+ font-size: 12px;
+ padding: 4px 0 0 20px;
+ color: #888;
+}
+
+span.highlight {
+ background-color: #eee;
+ border: 1px solid #ccc;
+}
+
+#toc {
+ margin: 0 -17px 0 -17px;
+ display: none;
+}
+
+#toc h3 {
+ float: right;
+ margin: 5px 5px 0 0;
+ padding: 0;
+ font-size: 12px;
+ color: #777;
+}
+
+#toc h3:hover {
+ color: #333;
+ cursor: pointer;
+}
+
+.expandedtoc {
+ background: #222 url(darkmetal.png);
+ border-bottom: 1px solid #111;
+ outline-bottom: 1px solid #000;
+ padding: 5px;
+}
+
+.expandedtoc h3 {
+ color: #aaa;
+ margin: 0!important;
+}
+
+.expandedtoc h3:hover {
+ color: white!important;
+}
+
+#tod h3:hover {
+ color: white;
+}
+
+#toc a {
+ color: #ddd;
+ text-decoration: none;
+}
+
+#toc a:hover {
+ color: white;
+ text-decoration: underline;
+}
+
+#toc ul {
+ margin: 5px 0 12px 17px;
+ padding: 0 7px 0 7px;
+}
+
+#toc ul ul {
+ margin-bottom: 0;
+}
+
+#toc ul li {
+ margin: 2px 0 0 0;
+}
diff --git a/sphinx/themes/scrolls/static/theme_extras.js b/sphinx/themes/scrolls/static/theme_extras.js
new file mode 100644
index 00000000..1c042187
--- /dev/null
+++ b/sphinx/themes/scrolls/static/theme_extras.js
@@ -0,0 +1,26 @@
+$(function() {
+
+ var
+ toc = $('#toc').show(),
+ items = $('#toc > ul').hide();
+
+ $('#toc h3')
+ .click(function() {
+ if (items.is(':visible')) {
+ items.animate({
+ height: 'hide',
+ opacity: 'hide'
+ }, 300, function() {
+ toc.removeClass('expandedtoc');
+ });
+ }
+ else {
+ items.animate({
+ height: 'show',
+ opacity: 'show'
+ }, 400);
+ toc.addClass('expandedtoc');
+ }
+ });
+
+});
diff --git a/sphinx/themes/scrolls/static/watermark.png b/sphinx/themes/scrolls/static/watermark.png
new file mode 100644
index 00000000..eb1b6be9
--- /dev/null
+++ b/sphinx/themes/scrolls/static/watermark.png
Binary files differ
diff --git a/sphinx/themes/scrolls/static/watermark_blur.png b/sphinx/themes/scrolls/static/watermark_blur.png
new file mode 100644
index 00000000..563f6cde
--- /dev/null
+++ b/sphinx/themes/scrolls/static/watermark_blur.png
Binary files differ
diff --git a/sphinx/themes/scrolls/theme.conf b/sphinx/themes/scrolls/theme.conf
new file mode 100644
index 00000000..b4205046
--- /dev/null
+++ b/sphinx/themes/scrolls/theme.conf
@@ -0,0 +1,11 @@
+[theme]
+inherit = default
+stylesheet = scrolls.css
+pygments_style = tango
+
+[options]
+headerbordercolor = #1752b4
+subheadlinecolor = #0d306b
+linkcolor = #1752b4
+visitedlinkcolor = #444
+admonitioncolor = #28437f
diff --git a/sphinx/theming.py b/sphinx/theming.py
index e5807029..217dd81c 100644
--- a/sphinx/theming.py
+++ b/sphinx/theming.py
@@ -78,7 +78,7 @@ class Theme(object):
dirname = path.dirname(name)
if not path.isdir(path.join(self.themedir, dirname)):
os.makedirs(path.join(self.themedir, dirname))
- fp = open(path.join(self.themedir, name), 'w')
+ fp = open(path.join(self.themedir, name), 'wb')
fp.write(tinfo.read(name))
fp.close()
diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py
index 40d4e323..c7ced1d8 100644
--- a/sphinx/util/__init__.py
+++ b/sphinx/util/__init__.py
@@ -402,8 +402,10 @@ def movefile(source, dest):
def copyfile(source, dest):
"""Copy a file and its modification times, if possible."""
shutil.copyfile(source, dest)
- try: shutil.copystat(source, dest)
- except shutil.Error: pass
+ try:
+ shutil.copystat(source, dest)
+ except shutil.Error:
+ pass
def copy_static_entry(source, target, builder, context={}):
@@ -425,39 +427,69 @@ def copy_static_entry(source, target, builder, context={}):
shutil.copytree(source, target)
+def split_explicit_title(text):
+ """Split role content into title and target, if given."""
+ brace = text.find('<')
+ if brace != -1:
+ m = caption_ref_re.match(text)
+ if m:
+ target = m.group(2)
+ title = m.group(1)
+ else:
+ # fallback: everything after '<' is the target
+ target = text[brace+1:]
+ title = text[:brace]
+ return True, title, target
+ else:
+ return False, text, text
+
+
+from docutils import nodes
+
+def make_refnode(builder, fromdocname, todocname, targetid, child, title=None):
+ """Shortcut to create a reference node."""
+ node = nodes.reference('', '')
+ if fromdocname == todocname:
+ node['refid'] = targetid
+ else:
+ node['refuri'] = (builder.get_relative_uri(fromdocname, todocname)
+ + '#' + targetid)
+ if title:
+ node['reftitle'] = title
+ node.append(child)
+ return node
+
+
# monkey-patch Node.traverse to get more speed
# traverse() is called so many times during a build that it saves
# on average 20-25% overall build time!
-def _all_traverse(self):
+def _all_traverse(self, result):
"""Version of Node.traverse() that doesn't need a condition."""
- result = []
result.append(self)
for child in self.children:
- result.extend(child._all_traverse())
+ child._all_traverse(result)
return result
-def _fast_traverse(self, cls):
+def _fast_traverse(self, cls, result):
"""Version of Node.traverse() that only supports instance checks."""
- result = []
if isinstance(self, cls):
result.append(self)
for child in self.children:
- result.extend(child._fast_traverse(cls))
+ child._fast_traverse(cls, result)
return result
def _new_traverse(self, condition=None,
include_self=1, descend=1, siblings=0, ascend=0):
if include_self and descend and not siblings and not ascend:
if condition is None:
- return self._all_traverse()
+ return self._all_traverse([])
elif isinstance(condition, (types.ClassType, type)):
- return self._fast_traverse(condition)
+ return self._fast_traverse(condition, [])
return self._old_traverse(condition, include_self,
descend, siblings, ascend)
-import docutils.nodes
-docutils.nodes.Node._old_traverse = docutils.nodes.Node.traverse
-docutils.nodes.Node._all_traverse = _all_traverse
-docutils.nodes.Node._fast_traverse = _fast_traverse
-docutils.nodes.Node.traverse = _new_traverse
+nodes.Node._old_traverse = nodes.Node.traverse
+nodes.Node._all_traverse = _all_traverse
+nodes.Node._fast_traverse = _fast_traverse
+nodes.Node.traverse = _new_traverse
diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py
index 1719f22e..bf260e46 100644
--- a/sphinx/writers/latex.py
+++ b/sphinx/writers/latex.py
@@ -28,8 +28,10 @@ from sphinx.util.texescape import tex_escape_map
from sphinx.util.smartypants import educateQuotesLatex
HEADER = r'''%% Generated by Sphinx.
-\documentclass[%(papersize)s,%(pointsize)s%(classoptions)s]{%(docclass)s}
+\def\sphinxdocclass{%(docclass)s}
+\documentclass[%(papersize)s,%(pointsize)s%(classoptions)s]{%(wrapperclass)s}
%(inputenc)s
+%(utf8extra)s
%(fontenc)s
%(babel)s
%(fontpkg)s
@@ -134,11 +136,11 @@ class LaTeXTranslator(nodes.NodeVisitor):
ignore_missing_images = False
default_elements = {
- 'docclass': 'manual',
'papersize': 'letterpaper',
'pointsize': '10pt',
'classoptions': '',
'inputenc': '\\usepackage[utf8]{inputenc}',
+ 'utf8extra': '\\DeclareUnicodeCharacter{00A0}{\\nobreakspace}',
'fontenc': '\\usepackage[T1]{fontenc}',
'babel': '\\usepackage{babel}',
'fontpkg': '\\usepackage{times}',
@@ -173,7 +175,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.elements = self.default_elements.copy()
self.elements.update({
- 'docclass': document.settings.docclass,
+ 'wrapperclass': 'sphinx' + document.settings.docclass,
'papersize': papersize,
'pointsize': builder.config.latex_font_size,
# if empty, the title is set to the first section title
@@ -187,6 +189,11 @@ class LaTeXTranslator(nodes.NodeVisitor):
'modindexname': _('Module Index'),
'indexname': _('Index'),
})
+ if document.settings.docclass == 'howto':
+ docclass = builder.config.latex_docclass.get('howto', 'article')
+ else:
+ docclass = builder.config.latex_docclass.get('manual', 'report')
+ self.elements['docclass'] = docclass
if builder.config.latex_logo:
self.elements['logo'] = '\\includegraphics{%s}\\par' % \
path.basename(builder.config.latex_logo)
@@ -208,8 +215,8 @@ class LaTeXTranslator(nodes.NodeVisitor):
# allow the user to override them all
self.elements.update(builder.config.latex_elements)
- self.highlighter = highlighting.PygmentsBridge(
- 'latex', builder.config.pygments_style)
+ self.highlighter = highlighting.PygmentsBridge('latex',
+ builder.config.pygments_style, builder.config.trim_doctest_flags)
self.context = []
self.descstack = []
self.bibitems = []
@@ -221,13 +228,13 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.footnotestack = []
self.curfilestack = []
self.handled_abbrs = set()
- if self.elements['docclass'] == 'manual':
+ if document.settings.docclass == 'howto':
+ self.top_sectionlevel = 2
+ else:
if builder.config.latex_use_parts:
self.top_sectionlevel = 0
else:
self.top_sectionlevel = 1
- else:
- self.top_sectionlevel = 2
self.next_section_target = None
# flags
self.verbatim = None
diff --git a/sphinx/writers/text.py b/sphinx/writers/text.py
index ceca5c8a..9e7bb63d 100644
--- a/sphinx/writers/text.py
+++ b/sphinx/writers/text.py
@@ -47,7 +47,7 @@ STDINDENT = 3
class TextTranslator(nodes.NodeVisitor):
- sectionchars = '*=-~"+'
+ sectionchars = '*=-~"+`'
def __init__(self, document, builder):
nodes.NodeVisitor.__init__(self, document)