summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgignore4
-rw-r--r--AUTHORS5
-rw-r--r--CHANGES45
-rw-r--r--EXAMPLES1
-rw-r--r--MANIFEST.in2
-rw-r--r--Makefile53
-rw-r--r--README12
-rw-r--r--custom_fixers/__init__.py0
-rw-r--r--custom_fixers/fix_alt_unicode.py12
-rw-r--r--distribute_setup.py485
-rw-r--r--doc/Makefile21
-rw-r--r--doc/builders.rst32
-rw-r--r--doc/conf.py6
-rw-r--r--doc/config.rst245
-rw-r--r--doc/contents.rst2
-rw-r--r--doc/ext/appapi.rst6
-rw-r--r--doc/ext/autodoc.rst61
-rw-r--r--doc/ext/doctest.rst16
-rw-r--r--doc/ext/graphviz.rst16
-rw-r--r--doc/faq.rst115
-rw-r--r--doc/intl.rst69
-rw-r--r--doc/intro.rst12
-rw-r--r--doc/invocation.rst7
-rw-r--r--doc/markup/inline.rst1
-rw-r--r--doc/markup/misc.rst79
-rw-r--r--doc/markup/para.rst68
-rw-r--r--doc/markup/toctree.rst14
-rw-r--r--doc/theming.rst2
-rw-r--r--doc/translation.pngbin0 -> 40683 bytes
-rw-r--r--doc/web/api.rst65
-rw-r--r--doc/web/quickstart.rst254
-rw-r--r--doc/web/searchadapters.rst45
-rw-r--r--doc/web/storagebackends.rst44
-rw-r--r--doc/websupport.rst16
-rw-r--r--ez_setup.py276
-rw-r--r--setup.py11
-rw-r--r--sphinx/__init__.py25
-rw-r--r--sphinx/addnodes.py195
-rw-r--r--sphinx/application.py25
-rw-r--r--sphinx/builders/__init__.py47
-rw-r--r--sphinx/builders/changes.py3
-rw-r--r--sphinx/builders/devhelp.py1
-rw-r--r--sphinx/builders/epub.py75
-rw-r--r--sphinx/builders/html.py75
-rw-r--r--sphinx/builders/htmlhelp.py3
-rw-r--r--sphinx/builders/intl.py110
-rw-r--r--sphinx/builders/linkcheck.py179
-rw-r--r--sphinx/builders/qthelp.py14
-rw-r--r--sphinx/builders/texinfo.py228
-rw-r--r--sphinx/builders/versioning.py72
-rw-r--r--sphinx/builders/websupport.py160
-rw-r--r--sphinx/config.py56
-rw-r--r--sphinx/directives/code.py24
-rw-r--r--sphinx/directives/other.py66
-rw-r--r--sphinx/domains/__init__.py29
-rw-r--r--sphinx/domains/cpp.py29
-rw-r--r--sphinx/domains/javascript.py2
-rw-r--r--sphinx/domains/python.py22
-rw-r--r--sphinx/domains/rst.py7
-rw-r--r--sphinx/environment.py228
-rw-r--r--sphinx/ext/autodoc.py246
-rw-r--r--sphinx/ext/autosummary/__init__.py28
-rw-r--r--sphinx/ext/autosummary/generate.py13
-rw-r--r--sphinx/ext/coverage.py5
-rw-r--r--sphinx/ext/doctest.py87
-rw-r--r--sphinx/ext/graphviz.py59
-rw-r--r--sphinx/ext/inheritance_diagram.py19
-rw-r--r--sphinx/ext/intersphinx.py24
-rw-r--r--sphinx/ext/mathbase.py42
-rw-r--r--sphinx/ext/oldcmarkup.py1
-rw-r--r--sphinx/ext/pngmath.py6
-rw-r--r--sphinx/ext/todo.py3
-rw-r--r--sphinx/ext/viewcode.py6
-rw-r--r--sphinx/highlighting.py4
-rw-r--r--sphinx/jinja2glue.py6
-rw-r--r--sphinx/locale/__init__.py40
-rw-r--r--sphinx/locale/bn/LC_MESSAGES/sphinx.js2
-rw-r--r--sphinx/locale/bn/LC_MESSAGES/sphinx.mobin12509 -> 13015 bytes
-rw-r--r--sphinx/locale/bn/LC_MESSAGES/sphinx.po702
-rw-r--r--sphinx/locale/ca/LC_MESSAGES/sphinx.mobin9378 -> 9378 bytes
-rw-r--r--sphinx/locale/ca/LC_MESSAGES/sphinx.po238
-rw-r--r--sphinx/locale/cs/LC_MESSAGES/sphinx.mobin9067 -> 9067 bytes
-rw-r--r--sphinx/locale/cs/LC_MESSAGES/sphinx.po238
-rw-r--r--sphinx/locale/da/LC_MESSAGES/sphinx.js2
-rw-r--r--sphinx/locale/da/LC_MESSAGES/sphinx.mobin8668 -> 9469 bytes
-rw-r--r--sphinx/locale/da/LC_MESSAGES/sphinx.po667
-rw-r--r--sphinx/locale/de/LC_MESSAGES/sphinx.mobin10037 -> 10037 bytes
-rw-r--r--sphinx/locale/de/LC_MESSAGES/sphinx.po238
-rw-r--r--sphinx/locale/es/LC_MESSAGES/sphinx.mobin8121 -> 8121 bytes
-rw-r--r--sphinx/locale/es/LC_MESSAGES/sphinx.po238
-rw-r--r--sphinx/locale/fa/LC_MESSAGES/sphinx.js1
-rw-r--r--sphinx/locale/fa/LC_MESSAGES/sphinx.mobin0 -> 9545 bytes
-rw-r--r--sphinx/locale/fa/LC_MESSAGES/sphinx.po596
-rw-r--r--sphinx/locale/fi/LC_MESSAGES/sphinx.mobin9102 -> 9144 bytes
-rw-r--r--sphinx/locale/fi/LC_MESSAGES/sphinx.po235
-rw-r--r--sphinx/locale/fr/LC_MESSAGES/sphinx.mobin8938 -> 8938 bytes
-rw-r--r--sphinx/locale/fr/LC_MESSAGES/sphinx.po249
-rw-r--r--sphinx/locale/hr/LC_MESSAGES/sphinx.mobin9195 -> 9195 bytes
-rw-r--r--sphinx/locale/hr/LC_MESSAGES/sphinx.po249
-rw-r--r--sphinx/locale/it/LC_MESSAGES/sphinx.mobin9461 -> 9461 bytes
-rw-r--r--sphinx/locale/it/LC_MESSAGES/sphinx.po238
-rw-r--r--sphinx/locale/ja/LC_MESSAGES/sphinx.js2
-rw-r--r--sphinx/locale/ja/LC_MESSAGES/sphinx.mobin9950 -> 10110 bytes
-rw-r--r--sphinx/locale/ja/LC_MESSAGES/sphinx.po284
-rw-r--r--sphinx/locale/lt/LC_MESSAGES/sphinx.mobin10244 -> 10287 bytes
-rw-r--r--sphinx/locale/lt/LC_MESSAGES/sphinx.po244
-rw-r--r--sphinx/locale/nl/LC_MESSAGES/sphinx.mobin9352 -> 9352 bytes
-rw-r--r--sphinx/locale/nl/LC_MESSAGES/sphinx.po322
-rw-r--r--sphinx/locale/pl/LC_MESSAGES/sphinx.mobin9370 -> 11024 bytes
-rw-r--r--sphinx/locale/pl/LC_MESSAGES/sphinx.po345
-rw-r--r--sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mobin10252 -> 10252 bytes
-rw-r--r--sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po317
-rw-r--r--sphinx/locale/ru/LC_MESSAGES/sphinx.mobin11308 -> 11308 bytes
-rw-r--r--sphinx/locale/ru/LC_MESSAGES/sphinx.po238
-rw-r--r--sphinx/locale/sl/LC_MESSAGES/sphinx.mobin9146 -> 9146 bytes
-rw-r--r--sphinx/locale/sl/LC_MESSAGES/sphinx.po238
-rw-r--r--sphinx/locale/sphinx.pot236
-rw-r--r--sphinx/locale/sv/LC_MESSAGES/sphinx.js1
-rw-r--r--sphinx/locale/sv/LC_MESSAGES/sphinx.mobin0 -> 9509 bytes
-rw-r--r--sphinx/locale/sv/LC_MESSAGES/sphinx.po780
-rw-r--r--sphinx/locale/tr/LC_MESSAGES/sphinx.mobin10111 -> 10111 bytes
-rw-r--r--sphinx/locale/tr/LC_MESSAGES/sphinx.po306
-rw-r--r--sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mobin10983 -> 10983 bytes
-rw-r--r--sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po239
-rw-r--r--sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mobin8755 -> 8755 bytes
-rw-r--r--sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po238
-rw-r--r--sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mobin8934 -> 8934 bytes
-rw-r--r--sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po241
-rw-r--r--sphinx/pycode/__init__.py6
-rw-r--r--sphinx/pycode/nodes.py2
-rw-r--r--sphinx/pycode/pgen2/literals.py2
-rw-r--r--sphinx/pycode/pgen2/tokenize.py4
-rw-r--r--sphinx/quickstart.py143
-rw-r--r--sphinx/roles.py35
-rw-r--r--sphinx/setup_command.py3
-rw-r--r--sphinx/themes/basic/layout.html45
-rw-r--r--sphinx/themes/basic/searchresults.html36
-rw-r--r--sphinx/themes/basic/static/ajax-loader.gifbin0 -> 673 bytes
-rw-r--r--sphinx/themes/basic/static/comment-bright.pngbin0 -> 3500 bytes
-rw-r--r--sphinx/themes/basic/static/comment-close.pngbin0 -> 3578 bytes
-rw-r--r--sphinx/themes/basic/static/comment.pngbin0 -> 3445 bytes
-rw-r--r--sphinx/themes/basic/static/down-pressed.pngbin0 -> 368 bytes
-rw-r--r--sphinx/themes/basic/static/down.pngbin0 -> 363 bytes
-rw-r--r--sphinx/themes/basic/static/up-pressed.pngbin0 -> 372 bytes
-rw-r--r--sphinx/themes/basic/static/up.pngbin0 -> 363 bytes
-rw-r--r--sphinx/themes/basic/static/websupport.js808
-rw-r--r--sphinx/themes/default/static/sidebar.js3
-rw-r--r--sphinx/themes/epub/epub-cover.html24
-rw-r--r--sphinx/theming.py25
-rw-r--r--sphinx/util/__init__.py75
-rw-r--r--sphinx/util/docstrings.py32
-rw-r--r--sphinx/util/jsdump.py4
-rw-r--r--sphinx/util/jsonimpl.py2
-rw-r--r--sphinx/util/matching.py11
-rw-r--r--sphinx/util/nodes.py57
-rw-r--r--sphinx/util/osutil.py16
-rw-r--r--sphinx/util/png.py14
-rw-r--r--sphinx/util/pycompat.py101
-rw-r--r--sphinx/util/websupport.py12
-rw-r--r--sphinx/versioning.py128
-rw-r--r--sphinx/websupport/__init__.py455
-rw-r--r--sphinx/websupport/errors.py26
-rw-r--r--sphinx/websupport/search/__init__.py121
-rw-r--r--sphinx/websupport/search/nullsearch.py24
-rw-r--r--sphinx/websupport/search/whooshsearch.py59
-rw-r--r--sphinx/websupport/search/xapiansearch.py81
-rw-r--r--sphinx/websupport/storage/__init__.py115
-rw-r--r--sphinx/websupport/storage/differ.py85
-rw-r--r--sphinx/websupport/storage/sqlalchemy_db.py208
-rw-r--r--sphinx/websupport/storage/sqlalchemystorage.py177
-rw-r--r--sphinx/writers/html.py34
-rw-r--r--sphinx/writers/latex.py24
-rw-r--r--sphinx/writers/texinfo.py1217
-rw-r--r--sphinx/writers/text.py6
-rw-r--r--sphinx/writers/websupport.py46
-rw-r--r--tests/etree13/ElementTree.py14
-rw-r--r--tests/path.py1021
-rw-r--r--tests/root/bom.po12
-rw-r--r--tests/root/conf.py7
-rw-r--r--tests/root/contents.txt1
-rw-r--r--tests/root/doctest.txt47
-rw-r--r--tests/root/literal.inc2
-rw-r--r--tests/root/markup.txt2
-rw-r--r--tests/root/subdir.po9
-rw-r--r--tests/root/versioning/added.txt20
-rw-r--r--tests/root/versioning/deleted.txt12
-rw-r--r--tests/root/versioning/deleted_end.txt11
-rw-r--r--tests/root/versioning/index.txt13
-rw-r--r--tests/root/versioning/insert.txt18
-rw-r--r--tests/root/versioning/insert_beginning.txt18
-rw-r--r--tests/root/versioning/insert_similar.txt17
-rw-r--r--tests/root/versioning/modified.txt17
-rw-r--r--tests/root/versioning/original.txt15
-rwxr-xr-xtests/run.py16
-rw-r--r--tests/test_application.py2
-rw-r--r--tests/test_autodoc.py18
-rw-r--r--tests/test_autosummary.py4
-rw-r--r--tests/test_build_gettext.py81
-rw-r--r--tests/test_build_html.py10
-rw-r--r--tests/test_build_latex.py3
-rw-r--r--tests/test_build_texinfo.py61
-rw-r--r--tests/test_config.py17
-rw-r--r--tests/test_coverage.py2
-rw-r--r--tests/test_doctest.py10
-rw-r--r--tests/test_env.py10
-rw-r--r--tests/test_intersphinx.py17
-rw-r--r--tests/test_intl.py60
-rw-r--r--tests/test_markup.py3
-rw-r--r--tests/test_quickstart.py35
-rw-r--r--tests/test_search.py3
-rw-r--r--tests/test_searchadapters.py79
-rw-r--r--tests/test_versioning.py114
-rw-r--r--tests/test_websupport.py279
-rw-r--r--tests/util.py48
-rwxr-xr-xutils/check_sources.py115
-rw-r--r--utils/convert.py43
-rwxr-xr-xutils/reindent.py80
217 files changed, 13546 insertions, 5376 deletions
diff --git a/.hgignore b/.hgignore
index 70ea36a5..45ecebc3 100644
--- a/.hgignore
+++ b/.hgignore
@@ -15,3 +15,7 @@
^env/
\.DS_Store$
~$
+^utils/.*3\.py$
+^distribute-
+^tests/root/_build/*
+^tests/root/generated/*
diff --git a/AUTHORS b/AUTHORS
index 10120c7b..04987b60 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -15,12 +15,14 @@ Other contributors, listed alphabetically, are:
* Martin Hans -- autodoc improvements
* Dave Kuhlman -- original LaTeX writer
* Thomas Lamb -- linkcheck builder
+* Robert Lehmann -- gettext builder (GSOC project)
* Dan MacKinlay -- metadata fixes
* Martin Mahner -- nature theme
* Will Maier -- directory HTML builder
+* Jacob Mason -- websupport library (GSOC project)
* Roland Meister -- epub builder
* Ezio Melotti -- collapsible sidebar JavaScript
-* Daniel Neuhäuser -- JavaScript domain
+* Daniel Neuhäuser -- JavaScript domain, Python 3 support (GSOC)
* Christopher Perkins -- autosummary integration
* Benjamin Peterson -- unittests
* T. Powers -- HTML output improvements
@@ -28,6 +30,7 @@ Other contributors, listed alphabetically, are:
* Antonio Valentino -- qthelp builder
* Pauli Virtanen -- autodoc improvements, autosummary extension
* Stefan van der Walt -- autosummary extension
+* John Waltman -- Texinfo builder
* Barry Warsaw -- setup command improvements
* Sebastian Wiesner -- image handling, distutils support
diff --git a/CHANGES b/CHANGES
index 7e4de2d2..abe2bdd2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,48 @@
+Release 1.1 (in development)
+============================
+
+* Added Python 3.x support.
+
+* Added a Texinfo builder.
+
+* Added i18n support for content, a ``gettext`` builder and
+ related utilities.
+
+* Added the ``websupport`` library.
+
+* #460: Allow limiting the depth of section numbers for HTML.
+
+* #564: Add :confval:`autodoc_docstring_signature` which retrieves
+ the signature from the first line of the docstring, if it is
+ found there.
+
+* #176: Provide ``private-members`` option for autodoc directives.
+
+* #520: Provide ``special-members`` option for autodoc directives.
+
+* #138: Add an ``index`` role, to make inline index entries.
+
+* #443: Allow referencing external graphviz files.
+
+* #472: linkcheck builder: Check links in parallel, use HTTP HEAD
+ requests and allow configuring the timeout. New config values:
+ :confval:`linkcheck_timeout` and :confval:`linkcheck_workers`.
+
+* #221: Add Swedish locale.
+
+* Added ``inline`` option to graphviz directives, and fixed the
+ default (block-style) in LaTeX output.
+
+* #521: Added :confval:`linkcheck_ignore` config value.
+
+* #526: Added Iranian translation.
+
+* #559: :confval:`html_add_permalinks` is now a string giving the
+ text to display in permalinks.
+
+* #553: Added :rst:dir:`testcleanup` blocks in the doctest extension.
+
+
Release 1.0.6 (in development)
==============================
diff --git a/EXAMPLES b/EXAMPLES
index 1a161660..0dab0046 100644
--- a/EXAMPLES
+++ b/EXAMPLES
@@ -25,6 +25,7 @@ Documentation using the default theme
* gevent: http://www.gevent.org/
* Google Wave API: http://wave-robot-python-client.googlecode.com/svn/trunk/pydocs/index.html
* GSL Shell: http://www.nongnu.org/gsl-shell/
+* Heapkeeper: http://heapkeeper.org/
* Hedge: http://documen.tician.de/hedge/
* Kaa: http://doc.freevo.org/api/kaa/
* MeshPy: http://documen.tician.de/meshpy/
diff --git a/MANIFEST.in b/MANIFEST.in
index 25cbc334..cfc44c17 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -7,7 +7,7 @@ include TODO
include babel.cfg
include Makefile
-include ez_setup.py
+include distribute_setup.py
include sphinx-autogen.py
include sphinx-build.py
include sphinx-quickstart.py
diff --git a/Makefile b/Makefile
index 7057a715..09aa3c96 100644
--- a/Makefile
+++ b/Makefile
@@ -1,36 +1,63 @@
PYTHON ?= python
-export PYTHONPATH = $(shell echo "$$PYTHONPATH"):./sphinx
+.PHONY: all check clean clean-pyc clean-patchfiles clean-backupfiles \
+ clean-generated pylint reindent test covertest build convert-utils
-.PHONY: all check clean clean-pyc clean-patchfiles pylint reindent test
+DONT_CHECK = -i build -i dist -i sphinx/style/jquery.js \
+ -i sphinx/pycode/pgen2 -i sphinx/util/smartypants.py \
+ -i .ropeproject -i doc/_build -i tests/path.py \
+ -i tests/coverage.py -i env -i utils/convert.py \
+ -i utils/reindent3.py -i utils/check_sources3.py -i .tox
-all: clean-pyc check test
+all: clean-pyc clean-backupfiles check test
+ifeq ($(PYTHON), python3)
+check: convert-utils
+ @$(PYTHON) utils/check_sources3.py $(DONT_CHECK) .
+else
check:
- @$(PYTHON) utils/check_sources.py -i build -i dist -i sphinx/style/jquery.js \
- -i sphinx/pycode/pgen2 -i sphinx/util/smartypants.py -i .ropeproject \
- -i doc/_build -i ez_setup.py -i tests/path.py -i tests/coverage.py \
- -i env -i .tox .
+ @$(PYTHON) utils/check_sources.py $(DONT_CHECK) .
+endif
-clean: clean-pyc clean-patchfiles
+clean: clean-pyc clean-patchfiles clean-backupfiles clean-generated
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
- find . -name '*~' -exec rm -f {} +
clean-patchfiles:
find . -name '*.orig' -exec rm -f {} +
find . -name '*.rej' -exec rm -f {} +
+clean-backupfiles:
+ find . -name '*~' -exec rm -f {} +
+ find . -name '*.bak' -exec rm -f {} +
+
+clean-generated:
+ rm -f utils/*3.py*
+
pylint:
@pylint --rcfile utils/pylintrc sphinx
+ifeq ($(PYTHON), python3)
+reindent: convert-utils
+ @$(PYTHON) utils/reindent3.py -r -n .
+else
reindent:
- @$(PYTHON) utils/reindent.py -r -B .
+ @$(PYTHON) utils/reindent.py -r -n .
+endif
-test:
+test: build
@cd tests; $(PYTHON) run.py -d -m '^[tT]est' $(TEST)
-covertest:
- @cd tests; $(PYTHON) run.py -d -m '^[tT]est' --with-coverage --cover-package=sphinx $(TEST)
+covertest: build
+ @cd tests; $(PYTHON) run.py -d -m '^[tT]est' --with-coverage \
+ --cover-package=sphinx $(TEST)
+
+build:
+ @$(PYTHON) setup.py build
+
+ifeq ($(PYTHON), python3)
+convert-utils:
+ @python3 utils/convert.py -i utils/convert.py utils/
+endif
diff --git a/README b/README
index bb2dea9d..e31d6b93 100644
--- a/README
+++ b/README
@@ -26,6 +26,18 @@ Then, direct your browser to ``_build/html/index.html``.
Or read them online at <http://sphinx.pocoo.org/>.
+Testing
+=======
+
+To run the tests with the interpreter available as ``python``, use::
+
+ make test
+
+If you want to use a different interpreter, e.g. ``python3``, use::
+
+ PYTHON=python3 make test
+
+
Contributing
============
diff --git a/custom_fixers/__init__.py b/custom_fixers/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/custom_fixers/__init__.py
diff --git a/custom_fixers/fix_alt_unicode.py b/custom_fixers/fix_alt_unicode.py
new file mode 100644
index 00000000..55175e90
--- /dev/null
+++ b/custom_fixers/fix_alt_unicode.py
@@ -0,0 +1,12 @@
+from lib2to3.fixer_base import BaseFix
+from lib2to3.fixer_util import Name
+
+class FixAltUnicode(BaseFix):
+ PATTERN = """
+ func=funcdef< 'def' name='__unicode__'
+ parameters< '(' NAME ')' > any+ >
+ """
+
+ def transform(self, node, results):
+ name = results['name']
+ name.replace(Name('__str__', prefix=name.prefix))
diff --git a/distribute_setup.py b/distribute_setup.py
new file mode 100644
index 00000000..37117b34
--- /dev/null
+++ b/distribute_setup.py
@@ -0,0 +1,485 @@
+#!python
+"""Bootstrap distribute installation
+
+If you want to use setuptools in your package's setup.py, just include this
+file in the same directory with it, and add this to the top of your setup.py::
+
+ from distribute_setup import use_setuptools
+ use_setuptools()
+
+If you want to require a specific version of setuptools, set a download
+mirror, or use an alternate download directory, you can do so by supplying
+the appropriate options to ``use_setuptools()``.
+
+This file can also be run as a script to install or upgrade setuptools.
+"""
+import os
+import sys
+import time
+import fnmatch
+import tempfile
+import tarfile
+from distutils import log
+
+try:
+ from site import USER_SITE
+except ImportError:
+ USER_SITE = None
+
+try:
+ import subprocess
+
+ def _python_cmd(*args):
+ args = (sys.executable,) + args
+ return subprocess.call(args) == 0
+
+except ImportError:
+ # will be used for python 2.3
+ def _python_cmd(*args):
+ args = (sys.executable,) + args
+ # quoting arguments if windows
+ if sys.platform == 'win32':
+ def quote(arg):
+ if ' ' in arg:
+ return '"%s"' % arg
+ return arg
+ args = [quote(arg) for arg in args]
+ return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
+
+DEFAULT_VERSION = "0.6.13"
+DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
+SETUPTOOLS_FAKED_VERSION = "0.6c11"
+
+SETUPTOOLS_PKG_INFO = """\
+Metadata-Version: 1.0
+Name: setuptools
+Version: %s
+Summary: xxxx
+Home-page: xxx
+Author: xxx
+Author-email: xxx
+License: xxx
+Description: xxx
+""" % SETUPTOOLS_FAKED_VERSION
+
+
+def _install(tarball):
+ # extracting the tarball
+ tmpdir = tempfile.mkdtemp()
+ log.warn('Extracting in %s', tmpdir)
+ old_wd = os.getcwd()
+ try:
+ os.chdir(tmpdir)
+ tar = tarfile.open(tarball)
+ _extractall(tar)
+ tar.close()
+
+ # going in the directory
+ subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
+ os.chdir(subdir)
+ log.warn('Now working in %s', subdir)
+
+ # installing
+ log.warn('Installing Distribute')
+ if not _python_cmd('setup.py', 'install'):
+ log.warn('Something went wrong during the installation.')
+ log.warn('See the error message above.')
+ finally:
+ os.chdir(old_wd)
+
+
+def _build_egg(egg, tarball, to_dir):
+ # extracting the tarball
+ tmpdir = tempfile.mkdtemp()
+ log.warn('Extracting in %s', tmpdir)
+ old_wd = os.getcwd()
+ try:
+ os.chdir(tmpdir)
+ tar = tarfile.open(tarball)
+ _extractall(tar)
+ tar.close()
+
+ # going in the directory
+ subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
+ os.chdir(subdir)
+ log.warn('Now working in %s', subdir)
+
+ # building an egg
+ log.warn('Building a Distribute egg in %s', to_dir)
+ _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
+
+ finally:
+ os.chdir(old_wd)
+ # returning the result
+ log.warn(egg)
+ if not os.path.exists(egg):
+ raise IOError('Could not build the egg.')
+
+
+def _do_download(version, download_base, to_dir, download_delay):
+ egg = os.path.join(to_dir, 'distribute-%s-py%d.%d.egg'
+ % (version, sys.version_info[0], sys.version_info[1]))
+ if not os.path.exists(egg):
+ tarball = download_setuptools(version, download_base,
+ to_dir, download_delay)
+ _build_egg(egg, tarball, to_dir)
+ sys.path.insert(0, egg)
+ import setuptools
+ setuptools.bootstrap_install_from = egg
+
+
+def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
+ to_dir=os.curdir, download_delay=15, no_fake=True):
+ # making sure we use the absolute path
+ to_dir = os.path.abspath(to_dir)
+ was_imported = 'pkg_resources' in sys.modules or \
+ 'setuptools' in sys.modules
+ try:
+ try:
+ import pkg_resources
+ if not hasattr(pkg_resources, '_distribute'):
+ if not no_fake:
+ _fake_setuptools()
+ raise ImportError
+ except ImportError:
+ return _do_download(version, download_base, to_dir, download_delay)
+ try:
+ pkg_resources.require("distribute>="+version)
+ return
+ except pkg_resources.VersionConflict:
+ e = sys.exc_info()[1]
+ if was_imported:
+ sys.stderr.write(
+ "The required version of distribute (>=%s) is not available,\n"
+ "and can't be installed while this script is running. Please\n"
+ "install a more recent version first, using\n"
+ "'easy_install -U distribute'."
+ "\n\n(Currently using %r)\n" % (version, e.args[0]))
+ sys.exit(2)
+ else:
+ del pkg_resources, sys.modules['pkg_resources'] # reload ok
+ return _do_download(version, download_base, to_dir,
+ download_delay)
+ except pkg_resources.DistributionNotFound:
+ return _do_download(version, download_base, to_dir,
+ download_delay)
+ finally:
+ if not no_fake:
+ _create_fake_setuptools_pkg_info(to_dir)
+
+def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
+ to_dir=os.curdir, delay=15):
+ """Download distribute from a specified location and return its filename
+
+ `version` should be a valid distribute version number that is available
+ as an egg for download under the `download_base` URL (which should end
+ with a '/'). `to_dir` is the directory where the egg will be downloaded.
+ `delay` is the number of seconds to pause before an actual download
+ attempt.
+ """
+ # making sure we use the absolute path
+ to_dir = os.path.abspath(to_dir)
+ try:
+ from urllib.request import urlopen
+ except ImportError:
+ from urllib2 import urlopen
+ tgz_name = "distribute-%s.tar.gz" % version
+ url = download_base + tgz_name
+ saveto = os.path.join(to_dir, tgz_name)
+ src = dst = None
+ if not os.path.exists(saveto): # Avoid repeated downloads
+ try:
+ log.warn("Downloading %s", url)
+ src = urlopen(url)
+ # Read/write all in one block, so we don't create a corrupt file
+ # if the download is interrupted.
+ data = src.read()
+ dst = open(saveto, "wb")
+ dst.write(data)
+ finally:
+ if src:
+ src.close()
+ if dst:
+ dst.close()
+ return os.path.realpath(saveto)
+
+def _no_sandbox(function):
+ def __no_sandbox(*args, **kw):
+ try:
+ from setuptools.sandbox import DirectorySandbox
+ if not hasattr(DirectorySandbox, '_old'):
+ def violation(*args):
+ pass
+ DirectorySandbox._old = DirectorySandbox._violation
+ DirectorySandbox._violation = violation
+ patched = True
+ else:
+ patched = False
+ except ImportError:
+ patched = False
+
+ try:
+ return function(*args, **kw)
+ finally:
+ if patched:
+ DirectorySandbox._violation = DirectorySandbox._old
+ del DirectorySandbox._old
+
+ return __no_sandbox
+
+def _patch_file(path, content):
+ """Will backup the file then patch it"""
+ existing_content = open(path).read()
+ if existing_content == content:
+ # already patched
+ log.warn('Already patched.')
+ return False
+ log.warn('Patching...')
+ _rename_path(path)
+ f = open(path, 'w')
+ try:
+ f.write(content)
+ finally:
+ f.close()
+ return True
+
+_patch_file = _no_sandbox(_patch_file)
+
+def _same_content(path, content):
+ return open(path).read() == content
+
+def _rename_path(path):
+ new_name = path + '.OLD.%s' % time.time()
+ log.warn('Renaming %s into %s', path, new_name)
+ os.rename(path, new_name)
+ return new_name
+
+def _remove_flat_installation(placeholder):
+ if not os.path.isdir(placeholder):
+ log.warn('Unkown installation at %s', placeholder)
+ return False
+ found = False
+ for file in os.listdir(placeholder):
+ if fnmatch.fnmatch(file, 'setuptools*.egg-info'):
+ found = True
+ break
+ if not found:
+ log.warn('Could not locate setuptools*.egg-info')
+ return
+
+ log.warn('Removing elements out of the way...')
+ pkg_info = os.path.join(placeholder, file)
+ if os.path.isdir(pkg_info):
+ patched = _patch_egg_dir(pkg_info)
+ else:
+ patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO)
+
+ if not patched:
+ log.warn('%s already patched.', pkg_info)
+ return False
+ # now let's move the files out of the way
+ for element in ('setuptools', 'pkg_resources.py', 'site.py'):
+ element = os.path.join(placeholder, element)
+ if os.path.exists(element):
+ _rename_path(element)
+ else:
+ log.warn('Could not find the %s element of the '
+ 'Setuptools distribution', element)
+ return True
+
+_remove_flat_installation = _no_sandbox(_remove_flat_installation)
+
+def _after_install(dist):
+ log.warn('After install bootstrap.')
+ placeholder = dist.get_command_obj('install').install_purelib
+ _create_fake_setuptools_pkg_info(placeholder)
+
+def _create_fake_setuptools_pkg_info(placeholder):
+ if not placeholder or not os.path.exists(placeholder):
+ log.warn('Could not find the install location')
+ return
+ pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1])
+ setuptools_file = 'setuptools-%s-py%s.egg-info' % \
+ (SETUPTOOLS_FAKED_VERSION, pyver)
+ pkg_info = os.path.join(placeholder, setuptools_file)
+ if os.path.exists(pkg_info):
+ log.warn('%s already exists', pkg_info)
+ return
+
+ log.warn('Creating %s', pkg_info)
+ f = open(pkg_info, 'w')
+ try:
+ f.write(SETUPTOOLS_PKG_INFO)
+ finally:
+ f.close()
+
+ pth_file = os.path.join(placeholder, 'setuptools.pth')
+ log.warn('Creating %s', pth_file)
+ f = open(pth_file, 'w')
+ try:
+ f.write(os.path.join(os.curdir, setuptools_file))
+ finally:
+ f.close()
+
+_create_fake_setuptools_pkg_info = _no_sandbox(_create_fake_setuptools_pkg_info)
+
+def _patch_egg_dir(path):
+ # let's check if it's already patched
+ pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
+ if os.path.exists(pkg_info):
+ if _same_content(pkg_info, SETUPTOOLS_PKG_INFO):
+ log.warn('%s already patched.', pkg_info)
+ return False
+ _rename_path(path)
+ os.mkdir(path)
+ os.mkdir(os.path.join(path, 'EGG-INFO'))
+ pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
+ f = open(pkg_info, 'w')
+ try:
+ f.write(SETUPTOOLS_PKG_INFO)
+ finally:
+ f.close()
+ return True
+
+_patch_egg_dir = _no_sandbox(_patch_egg_dir)
+
+def _before_install():
+ log.warn('Before install bootstrap.')
+ _fake_setuptools()
+
+
+def _under_prefix(location):
+ if 'install' not in sys.argv:
+ return True
+ args = sys.argv[sys.argv.index('install')+1:]
+ for index, arg in enumerate(args):
+ for option in ('--root', '--prefix'):
+ if arg.startswith('%s=' % option):
+ top_dir = arg.split('root=')[-1]
+ return location.startswith(top_dir)
+ elif arg == option:
+ if len(args) > index:
+ top_dir = args[index+1]
+ return location.startswith(top_dir)
+ if arg == '--user' and USER_SITE is not None:
+ return location.startswith(USER_SITE)
+ return True
+
+
+def _fake_setuptools():
+ log.warn('Scanning installed packages')
+ try:
+ import pkg_resources
+ except ImportError:
+ # we're cool
+ log.warn('Setuptools or Distribute does not seem to be installed.')
+ return
+ ws = pkg_resources.working_set
+ try:
+ setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools',
+ replacement=False))
+ except TypeError:
+ # old distribute API
+ setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools'))
+
+ if setuptools_dist is None:
+ log.warn('No setuptools distribution found')
+ return
+ # detecting if it was already faked
+ setuptools_location = setuptools_dist.location
+ log.warn('Setuptools installation detected at %s', setuptools_location)
+
+ # if --root or --preix was provided, and if
+ # setuptools is not located in them, we don't patch it
+ if not _under_prefix(setuptools_location):
+ log.warn('Not patching, --root or --prefix is installing Distribute'
+ ' in another location')
+ return
+
+ # let's see if its an egg
+ if not setuptools_location.endswith('.egg'):
+ log.warn('Non-egg installation')
+ res = _remove_flat_installation(setuptools_location)
+ if not res:
+ return
+ else:
+ log.warn('Egg installation')
+ pkg_info = os.path.join(setuptools_location, 'EGG-INFO', 'PKG-INFO')
+ if (os.path.exists(pkg_info) and
+ _same_content(pkg_info, SETUPTOOLS_PKG_INFO)):
+ log.warn('Already patched.')
+ return
+ log.warn('Patching...')
+ # let's create a fake egg replacing setuptools one
+ res = _patch_egg_dir(setuptools_location)
+ if not res:
+ return
+ log.warn('Patched done.')
+ _relaunch()
+
+
+def _relaunch():
+ log.warn('Relaunching...')
+ # we have to relaunch the process
+ # pip marker to avoid a relaunch bug
+ if sys.argv[:3] == ['-c', 'install', '--single-version-externally-managed']:
+ sys.argv[0] = 'setup.py'
+ args = [sys.executable] + sys.argv
+ sys.exit(subprocess.call(args))
+
+
+def _extractall(self, path=".", members=None):
+ """Extract all members from the archive to the current working
+ directory and set owner, modification time and permissions on
+ directories afterwards. `path' specifies a different directory
+ to extract to. `members' is optional and must be a subset of the
+ list returned by getmembers().
+ """
+ import copy
+ import operator
+ from tarfile import ExtractError
+ directories = []
+
+ if members is None:
+ members = self
+
+ for tarinfo in members:
+ if tarinfo.isdir():
+ # Extract directories with a safe mode.
+ directories.append(tarinfo)
+ tarinfo = copy.copy(tarinfo)
+ tarinfo.mode = 448 # decimal for oct 0700
+ self.extract(tarinfo, path)
+
+ # Reverse sort directories.
+ if sys.version_info < (2, 4):
+ def sorter(dir1, dir2):
+ return cmp(dir1.name, dir2.name)
+ directories.sort(sorter)
+ directories.reverse()
+ else:
+ directories.sort(key=operator.attrgetter('name'), reverse=True)
+
+ # Set correct owner, mtime and filemode on directories.
+ for tarinfo in directories:
+ dirpath = os.path.join(path, tarinfo.name)
+ try:
+ self.chown(tarinfo, dirpath)
+ self.utime(tarinfo, dirpath)
+ self.chmod(tarinfo, dirpath)
+ except ExtractError:
+ e = sys.exc_info()[1]
+ if self.errorlevel > 1:
+ raise
+ else:
+ self._dbg(1, "tarfile: %s" % e)
+
+
+def main(argv, version=DEFAULT_VERSION):
+ """Install or upgrade setuptools and EasyInstall"""
+ tarball = download_setuptools()
+ _install(tarball)
+
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
diff --git a/doc/Makefile b/doc/Makefile
index 90fb5af2..0199ba47 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -29,6 +29,9 @@ help:
@echo " epub to make an epub file"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run pdflatex"
+ @echo " texinfo to make Texinfo files"
+ @echo " info to make Texinfo files and run them through makeinfo"
+ @echo " gettext to make PO message catalogs"
@echo " changes to make an overview over all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@@ -112,6 +115,11 @@ latexpdf:
make -C _build/latex all-pdf
@echo "pdflatex finished; the PDF files are in _build/latex."
+gettext:
+ $(SPHINXBUILD) -b gettext $(ALLSPHINXOPTS) _build/locale
+ @echo
+ @echo "Build finished. The message catalogs are in _build/locale."
+
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
@echo
@@ -125,3 +133,16 @@ linkcheck:
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
+
+texinfo:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) _build/texinfo
+ @echo
+ @echo "Build finished. The Texinfo files are in _build/texinfo."
+ @echo "Run \`make' in that directory to run these through makeinfo" \
+ "(use \`make info' here to do that automatically)."
+
+info:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) _build/texinfo
+ @echo "Running Texinfo files through makeinfo..."
+ make -C _build/texinfo info
+ @echo "makeinfo finished; the Info files are in _build/texinfo."
diff --git a/doc/builders.rst b/doc/builders.rst
index 80203e75..4a95e120 100644
--- a/doc/builders.rst
+++ b/doc/builders.rst
@@ -144,6 +144,26 @@ Note that a direct PDF builder using ReportLab is available in `rst2pdf
.. versionadded:: 1.0
+
+.. module:: sphinx.builders.texinfo
+.. class:: TexinfoBuilder
+
+ This builder produces Texinfo files that can be processed into Info files by
+ the :program:`makeinfo` program. You have to specify which documents are to
+ be included in which Texinfo files via the :confval:`texinfo_documents`
+ configuration value.
+
+ The Info format is the basis of the on-line help system used by GNU Emacs and
+ the terminal-based program :program:`info`. See :ref:`texinfo-faq` for more
+ details. The Texinfo format is the official documentation system used by the
+ GNU project. More information on Texinfo can be found at
+ `<http://www.gnu.org/software/texinfo/>`_.
+
+ Its name is ``texinfo``.
+
+ .. versionadded:: 1.1
+
+
.. currentmodule:: sphinx.builders.html
.. class:: SerializingHTMLBuilder
@@ -220,6 +240,18 @@ Note that a direct PDF builder using ReportLab is available in `rst2pdf
.. versionadded:: 0.5
+.. module:: sphinx.builders.intl
+.. class:: MessageCatalogBuilder
+
+ This builder produces gettext-style message catalos. Each top-level file or
+ subdirectory grows a single ``.pot`` catalog template.
+
+ See the documentation on :ref:`intl` for further reference.
+
+ Its name is ``gettext``.
+
+ .. versionadded:: 1.1
+
.. module:: sphinx.builders.changes
.. class:: ChangesBuilder
diff --git a/doc/conf.py b/doc/conf.py
index aecd4f6d..6322f794 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -63,6 +63,12 @@ man_pages = [
'template generator', '', 1),
]
+texinfo_documents = [
+ ('contents', 'sphinx', 'Sphinx Documentation', 'Georg Brandl',
+ 'Sphinx', 'The Sphinx documentation builder.', 'Documentation tools',
+ 1),
+]
+
# We're not using intersphinx right now, but if we did, this would be part of
# the mapping:
intersphinx_mapping = {'python': ('http://docs.python.org/dev', None)}
diff --git a/doc/config.rst b/doc/config.rst
index 80464768..992a714e 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -143,20 +143,6 @@ General configuration
.. deprecated:: 1.0
Use :confval:`exclude_patterns` instead.
-.. confval:: locale_dirs
-
- .. versionadded:: 0.5
-
- Directories in which to search for additional Sphinx message catalogs (see
- :confval:`language`), relative to the source directory. The directories on
- this path are searched by the standard :mod:`gettext` module for a text
- domain of ``sphinx``; so if you add the directory :file:`./locale` to this
- settting, the message catalogs (compiled from ``.po`` format using
- :program:`msgfmt`) must be in
- :file:`./locale/{language}/LC_MESSAGES/sphinx.mo`.
-
- The default is ``[]``.
-
.. confval:: templates_path
A list of paths that contain extra templates (or templates that overwrite
@@ -272,39 +258,6 @@ Project information
If you don't need the separation provided between :confval:`version` and
:confval:`release`, just set them both to the same value.
-.. confval:: language
-
- The code for the language the docs are written in. Any text automatically
- generated by Sphinx will be in that language. Also, in the LaTeX builder, a
- suitable language will be selected as an option for the *Babel* package.
- Default is ``None``, which means that no translation will be done.
-
- .. versionadded:: 0.5
-
- Currently supported languages are:
-
- * ``bn`` -- Bengali
- * ``ca`` -- Catalan
- * ``cs`` -- Czech
- * ``da`` -- Danish
- * ``de`` -- German
- * ``en`` -- English
- * ``es`` -- Spanish
- * ``fi`` -- Finnish
- * ``fr`` -- French
- * ``hr`` -- Croatian
- * ``it`` -- Italian
- * ``lt`` -- Lithuanian
- * ``nl`` -- Dutch
- * ``pl`` -- Polish
- * ``pt_BR`` -- Brazilian Portuguese
- * ``ru`` -- Russian
- * ``sl`` -- Slovenian
- * ``tr`` -- Turkish
- * ``uk_UA`` -- Ukrainian
- * ``zh_CN`` -- Simplified Chinese
- * ``zh_TW`` -- Traditional Chinese
-
.. confval:: today
today_fmt
@@ -380,6 +333,69 @@ Project information
.. versionadded:: 1.0
+.. _intl-options:
+
+Options for internationalization
+--------------------------------
+
+These options influence Sphinx' *Native Language Support*. See the
+documentation on :ref:`intl` for details.
+
+.. confval:: language
+
+ The code for the language the docs are written in. Any text automatically
+ generated by Sphinx will be in that language. Also, Sphinx will try to
+ substitute individual paragraphs from your documents with the translation
+ sets obtained from :confval:`locale_dirs`. In the LaTeX builder, a suitable
+ language will be selected as an option for the *Babel* package. Default is
+ ``None``, which means that no translation will be done.
+
+ .. versionadded:: 0.5
+
+ Currently supported languages by Sphinx are:
+
+ * ``bn`` -- Bengali
+ * ``ca`` -- Catalan
+ * ``cs`` -- Czech
+ * ``da`` -- Danish
+ * ``de`` -- German
+ * ``en`` -- English
+ * ``es`` -- Spanish
+ * ``fa`` -- Iranian
+ * ``fi`` -- Finnish
+ * ``fr`` -- French
+ * ``hr`` -- Croatian
+ * ``it`` -- Italian
+ * ``lt`` -- Lithuanian
+ * ``nl`` -- Dutch
+ * ``pl`` -- Polish
+ * ``pt_BR`` -- Brazilian Portuguese
+ * ``ru`` -- Russian
+ * ``sl`` -- Slovenian
+ * ``sv`` -- Swedish
+ * ``tr`` -- Turkish
+ * ``uk_UA`` -- Ukrainian
+ * ``zh_CN`` -- Simplified Chinese
+ * ``zh_TW`` -- Traditional Chinese
+
+.. confval:: locale_dirs
+
+ .. versionadded:: 0.5
+
+ Directories in which to search for additional message catalogs (see
+ :confval:`language`), relative to the source directory. The directories on
+ this path are searched by the standard :mod:`gettext` module.
+
+ Internal messages are fetched from a text domain of ``sphinx``; so if you
+ add the directory :file:`./locale` to this settting, the message catalogs
+ (compiled from ``.po`` format using :program:`msgfmt`) must be in
+ :file:`./locale/{language}/LC_MESSAGES/sphinx.mo`. The text domain of
+ individual documents depends on their docname if they are top-level project
+ files and on their base directory otherwise.
+
+ The default is ``[]``.
+
+
.. _html-options:
Options for HTML output
@@ -483,13 +499,19 @@ that use Sphinx' HTMLWriter class.
.. confval:: html_add_permalinks
- If true, Sphinx will add "permalinks" for each heading and description
- environment as paragraph signs that become visible when the mouse hovers over
- them. Default: ``True``.
+ Sphinx will add "permalinks" for each heading and description environment as
+ paragraph signs that become visible when the mouse hovers over them.
+
+ This value determines the text for the permalink; it defaults to ``"¶"``.
+ Set it to ``None`` or the empty string to disable permalinks.
.. versionadded:: 0.6
Previously, this was always activated.
+ .. versionchanged:: 1.1
+ This can now be a string to select the actual text of the link.
+ Previously, only boolean values were accepted.
+
.. confval:: html_sidebars
Custom sidebar templates, must be a dictionary that maps document names to
@@ -743,6 +765,22 @@ the `Dublin Core metadata <http://dublincore.org/>`_.
A unique identifier for the document. This is put in the Dublin Core
metadata. You may use a random string. The default value is ``'unknown'``.
+.. confval:: epub_cover
+
+ The cover page information. This is a tuple containing the filenames of
+ the cover image and the html template. The rendered html cover page is
+ inserted as the first item in the spine in :file:`content.opf`. If the
+ template filename is empty, no html cover page is created. No cover at all
+ is created if the tuple is empty. Examples::
+
+ epub_cover = ('_static/cover.png', 'epub-cover.html')
+ epub_cover = ('_static/cover.png', '')
+ epub_cover = ()
+
+ The default value is ``()``.
+
+ .. versionadded:: 1.1
+
.. confval:: epub_pre_files
Additional files that should be inserted before the text generated by
@@ -1000,15 +1038,116 @@ These options influence manual page output.
well as the name of the manual page (in the NAME section).
* *description*: description of the manual page. This is used in the NAME
section.
- * *authors*: A list of strings with authors, or a single string. Can be
- an empty string or list if you do not want to automatically generate
- an AUTHORS section in the manual page.
+ * *authors*: A list of strings with authors, or a single string. Can be an
+ empty string or list if you do not want to automatically generate an
+ AUTHORS section in the manual page.
* *section*: The manual page section. Used for the output file name as well
as in the manual page header.
.. versionadded:: 1.0
+.. _texinfo-options:
+
+Options for Texinfo output
+--------------------------
+
+These options influence Texinfo output.
+
+.. confval:: texinfo_documents
+
+ This value determines how to group the document tree into Texinfo source
+ files. It must be a list of tuples ``(startdocname, targetname, title,
+ author, dir_entry, description, category, toctree_only)``, where the items
+ are:
+
+ * *startdocname*: document name that is the "root" of the Texinfo file. All
+ documents referenced by it in TOC trees will be included in the Texinfo
+ file too. (If you want only one Texinfo file, use your
+ :confval:`master_doc` here.)
+ * *targetname*: file name (no extension) of the Texinfo file in the output
+ directory.
+ * *title*: Texinfo document title. Can be empty to use the title of the
+ *startdoc*.
+ * *author*: Author for the Texinfo document. Use ``\and`` to separate
+ multiple authors, as in: ``'John \and Sarah'``.
+ * *dir_entry*: The name that will appear in the top-level ``DIR`` menu file.
+ * *description*: Descriptive text to appear in the top-level ``DIR`` menu
+ file.
+ * *category*: Specifies the section which this entry will appear in the
+ top-level ``DIR`` menu file.
+ * *toctree_only*: Must be ``True`` or ``False``. If ``True``, the *startdoc*
+ document itself is not included in the output, only the documents
+ referenced by it via TOC trees. With this option, you can put extra stuff
+ in the master document that shows up in the HTML, but not the Texinfo
+ output.
+
+ .. versionadded:: 1.1
+
+
+.. confval:: texinfo_appendices
+
+ A list of document names to append as an appendix to all manuals.
+
+ .. versionadded:: 1.1
+
+
+.. confval:: texinfo_elements
+
+ A dictionary that contains Texinfo snippets that override those Sphinx
+ usually puts into the generated ``.texi`` files.
+
+ * Keys that you may want to override include:
+
+ ``'paragraphindent'``
+ Number of spaces to indent the first line of each paragraph, default
+ ``2``. Specify ``0`` for no indentation.
+
+ ``'exampleindent'``
+ Number of spaces to indent the lines for examples or literal blocks,
+ default ``4``. Specify ``0`` for no indentation.
+
+ ``'preamble'``
+ Text inserted as is near the beginning of the file.
+
+ * Keys that are set by other options and therefore should not be overridden
+ are:
+
+ ``'filename'``
+ ``'title'``
+ ``'direntry'``
+
+ .. versionadded:: 1.1
+
+
+Options for the linkcheck builder
+---------------------------------
+
+.. confval:: linkcheck_ignore
+
+ A list of regular expressions that match URIs that should not be checked
+ when doing a ``linkcheck`` build. Example::
+
+ linkcheck_ignore = [r'http://localhost:\d+/']
+
+ .. versionadded:: 1.1
+
+.. confval:: linkcheck_timeout
+
+ A timeout value, in seconds, for the linkcheck builder. **Only works in
+ Python 2.6 and higher.** The default is to use Python's global socket
+ timeout.
+
+ .. versionadded:: 1.1
+
+.. confval:: linkcheck_workers
+
+ The number of worker threads to use when checking links. Default is 5
+ threads.
+
+ .. versionadded:: 1.1
+
+
.. rubric:: Footnotes
.. [1] A note on available globbing syntax: you can use the standard shell
diff --git a/doc/contents.rst b/doc/contents.rst
index 079f93f2..3bbc2835 100644
--- a/doc/contents.rst
+++ b/doc/contents.rst
@@ -14,9 +14,11 @@ Sphinx documentation contents
domains
builders
config
+ intl
theming
templating
extensions
+ websupport
faq
glossary
diff --git a/doc/ext/appapi.rst b/doc/ext/appapi.rst
index 8f2a779b..bbe2070f 100644
--- a/doc/ext/appapi.rst
+++ b/doc/ext/appapi.rst
@@ -76,9 +76,9 @@ the following public API:
Node visitor functions for the Sphinx HTML, LaTeX, text and manpage writers
can be given as keyword arguments: the keyword must be one or more of
- ``'html'``, ``'latex'``, ``'text'``, ``'man'``, the value a 2-tuple of
- ``(visit, depart)`` methods. ``depart`` can be ``None`` if the ``visit``
- function raises :exc:`docutils.nodes.SkipNode`. Example:
+ ``'html'``, ``'latex'``, ``'text'``, ``'man'``, ``'texinfo'``, the value a
+ 2-tuple of ``(visit, depart)`` methods. ``depart`` can be ``None`` if the
+ ``visit`` function raises :exc:`docutils.nodes.SkipNode`. Example:
.. code-block:: python
diff --git a/doc/ext/autodoc.rst b/doc/ext/autodoc.rst
index a1d9d98f..6c4a147a 100644
--- a/doc/ext/autodoc.rst
+++ b/doc/ext/autodoc.rst
@@ -93,8 +93,8 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
.. autoclass:: Noodle
:members: eat, slurp
- * If you want to make the ``members`` option the default, see
- :confval:`autodoc_default_flags`.
+ * If you want to make the ``members`` option (or other flag options described
+ below) the default, see :confval:`autodoc_default_flags`.
* Members without docstrings will be left out, unless you give the
``undoc-members`` flag option::
@@ -103,6 +103,23 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
:members:
:undoc-members:
+ * "Private" members (that is, those named like ``_private`` or ``__private``)
+ will be included if the ``private-members`` flag option is given.
+
+ .. versionadded:: 1.1
+
+ * Python "special" members (that is, those named like ``__special__``) will
+ be included if the ``special-members`` flag option is given::
+
+ .. autoclass:: my.Class
+ :members:
+ :private-members:
+ :special-members:
+
+ would document both "private" and "special" members of the class.
+
+ .. versionadded:: 1.1
+
* For classes and exceptions, members inherited from base classes will be
left out, unless you give the ``inherited-members`` flag option, in
addition to ``members``::
@@ -152,8 +169,8 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
.. versionadded:: 0.5
- * :rst:dir:`automodule` and :rst:dir:`autoclass` also has an ``member-order`` option
- that can be used to override the global value of
+ * :rst:dir:`automodule` and :rst:dir:`autoclass` also has an ``member-order``
+ option that can be used to override the global value of
:confval:`autodoc_member_order` for one directive.
.. versionadded:: 0.6
@@ -173,9 +190,9 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
.. rst:directive:: autofunction
- autodata
- automethod
- autoattribute
+ autodata
+ automethod
+ autoattribute
These work exactly like :rst:dir:`autoclass` etc., but do not offer the options
used for automatic member documentation.
@@ -183,16 +200,23 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
For module data members and class attributes, documentation can either be put
into a special-formatted comment *before* the attribute definition, or in a
docstring *after* the definition. This means that in the following class
- definition, both attributes can be autodocumented::
+ definition, all attributes can be autodocumented::
class Foo:
"""Docstring for class Foo."""
- #: Doc comment for attribute Foo.bar.
+ #: Doc comment for class attribute Foo.bar.
bar = 1
baz = 2
- """Docstring for attribute Foo.baz."""
+ """Docstring for class attribute Foo.baz."""
+
+ def __init__(self):
+ #: Doc comment for instance attribute qux.
+ self.qux = 3
+
+ self.spam = 4
+ """Docstring for instance attribute spam."""
.. versionchanged:: 0.6
:rst:dir:`autodata` and :rst:dir:`autoattribute` can now extract docstrings.
@@ -246,7 +270,8 @@ There are also new config values that you can set:
This value is a list of autodoc directive flags that should be automatically
applied to all autodoc directives. The supported flags are ``'members'``,
- ``'undoc-members'``, ``'inherited-members'`` and ``'show-inheritance'``.
+ ``'undoc-members'``, ``'private-members'``, ``'special-members'``,
+ ``'inherited-members'`` and ``'show-inheritance'``.
If you set one of these flags in this config value, you can use a negated
form, :samp:`'no-{flag}'`, in an autodoc directive, to disable it once.
@@ -260,6 +285,20 @@ There are also new config values that you can set:
.. versionadded:: 1.0
+.. confval:: autodoc_docstring_signature
+
+ Functions imported from C modules cannot be introspected, and therefore the
+ signature for such functions cannot be automatically determined. However, it
+ is an often-used convention to put the signature into the first line of the
+ function's docstring.
+
+ If this boolean value is set to ``True`` (which is the default), autodoc will
+ look at the first line of the docstring for functions and methods, and if it
+ looks like a signature, use the line as the signature and remove it from the
+ docstring content.
+
+ .. versionadded:: 1.1
+
Docstring preprocessing
-----------------------
diff --git a/doc/ext/doctest.rst b/doc/ext/doctest.rst
index 20e747de..c884a10d 100644
--- a/doc/ext/doctest.rst
+++ b/doc/ext/doctest.rst
@@ -45,6 +45,14 @@ names.
but executed before the doctests of the group(s) it belongs to.
+.. rst:directive:: .. testcleanup:: [group]
+
+ A cleanup code block. This code is not shown in the output for other
+ builders, but executed after the doctests of the group(s) it belongs to.
+
+ .. versionadded:: 1.1
+
+
.. rst:directive:: .. doctest:: [group]
A doctest-style code block. You can use standard :mod:`doctest` flags for
@@ -181,6 +189,14 @@ There are also these config values for customizing the doctest extension:
.. versionadded:: 0.6
+.. confval:: doctest_global_cleanup
+
+ Python code that is treated like it were put in a ``testcleanup`` directive
+ for *every* file that is tested, and for every group. You can use this to
+ e.g. remove any temporary files that the tests leave behind.
+
+ .. versionadded:: 1.1
+
.. confval:: doctest_test_doctest_blocks
If this is a nonempty string (the default is ``'default'``), standard reST
diff --git a/doc/ext/graphviz.rst b/doc/ext/graphviz.rst
index 3741cec6..3a6d7c30 100644
--- a/doc/ext/graphviz.rst
+++ b/doc/ext/graphviz.rst
@@ -29,6 +29,17 @@ It adds these directives:
:confval:`graphviz_output_format`). In LaTeX output, the code will be
rendered to an embeddable PDF file.
+ You can also embed external dot files, by giving the file name as an
+ argument to :rst:dir:`graphviz` and no additional content::
+
+ .. graphviz:: external.dot
+
+ As for all file references in Sphinx, if the filename is absolute, it is
+ taken as relative to the source directory.
+
+ .. versionchanged:: 1.1
+ Added support for external files.
+
.. rst:directive:: graph
@@ -61,6 +72,11 @@ It adds these directives:
alternate text for HTML output. If not given, the alternate text defaults to
the graphviz code.
+.. versionadded:: 1.1
+ All three directives support an ``inline`` flag that controls
+ paragraph breaks in the output. When set, the graph is inserted
+ into the current paragraph. If the flag is not given, paragraph
+ breaks are introduced before and after the image (the default).
There are also these new config values:
diff --git a/doc/faq.rst b/doc/faq.rst
index 5869e3af..c92067f0 100644
--- a/doc/faq.rst
+++ b/doc/faq.rst
@@ -60,10 +60,11 @@ PyPI
Sphinx documentation to the PyPI package documentation area at
http://packages.python.org/.
-github pages
- You can use `Michael Jones' sphinx-to-github tool
- <http://github.com/michaeljones/sphinx-to-github/tree/master>`_ to prepare
- Sphinx HTML output.
+GitHub Pages
+ Directories starting with underscores are ignored by default which breaks
+ static files in Sphinx. GitHub's preprocessor can be `disabled
+ <https://github.com/blog/572-bypassing-jekyll-on-github-pages>`_ to support
+ Sphinx HTML output properly.
Google Analytics
You can use a custom ``layout.html`` template, like this:
@@ -148,3 +149,109 @@ some notes:
.. _Calibre: http://calibre-ebook.com/
.. _FBreader: http://www.fbreader.org/
.. _Bookworm: http://bookworm.oreilly.com/
+
+
+.. _texinfo-faq:
+
+Texinfo info
+------------
+
+The Texinfo builder is currently in an experimental stage but has successfully
+been used to build the documentation for both Sphinx and Python. The intended
+use of this builder is to generate Texinfo that is then processed into Info
+files.
+
+There are two main programs for reading Info files, ``info`` and GNU Emacs. The
+``info`` program has less features but is available in most Unix environments
+and can be quickly accessed from the terminal. Emacs provides better font and
+color display and supports extensive customization (of course).
+
+
+.. _texinfo-links:
+
+Displaying Links
+~~~~~~~~~~~~~~~~
+
+One noticeable problem you may encounter with the generated Info files is how
+references are displayed. If you read the source of an Info file, a reference
+to this section would look like::
+
+ * note Displaying Links: target-id
+
+In the stand-alone reader, ``info``, references are displayed just as they
+appear in the source. Emacs, on the other-hand, will by default replace
+``\*note:`` with ``see`` and hide the ``target-id``. For example:
+
+ :ref:`texinfo-links`
+
+The exact behavior of how Emacs displays references is dependent on the variable
+``Info-hide-note-references``. If set to the value of ``hide``, Emacs will hide
+both the ``\*note:`` part and the ``target-id``. This is generally the best way
+to view Sphinx-based documents since they often make frequent use of links and
+do not take this limitation into account. However, changing this variable
+affects how all Info documents are displayed and most due take this behavior
+into account.
+
+If you want Emacs to display Info files produced by Sphinx using the value
+``hide`` for ``Info-hide-note-references`` and the default value for all other
+Info files, try adding the following Emacs Lisp code to your start-up file,
+``~/.emacs.d/init.el``.
+
+::
+
+ (defadvice info-insert-file-contents (after
+ sphinx-info-insert-file-contents
+ activate)
+ "Hack to make `Info-hide-note-references' buffer-local and
+ automatically set to `hide' iff it can be determined that this file
+ was created from a Texinfo file generated by Docutils or Sphinx."
+ (set (make-local-variable 'Info-hide-note-references)
+ (default-value 'Info-hide-note-references))
+ (save-excursion
+ (save-restriction
+ (widen) (goto-char (point-min))
+ (when (re-search-forward
+ "^Generated by \\(Sphinx\\|Docutils\\)"
+ (save-excursion (search-forward "" nil t)) t)
+ (set (make-local-variable 'Info-hide-note-references)
+ 'hide)))))
+
+
+Notes
+~~~~~
+
+The following notes may be helpful if you want to create Texinfo files:
+
+- Each section corresponds to a different ``node`` in the Info file.
+
+- Some characters cannot be properly escaped in menu entries and xrefs. The
+ following characters are replaced by spaces in these contexts: ``@``, ``{``,
+ ``}``, ``.``, ``,``, and ``:``.
+
+- In the HTML and Tex output, the word ``see`` is automatically inserted before
+ all xrefs.
+
+- Links to external Info files can be created using the somewhat official URI
+ scheme ``info``. For example::
+
+ info:Texinfo#makeinfo_options
+
+ which produces:
+
+ info:Texinfo#makeinfo_options
+
+- Inline markup appears as follows in Info:
+
+ * strong -- \*strong\*
+ * emphasis -- _emphasis_
+ * literal -- \`literal'
+
+ It is possible to change this behavior using the Texinfo command
+ ``@definfoenclose``. For example, to make inline markup more closely resemble
+ reST, add the following to your :file:`conf.py`::
+
+ texinfo_elements = {'preamble': """\
+ @definfoenclose strong,**,**
+ @definfoenclose emph,*,*
+ @definfoenclose code,`@w{}`,`@w{}`
+ """}
diff --git a/doc/intl.rst b/doc/intl.rst
new file mode 100644
index 00000000..89cfcd2c
--- /dev/null
+++ b/doc/intl.rst
@@ -0,0 +1,69 @@
+.. _intl:
+
+Internationalization
+====================
+
+.. versionadded:: 1.1
+
+Complementary to translations provided for Sphinx-generated messages such as
+navigation bars, Sphinx provides mechanisms facilitating *document* translations
+in itself. See the :ref:`intl-options` for details on configuration.
+
+.. figure:: translation.png
+ :width: 100%
+
+ Workflow visualization of translations in Sphinx. [1]_
+
+**gettext** [2]_ is an established standard for internationalization and
+localization. It naïvely maps messages in a program to a translated string.
+Sphinx uses these facilities to translate whole documents.
+
+Initially project maintainers have to collect all translatable strings (also
+referred to as *messages*) to make them known to translators. Sphinx extracts
+these through invocation of ``sphinx-build -b gettext``.
+
+Every single element in the doctree will end up in a single message which
+results in lists being equally split into different chunks while large
+paragraphs will remain as coarsely-grained as they were in the original
+document. This grants seamless document updates while still providing a little
+bit of context for translators in free-text passages. It is the maintainer's
+task to split up paragraphs which are too large as there is no sane automated
+way to do that.
+
+After Sphinx successfully ran the
+:class:`~sphinx.builders.intl.MessageCatalogBuilder` you will find a collection
+of ``.pot`` files in your output directory. These are **catalog templates**
+and contain messages in your original language *only*.
+
+They can be delivered to translators which will transform them to ``.po`` files
+--- so called **message catalogs** --- containing a mapping from the original
+messages to foreign-language strings.
+
+Gettext compiles them into a binary format known as **binary catalogs** through
+:program:`msgfmt` for efficiency reasons. If you make these files discoverable
+with :confval:`locale_dirs` for your :confval:`language`, Sphinx will pick them
+up automatically.
+
+An example: you have a document ``usage.rst`` in your Sphinx project. The
+gettext builder will put its messages into ``usage.pot``. Image you have
+Spanish translations [3]_ on your hands in ``usage.po`` --- for your builds to
+be translated you need to follow these instructions:
+
+* Compile your message catalog to a locale directory, say ``translated``, so it
+ ends up in ``./translated/es/LC_MESSAGES/usage.mo`` in your source directory
+ (where ``es`` is the language code for Spanish.) ::
+
+ msgfmt "usage.po" -o "translated/es/LC_MESSAGES/usage.mo"
+
+* Set :confval:`locale_dirs` to ``["translated/"]``.
+* Set :confval:`language` to ``es`` (also possible via :option:`-D`).
+* Run your desired build.
+
+
+.. rubric:: Footnotes
+
+.. [1] The stick-figure is taken from an `XKCD comic <http://xkcd.com/779/>`_.
+.. [2] See the `GNU gettext utilites
+ <http://www.gnu.org/software/gettext/manual/gettext.html#Introduction>`_
+ for details on that software suite.
+.. [3] Because nobody expects the Spanish Inquisition!
diff --git a/doc/intro.rst b/doc/intro.rst
index 1a39e266..caff141d 100644
--- a/doc/intro.rst
+++ b/doc/intro.rst
@@ -45,15 +45,19 @@ See the :ref:`pertinent section in the FAQ list <usingwith>`.
Prerequisites
-------------
-Sphinx needs at least **Python 2.4** to run, as well as the docutils_ and
-Jinja2_ libraries. Sphinx should work with docutils version 0.5 or some
-(not broken) SVN trunk snapshot. If you like to have source code highlighting
-support, you must also install the Pygments_ library.
+Sphinx needs at least **Python 2.4** or **Python 3.1** to run, as well as the
+docutils_ and Jinja2_ libraries. Sphinx should work with docutils version 0.5
+or some (not broken) SVN trunk snapshot. If you like to have source code
+highlighting support, you must also install the Pygments_ library.
+
+If you use **Python 2.4** you also need uuid_.
.. _reStructuredText: http://docutils.sf.net/rst.html
.. _docutils: http://docutils.sf.net/
.. _Jinja2: http://jinja.pocoo.org/2/
.. _Pygments: http://pygments.org/
+.. The given homepage is only a directory listing so I'm using the pypi site.
+.. _uuid: http://pypi.python.org/pypi/uuid/
Usage
diff --git a/doc/invocation.rst b/doc/invocation.rst
index 6b8b9ee3..c8e9a61f 100644
--- a/doc/invocation.rst
+++ b/doc/invocation.rst
@@ -40,9 +40,16 @@ The :program:`sphinx-build` script has several options:
**man**
Build manual pages in groff format for UNIX systems.
+ **texinfo**
+ Build Texinfo files that can be processed into Info files using
+ :program:`makeinfo`.
+
**text**
Build plain text files.
+ **gettext**
+ Build gettext-style message catalogs (``.pot`` files).
+
**doctest**
Run all doctests in the documentation, if the :mod:`~sphinx.ext.doctest`
extension is enabled.
diff --git a/doc/markup/inline.rst b/doc/markup/inline.rst
index 35981edc..78aaea69 100644
--- a/doc/markup/inline.rst
+++ b/doc/markup/inline.rst
@@ -309,6 +309,7 @@ in a different style:
If you don't need the "variable part" indication, use the standard
````code```` instead.
+There is also an :rst:role:`index` role to generate index entries.
The following roles generate external links:
diff --git a/doc/markup/misc.rst b/doc/markup/misc.rst
index 39109a58..55370de7 100644
--- a/doc/markup/misc.rst
+++ b/doc/markup/misc.rst
@@ -64,6 +64,85 @@ Meta-information markup
:confval:`show_authors` configuration value is True.
+Index-generating markup
+-----------------------
+
+Sphinx automatically creates index entries from all object descriptions (like
+functions, classes or attributes) like discussed in :ref:`domains`.
+
+However, there is also explicit markup available, to make the index more
+comprehensive and enable index entries in documents where information is not
+mainly contained in information units, such as the language reference.
+
+.. rst:directive:: .. index:: <entries>
+
+ This directive contains one or more index entries. Each entry consists of a
+ type and a value, separated by a colon.
+
+ For example::
+
+ .. index::
+ single: execution; context
+ module: __main__
+ module: sys
+ triple: module; search; path
+
+ The execution context
+ ---------------------
+
+ ...
+
+ This directive contains five entries, which will be converted to entries in
+ the generated index which link to the exact location of the index statement
+ (or, in case of offline media, the corresponding page number).
+
+ Since index directives generate cross-reference targets at their location in
+ the source, it makes sense to put them *before* the thing they refer to --
+ e.g. a heading, as in the example above.
+
+ The possible entry types are:
+
+ single
+ Creates a single index entry. Can be made a subentry by separating the
+ subentry text with a semicolon (this notation is also used below to
+ describe what entries are created).
+ pair
+ ``pair: loop; statement`` is a shortcut that creates two index entries,
+ namely ``loop; statement`` and ``statement; loop``.
+ triple
+ Likewise, ``triple: module; search; path`` is a shortcut that creates
+ three index entries, which are ``module; search path``, ``search; path,
+ module`` and ``path; module search``.
+ module, keyword, operator, object, exception, statement, builtin
+ These all create two index entries. For example, ``module: hashlib``
+ creates the entries ``module; hashlib`` and ``hashlib; module``. (These
+ are Python-specific and therefore deprecated.)
+
+ For index directives containing only "single" entries, there is a shorthand
+ notation::
+
+ .. index:: BNF, grammar, syntax, notation
+
+ This creates four index entries.
+
+.. rst:role:: index
+
+ While the :rst:dir:`index` directive is a block-level markup and links to the
+ beginning of the next paragraph, there is also a corresponding role that sets
+ the link target directly where it is used.
+
+ The content of the role can be a simple phrase, which is then kept in the
+ text and used as an index entry. It can also be a combination of text and
+ index entry, styled like with explicit targets of cross-references. In that
+ case, the "target" part can be a full entry as described for the directive
+ above. For example::
+
+ This is a normal reST :index:`paragraph` that contains several
+ :index:`index entries <pair: index; entry>`.
+
+ .. versionadded:: 1.1
+
+
.. _tags:
Including content based on tags
diff --git a/doc/markup/para.rst b/doc/markup/para.rst
index ecc6b4a6..302d9c1b 100644
--- a/doc/markup/para.rst
+++ b/doc/markup/para.rst
@@ -52,7 +52,7 @@ units as well as normal text:
Similar to :rst:dir:`versionadded`, but describes when and what changed in
the named feature in some way (new parameters, changed side effects, etc.).
-.. rst:directive:: .. deprecated:: vesion
+.. rst:directive:: .. deprecated:: version
Similar to :rst:dir:`versionchanged`, but describes when the feature was
deprecated. An explanation can also be given, for example to inform the
@@ -112,6 +112,10 @@ units as well as normal text:
.. centered:: LICENSE AGREEMENT
+ .. deprecated:: 1.1
+ This presentation-only directive is a legacy from older versions. Use a
+ :rst:dir:`rst-class` directive instead and add an appropriate style.
+
.. rst:directive:: hlist
@@ -144,68 +148,6 @@ For local tables of contents, use the standard reST :dudir:`contents directive
<contents>`.
-Index-generating markup
------------------------
-
-Sphinx automatically creates index entries from all object descriptions (like
-functions, classes or attributes) like discussed in :ref:`domains`.
-
-However, there is also an explicit directive available, to make the index more
-comprehensive and enable index entries in documents where information is not
-mainly contained in information units, such as the language reference.
-
-.. rst:directive:: .. index:: <entries>
-
- This directive contains one or more index entries. Each entry consists of a
- type and a value, separated by a colon.
-
- For example::
-
- .. index::
- single: execution; context
- module: __main__
- module: sys
- triple: module; search; path
-
- The execution context
- ---------------------
-
- ...
-
- This directive contains five entries, which will be converted to entries in
- the generated index which link to the exact location of the index statement
- (or, in case of offline media, the corresponding page number).
-
- Since index directives generate cross-reference targets at their location in
- the source, it makes sense to put them *before* the thing they refer to --
- e.g. a heading, as in the example above.
-
- The possible entry types are:
-
- single
- Creates a single index entry. Can be made a subentry by separating the
- subentry text with a semicolon (this notation is also used below to
- describe what entries are created).
- pair
- ``pair: loop; statement`` is a shortcut that creates two index entries,
- namely ``loop; statement`` and ``statement; loop``.
- triple
- Likewise, ``triple: module; search; path`` is a shortcut that creates
- three index entries, which are ``module; search path``, ``search; path,
- module`` and ``path; module search``.
- module, keyword, operator, object, exception, statement, builtin
- These all create two index entries. For example, ``module: hashlib``
- creates the entries ``module; hashlib`` and ``hashlib; module``. (These
- are Python-specific and therefore deprecated.)
-
- For index directives containing only "single" entries, there is a shorthand
- notation::
-
- .. index:: BNF, grammar, syntax, notation
-
- This creates four index entries.
-
-
Glossary
--------
diff --git a/doc/markup/toctree.rst b/doc/markup/toctree.rst
index 2c0a418a..0b6a46c1 100644
--- a/doc/markup/toctree.rst
+++ b/doc/markup/toctree.rst
@@ -41,6 +41,8 @@ tables of contents. The ``toctree`` directive is the central element.
document, the library index. From this information it generates "next
chapter", "previous chapter" and "parent chapter" links.
+ **Entries**
+
Document titles in the :rst:dir:`toctree` will be automatically read from the
title of the referenced document. If that isn't what you want, you can
specify an explicit title and target using a similar syntax to reST
@@ -59,8 +61,10 @@ tables of contents. The ``toctree`` directive is the central element.
You can also add external links, by giving an HTTP URL instead of a document
name.
+ **Section numbering**
+
If you want to have section numbers even in HTML output, give the toctree a
- ``numbered`` flag option. For example::
+ ``numbered`` option. For example::
.. toctree::
:numbered:
@@ -71,6 +75,11 @@ tables of contents. The ``toctree`` directive is the central element.
Numbering then starts at the heading of ``foo``. Sub-toctrees are
automatically numbered (don't give the ``numbered`` flag to those).
+ Numbering up to a specific depth is also possible, by giving the depth as a
+ numeric argument to ``numbered``.
+
+ **Additional options**
+
If you want only the titles of documents in the tree to show up, not other
headings of the same level, you can use the ``titlesonly`` option::
@@ -133,6 +142,9 @@ tables of contents. The ``toctree`` directive is the central element.
.. versionchanged:: 1.0
Added "titlesonly" option.
+ .. versionchanged:: 1.1
+ Added numeric argument to "numbered".
+
Special names
-------------
diff --git a/doc/theming.rst b/doc/theming.rst
index 716eb50a..552a0eaf 100644
--- a/doc/theming.rst
+++ b/doc/theming.rst
@@ -206,7 +206,7 @@ name), containing the following:
* A :file:`theme.conf` file, see below.
* HTML templates, if needed.
* A ``static/`` directory containing any static files that will be copied to the
- output statid directory on build. These can be images, styles, script files.
+ output static directory on build. These can be images, styles, script files.
The :file:`theme.conf` file is in INI format [1]_ (readable by the standard
Python :mod:`ConfigParser` module) and has the following structure:
diff --git a/doc/translation.png b/doc/translation.png
new file mode 100644
index 00000000..aa368b67
--- /dev/null
+++ b/doc/translation.png
Binary files differ
diff --git a/doc/web/api.rst b/doc/web/api.rst
new file mode 100644
index 00000000..070cd3a2
--- /dev/null
+++ b/doc/web/api.rst
@@ -0,0 +1,65 @@
+.. _websupportapi:
+
+.. currentmodule:: sphinx.websupport
+
+The WebSupport Class
+====================
+
+.. class:: WebSupport
+
+ The main API class for the web support package. All interactions with the
+ web support package should occur through this class.
+
+ The class takes the following keyword arguments:
+
+ srcdir
+ The directory containing reStructuredText source files.
+
+ builddir
+ The directory that build data and static files should be placed in. This
+ should be used when creating a :class:`WebSupport` object that will be
+ used to build data.
+
+ datadir
+ The directory that the web support data is in. This should be used when
+ creating a :class:`WebSupport` object that will be used to retrieve data.
+
+ search
+ This may contain either a string (e.g. 'xapian') referencing a built-in
+ search adapter to use, or an instance of a subclass of
+ :class:`~.search.BaseSearch`.
+
+ storage
+ This may contain either a string representing a database uri, or an
+ instance of a subclass of :class:`~.storage.StorageBackend`. If this is
+ not provided, a new sqlite database will be created.
+
+ moderation_callback
+ A callable to be called when a new comment is added that is not
+ displayed. It must accept one argument: a dictionary representing the
+ comment that was added.
+
+ staticdir
+ If static files are served from a location besides ``'/static'``, this
+ should be a string with the name of that location
+ (e.g. ``'/static_files'``).
+
+ docroot
+ If the documentation is not served from the base path of a URL, this
+ should be a string specifying that path (e.g. ``'docs'``).
+
+
+Methods
+~~~~~~~
+
+.. automethod:: sphinx.websupport.WebSupport.build
+
+.. automethod:: sphinx.websupport.WebSupport.get_document
+
+.. automethod:: sphinx.websupport.WebSupport.get_data
+
+.. automethod:: sphinx.websupport.WebSupport.add_comment
+
+.. automethod:: sphinx.websupport.WebSupport.process_vote
+
+.. automethod:: sphinx.websupport.WebSupport.get_search_results
diff --git a/doc/web/quickstart.rst b/doc/web/quickstart.rst
new file mode 100644
index 00000000..bd0f71a7
--- /dev/null
+++ b/doc/web/quickstart.rst
@@ -0,0 +1,254 @@
+.. _websupportquickstart:
+
+Web Support Quick Start
+=======================
+
+Building Documentation Data
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+To make use of the web support package in your application you'll need to build
+the data it uses. This data includes pickle files representing documents,
+search indices, and node data that is used to track where comments and other
+things are in a document. To do this you will need to create an instance of the
+:class:`~.WebSupport` class and call its :meth:`~.WebSupport.build` method::
+
+ from sphinx.websupport import WebSupport
+
+ support = WebSupport(srcdir='/path/to/rst/sources/',
+ builddir='/path/to/build/outdir',
+ search='xapian')
+
+ support.build()
+
+This will read reStructuredText sources from `srcdir` and place the necessary
+data in `builddir`. The `builddir` will contain two sub-directories: one named
+"data" that contains all the data needed to display documents, search through
+documents, and add comments to documents. The other directory will be called
+"static" and contains static files that should be served from "/static".
+
+.. note::
+
+ If you wish to serve static files from a path other than "/static", you can
+ do so by providing the *staticdir* keyword argument when creating the
+ :class:`~.WebSupport` object.
+
+
+Integrating Sphinx Documents Into Your Webapp
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Now that the data is built, it's time to do something useful with it. Start off
+by creating a :class:`~.WebSupport` object for your application::
+
+ from sphinx.websupport import WebSupport
+
+ support = WebSupport(datadir='/path/to/the/data',
+ search='xapian')
+
+You'll only need one of these for each set of documentation you will be working
+with. You can then call it's :meth:`~.WebSupport.get_document` method to access
+individual documents::
+
+ contents = support.get_document('contents')
+
+This will return a dictionary containing the following items:
+
+* **body**: The main body of the document as HTML
+* **sidebar**: The sidebar of the document as HTML
+* **relbar**: A div containing links to related documents
+* **title**: The title of the document
+* **css**: Links to css files used by Sphinx
+* **js**: Javascript containing comment options
+
+This dict can then be used as context for templates. The goal is to be easy to
+integrate with your existing templating system. An example using `Jinja2
+<http://jinja.pocoo.org/2/>`_ is:
+
+.. sourcecode:: html+jinja
+
+ {%- extends "layout.html" %}
+
+ {%- block title %}
+ {{ document.title }}
+ {%- endblock %}
+
+ {% block css %}
+ {{ super() }}
+ {{ document.css|safe }}
+ <link rel="stylesheet" href="/static/websupport-custom.css" type="text/css">
+ {% endblock %}
+
+ {%- block js %}
+ {{ super() }}
+ {{ document.js|safe }}
+ {%- endblock %}
+
+ {%- block relbar %}
+ {{ document.relbar|safe }}
+ {%- endblock %}
+
+ {%- block body %}
+ {{ document.body|safe }}
+ {%- endblock %}
+
+ {%- block sidebar %}
+ {{ document.sidebar|safe }}
+ {%- endblock %}
+
+
+Authentication
+--------------
+
+To use certain features such as voting, it must be possible to authenticate
+users. The details of the authentication are left to your application. Once a
+user has been authenticated you can pass the user's details to certain
+:class:`~.WebSupport` methods using the *username* and *moderator* keyword
+arguments. The web support package will store the username with comments and
+votes. The only caveat is that if you allow users to change their username you
+must update the websupport package's data::
+
+ support.update_username(old_username, new_username)
+
+*username* should be a unique string which identifies a user, and *moderator*
+should be a boolean representing whether the user has moderation privilieges.
+The default value for *moderator* is *False*.
+
+An example `Flask <http://flask.pocoo.org/>`_ function that checks whether a
+user is logged in and then retrieves a document is::
+
+ from sphinx.websupport.errors import *
+
+ @app.route('/<path:docname>')
+ def doc(docname):
+ username = g.user.name if g.user else ''
+ moderator = g.user.moderator if g.user else False
+ try:
+ document = support.get_document(docname, username, moderator)
+ except DocumentNotFoundError:
+ abort(404)
+ return render_template('doc.html', document=document)
+
+The first thing to notice is that the *docname* is just the request path. This
+makes accessing the correct document easy from a single view. If the user is
+authenticated, then the username and moderation status are passed along with the
+docname to :meth:`~.WebSupport.get_document`. The web support package will then
+add this data to the ``COMMENT_OPTIONS`` that are used in the template.
+
+.. note::
+
+ This only works works if your documentation is served from your
+ document root. If it is served from another directory, you will
+ need to prefix the url route with that directory, and give the `docroot`
+ keyword argument when creating the web support object::
+
+ support = WebSupport(..., docroot='docs')
+
+ @app.route('/docs/<path:docname>')
+
+
+Performing Searches
+~~~~~~~~~~~~~~~~~~~
+
+To use the search form built-in to the Sphinx sidebar, create a function to
+handle requests to the url 'search' relative to the documentation root. The
+user's search query will be in the GET parameters, with the key `q`. Then use
+the :meth:`~sphinx.websupport.WebSupport.get_search_results` method to retrieve
+search results. In `Flask <http://flask.pocoo.org/>`_ that would be like this::
+
+ @app.route('/search')
+ def search():
+ q = request.args.get('q')
+ document = support.get_search_results(q)
+ return render_template('doc.html', document=document)
+
+Note that we used the same template to render our search results as we did to
+render our documents. That's because :meth:`~.WebSupport.get_search_results`
+returns a context dict in the same format that :meth:`~.WebSupport.get_document`
+does.
+
+
+Comments & Proposals
+~~~~~~~~~~~~~~~~~~~~
+
+Now that this is done it's time to define the functions that handle the AJAX
+calls from the script. You will need three functions. The first function is
+used to add a new comment, and will call the web support method
+:meth:`~.WebSupport.add_comment`::
+
+ @app.route('/docs/add_comment', methods=['POST'])
+ def add_comment():
+ parent_id = request.form.get('parent', '')
+ node_id = request.form.get('node', '')
+ text = request.form.get('text', '')
+ proposal = request.form.get('proposal', '')
+ username = g.user.name if g.user is not None else 'Anonymous'
+ comment = support.add_comment(text, node_id='node_id',
+ parent_id='parent_id',
+ username=username, proposal=proposal)
+ return jsonify(comment=comment)
+
+You'll notice that both a `parent_id` and `node_id` are sent with the
+request. If the comment is being attached directly to a node, `parent_id`
+will be empty. If the comment is a child of another comment, then `node_id`
+will be empty. Then next function handles the retrieval of comments for a
+specific node, and is aptly named
+:meth:`~sphinx.websupport.WebSupport.get_data`::
+
+ @app.route('/docs/get_comments')
+ def get_comments():
+ username = g.user.name if g.user else None
+ moderator = g.user.moderator if g.user else False
+ node_id = request.args.get('node', '')
+ data = support.get_data(parent_id, user_id)
+ return jsonify(**data)
+
+The final function that is needed will call :meth:`~.WebSupport.process_vote`,
+and will handle user votes on comments::
+
+ @app.route('/docs/process_vote', methods=['POST'])
+ def process_vote():
+ if g.user is None:
+ abort(401)
+ comment_id = request.form.get('comment_id')
+ value = request.form.get('value')
+ if value is None or comment_id is None:
+ abort(400)
+ support.process_vote(comment_id, g.user.id, value)
+ return "success"
+
+
+Comment Moderation
+~~~~~~~~~~~~~~~~~~
+
+By default, all comments added through :meth:`~.WebSupport.add_comment` are
+automatically displayed. If you wish to have some form of moderation, you can
+pass the `displayed` keyword argument::
+
+ comment = support.add_comment(text, node_id='node_id',
+ parent_id='parent_id',
+ username=username, proposal=proposal,
+ displayed=False)
+
+You can then create a new view to handle the moderation of comments. It
+will be called when a moderator decides a comment should be accepted and
+displayed::
+
+ @app.route('/docs/accept_comment', methods=['POST'])
+ def accept_comment():
+ moderator = g.user.moderator if g.user else False
+ comment_id = request.form.get('id')
+ support.accept_comment(comment_id, moderator=moderator)
+ return 'OK'
+
+Rejecting comments happens via comment deletion.
+
+To perform a custom action (such as emailing a moderator) when a new comment is
+added but not displayed, you can pass callable to the :class:`~.WebSupport`
+class when instantiating your support object::
+
+ def moderation_callback(comment):
+ """Do something..."""
+
+ support = WebSupport(..., moderation_callback=moderation_callback)
+
+The moderation callback must take one argument, which will be the same comment
+dict that is returned by :meth:`add_comment`.
diff --git a/doc/web/searchadapters.rst b/doc/web/searchadapters.rst
new file mode 100644
index 00000000..7d8634f7
--- /dev/null
+++ b/doc/web/searchadapters.rst
@@ -0,0 +1,45 @@
+.. _searchadapters:
+
+.. currentmodule:: sphinx.websupport.search
+
+Search Adapters
+===============
+
+To create a custom search adapter you will need to subclass the
+:class:`BaseSearch` class. Then create an instance of the new class and pass
+that as the `search` keyword argument when you create the :class:`~.WebSupport`
+object::
+
+ support = WebSupport(srcdir=srcdir,
+ builddir=builddir,
+ search=MySearch())
+
+For more information about creating a custom search adapter, please see the
+documentation of the :class:`BaseSearch` class below.
+
+.. class:: BaseSearch
+
+ Defines an interface for search adapters.
+
+
+BaseSearch Methods
+~~~~~~~~~~~~~~~~~~
+
+ The following methods are defined in the BaseSearch class. Some methods do
+ not need to be overridden, but some (:meth:`~BaseSearch.add_document` and
+ :meth:`~BaseSearch.handle_query`) must be overridden in your subclass. For a
+ working example, look at the built-in adapter for whoosh.
+
+.. automethod:: BaseSearch.init_indexing
+
+.. automethod:: BaseSearch.finish_indexing
+
+.. automethod:: BaseSearch.feed
+
+.. automethod:: BaseSearch.add_document
+
+.. automethod:: BaseSearch.query
+
+.. automethod:: BaseSearch.handle_query
+
+.. automethod:: BaseSearch.extract_context
diff --git a/doc/web/storagebackends.rst b/doc/web/storagebackends.rst
new file mode 100644
index 00000000..d191b43e
--- /dev/null
+++ b/doc/web/storagebackends.rst
@@ -0,0 +1,44 @@
+.. _storagebackends:
+
+.. currentmodule:: sphinx.websupport.storage
+
+Storage Backends
+================
+
+To create a custom storage backend you will need to subclass the
+:class:`StorageBackend` class. Then create an instance of the new class and
+pass that as the `storage` keyword argument when you create the
+:class:`~.WebSupport` object::
+
+ support = WebSupport(srcdir=srcdir,
+ builddir=builddir,
+ storage=MyStorage())
+
+For more information about creating a custom storage backend, please see the
+documentation of the :class:`StorageBackend` class below.
+
+.. class:: StorageBackend
+
+ Defines an interface for storage backends.
+
+
+StorageBackend Methods
+~~~~~~~~~~~~~~~~~~~~~~
+
+.. automethod:: StorageBackend.pre_build
+
+.. automethod:: StorageBackend.add_node
+
+.. automethod:: StorageBackend.post_build
+
+.. automethod:: StorageBackend.add_comment
+
+.. automethod:: StorageBackend.delete_comment
+
+.. automethod:: StorageBackend.get_data
+
+.. automethod:: StorageBackend.process_vote
+
+.. automethod:: StorageBackend.update_username
+
+.. automethod:: StorageBackend.accept_comment
diff --git a/doc/websupport.rst b/doc/websupport.rst
new file mode 100644
index 00000000..3ccae246
--- /dev/null
+++ b/doc/websupport.rst
@@ -0,0 +1,16 @@
+.. _websupport:
+
+Sphinx Web Support
+==================
+
+.. versionadded:: 1.1
+
+Sphinx provides a Python API to easily integrate Sphinx documentation into your
+web application. To learn more read the :ref:`websupportquickstart`.
+
+.. toctree::
+
+ web/quickstart
+ web/api
+ web/searchadapters
+ web/storagebackends
diff --git a/ez_setup.py b/ez_setup.py
deleted file mode 100644
index d24e845e..00000000
--- a/ez_setup.py
+++ /dev/null
@@ -1,276 +0,0 @@
-#!python
-"""Bootstrap setuptools installation
-
-If you want to use setuptools in your package's setup.py, just include this
-file in the same directory with it, and add this to the top of your setup.py::
-
- from ez_setup import use_setuptools
- use_setuptools()
-
-If you want to require a specific version of setuptools, set a download
-mirror, or use an alternate download directory, you can do so by supplying
-the appropriate options to ``use_setuptools()``.
-
-This file can also be run as a script to install or upgrade setuptools.
-"""
-import sys
-DEFAULT_VERSION = "0.6c9"
-DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3]
-
-md5_data = {
- 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
- 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb',
- 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b',
- 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a',
- 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618',
- 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac',
- 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5',
- 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4',
- 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c',
- 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b',
- 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27',
- 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277',
- 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa',
- 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e',
- 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e',
- 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f',
- 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2',
- 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc',
- 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167',
- 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64',
- 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d',
- 'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20',
- 'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab',
- 'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53',
- 'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2',
- 'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e',
- 'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372',
- 'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902',
- 'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de',
- 'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b',
- 'setuptools-0.6c9-py2.3.egg': 'a83c4020414807b496e4cfbe08507c03',
- 'setuptools-0.6c9-py2.4.egg': '260a2be2e5388d66bdaee06abec6342a',
- 'setuptools-0.6c9-py2.5.egg': 'fe67c3e5a17b12c0e7c541b7ea43a8e6',
- 'setuptools-0.6c9-py2.6.egg': 'ca37b1ff16fa2ede6e19383e7b59245a',
-}
-
-import sys, os
-try: from hashlib import md5
-except ImportError: from md5 import md5
-
-def _validate_md5(egg_name, data):
- if egg_name in md5_data:
- digest = md5(data).hexdigest()
- if digest != md5_data[egg_name]:
- print >>sys.stderr, (
- "md5 validation of %s failed! (Possible download problem?)"
- % egg_name
- )
- sys.exit(2)
- return data
-
-def use_setuptools(
- version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
- download_delay=15
-):
- """Automatically find/download setuptools and make it available on sys.path
-
- `version` should be a valid setuptools version number that is available
- as an egg for download under the `download_base` URL (which should end with
- a '/'). `to_dir` is the directory where setuptools will be downloaded, if
- it is not already available. If `download_delay` is specified, it should
- be the number of seconds that will be paused before initiating a download,
- should one be required. If an older version of setuptools is installed,
- this routine will print a message to ``sys.stderr`` and raise SystemExit in
- an attempt to abort the calling script.
- """
- was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules
- def do_download():
- egg = download_setuptools(version, download_base, to_dir, download_delay)
- sys.path.insert(0, egg)
- import setuptools; setuptools.bootstrap_install_from = egg
- try:
- import pkg_resources
- except ImportError:
- return do_download()
- try:
- pkg_resources.require("setuptools>="+version); return
- except pkg_resources.VersionConflict, e:
- if was_imported:
- print >>sys.stderr, (
- "The required version of setuptools (>=%s) is not available, and\n"
- "can't be installed while this script is running. Please install\n"
- " a more recent version first, using 'easy_install -U setuptools'."
- "\n\n(Currently using %r)"
- ) % (version, e.args[0])
- sys.exit(2)
- else:
- del pkg_resources, sys.modules['pkg_resources'] # reload ok
- return do_download()
- except pkg_resources.DistributionNotFound:
- return do_download()
-
-def download_setuptools(
- version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
- delay = 15
-):
- """Download setuptools from a specified location and return its filename
-
- `version` should be a valid setuptools version number that is available
- as an egg for download under the `download_base` URL (which should end
- with a '/'). `to_dir` is the directory where the egg will be downloaded.
- `delay` is the number of seconds to pause before an actual download attempt.
- """
- import urllib2, shutil
- egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3])
- url = download_base + egg_name
- saveto = os.path.join(to_dir, egg_name)
- src = dst = None
- if not os.path.exists(saveto): # Avoid repeated downloads
- try:
- from distutils import log
- if delay:
- log.warn("""
----------------------------------------------------------------------------
-This script requires setuptools version %s to run (even to display
-help). I will attempt to download it for you (from
-%s), but
-you may need to enable firewall access for this script first.
-I will start the download in %d seconds.
-
-(Note: if this machine does not have network access, please obtain the file
-
- %s
-
-and place it in this directory before rerunning this script.)
----------------------------------------------------------------------------""",
- version, download_base, delay, url
- ); from time import sleep; sleep(delay)
- log.warn("Downloading %s", url)
- src = urllib2.urlopen(url)
- # Read/write all in one block, so we don't create a corrupt file
- # if the download is interrupted.
- data = _validate_md5(egg_name, src.read())
- dst = open(saveto,"wb"); dst.write(data)
- finally:
- if src: src.close()
- if dst: dst.close()
- return os.path.realpath(saveto)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-def main(argv, version=DEFAULT_VERSION):
- """Install or upgrade setuptools and EasyInstall"""
- try:
- import setuptools
- except ImportError:
- egg = None
- try:
- egg = download_setuptools(version, delay=0)
- sys.path.insert(0,egg)
- from setuptools.command.easy_install import main
- return main(list(argv)+[egg]) # we're done here
- finally:
- if egg and os.path.exists(egg):
- os.unlink(egg)
- else:
- if setuptools.__version__ == '0.0.1':
- print >>sys.stderr, (
- "You have an obsolete version of setuptools installed. Please\n"
- "remove it from your system entirely before rerunning this script."
- )
- sys.exit(2)
-
- req = "setuptools>="+version
- import pkg_resources
- try:
- pkg_resources.require(req)
- except pkg_resources.VersionConflict:
- try:
- from setuptools.command.easy_install import main
- except ImportError:
- from easy_install import main
- main(list(argv)+[download_setuptools(delay=0)])
- sys.exit(0) # try to force an exit
- else:
- if argv:
- from setuptools.command.easy_install import main
- main(argv)
- else:
- print "Setuptools version",version,"or greater has been installed."
- print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)'
-
-def update_md5(filenames):
- """Update our built-in md5 registry"""
-
- import re
-
- for name in filenames:
- base = os.path.basename(name)
- f = open(name,'rb')
- md5_data[base] = md5(f.read()).hexdigest()
- f.close()
-
- data = [" %r: %r,\n" % it for it in md5_data.items()]
- data.sort()
- repl = "".join(data)
-
- import inspect
- srcfile = inspect.getsourcefile(sys.modules[__name__])
- f = open(srcfile, 'rb'); src = f.read(); f.close()
-
- match = re.search("\nmd5_data = {\n([^}]+)}", src)
- if not match:
- print >>sys.stderr, "Internal error!"
- sys.exit(2)
-
- src = src[:match.start(1)] + repl + src[match.end(1):]
- f = open(srcfile,'w')
- f.write(src)
- f.close()
-
-
-if __name__=='__main__':
- if len(sys.argv)>2 and sys.argv[1]=='--md5update':
- update_md5(sys.argv[2:])
- else:
- main(sys.argv[1:])
-
-
-
-
-
-
diff --git a/setup.py b/setup.py
index 183fcceb..3b1d2d91 100644
--- a/setup.py
+++ b/setup.py
@@ -2,8 +2,8 @@
try:
from setuptools import setup, find_packages
except ImportError:
- import ez_setup
- ez_setup.use_setuptools()
+ import distribute_setup
+ distribute_setup.use_setuptools()
from setuptools import setup, find_packages
import os
@@ -47,7 +47,7 @@ A development egg can be found `here
requires = ['Pygments>=0.8', 'Jinja2>=2.2', 'docutils>=0.5']
if sys.version_info < (2, 4):
- print 'ERROR: Sphinx requires at least Python 2.4 to run.'
+ print('ERROR: Sphinx requires at least Python 2.4 to run.')
sys.exit(1)
if sys.version_info < (2, 5):
@@ -63,6 +63,9 @@ if sys.version_info < (2, 5):
else:
del requires[-1]
+ # The uuid module is new in the stdlib in 2.5
+ requires.append('uuid>=1.30')
+
# Provide a "compile_catalog" command that also creates the translated
# JavaScript files if Babel is available.
@@ -198,4 +201,6 @@ setup(
},
install_requires=requires,
cmdclass=cmdclass,
+ use_2to3=True,
+ use_2to3_fixers=['custom_fixers'],
)
diff --git a/sphinx/__init__.py b/sphinx/__init__.py
index 9773123f..468b3406 100644
--- a/sphinx/__init__.py
+++ b/sphinx/__init__.py
@@ -9,11 +9,14 @@
:license: BSD, see LICENSE for details.
"""
+# Keep this file executable as-is in Python 3!
+# (Otherwise getting the version out of it from setup.py is impossible.)
+
import sys
from os import path
-__version__ = '1.0.5+'
-__released__ = '1.0.5' # used when Sphinx builds its own docs
+__version__ = '1.1pre'
+__released__ = '1.1 (hg)' # used when Sphinx builds its own docs
package_dir = path.abspath(path.dirname(__file__))
@@ -34,14 +37,16 @@ if '+' in __version__ or 'pre' in __version__:
def main(argv=sys.argv):
+ """Sphinx build "main" command-line entry."""
if sys.version_info[:3] < (2, 4, 0):
- print >>sys.stderr, \
- 'Error: Sphinx requires at least Python 2.4 to run.'
+ sys.stderr.write('Error: Sphinx requires at least '
+ 'Python 2.4 to run.\n')
return 1
try:
from sphinx import cmdline
- except ImportError, err:
+ except ImportError:
+ err = sys.exc_info()[1]
errstr = str(err)
if errstr.lower().startswith('no module named'):
whichmod = errstr[16:]
@@ -54,14 +59,14 @@ def main(argv=sys.argv):
whichmod = 'roman module (which is distributed with Docutils)'
hint = ('This can happen if you upgraded docutils using\n'
'easy_install without uninstalling the old version'
- 'first.')
+ 'first.\n')
else:
whichmod += ' module'
- print >>sys.stderr, ('Error: The %s cannot be found. '
- 'Did you install Sphinx and its dependencies '
- 'correctly?' % whichmod)
+ sys.stderr.write('Error: The %s cannot be found. '
+ 'Did you install Sphinx and its dependencies '
+ 'correctly?\n' % whichmod)
if hint:
- print >> sys.stderr, hint
+ sys.stderr.write(hint)
return 1
raise
return cmdline.main(argv)
diff --git a/sphinx/addnodes.py b/sphinx/addnodes.py
index 384b51e4..ec6f2f6d 100644
--- a/sphinx/addnodes.py
+++ b/sphinx/addnodes.py
@@ -11,103 +11,168 @@
from docutils import nodes
-# index markup
-class index(nodes.Invisible, nodes.Inline, nodes.TextElement): pass
+
+class toctree(nodes.General, nodes.Element):
+ """Node for inserting a "TOC tree"."""
+
# domain-specific object descriptions (class, function etc.)
-# parent node for signature and content
-class desc(nodes.Admonition, nodes.Element): pass
+class desc(nodes.Admonition, nodes.Element):
+ """Node for object descriptions.
+
+ This node is similar to a "definition list" with one definition. It
+ contains one or more ``desc_signature`` and a ``desc_content``.
+ """
+
+class desc_signature(nodes.Part, nodes.Inline, nodes.TextElement):
+ """Node for object signatures.
-# additional name parts (module name, class name)
-class desc_addname(nodes.Part, nodes.Inline, nodes.TextElement): pass
+ The "term" part of the custom Sphinx definition list.
+ """
+
+
+# nodes to use within a desc_signature
+
+class desc_addname(nodes.Part, nodes.Inline, nodes.TextElement):
+ """Node for additional name parts (module name, class name)."""
# compatibility alias
desc_classname = desc_addname
-# return type (C); object type
-class desc_type(nodes.Part, nodes.Inline, nodes.TextElement): pass
-# -> annotation (Python)
+
+class desc_type(nodes.Part, nodes.Inline, nodes.TextElement):
+ """Node for return types or object type names."""
+
class desc_returns(desc_type):
+ """Node for a "returns" annotation (a la -> in Python)."""
def astext(self):
return ' -> ' + nodes.TextElement.astext(self)
-# main name of object
-class desc_name(nodes.Part, nodes.Inline, nodes.TextElement): pass
-# argument list
-class desc_signature(nodes.Part, nodes.Inline, nodes.TextElement): pass
+
+class desc_name(nodes.Part, nodes.Inline, nodes.TextElement):
+ """Node for the main object name."""
+
class desc_parameterlist(nodes.Part, nodes.Inline, nodes.TextElement):
+ """Node for a general parameter list."""
child_text_separator = ', '
-class desc_parameter(nodes.Part, nodes.Inline, nodes.TextElement): pass
+
+class desc_parameter(nodes.Part, nodes.Inline, nodes.TextElement):
+ """Node for a single parameter."""
+
class desc_optional(nodes.Part, nodes.Inline, nodes.TextElement):
+ """Node for marking optional parts of the parameter list."""
child_text_separator = ', '
def astext(self):
return '[' + nodes.TextElement.astext(self) + ']'
-# annotation (not Python 3-style annotations)
-class desc_annotation(nodes.Part, nodes.Inline, nodes.TextElement): pass
-# node for content
-class desc_content(nodes.General, nodes.Element): pass
+class desc_annotation(nodes.Part, nodes.Inline, nodes.TextElement):
+ """Node for signature annotations (not Python 3-style annotations)."""
+
+class desc_content(nodes.General, nodes.Element):
+ """Node for object description content.
+
+ This is the "definition" part of the custom Sphinx definition list.
+ """
+
+
+# new admonition-like constructs
+
+class versionmodified(nodes.Admonition, nodes.TextElement):
+ """Node for version change entries.
+
+ Currently used for "versionadded", "versionchanged" and "deprecated"
+ directives.
+ """
+
+class seealso(nodes.Admonition, nodes.Element):
+ """Custom "see also" admonition."""
+
+class productionlist(nodes.Admonition, nodes.Element):
+ """Node for grammar production lists.
+
+ Contains ``production`` nodes.
+ """
+
+class production(nodes.Part, nodes.Inline, nodes.TextElement):
+ """Node for a single grammar production rule."""
+
+
+# other directive-level nodes
+
+class index(nodes.Invisible, nodes.Inline, nodes.TextElement):
+ """Node for index entries.
+
+ This node is created by the ``index`` directive and has one attribute,
+ ``entries``. Its value is a list of 4-tuples of ``(entrytype, entryname,
+ target, ignored)``.
+
+ *entrytype* is one of "single", "pair", "double", "triple".
+ """
+
+class centered(nodes.Part, nodes.Element):
+ """Deprecated."""
+
+class acks(nodes.Element):
+ """Special node for "acks" lists."""
+
+class hlist(nodes.Element):
+ """Node for "horizontal lists", i.e. lists that should be compressed to
+ take up less vertical space.
+ """
-# \versionadded, \versionchanged, \deprecated
-class versionmodified(nodes.Admonition, nodes.TextElement): pass
+class hlistcol(nodes.Element):
+ """Node for one column in a horizontal list."""
-# seealso
-class seealso(nodes.Admonition, nodes.Element): pass
+class compact_paragraph(nodes.paragraph):
+ """Node for a compact paragraph (which never makes a <p> node)."""
-# productionlist
-class productionlist(nodes.Admonition, nodes.Element): pass
-class production(nodes.Part, nodes.Inline, nodes.TextElement): pass
+class glossary(nodes.Element):
+ """Node to insert a glossary."""
-# toc tree
-class toctree(nodes.General, nodes.Element): pass
+class only(nodes.Element):
+ """Node for "only" directives (conditional inclusion based on tags)."""
-# centered
-class centered(nodes.Part, nodes.Element): pass
-# pending xref
-class pending_xref(nodes.Inline, nodes.Element): pass
+# meta-information nodes
-# compact paragraph -- never makes a <p>
-class compact_paragraph(nodes.paragraph): pass
+class start_of_file(nodes.Element):
+ """Node to mark start of a new file, used in the LaTeX builder only."""
-# reference to a file to download
-class download_reference(nodes.reference): pass
+class highlightlang(nodes.Element):
+ """Inserted to set the highlight language and line number options for
+ subsequent code blocks.
+ """
-# for the ACKS list
-class acks(nodes.Element): pass
+class tabular_col_spec(nodes.Element):
+ """Node for specifying tabular columns, used for LaTeX output."""
-# for horizontal lists
-class hlist(nodes.Element): pass
-class hlistcol(nodes.Element): pass
+class meta(nodes.Special, nodes.PreBibliographic, nodes.Element):
+ """Node for meta directive -- same as docutils' standard meta node,
+ but pickleable.
+ """
-# sets the highlighting language for literal blocks
-class highlightlang(nodes.Element): pass
-# like emphasis, but doesn't apply further text processors, e.g. smartypants
-class literal_emphasis(nodes.emphasis): pass
+# inline nodes
-# for abbreviations (with explanations)
-class abbreviation(nodes.Inline, nodes.TextElement): pass
+class pending_xref(nodes.Inline, nodes.Element):
+ """Node for cross-references that cannot be resolved without complete
+ information about all documents.
-# glossary
-class glossary(nodes.Element): pass
+ These nodes are resolved before writing output, in
+ BuildEnvironment.resolve_references.
+ """
-# start of a file, used in the LaTeX builder only
-class start_of_file(nodes.Element): pass
+class download_reference(nodes.reference):
+ """Node for download references, similar to pending_xref."""
-# tabular column specification, used for the LaTeX writer
-class tabular_col_spec(nodes.Element): pass
+class literal_emphasis(nodes.emphasis):
+ """Node that behaves like `emphasis`, but further text processors are not
+ applied (e.g. smartypants for HTML output).
+ """
-# only (in/exclusion based on tags)
-class only(nodes.Element): pass
+class abbreviation(nodes.Inline, nodes.TextElement):
+ """Node for abbreviations with explanations."""
-# meta directive -- same as docutils' standard meta node, but pickleable
-class meta(nodes.Special, nodes.PreBibliographic, nodes.Element): pass
-# make them known to docutils. this is needed, because the HTML writer
-# will choke at some point if these are not added
-nodes._add_node_class_names("""index desc desc_content desc_signature
- desc_type desc_returns desc_addname desc_name desc_parameterlist
- desc_parameter desc_optional download_reference hlist hlistcol
- centered versionmodified seealso productionlist production toctree
- pending_xref compact_paragraph highlightlang literal_emphasis
- abbreviation glossary acks module start_of_file tabular_col_spec
- meta""".split())
+# make the new nodes known to docutils; needed because the HTML writer will
+# choke at some point if these are not added
+nodes._add_node_class_names(k for k in globals().keys()
+ if k != 'nodes' and k[0] != '_')
diff --git a/sphinx/application.py b/sphinx/application.py
index 9b4fb3a3..7042c439 100644
--- a/sphinx/application.py
+++ b/sphinx/application.py
@@ -37,9 +37,6 @@ from sphinx.util.osutil import ENOENT
from sphinx.util.console import bold
-# Directive is either new-style or old-style
-clstypes = (type, types.ClassType)
-
# List of all known core events. Maps name to arguments description.
events = {
'builder-inited': '',
@@ -136,9 +133,8 @@ class Sphinx(object):
self._init_builder(buildername)
def _init_i18n(self):
- """
- Load translated strings from the configured localedirs if
- enabled in the configuration.
+ """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]... ' %
@@ -368,6 +364,9 @@ class Sphinx(object):
elif key == 'man':
from sphinx.writers.manpage import ManualPageTranslator \
as translator
+ elif key == 'texinfo':
+ from sphinx.writers.texinfo import TexinfoTranslator \
+ as translator
else:
# ignore invalid keys for compatibility
continue
@@ -496,8 +495,7 @@ class TemplateBridge(object):
"""
def init(self, builder, theme=None, dirs=None):
- """
- Called by the builder to initialize the template system.
+ """Called by the builder to initialize the template system.
*builder* is the builder object; you'll probably want to look at the
value of ``builder.config.templates_path``.
@@ -508,23 +506,20 @@ class TemplateBridge(object):
raise NotImplementedError('must be implemented in subclasses')
def newest_template_mtime(self):
- """
- Called by the builder to determine if output files are outdated
+ """Called by the builder to determine if output files are outdated
because of template changes. Return the mtime of the newest template
file that was changed. The default implementation returns ``0``.
"""
return 0
def render(self, template, context):
- """
- Called by the builder to render a template given as a filename with a
- specified context (a Python dictionary).
+ """Called by the builder to render a template given as a filename with
+ a specified context (a Python dictionary).
"""
raise NotImplementedError('must be implemented in subclasses')
def render_string(self, template, context):
- """
- Called by the builder to render a template given as a string with a
+ """Called by the builder to render a template given as a string with a
specified context (a Python dictionary).
"""
raise NotImplementedError('must be implemented in subclasses')
diff --git a/sphinx/builders/__init__.py b/sphinx/builders/__init__.py
index 0e4ed026..d96ad58e 100644
--- a/sphinx/builders/__init__.py
+++ b/sphinx/builders/__init__.py
@@ -55,16 +55,13 @@ class Builder(object):
# helper methods
def init(self):
- """
- Load necessary templates and perform initialization. The default
+ """Load necessary templates and perform initialization. The default
implementation does nothing.
"""
pass
def create_template_bridge(self):
- """
- Return the template bridge configured.
- """
+ """Return the template bridge configured."""
if self.config.template_bridge:
self.templates = self.app.import_object(
self.config.template_bridge, 'template_bridge setting')()
@@ -73,23 +70,23 @@ class Builder(object):
self.templates = BuiltinTemplateLoader()
def get_target_uri(self, docname, typ=None):
- """
- Return the target URI for a document name (*typ* can be used to qualify
- the link characteristic for individual builders).
+ """Return the target URI for a document name.
+
+ *typ* can be used to qualify the link characteristic for individual
+ builders.
"""
raise NotImplementedError
def get_relative_uri(self, from_, to, typ=None):
- """
- Return a relative URI between two source filenames. May raise
- environment.NoUri if there's no way to return a sensible URI.
+ """Return a relative URI between two source filenames.
+
+ May raise environment.NoUri if there's no way to return a sensible URI.
"""
return relative_uri(self.get_target_uri(from_),
self.get_target_uri(to, typ))
def get_outdated_docs(self):
- """
- Return an iterable of output files that are outdated, or a string
+ """Return an iterable of output files that are outdated, or a string
describing what an update build will build.
If the builder does not output individual files corresponding to
@@ -129,9 +126,7 @@ class Builder(object):
supported_image_types = []
def post_process_images(self, doctree):
- """
- Pick the best candidate for all image URIs.
- """
+ """Pick the best candidate for all image URIs."""
for node in doctree.traverse(nodes.image):
if '?' in node['candidates']:
# don't rewrite nonlocal image URIs
@@ -198,9 +193,9 @@ class Builder(object):
'out of date' % len(to_build))
def build(self, docnames, summary=None, method='update'):
- """
- Main build method. First updates the environment, and then
- calls :meth:`write`.
+ """Main build method.
+
+ First updates the environment, and then calls :meth:`write`.
"""
if summary:
self.info(bold('building [%s]: ' % self.name), nonl=1)
@@ -302,15 +297,18 @@ class Builder(object):
raise NotImplementedError
def finish(self):
- """
- Finish the building process. The default implementation does nothing.
+ """Finish the building process.
+
+ The default implementation does nothing.
"""
pass
def cleanup(self):
+ """Cleanup any resources.
+
+ The default implementation does nothing.
"""
- Cleanup any resources. The default implementation does nothing.
- """
+ pass
BUILTIN_BUILDERS = {
@@ -327,6 +325,9 @@ BUILTIN_BUILDERS = {
'latex': ('latex', 'LaTeXBuilder'),
'text': ('text', 'TextBuilder'),
'man': ('manpage', 'ManualPageBuilder'),
+ 'texinfo': ('texinfo', 'TexinfoBuilder'),
'changes': ('changes', 'ChangesBuilder'),
'linkcheck': ('linkcheck', 'CheckExternalLinksBuilder'),
+ 'websupport': ('websupport', 'WebSupportBuilder'),
+ 'gettext': ('intl', 'MessageCatalogBuilder'),
}
diff --git a/sphinx/builders/changes.py b/sphinx/builders/changes.py
index 6c19fd30..3e351e6c 100644
--- a/sphinx/builders/changes.py
+++ b/sphinx/builders/changes.py
@@ -30,7 +30,8 @@ class ChangesBuilder(Builder):
def init(self):
self.create_template_bridge()
- Theme.init_themes(self)
+ Theme.init_themes(self.confdir, self.config.html_theme_path,
+ warn=self.warn)
self.theme = Theme('default')
self.templates.init(self, self.theme)
diff --git a/sphinx/builders/devhelp.py b/sphinx/builders/devhelp.py
index fca1602e..a1b41945 100644
--- a/sphinx/builders/devhelp.py
+++ b/sphinx/builders/devhelp.py
@@ -42,7 +42,6 @@ except ImportError:
class DevhelpBuilder(StandaloneHTMLBuilder):
"""
Builder that also outputs GNOME Devhelp file.
-
"""
name = 'devhelp'
diff --git a/sphinx/builders/epub.py b/sphinx/builders/epub.py
index 366587b6..12896503 100644
--- a/sphinx/builders/epub.py
+++ b/sphinx/builders/epub.py
@@ -12,6 +12,7 @@
import os
import re
+import sys
import time
import codecs
import zipfile
@@ -97,6 +98,12 @@ _content_template = u'''\
</package>
'''
+_cover_template = u'''\
+ <meta name="cover" content="%(cover)s"/>
+'''
+
+_coverpage_name = u'epub-cover.html'
+
_file_template = u'''\
<item id="%(id)s"
href="%(href)s"
@@ -132,7 +139,8 @@ _refuri_re = re.compile("([^#:]*#)(.*)")
# The epub publisher
class EpubBuilder(StandaloneHTMLBuilder):
- """Builder that outputs epub files.
+ """
+ Builder that outputs epub files.
It creates the metainfo files container.opf, toc.ncx, mimetype, and
META-INF/container.xml. Afterwards, all necessary files are zipped to an
@@ -229,12 +237,12 @@ class EpubBuilder(StandaloneHTMLBuilder):
})
def fix_fragment(self, prefix, fragment):
- """Return a href/id attribute with colons replaced by hyphens.
- """
+ """Return a href/id attribute with colons replaced by hyphens."""
return prefix + fragment.replace(':', '-')
def fix_ids(self, tree):
"""Replace colons with hyphens in href and id attributes.
+
Some readers crash because they interpret the part as a
transport protocol specification.
"""
@@ -253,8 +261,7 @@ class EpubBuilder(StandaloneHTMLBuilder):
node.attributes['ids'] = newids
def add_visible_links(self, tree):
- """Append visible link targets after external links.
- """
+ """Append visible link targets after external links."""
for node in tree.traverse(nodes.reference):
uri = node.get('refuri', '')
if (uri.startswith('http:') or uri.startswith('https:') or
@@ -268,6 +275,7 @@ class EpubBuilder(StandaloneHTMLBuilder):
def write_doc(self, docname, doctree):
"""Write one document file.
+
This method is overwritten in order to fix fragment identifiers
and to add visible external links.
"""
@@ -276,8 +284,7 @@ class EpubBuilder(StandaloneHTMLBuilder):
return StandaloneHTMLBuilder.write_doc(self, docname, doctree)
def fix_genindex(self, tree):
- """Fix href attributes for genindex pages.
- """
+ """Fix href attributes for genindex pages."""
# XXX: modifies tree inline
# Logic modeled from themes/basic/genindex.html
for key, columns in tree:
@@ -296,8 +303,9 @@ class EpubBuilder(StandaloneHTMLBuilder):
def handle_page(self, pagename, addctx, templatename='page.html',
outfilename=None, event_arg=None):
"""Create a rendered page.
- This method is overwritten for genindex pages in order to fix
- href link attributes.
+
+ This method is overwritten for genindex pages in order to fix href link
+ attributes.
"""
if pagename.startswith('genindex'):
self.fix_genindex(addctx['genindexentries'])
@@ -388,7 +396,6 @@ class EpubBuilder(StandaloneHTMLBuilder):
'media_type': self.esc(_media_types[ext])
})
self.files.append(filename)
- projectfiles = '\n'.join(projectfiles)
# spine
spine = []
@@ -400,12 +407,38 @@ class EpubBuilder(StandaloneHTMLBuilder):
spine.append(_spine_template % {
'idref': self.esc(self.make_id(item['refuri']))
})
+
+ # add the optional cover
+ content_tmpl = _content_template
+ if self.config.epub_cover:
+ image, tmpl = self.config.epub_cover
+ mpos = content_tmpl.rfind('</metadata>')
+ cpos = content_tmpl.rfind('\n', 0 , mpos) + 1
+ content_tmpl = content_tmpl[:cpos] + \
+ _cover_template % {'cover': self.esc(self.make_id(image))} + \
+ content_tmpl[cpos:]
+ if tmpl:
+ spine.insert(0, _spine_template % {
+ 'idref': self.esc(self.make_id(_coverpage_name))})
+ if _coverpage_name not in self.files:
+ ext = path.splitext(_coverpage_name)[-1]
+ self.files.append(_coverpage_name)
+ projectfiles.append(_file_template % {
+ 'href': self.esc(_coverpage_name),
+ 'id': self.esc(self.make_id(_coverpage_name)),
+ 'media_type': self.esc(_media_types[ext])
+ })
+ ctx = {'image': self.esc(image), 'title': self.config.project}
+ self.handle_page(
+ os.path.splitext(_coverpage_name)[0], ctx, tmpl)
+
+ projectfiles = '\n'.join(projectfiles)
spine = '\n'.join(spine)
# write the project file
f = codecs.open(path.join(outdir, outname), 'w', 'utf-8')
try:
- f.write(_content_template % \
+ f.write(content_tmpl % \
self.content_metadata(projectfiles, spine))
finally:
f.close()
@@ -422,6 +455,7 @@ class EpubBuilder(StandaloneHTMLBuilder):
def insert_subnav(self, node, subnav):
"""Insert nested navpoints for given node.
+
The node and subnav are already rendered to text.
"""
nlist = node.rsplit('\n', 1)
@@ -431,8 +465,8 @@ class EpubBuilder(StandaloneHTMLBuilder):
def build_navpoints(self, nodes):
"""Create the toc navigation structure.
- Subelements of a node are nested inside the navpoint.
- For nested nodes the parent node is reinserted in the subnav.
+ Subelements of a node are nested inside the navpoint. For nested nodes
+ the parent node is reinserted in the subnav.
"""
navstack = []
navlist = []
@@ -472,8 +506,8 @@ class EpubBuilder(StandaloneHTMLBuilder):
return '\n'.join(navlist)
def toc_metadata(self, level, navpoints):
- """Create a dictionary with all metadata for the toc.ncx
- file properly escaped.
+ """Create a dictionary with all metadata for the toc.ncx file
+ properly escaped.
"""
metadata = {}
metadata['uid'] = self.config.epub_uid
@@ -498,8 +532,8 @@ class EpubBuilder(StandaloneHTMLBuilder):
def build_epub(self, outdir, outname):
"""Write the epub file.
- It is a zip file with the mimetype file stored uncompressed
- as the first entry.
+ It is a zip file with the mimetype file stored uncompressed as the first
+ entry.
"""
self.info('writing %s file...' % outname)
projectfiles = ['META-INF/container.xml', 'content.opf', 'toc.ncx'] \
@@ -509,7 +543,8 @@ class EpubBuilder(StandaloneHTMLBuilder):
epub.write(path.join(outdir, 'mimetype'), 'mimetype', \
zipfile.ZIP_STORED)
for file in projectfiles:
- if isinstance(file, unicode):
- file = file.encode('utf-8')
- epub.write(path.join(outdir, file), file, zipfile.ZIP_DEFLATED)
+ fp = path.join(outdir, file)
+ if isinstance(fp, unicode):
+ fp = fp.encode(sys.getfilesystemencoding())
+ epub.write(fp, file, zipfile.ZIP_DEFLATED)
epub.close()
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index 8ff628c9..f2801499 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -35,7 +35,7 @@ from sphinx.util.osutil import SEP, os_path, relative_uri, ensuredir, \
movefile, ustrftime, copyfile
from sphinx.util.nodes import inline_all_toctrees
from sphinx.util.matching import patmatch, compile_matchers
-from sphinx.util.pycompat import any
+from sphinx.util.pycompat import any, b
from sphinx.errors import SphinxError
from sphinx.locale import _
from sphinx.search import js_index
@@ -63,6 +63,7 @@ class StandaloneHTMLBuilder(Builder):
out_suffix = '.html'
link_suffix = '.html' # defaults to matching out_suffix
indexer_format = js_index
+ indexer_dumps_unicode = True
supported_image_types = ['image/svg+xml', 'image/png',
'image/gif', 'image/jpeg']
searchindex_filename = 'searchindex.js'
@@ -122,7 +123,8 @@ class StandaloneHTMLBuilder(Builder):
return self.config.html_theme, self.config.html_theme_options
def init_templates(self):
- Theme.init_themes(self)
+ Theme.init_themes(self.confdir, self.config.html_theme_path,
+ warn=self.warn)
themename, themeoptions = self.get_theme_config()
self.theme = Theme(themename)
self.theme_options = themeoptions.copy()
@@ -154,8 +156,9 @@ class StandaloneHTMLBuilder(Builder):
cfgdict = dict((name, self.config[name])
for (name, desc) in self.config.values.iteritems()
if desc[1] == 'html')
- self.config_hash = md5(str(cfgdict)).hexdigest()
- self.tags_hash = md5(str(sorted(self.tags))).hexdigest()
+ self.config_hash = md5(unicode(cfgdict).encode('utf-8')).hexdigest()
+ self.tags_hash = md5(unicode(sorted(self.tags)).encode('utf-8')) \
+ .hexdigest()
old_config_hash = old_tags_hash = ''
try:
fp = open(path.join(self.outdir, '.buildinfo'))
@@ -207,7 +210,7 @@ class StandaloneHTMLBuilder(Builder):
"""Utility: Render a lone doctree node."""
if node is None:
return {'fragment': ''}
- doc = new_document('<partial node>')
+ doc = new_document(b('<partial node>'))
doc.append(node)
if self._publisher is None:
@@ -589,8 +592,7 @@ class StandaloneHTMLBuilder(Builder):
self.theme.cleanup()
def post_process_images(self, doctree):
- """
- Pick the best candidate for an image and link down-scaled images to
+ """Pick the best candidate for an image and link down-scaled images to
their high res version.
"""
Builder.post_process_images(self, doctree)
@@ -614,7 +616,11 @@ class StandaloneHTMLBuilder(Builder):
def load_indexer(self, docnames):
keep = set(self.env.all_docs) - set(docnames)
try:
- f = open(path.join(self.outdir, self.searchindex_filename), 'rb')
+ searchindexfn = path.join(self.outdir, self.searchindex_filename)
+ if self.indexer_dumps_unicode:
+ f = codecs.open(searchindexfn, 'r', encoding='utf-8')
+ else:
+ f = open(searchindexfn, 'rb')
try:
self.indexer.load(f, self.indexer_format)
finally:
@@ -737,10 +743,12 @@ class StandaloneHTMLBuilder(Builder):
self.info(bold('dumping object inventory... '), nonl=True)
f = open(path.join(self.outdir, INVENTORY_FILENAME), 'wb')
try:
- f.write('# Sphinx inventory version 2\n')
- f.write('# Project: %s\n' % self.config.project.encode('utf-8'))
- f.write('# Version: %s\n' % self.config.version.encode('utf-8'))
- f.write('# The remainder of this file is compressed using zlib.\n')
+ f.write((u'# Sphinx inventory version 2\n'
+ u'# Project: %s\n'
+ u'# Version: %s\n'
+ u'# The remainder of this file is compressed using zlib.\n'
+ % (self.config.project, self.config.version)
+ ).encode('utf-8'))
compressor = zlib.compressobj(9)
for domainname, domain in self.env.domains.iteritems():
for name, dispname, type, docname, anchor, prio in \
@@ -752,11 +760,9 @@ class StandaloneHTMLBuilder(Builder):
if dispname == name:
dispname = u'-'
f.write(compressor.compress(
- '%s %s:%s %s %s %s\n' % (name.encode('utf-8'),
- domainname.encode('utf-8'),
- type.encode('utf-8'), prio,
- uri.encode('utf-8'),
- dispname.encode('utf-8'))))
+ (u'%s %s:%s %s %s %s\n' % (name, domainname, type,
+ prio, uri, dispname)
+ ).encode('utf-8')))
f.write(compressor.flush())
finally:
f.close()
@@ -768,7 +774,10 @@ class StandaloneHTMLBuilder(Builder):
searchindexfn = path.join(self.outdir, self.searchindex_filename)
# first write to a temporary file, so that if dumping fails,
# the existing index won't be overwritten
- f = open(searchindexfn + '.tmp', 'wb')
+ if self.indexer_dumps_unicode:
+ f = codecs.open(searchindexfn + '.tmp', 'w', encoding='utf-8')
+ else:
+ f = open(searchindexfn + '.tmp', 'wb')
try:
self.indexer.dump(f, self.indexer_format)
finally:
@@ -925,6 +934,9 @@ class SerializingHTMLBuilder(StandaloneHTMLBuilder):
#: implements a `dump`, `load`, `dumps` and `loads` functions
#: (pickle, simplejson etc.)
implementation = None
+ implementation_dumps_unicode = False
+ #: additional arguments for dump()
+ additional_dump_args = ()
#: the filename for the global context file
globalcontext_filename = None
@@ -947,6 +959,16 @@ class SerializingHTMLBuilder(StandaloneHTMLBuilder):
return docname[:-5] # up to sep
return docname + SEP
+ def dump_context(self, context, filename):
+ if self.implementation_dumps_unicode:
+ f = codecs.open(filename, 'w', encoding='utf-8')
+ else:
+ f = open(filename, 'wb')
+ try:
+ self.implementation.dump(context, f, *self.additional_dump_args)
+ finally:
+ f.close()
+
def handle_page(self, pagename, ctx, templatename='page.html',
outfilename=None, event_arg=None):
ctx['current_page_name'] = pagename
@@ -960,11 +982,7 @@ class SerializingHTMLBuilder(StandaloneHTMLBuilder):
ctx, event_arg)
ensuredir(path.dirname(outfilename))
- f = open(outfilename, 'wb')
- try:
- self.implementation.dump(ctx, f, 2)
- finally:
- f.close()
+ self.dump_context(ctx, outfilename)
# if there is a source file, copy the source file for the
# "show source" link
@@ -977,11 +995,7 @@ class SerializingHTMLBuilder(StandaloneHTMLBuilder):
def handle_finish(self):
# dump the global context
outfilename = path.join(self.outdir, self.globalcontext_filename)
- f = open(outfilename, 'wb')
- try:
- self.implementation.dump(self.globalcontext, f, 2)
- finally:
- f.close()
+ self.dump_context(self.globalcontext, outfilename)
# super here to dump the search index
StandaloneHTMLBuilder.handle_finish(self)
@@ -1001,7 +1015,10 @@ class PickleHTMLBuilder(SerializingHTMLBuilder):
A Builder that dumps the generated HTML into pickle files.
"""
implementation = pickle
+ implementation_dumps_unicode = False
+ additional_dump_args = (pickle.HIGHEST_PROTOCOL,)
indexer_format = pickle
+ indexer_dumps_unicode = False
name = 'pickle'
out_suffix = '.fpickle'
globalcontext_filename = 'globalcontext.pickle'
@@ -1016,7 +1033,9 @@ class JSONHTMLBuilder(SerializingHTMLBuilder):
A builder that dumps the generated HTML into JSON files.
"""
implementation = jsonimpl
+ implementation_dumps_unicode = True
indexer_format = jsonimpl
+ indexer_dumps_unicode = True
name = 'json'
out_suffix = '.fjson'
globalcontext_filename = 'globalcontext.json'
diff --git a/sphinx/builders/htmlhelp.py b/sphinx/builders/htmlhelp.py
index 2c9fe530..9227a6e6 100644
--- a/sphinx/builders/htmlhelp.py
+++ b/sphinx/builders/htmlhelp.py
@@ -258,7 +258,8 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
def write_index(title, refs, subitems):
def write_param(name, value):
item = ' <param name="%s" value="%s">\n' % (name, value)
- f.write(item.encode(self.encoding, 'xmlcharrefreplace'))
+ f.write(item.encode(self.encoding, 'xmlcharrefreplace')
+ .decode(self.encoding))
title = cgi.escape(title)
f.write('<LI> <OBJECT type="text/sitemap">\n')
write_param('Keyword', title)
diff --git a/sphinx/builders/intl.py b/sphinx/builders/intl.py
new file mode 100644
index 00000000..447a20cf
--- /dev/null
+++ b/sphinx/builders/intl.py
@@ -0,0 +1,110 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.builders.intl
+ ~~~~~~~~~~~~~~~~~~~~
+
+ The MessageCatalogBuilder class.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from os import path
+from codecs import open
+from datetime import datetime
+from collections import defaultdict
+
+from docutils import nodes
+
+from sphinx.builders import Builder
+from sphinx.builders.versioning import VersioningBuilderMixin
+from sphinx.util.nodes import extract_messages
+from sphinx.util.osutil import SEP, copyfile
+from sphinx.util.console import darkgreen
+
+POHEADER = ur"""
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) %(copyright)s
+# This file is distributed under the same license as the %(project)s package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: %(version)s\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: %(ctime)s\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+"""[1:]
+
+
+class I18nBuilder(Builder, VersioningBuilderMixin):
+ """
+ General i18n builder.
+ """
+ name = 'i18n'
+
+ def init(self):
+ Builder.init(self)
+ VersioningBuilderMixin.init(self)
+ self.catalogs = defaultdict(dict)
+
+ def get_target_uri(self, docname, typ=None):
+ return ''
+
+ def get_outdated_docs(self):
+ return self.env.found_docs
+
+ def prepare_writing(self, docnames):
+ return
+
+ def write_doc(self, docname, doctree):
+ catalog = self.catalogs[docname.split(SEP, 1)[0]]
+
+ self.handle_versioning(docname, doctree, nodes.TextElement)
+
+ for node, msg in extract_messages(doctree):
+ catalog.setdefault(node.uid, msg)
+
+ def finish(self):
+ Builder.finish(self)
+ VersioningBuilderMixin.finish(self)
+
+
+class MessageCatalogBuilder(I18nBuilder):
+ """
+ Builds gettext-style message catalogs (.pot files).
+ """
+ name = 'gettext'
+
+ def finish(self):
+ I18nBuilder.finish(self)
+ data = dict(
+ version = self.config.version,
+ copyright = self.config.copyright,
+ project = self.config.project,
+ # XXX should supply tz
+ ctime = datetime.now().strftime('%Y-%m-%d %H:%M%z'),
+ )
+ for section, messages in self.status_iterator(
+ self.catalogs.iteritems(), "writing message catalogs... ",
+ lambda (section, _):darkgreen(section), len(self.catalogs)):
+
+ pofn = path.join(self.outdir, section + '.pot')
+ pofile = open(pofn, 'w', encoding='utf-8')
+ try:
+ pofile.write(POHEADER % data)
+ for uid, message in messages.iteritems():
+ # message contains *one* line of text ready for translation
+ message = message.replace(u'\\', ur'\\'). \
+ replace(u'"', ur'\"')
+ pomsg = u'#%s\nmsgid "%s"\nmsgstr ""\n\n' % (uid, message)
+ pofile.write(pomsg)
+ finally:
+ pofile.close()
diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py
index ee114398..ad15b55d 100644
--- a/sphinx/builders/linkcheck.py
+++ b/sphinx/builders/linkcheck.py
@@ -9,9 +9,13 @@
:license: BSD, see LICENSE for details.
"""
+import re
+import sys
+import Queue
import socket
+import threading
from os import path
-from urllib2 import build_opener, HTTPError
+from urllib2 import build_opener, Request
from docutils import nodes
@@ -23,6 +27,12 @@ opener = build_opener()
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
+class HeadRequest(Request):
+ """Subclass of urllib2.Request that sends a HEAD request."""
+ def get_method(self):
+ return 'HEAD'
+
+
class CheckExternalLinksBuilder(Builder):
"""
Checks for broken external links.
@@ -30,6 +40,7 @@ class CheckExternalLinksBuilder(Builder):
name = 'linkcheck'
def init(self):
+ self.to_ignore = map(re.compile, self.app.config.linkcheck_ignore)
self.good = set()
self.broken = {}
self.redirected = {}
@@ -38,6 +49,83 @@ class CheckExternalLinksBuilder(Builder):
# create output file
open(path.join(self.outdir, 'output.txt'), 'w').close()
+ # create queues and worker threads
+ self.wqueue = Queue.Queue()
+ self.rqueue = Queue.Queue()
+ self.workers = []
+ for i in range(self.app.config.linkcheck_workers):
+ thread = threading.Thread(target=self.check_thread)
+ thread.setDaemon(True)
+ thread.start()
+ self.workers.append(thread)
+
+ def check_thread(self):
+ kwargs = {}
+ if sys.version_info > (2, 5) and self.app.config.linkcheck_timeout:
+ kwargs['timeout'] = self.app.config.linkcheck_timeout
+
+ def check():
+ # check for various conditions without bothering the network
+ if len(uri) == 0 or uri[0:7] == 'mailto:' or uri[0:4] == 'ftp:':
+ return 'unchecked', ''
+ elif not (uri[0:5] == 'http:' or uri[0:6] == 'https:'):
+ return 'local', ''
+ elif uri in self.good:
+ return 'working', ''
+ elif uri in self.broken:
+ return 'broken', self.broken[uri]
+ elif uri in self.redirected:
+ return 'redirected', self.redirected[uri]
+ for rex in self.to_ignore:
+ if rex.match(uri):
+ return 'ignored', ''
+
+ # need to actually check the URI
+ try:
+ f = opener.open(HeadRequest(uri), **kwargs)
+ f.close()
+ except Exception, err:
+ self.broken[uri] = str(err)
+ return 'broken', str(err)
+ if f.url.rstrip('/') == uri.rstrip('/'):
+ self.good.add(uri)
+ return 'working', 'new'
+ else:
+ self.redirected[uri] = f.url
+ return 'redirected', f.url
+
+ while True:
+ uri, docname, lineno = self.wqueue.get()
+ if uri is None:
+ break
+ status, info = check()
+ self.rqueue.put((uri, docname, lineno, status, info))
+
+ def process_result(self, result):
+ uri, docname, lineno, status, info = result
+ if status == 'unchecked':
+ return
+ if status == 'working' and info != 'new':
+ return
+ if lineno:
+ self.info('(line %3d) ' % lineno, nonl=1)
+ if status == 'ignored':
+ self.info(uri + ' - ' + darkgray('ignored'))
+ elif status == 'local':
+ self.info(uri + ' - ' + darkgray('local'))
+ self.write_entry('local', docname, lineno, uri)
+ elif status == 'working':
+ self.info(uri + ' - ' + darkgreen('working'))
+ elif status == 'broken':
+ self.info(uri + ' - ' + red('broken: ') + info)
+ self.write_entry('broken', docname, lineno, uri + ': ' + info)
+ if self.app.quiet:
+ self.warn('broken link: %s' % uri,
+ '%s:%s' % (self.env.doc2path(docname), lineno))
+ elif status == 'redirected':
+ self.info(uri + ' - ' + purple('redirected') + ' to ' + info)
+ self.write_entry('redirected', docname, lineno, uri + ' to ' + info)
+
def get_target_uri(self, docname, typ=None):
return ''
@@ -49,61 +137,25 @@ class CheckExternalLinksBuilder(Builder):
def write_doc(self, docname, doctree):
self.info()
+ n = 0
for node in doctree.traverse(nodes.reference):
- try:
- self.check(node, docname)
- except KeyError:
+ if 'refuri' not in node:
continue
-
- def check(self, node, docname):
- uri = node['refuri']
-
- if '#' in uri:
- uri = uri.split('#')[0]
-
- if uri in self.good:
- return
-
- lineno = None
- while lineno is None:
- node = node.parent
- if node is None:
- break
- lineno = node.line
-
- if len(uri) == 0 or uri[0:7] == 'mailto:' or uri[0:4] == 'ftp:':
- return
-
- if lineno:
- self.info('(line %3d) ' % lineno, nonl=1)
- if uri[0:5] == 'http:' or uri[0:6] == 'https:':
- self.info(uri, nonl=1)
-
- if uri in self.broken:
- (r, s) = self.broken[uri]
- elif uri in self.redirected:
- (r, s) = self.redirected[uri]
- else:
- (r, s) = self.resolve(uri)
-
- if r == 0:
- self.info(' - ' + darkgreen('working'))
- self.good.add(uri)
- elif r == 2:
- self.info(' - ' + red('broken: ') + s)
- self.write_entry('broken', docname, lineno, uri + ': ' + s)
- self.broken[uri] = (r, s)
- if self.app.quiet:
- self.warn('broken link: %s' % uri,
- '%s:%s' % (self.env.doc2path(docname), lineno))
- else:
- self.info(' - ' + purple('redirected') + ' to ' + s)
- self.write_entry('redirected', docname,
- lineno, uri + ' to ' + s)
- self.redirected[uri] = (r, s)
- else:
- self.info(uri + ' - ' + darkgray('local'))
- self.write_entry('local', docname, lineno, uri)
+ uri = node['refuri']
+ if '#' in uri:
+ uri = uri.split('#')[0]
+ lineno = None
+ while lineno is None:
+ node = node.parent
+ if node is None:
+ break
+ lineno = node.line
+ self.wqueue.put((uri, docname, lineno), False)
+ n += 1
+ done = 0
+ while done < n:
+ self.process_result(self.rqueue.get())
+ done += 1
if self.broken:
self.app.statuscode = 1
@@ -114,21 +166,6 @@ class CheckExternalLinksBuilder(Builder):
line, what, uri))
output.close()
- def resolve(self, uri):
- try:
- f = opener.open(uri)
- f.close()
- except HTTPError, err:
- #if err.code == 403 and uri.startswith('http://en.wikipedia.org/'):
- # # Wikipedia blocks requests from urllib User-Agent
- # return (0, 0)
- return (2, str(err))
- except Exception, err:
- return (2, str(err))
- if f.url.rstrip('/') == uri.rstrip('/'):
- return (0, 0)
- else:
- return (1, f.url)
-
def finish(self):
- return
+ for worker in self.workers:
+ self.wqueue.put((None, None, None), False)
diff --git a/sphinx/builders/qthelp.py b/sphinx/builders/qthelp.py
index bf536dba..5598aad2 100644
--- a/sphinx/builders/qthelp.py
+++ b/sphinx/builders/qthelp.py
@@ -130,8 +130,16 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
for indexname, indexcls, content, collapse in self.domain_indices:
item = section_template % {'title': indexcls.localname,
'ref': '%s.html' % indexname}
- sections.append(' '*4*4 + item)
- sections = '\n'.join(sections)
+ sections.append((' ' * 4 * 4 + item).encode('utf-8'))
+ # sections may be unicode strings or byte strings, we have to make sure
+ # they are all byte strings before joining them
+ new_sections = []
+ for section in sections:
+ if isinstance(section, unicode):
+ new_sections.append(section.encode('utf-8'))
+ else:
+ new_sections.append(section)
+ sections = u'\n'.encode('utf-8').join(new_sections)
# keywords
keywords = []
@@ -231,7 +239,7 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
link = node['refuri']
title = escape(node.astext()).replace('"','&quot;')
item = section_template % {'title': title, 'ref': link}
- item = ' '*4*indentlevel + item.encode('ascii', 'xmlcharrefreplace')
+ item = u' ' * 4 * indentlevel + item
parts.append(item.encode('ascii', 'xmlcharrefreplace'))
elif isinstance(node, nodes.bullet_list):
for subnode in node:
diff --git a/sphinx/builders/texinfo.py b/sphinx/builders/texinfo.py
new file mode 100644
index 00000000..9d8749a9
--- /dev/null
+++ b/sphinx/builders/texinfo.py
@@ -0,0 +1,228 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.builders.texinfo
+ ~~~~~~~~~~~~~~~~~~~~~~~
+
+ Texinfo builder.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from os import path
+
+from docutils import nodes
+from docutils.io import FileOutput
+from docutils.utils import new_document
+from docutils.frontend import OptionParser
+
+from sphinx import addnodes
+from sphinx.locale import _
+from sphinx.builders import Builder
+from sphinx.environment import NoUri
+from sphinx.util.nodes import inline_all_toctrees
+from sphinx.util.osutil import SEP
+from sphinx.util.console import bold, darkgreen
+from sphinx.writers.texinfo import TexinfoWriter
+
+
+TEXINFO_MAKEFILE = '''\
+# Makefile for Sphinx Texinfo output
+
+infodir ?= /usr/share/info
+
+MAKEINFO = makeinfo --no-split
+MAKEINFO_html = makeinfo --no-split --html
+MAKEINFO_plaintext = makeinfo --no-split --plaintext
+TEXI2PDF = texi2pdf --batch --expand
+INSTALL_INFO = install-info
+
+ALLDOCS = $(basename $(wildcard *.texi))
+
+all: info
+info: $(addsuffix .info,$(ALLDOCS))
+plaintext: $(addsuffix .txt,$(ALLDOCS))
+html: $(addsuffix .html,$(ALLDOCS))
+pdf: $(addsuffix .pdf,$(ALLDOCS))
+
+install-info: info
+\tfor f in *.info; do \\
+\t cp -t $(infodir) "$$f" && \\
+\t $(INSTALL_INFO) --info-dir=$(infodir) "$$f" ; \\
+\tdone
+
+uninstall-info: info
+\tfor f in *.info; do \\
+\t rm -f "$(infodir)/$$f" ; \\
+\t $(INSTALL_INFO) --delete --info-dir=$(infodir) "$$f" ; \\
+\tdone
+
+%.info: %.texi
+\t$(MAKEINFO) -o '$@' '$<'
+
+%.txt: %.texi
+\t$(MAKEINFO_plaintext) -o '$@' '$<'
+
+%.html: %.texi
+\t$(MAKEINFO_html) -o '$@' '$<'
+
+%.pdf: %.texi
+\t-$(TEXI2PDF) '$<'
+\t-$(TEXI2PDF) '$<'
+\t-$(TEXI2PDF) '$<'
+
+clean:
+\t-rm -f *.info *.pdf *.txt *.html
+\t-rm -f *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla *.ky *.pg
+\t-rm -f *.vr *.tp *.fn *.fns *.def *.defs *.cp *.cps *.ge *.ges *.mo
+
+.PHONY: all info plaintext html pdf install-info uninstall-info clean
+'''
+
+
+class TexinfoBuilder(Builder):
+ """
+ Builds Texinfo output to create Info documentation.
+ """
+ name = 'texinfo'
+ format = 'texinfo'
+ supported_image_types = []
+
+ def init(self):
+ self.docnames = []
+ self.document_data = []
+
+ def get_outdated_docs(self):
+ return 'all documents' # for now
+
+ def get_target_uri(self, docname, typ=None):
+ if docname not in self.docnames:
+ raise NoUri
+ else:
+ return '%' + docname
+
+ def get_relative_uri(self, from_, to, typ=None):
+ # ignore source path
+ return self.get_target_uri(to, typ)
+
+ def init_document_data(self):
+ preliminary_document_data = map(list, self.config.texinfo_documents)
+ if not preliminary_document_data:
+ self.warn('no "texinfo_documents" config value found; no documents '
+ 'will be written')
+ return
+ # assign subdirs to titles
+ self.titles = []
+ for entry in preliminary_document_data:
+ docname = entry[0]
+ if docname not in self.env.all_docs:
+ self.warn('"texinfo_documents" config value references unknown '
+ 'document %s' % docname)
+ continue
+ self.document_data.append(entry)
+ if docname.endswith(SEP+'index'):
+ docname = docname[:-5]
+ self.titles.append((docname, entry[2]))
+
+ def write(self, *ignored):
+ self.init_document_data()
+ for entry in self.document_data:
+ docname, targetname, title, author = entry[:4]
+ targetname += '.texi'
+ direntry = description = category = ''
+ if len(entry) > 6:
+ direntry, description, category = entry[4:7]
+ toctree_only = False
+ if len(entry) > 7:
+ toctree_only = entry[7]
+ destination = FileOutput(
+ destination_path=path.join(self.outdir, targetname),
+ encoding='utf-8')
+ self.info("processing " + targetname + "... ", nonl=1)
+ doctree = self.assemble_doctree(docname, toctree_only,
+ appendices=(self.config.texinfo_appendices or []))
+ self.info("writing... ", nonl=1)
+
+ # Add an Index section
+ if self.config.texinfo_domain_indices:
+ doctree.append(
+ nodes.section('',
+ nodes.title(_("Index"),
+ nodes.Text(_('Index'),
+ _('Index'))),
+ nodes.raw('@printindex ge\n',
+ nodes.Text('@printindex ge\n',
+ '@printindex ge\n'),
+ format="texinfo")))
+ docwriter = TexinfoWriter(self)
+ settings = OptionParser(
+ defaults=self.env.settings,
+ components=(docwriter,)).get_default_values()
+ settings.author = author
+ settings.title = title
+ settings.texinfo_filename = targetname[:-5] + '.info'
+ settings.texinfo_elements = self.config.texinfo_elements
+ settings.texinfo_dir_entry = direntry or ''
+ settings.texinfo_dir_category = category or ''
+ settings.texinfo_dir_description = description or ''
+ settings.docname = docname
+ doctree.settings = settings
+ docwriter.write(doctree, destination)
+ self.info("done")
+
+ def assemble_doctree(self, indexfile, toctree_only, appendices):
+ self.docnames = set([indexfile] + appendices)
+ self.info(darkgreen(indexfile) + " ", nonl=1)
+ tree = self.env.get_doctree(indexfile)
+ tree['docname'] = indexfile
+ if toctree_only:
+ # extract toctree nodes from the tree and put them in a
+ # fresh document
+ new_tree = new_document('<texinfo output>')
+ new_sect = nodes.section()
+ new_sect += nodes.title(u'<Set title in conf.py>',
+ u'<Set title in conf.py>')
+ new_tree += new_sect
+ for node in tree.traverse(addnodes.toctree):
+ new_sect += node
+ tree = new_tree
+ largetree = inline_all_toctrees(self, self.docnames, indexfile, tree,
+ darkgreen)
+ largetree['docname'] = indexfile
+ for docname in appendices:
+ appendix = self.env.get_doctree(docname)
+ appendix['docname'] = docname
+ largetree.append(appendix)
+ self.info()
+ self.info("resolving references...")
+ self.env.resolve_references(largetree, indexfile, self)
+ # TODO: add support for external :ref:s
+ for pendingnode in largetree.traverse(addnodes.pending_xref):
+ docname = pendingnode['refdocname']
+ sectname = pendingnode['refsectname']
+ newnodes = [nodes.emphasis(sectname, sectname)]
+ for subdir, title in self.titles:
+ if docname.startswith(subdir):
+ newnodes.append(nodes.Text(_(' (in '), _(' (in ')))
+ newnodes.append(nodes.emphasis(title, title))
+ newnodes.append(nodes.Text(')', ')'))
+ break
+ else:
+ pass
+ pendingnode.replace_self(newnodes)
+ return largetree
+
+ def finish(self):
+ self.info(bold('copying Texinfo support files... '), nonl=True)
+ # copy Makefile
+ fn = path.join(self.outdir, 'Makefile')
+ self.info(fn, nonl=1)
+ try:
+ mkfile = open(fn, 'w')
+ try:
+ mkfile.write(TEXINFO_MAKEFILE)
+ finally:
+ mkfile.close()
+ except (IOError, OSError), err:
+ self.warn("error writing file %s: %s" % (fn, err))
+ self.info(' done')
diff --git a/sphinx/builders/versioning.py b/sphinx/builders/versioning.py
new file mode 100644
index 00000000..8c6438c7
--- /dev/null
+++ b/sphinx/builders/versioning.py
@@ -0,0 +1,72 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.builders.versioning
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+import os
+import cPickle as pickle
+
+from docutils.utils import Reporter
+
+from sphinx.util.osutil import copyfile
+from sphinx.environment import WarningStream
+from sphinx.versioning import add_uids, merge_doctrees
+
+
+class VersioningBuilderMixin(object):
+ def walk_doctree_files(self):
+ for root, dirs, files in os.walk(self.doctreedir):
+ for fn in files:
+ yield os.path.join(root, fn)
+
+ def init(self):
+ for fp in self.walk_doctree_files():
+ if fp.endswith('.doctree'):
+ copyfile(fp, fp + '.old')
+
+ def get_old_doctree(self, docname):
+ fp = self.env.doc2path(docname, self.doctreedir, '.doctree.old')
+ try:
+ f = open(fp, 'rb')
+ try:
+ doctree = pickle.load(f)
+ finally:
+ f.close()
+ except IOError:
+ return None
+ doctree.settings.env = self.env
+ doctree.reporter = Reporter(self.env.doc2path(docname), 2, 5,
+ stream=WarningStream(self.env._warnfunc))
+ return doctree
+
+ def resave_doctree(self, docname, doctree):
+ reporter = doctree.reporter
+ doctree.reporter = None
+ doctree.settings.warning_stream = None
+ doctree.settings.env = None
+ doctree.settings.record_dependencies = None
+
+ fp = self.env.doc2path(docname, self.doctreedir, '.doctree')
+ f = open(fp, 'wb')
+ try:
+ pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL)
+ finally:
+ f.close()
+
+ doctree.reporter = reporter
+
+ def handle_versioning(self, docname, doctree, condition):
+ old_doctree = self.get_old_doctree(docname)
+ if old_doctree:
+ list(merge_doctrees(old_doctree, doctree, condition))
+ else:
+ list(add_uids(doctree, condition))
+ self.resave_doctree(docname, doctree)
+
+ def finish(self):
+ for fp in self.walk_doctree_files():
+ if fp.endswith('.doctree.old'):
+ os.remove(fp)
diff --git a/sphinx/builders/websupport.py b/sphinx/builders/websupport.py
new file mode 100644
index 00000000..5165bc19
--- /dev/null
+++ b/sphinx/builders/websupport.py
@@ -0,0 +1,160 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.builders.websupport
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Builder for the web support package.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from os import path
+import posixpath
+import shutil
+
+from docutils.io import StringOutput
+
+from sphinx.jinja2glue import BuiltinTemplateLoader
+from sphinx.util.osutil import os_path, relative_uri, ensuredir, copyfile
+from sphinx.util.websupport import is_commentable
+from sphinx.builders.html import PickleHTMLBuilder
+from sphinx.builders.versioning import VersioningBuilderMixin
+from sphinx.writers.websupport import WebSupportTranslator
+
+
+class WebSupportBuilder(PickleHTMLBuilder, VersioningBuilderMixin):
+ """
+ Builds documents for the web support package.
+ """
+ name = 'websupport'
+
+ def init(self):
+ PickleHTMLBuilder.init(self)
+ VersioningBuilderMixin.init(self)
+ # templates are needed for this builder, but the serializing
+ # builder does not initialize them
+ self.init_templates()
+ if not isinstance(self.templates, BuiltinTemplateLoader):
+ raise RuntimeError('websupport builder must be used with '
+ 'the builtin templates')
+ # add our custom JS
+ self.script_files.append('_static/websupport.js')
+
+ def set_webinfo(self, staticdir, virtual_staticdir, search, storage):
+ self.staticdir = staticdir
+ self.virtual_staticdir = virtual_staticdir
+ self.search = search
+ self.storage = storage
+
+ def init_translator_class(self):
+ self.translator_class = WebSupportTranslator
+
+ def prepare_writing(self, docnames):
+ PickleHTMLBuilder.prepare_writing(self, docnames)
+ self.globalcontext['no_search_suffix'] = True
+
+ def write_doc(self, docname, doctree):
+ destination = StringOutput(encoding='utf-8')
+ doctree.settings = self.docsettings
+
+ self.handle_versioning(docname, doctree, is_commentable)
+
+ self.cur_docname = docname
+ self.secnumbers = self.env.toc_secnumbers.get(docname, {})
+ self.imgpath = '/' + posixpath.join(self.virtual_staticdir, '_images')
+ self.post_process_images(doctree)
+ self.dlpath = '/' + posixpath.join(self.virtual_staticdir, '_downloads')
+ self.docwriter.write(doctree, destination)
+ self.docwriter.assemble_parts()
+ body = self.docwriter.parts['fragment']
+ metatags = self.docwriter.clean_meta
+
+ ctx = self.get_doc_context(docname, body, metatags)
+ self.index_page(docname, doctree, ctx.get('title', ''))
+ self.handle_page(docname, ctx, event_arg=doctree)
+
+ def load_indexer(self, docnames):
+ self.indexer = self.search
+ self.indexer.init_indexing(changed=docnames)
+
+ def _render_page(self, pagename, addctx, templatename, event_arg=None):
+ # This is mostly copied from StandaloneHTMLBuilder. However, instead
+ # of rendering the template and saving the html, create a context
+ # dict and pickle it.
+ ctx = self.globalcontext.copy()
+ ctx['pagename'] = pagename
+
+ def pathto(otheruri, resource=False,
+ baseuri=self.get_target_uri(pagename)):
+ if resource and '://' in otheruri:
+ return otheruri
+ elif not resource:
+ otheruri = self.get_target_uri(otheruri)
+ return relative_uri(baseuri, otheruri) or '#'
+ else:
+ return '/' + posixpath.join(self.virtual_staticdir, otheruri)
+ ctx['pathto'] = pathto
+ ctx['hasdoc'] = lambda name: name in self.env.all_docs
+ ctx['encoding'] = self.config.html_output_encoding
+ ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw)
+ self.add_sidebars(pagename, ctx)
+ ctx.update(addctx)
+
+ self.app.emit('html-page-context', pagename, templatename,
+ ctx, event_arg)
+
+ # create a dict that will be pickled and used by webapps
+ doc_ctx = {
+ 'body': ctx.get('body', ''),
+ 'title': ctx.get('title', ''),
+ }
+ # partially render the html template to get at interesting macros
+ template = self.templates.environment.get_template(templatename)
+ template_module = template.make_module(ctx)
+ for item in ['sidebar', 'relbar', 'script', 'css']:
+ if hasattr(template_module, item):
+ doc_ctx[item] = getattr(template_module, item)()
+
+ return ctx, doc_ctx
+
+ def handle_page(self, pagename, addctx, templatename='page.html',
+ outfilename=None, event_arg=None):
+ ctx, doc_ctx = self._render_page(pagename, addctx,
+ templatename, event_arg)
+
+ if not outfilename:
+ outfilename = path.join(self.outdir, 'pickles',
+ os_path(pagename) + self.out_suffix)
+ ensuredir(path.dirname(outfilename))
+ self.dump_context(doc_ctx, outfilename)
+
+ # if there is a source file, copy the source file for the
+ # "show source" link
+ if ctx.get('sourcename'):
+ source_name = path.join(self.staticdir,
+ '_sources', os_path(ctx['sourcename']))
+ ensuredir(path.dirname(source_name))
+ copyfile(self.env.doc2path(pagename), source_name)
+
+ def handle_finish(self):
+ # get global values for css and script files
+ _, doc_ctx = self._render_page('tmp', {}, 'page.html')
+ self.globalcontext['css'] = doc_ctx['css']
+ self.globalcontext['script'] = doc_ctx['script']
+
+ PickleHTMLBuilder.handle_finish(self)
+ VersioningBuilderMixin.finish(self)
+
+ # move static stuff over to separate directory
+ directories = ['_images', '_static']
+ for directory in directories:
+ src = path.join(self.outdir, directory)
+ dst = path.join(self.staticdir, directory)
+ if path.isdir(src):
+ if path.isdir(dst):
+ shutil.rmtree(dst)
+ shutil.move(src, dst)
+
+ def dump_search_index(self):
+ self.indexer.finish_indexing()
diff --git a/sphinx/config.py b/sphinx/config.py
index 19e29919..febc0a60 100644
--- a/sphinx/config.py
+++ b/sphinx/config.py
@@ -11,16 +11,23 @@
import os
import re
+import sys
from os import path
from sphinx.errors import ConfigError
from sphinx.util.osutil import make_filename
+from sphinx.util.pycompat import bytes, b, convert_with_2to3
-nonascii_re = re.compile(r'[\x80-\xff]')
+nonascii_re = re.compile(b(r'[\x80-\xff]'))
+CONFIG_SYNTAX_ERROR = "There is a syntax error in your configuration file: %s"
+if sys.version_info >= (3, 0):
+ CONFIG_SYNTAX_ERROR += "\nDid you change the syntax from 2.x to 3.x?"
class Config(object):
- """Configuration file abstraction."""
+ """
+ Configuration file abstraction.
+ """
# the values are: (default, what needs to be rebuilt if changed)
@@ -85,7 +92,7 @@ class Config(object):
html_additional_pages = ({}, 'html'),
html_use_modindex = (True, 'html'), # deprecated
html_domain_indices = (True, 'html'),
- html_add_permalinks = (True, 'html'),
+ html_add_permalinks = (u'\u00B6', 'html'),
html_use_index = (True, 'html'),
html_split_index = (False, 'html'),
html_copy_source = (True, 'html'),
@@ -120,6 +127,7 @@ class Config(object):
epub_identifier = ('unknown', 'html'),
epub_scheme = ('unknown', 'html'),
epub_uid = ('unknown', 'env'),
+ epub_cover = ((), 'env'),
epub_pre_files = ([], 'env'),
epub_post_files = ([], 'env'),
epub_exclude_files = ([], 'env'),
@@ -151,6 +159,17 @@ class Config(object):
# manpage options
man_pages = ([], None),
+
+ # Texinfo options
+ texinfo_documents = ([], None),
+ texinfo_appendices = ([], None),
+ texinfo_elements = ({}, None),
+ texinfo_domain_indices = (True, None),
+
+ # linkcheck options
+ linkcheck_ignore = ([], None),
+ linkcheck_timeout = (None, None),
+ linkcheck_workers = (5, None),
)
def __init__(self, dirname, filename, overrides, tags):
@@ -163,12 +182,30 @@ class Config(object):
config['tags'] = tags
olddir = os.getcwd()
try:
+ # we promise to have the config dir as current dir while the
+ # config file is executed
+ os.chdir(dirname)
+ # get config source
+ f = open(config_file, 'rb')
+ try:
+ source = f.read()
+ finally:
+ f.close()
try:
- os.chdir(dirname)
- execfile(config['__file__'], config)
+ # compile to a code object, handle syntax errors
+ try:
+ code = compile(source, config_file, 'exec')
+ except SyntaxError:
+ if convert_with_2to3:
+ # maybe the file uses 2.x syntax; try to refactor to
+ # 3.x syntax using 2to3
+ source = convert_with_2to3(config_file)
+ code = compile(source, config_file, 'exec')
+ else:
+ raise
+ exec code in config
except SyntaxError, err:
- raise ConfigError('There is a syntax error in your '
- 'configuration file: ' + str(err))
+ raise ConfigError(CONFIG_SYNTAX_ERROR % err)
finally:
os.chdir(olddir)
@@ -182,10 +219,11 @@ class Config(object):
# check all string values for non-ASCII characters in bytestrings,
# since that can result in UnicodeErrors all over the place
for name, value in self._raw_config.iteritems():
- if isinstance(value, str) and nonascii_re.search(value):
+ if isinstance(value, bytes) and nonascii_re.search(value):
warn('the config value %r is set to a string with non-ASCII '
'characters; this can lead to Unicode errors occurring. '
- 'Please use Unicode strings, e.g. u"Content".' % name)
+ 'Please use Unicode strings, e.g. %r.' % (name, u'Content')
+ )
def init_values(self):
config = self._raw_config
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py
index f72af912..99ba21cc 100644
--- a/sphinx/directives/code.py
+++ b/sphinx/directives/code.py
@@ -7,10 +7,8 @@
:license: BSD, see LICENSE for details.
"""
-import os
import sys
import codecs
-from os import path
from docutils import nodes
from docutils.parsers.rst import Directive, directives
@@ -93,23 +91,11 @@ class LiteralInclude(Directive):
def run(self):
document = self.state.document
- filename = self.arguments[0]
if not document.settings.file_insertion_enabled:
return [document.reporter.warning('File insertion disabled',
line=self.lineno)]
env = document.settings.env
- if filename.startswith('/') or filename.startswith(os.sep):
- rel_fn = filename[1:]
- else:
- docdir = path.dirname(env.doc2path(env.docname, base=None))
- rel_fn = path.join(docdir, filename)
- try:
- fn = path.join(env.srcdir, rel_fn)
- except UnicodeDecodeError:
- # the source directory is a bytestring with non-ASCII characters;
- # let's try to encode the rel_fn in the file system encoding
- rel_fn = rel_fn.encode(sys.getfilesystemencoding())
- fn = path.join(env.srcdir, rel_fn)
+ rel_filename, filename = env.relfn2path(self.arguments[0])
if 'pyobject' in self.options and 'lines' in self.options:
return [document.reporter.warning(
@@ -119,7 +105,7 @@ class LiteralInclude(Directive):
encoding = self.options.get('encoding', env.config.source_encoding)
codec_info = codecs.lookup(encoding)
try:
- f = codecs.StreamReaderWriter(open(fn, 'U'),
+ f = codecs.StreamReaderWriter(open(filename, 'rb'),
codec_info[2], codec_info[3], 'strict')
lines = f.readlines()
f.close()
@@ -136,7 +122,7 @@ class LiteralInclude(Directive):
objectname = self.options.get('pyobject')
if objectname is not None:
from sphinx.pycode import ModuleAnalyzer
- analyzer = ModuleAnalyzer.for_file(fn, '')
+ analyzer = ModuleAnalyzer.for_file(filename, '')
tags = analyzer.find_tags()
if objectname not in tags:
return [document.reporter.warning(
@@ -178,13 +164,13 @@ class LiteralInclude(Directive):
text = ''.join(lines)
if self.options.get('tab-width'):
text = text.expandtabs(self.options['tab-width'])
- retnode = nodes.literal_block(text, text, source=fn)
+ retnode = nodes.literal_block(text, text, source=filename)
retnode.line = 1
if self.options.get('language', ''):
retnode['language'] = self.options['language']
if 'linenos' in self.options:
retnode['linenos'] = True
- document.settings.env.note_dependency(rel_fn)
+ env.note_dependency(rel_filename)
return [retnode]
diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py
index c798f579..eab576f8 100644
--- a/sphinx/directives/other.py
+++ b/sphinx/directives/other.py
@@ -11,21 +11,28 @@ import os
from docutils import nodes
from docutils.parsers.rst import Directive, directives
+from docutils.parsers.rst.directives.misc import Class
+from docutils.parsers.rst.directives.misc import Include as BaseInclude
from sphinx import addnodes
-from sphinx.locale import pairindextypes, _
+from sphinx.locale import _
from sphinx.util import url_re, docname_join
-from sphinx.util.nodes import explicit_title_re
+from sphinx.util.nodes import explicit_title_re, process_index_entry
from sphinx.util.compat import make_admonition
from sphinx.util.matching import patfilter
+def int_or_nothing(argument):
+ if not argument:
+ return 999
+ return int(argument)
+
+
class TocTree(Directive):
"""
Directive to notify Sphinx about the hierarchical structure of the docs,
and to include a table-of-contents like tree in the current document.
"""
-
has_content = True
required_arguments = 0
optional_arguments = 0
@@ -34,7 +41,7 @@ class TocTree(Directive):
'maxdepth': int,
'glob': directives.flag,
'hidden': directives.flag,
- 'numbered': directives.flag,
+ 'numbered': int_or_nothing,
'titlesonly': directives.flag,
}
@@ -98,7 +105,7 @@ class TocTree(Directive):
subnode['maxdepth'] = self.options.get('maxdepth', -1)
subnode['glob'] = glob
subnode['hidden'] = 'hidden' in self.options
- subnode['numbered'] = 'numbered' in self.options
+ subnode['numbered'] = self.options.get('numbered', 0)
subnode['titlesonly'] = 'titlesonly' in self.options
wrappernode = nodes.compound(classes=['toctree-wrapper'])
wrappernode.append(subnode)
@@ -111,7 +118,6 @@ class Author(Directive):
Directive to give the name of the author of the current document
or section. Shown in the output only if the show_authors option is on.
"""
-
has_content = False
required_arguments = 1
optional_arguments = 0
@@ -144,17 +150,12 @@ class Index(Directive):
"""
Directive to add entries to the index.
"""
-
has_content = False
required_arguments = 1
optional_arguments = 0
final_argument_whitespace = True
option_spec = {}
- indextypes = [
- 'single', 'pair', 'double', 'triple',
- ]
-
def run(self):
arguments = self.arguments[0].split('\n')
env = self.state.document.settings.env
@@ -164,28 +165,7 @@ class Index(Directive):
indexnode = addnodes.index()
indexnode['entries'] = ne = []
for entry in arguments:
- entry = entry.strip()
- for type in pairindextypes:
- if entry.startswith(type+':'):
- value = entry[len(type)+1:].strip()
- value = pairindextypes[type] + '; ' + value
- ne.append(('pair', value, targetid, value))
- break
- else:
- for type in self.indextypes:
- if entry.startswith(type+':'):
- value = entry[len(type)+1:].strip()
- if type == 'double':
- type = 'pair'
- ne.append((type, value, targetid, value))
- break
- # shorthand notation for single entries
- else:
- for value in entry.split(','):
- value = value.strip()
- if not value:
- continue
- ne.append(('single', value, targetid, value))
+ ne.extend(process_index_entry(entry, targetid))
return [indexnode, targetnode]
@@ -193,7 +173,6 @@ class VersionChange(Directive):
"""
Directive to describe a change/addition/deprecation in a specific version.
"""
-
has_content = True
required_arguments = 1
optional_arguments = 1
@@ -223,7 +202,6 @@ class SeeAlso(Directive):
"""
An admonition mentioning things to look at as reference.
"""
-
has_content = True
required_arguments = 0
optional_arguments = 1
@@ -249,7 +227,6 @@ class TabularColumns(Directive):
"""
Directive to give an explicit tabulary column definition to LaTeX.
"""
-
has_content = False
required_arguments = 1
optional_arguments = 0
@@ -266,7 +243,6 @@ class Centered(Directive):
"""
Directive to create a centered line of bold text.
"""
-
has_content = False
required_arguments = 1
optional_arguments = 0
@@ -283,12 +259,10 @@ class Centered(Directive):
return [subnode] + messages
-
class Acks(Directive):
"""
Directive for a list of names.
"""
-
has_content = True
required_arguments = 0
optional_arguments = 0
@@ -310,7 +284,6 @@ class HList(Directive):
"""
Directive for a list that gets compacted horizontally.
"""
-
has_content = True
required_arguments = 0
optional_arguments = 0
@@ -347,7 +320,6 @@ class Only(Directive):
"""
Directive to only include text if the given tag(s) are enabled.
"""
-
has_content = True
required_arguments = 1
optional_arguments = 0
@@ -364,19 +336,16 @@ class Only(Directive):
return [node]
-from docutils.parsers.rst.directives.misc import Include as BaseInclude
-
class Include(BaseInclude):
"""
Like the standard "Include" directive, but interprets absolute paths
- correctly.
+ "correctly", i.e. relative to source directory.
"""
def run(self):
- if self.arguments[0].startswith('/') or \
- self.arguments[0].startswith(os.sep):
- env = self.state.document.settings.env
- self.arguments[0] = os.path.join(env.srcdir, self.arguments[0][1:])
+ env = self.state.document.settings.env
+ rel_filename, filename = env.relfn2path(self.arguments[0])
+ self.arguments[0] = filename
return BaseInclude.run(self)
@@ -397,7 +366,6 @@ directives.register_directive('only', Only)
directives.register_directive('include', Include)
# register the standard rst class directive under a different name
-from docutils.parsers.rst.directives.misc import Class
# only for backwards compatibility now
directives.register_directive('cssclass', Class)
# new standard name when default-domain with "class" is in effect
diff --git a/sphinx/domains/__init__.py b/sphinx/domains/__init__.py
index b16e6109..d6faa127 100644
--- a/sphinx/domains/__init__.py
+++ b/sphinx/domains/__init__.py
@@ -66,9 +66,8 @@ class Index(object):
self.domain = domain
def generate(self, docnames=None):
- """
- Return entries for the index given by *name*. If *docnames* is given,
- restrict to entries referring to these docnames.
+ """Return entries for the index given by *name*. If *docnames* is
+ given, restrict to entries referring to these docnames.
The return value is a tuple of ``(content, collapse)``, where *collapse*
is a boolean that determines if sub-entries should start collapsed (for
@@ -158,8 +157,7 @@ class Domain(object):
self.objtypes_for_role = self._role2type.get
def role(self, name):
- """
- Return a role adapter function that always gives the registered
+ """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:
@@ -175,8 +173,7 @@ class Domain(object):
return role_adapter
def directive(self, name):
- """
- Return a directive adapter class that always gives the registered
+ """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:
@@ -195,21 +192,16 @@ class Domain(object):
# methods that should be overwritten
def clear_doc(self, docname):
- """
- Remove traces of a document in the domain-specific inventories.
- """
+ """Remove traces of a document in the domain-specific inventories."""
pass
def process_doc(self, env, docname, document):
- """
- Process a document after it is read by the environment.
- """
+ """Process a document after it is read by the environment."""
pass
def resolve_xref(self, env, fromdocname, builder,
typ, target, node, contnode):
- """
- Resolve the ``pending_xref`` *node* with the given *typ* and *target*.
+ """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
@@ -225,8 +217,7 @@ class Domain(object):
pass
def get_objects(self):
- """
- Return an iterable of "object descriptions", which are tuples with
+ """Return an iterable of "object descriptions", which are tuples with
five items:
* `name` -- fully qualified name
@@ -245,9 +236,7 @@ class Domain(object):
return []
def get_type_name(self, type, primary=False):
- """
- Return full name for given ObjType.
- """
+ """Return full name for given ObjType."""
if primary:
return type.lname
return _('%s %s') % (self.label, type.lname)
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py
index 64bf06ca..3e9b3976 100644
--- a/sphinx/domains/cpp.py
+++ b/sphinx/domains/cpp.py
@@ -109,7 +109,7 @@ class DefinitionError(Exception):
return self.description
def __str__(self):
- return unicode(self.encode('utf-8'))
+ return unicode(self).encode('utf-8')
class DefExpr(object):
@@ -131,30 +131,34 @@ class DefExpr(object):
def __ne__(self, other):
return not self.__eq__(other)
+ __hash__ = None
+
def clone(self):
- """Close a definition expression node"""
+ """Clone a definition expression node."""
return deepcopy(self)
def get_id(self):
- """Returns the id for the node"""
+ """Return the id for the node."""
return u''
def get_name(self):
- """Returns the name. Returns either `None` or a node with
- a name you might call :meth:`split_owner` on.
+ """Return the name.
+
+ Returns either `None` or a node with a name you might call
+ :meth:`split_owner` on.
"""
return None
def split_owner(self):
- """Nodes returned by :meth:`get_name` can split off their
- owning parent. This function returns the owner and the
- name as a tuple of two items. If a node does not support
- it, :exc:`NotImplementedError` is raised.
+ """Nodes returned by :meth:`get_name` can split off their owning parent.
+
+ This function returns the owner and the name as a tuple of two items.
+ If a node does not support it, :exc:`NotImplementedError` is raised.
"""
raise NotImplementedError()
def prefix(self, prefix):
- """Prefixes a name node (a node returned by :meth:`get_name`)."""
+ """Prefix a name node (a node returned by :meth:`get_name`)."""
raise NotImplementedError()
def __str__(self):
@@ -979,8 +983,9 @@ class CPPFunctionObject(CPPObject):
class CPPCurrentNamespace(Directive):
- """This directive is just to tell Sphinx that we're documenting
- stuff in namespace foo.
+ """
+ This directive is just to tell Sphinx that we're documenting stuff in
+ namespace foo.
"""
has_content = False
diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py
index 4ad84dd3..07a54e4d 100644
--- a/sphinx/domains/javascript.py
+++ b/sphinx/domains/javascript.py
@@ -130,7 +130,7 @@ class JSCallable(JSObject):
class JSConstructor(JSCallable):
- """Like a callable but with a different prefix"""
+ """Like a callable but with a different prefix."""
display_prefix = 'class '
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py
index 4c216a43..30e9aa0c 100644
--- a/sphinx/domains/python.py
+++ b/sphinx/domains/python.py
@@ -110,22 +110,21 @@ class PyObject(ObjectDescription):
]
def get_signature_prefix(self, sig):
- """
- May return a prefix to put before the object name in the signature.
+ """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
+ """May return true if an empty argument list is to be generated even if
the document contains none.
"""
return False
def handle_signature(self, sig, signode):
- """
- Transform a Python signature into RST nodes.
- Returns (fully qualified name of the thing, classname if any).
+ """Transform a Python signature into RST nodes.
+
+ Return (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
@@ -195,9 +194,7 @@ class PyObject(ObjectDescription):
return fullname, name_prefix
def get_index_text(self, modname, name):
- """
- Return the text for the index entry of the object.
- """
+ """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):
@@ -576,9 +573,8 @@ class PythonDomain(Domain):
del self.data['modules'][modname]
def find_obj(self, env, modname, classname, name, type, searchmode=0):
- """
- Find a Python object for "name", perhaps using the given module and/or
- classname. Returns a list of (name, object entry) tuples.
+ """Find a Python object for "name", perhaps using the given module
+ and/or classname. Returns a list of (name, object entry) tuples.
"""
# skip parens
if name[-2:] == '()':
diff --git a/sphinx/domains/rst.py b/sphinx/domains/rst.py
index 6b3e05ee..fa3b4f1a 100644
--- a/sphinx/domains/rst.py
+++ b/sphinx/domains/rst.py
@@ -59,9 +59,10 @@ class ReSTMarkup(ObjectDescription):
def parse_directive(d):
- """
- Parses a directive signature. Returns (directive, arguments) string tuple.
- if no arguments are given, returns (directive, '').
+ """Parse a directive signature.
+
+ Returns (directive, arguments) string tuple. If no arguments are given,
+ returns (directive, '').
"""
dir = d.strip()
if not dir.startswith('.'):
diff --git a/sphinx/environment.py b/sphinx/environment.py
index 549a553d..1bf13bc4 100644
--- a/sphinx/environment.py
+++ b/sphinx/environment.py
@@ -11,11 +11,13 @@
import re
import os
+import sys
import time
import types
import codecs
import imghdr
import string
+import posixpath
import cPickle as pickle
from os import path
from glob import glob
@@ -24,9 +26,9 @@ from itertools import izip, groupby
from docutils import nodes
from docutils.io import FileInput, NullOutput
from docutils.core import Publisher
-from docutils.utils import Reporter, relative_path
+from docutils.utils import Reporter, relative_path, new_document
from docutils.readers import standalone
-from docutils.parsers.rst import roles, directives
+from docutils.parsers.rst import roles, directives, Parser as RSTParser
from docutils.parsers.rst.languages import en as english
from docutils.parsers.rst.directives.html import MetaBody
from docutils.writers import UnfilteredWriter
@@ -36,13 +38,14 @@ from docutils.transforms.parts import ContentsFilter
from sphinx import addnodes
from sphinx.util import url_re, get_matching_docs, docname_join, \
FilenameUniqDict
-from sphinx.util.nodes import clean_astext, make_refnode
+from sphinx.util.nodes import clean_astext, make_refnode, extract_messages
from sphinx.util.osutil import movefile, SEP, ustrftime
from sphinx.util.matching import compile_matchers
-from sphinx.util.pycompat import all
+from sphinx.util.pycompat import all, class_types
from sphinx.errors import SphinxError, ExtensionError
-from sphinx.locale import _
+from sphinx.locale import _, init as init_locale
+fs_encoding = sys.getfilesystemencoding() or sys.getdefaultencoding()
orig_role_function = roles.role
orig_directive_function = directives.directive
@@ -80,7 +83,7 @@ class WarningStream(object):
self.warnfunc = warnfunc
def write(self, text):
if text.strip():
- self.warnfunc(text, None, '')
+ self.warnfunc(text.strip(), None, '')
class NoUri(Exception):
@@ -182,12 +185,50 @@ class CitationReferences(Transform):
citnode.parent.replace(citnode, refnode)
+class Locale(Transform):
+ """
+ Replace translatable nodes with their translated doctree.
+ """
+ default_priority = 0
+ def apply(self):
+ env = self.document.settings.env
+ settings, source = self.document.settings, self.document['source']
+ # XXX check if this is reliable
+ assert source.startswith(env.srcdir)
+ docname = posixpath.splitext(source[len(env.srcdir):].lstrip('/'))[0]
+ section = docname.split(SEP, 1)[0]
+
+ # fetch translations
+ dirs = [path.join(env.srcdir, x)
+ for x in env.config.locale_dirs]
+ catalog, has_catalog = init_locale(dirs, env.config.language, section)
+ if not has_catalog:
+ return
+
+ parser = RSTParser()
+
+ for node, msg in extract_messages(self.document):
+ patch = new_document(source, settings)
+ msgstr = catalog.gettext(msg)
+ # XXX add marker to untranslated parts
+ if not msgstr or msgstr == msg: # as-of-yet untranslated
+ continue
+ parser.parse(msgstr, patch)
+ patch = patch[0]
+ #XXX doctest and other block markup
+ if not isinstance(patch, nodes.paragraph):
+ continue # skip for now
+ for child in patch.children: # update leaves
+ child.parent = node
+ node.children = patch.children
+
+
class SphinxStandaloneReader(standalone.Reader):
"""
Add our own transforms.
"""
- transforms = [CitationReferences, DefaultSubstitutions, MoveModuleTargets,
- HandleCodeBlocks, SortIds]
+ transforms = [Locale, CitationReferences, DefaultSubstitutions,
+ MoveModuleTargets, HandleCodeBlocks, SortIds]
def get_transforms(self):
return standalone.Reader.get_transforms(self) + self.transforms
@@ -251,7 +292,7 @@ class BuildEnvironment:
if key.startswith('_') or \
isinstance(val, types.ModuleType) or \
isinstance(val, types.FunctionType) or \
- isinstance(val, (type, types.ClassType)):
+ isinstance(val, class_types):
del self.config[key]
try:
pickle.dump(self, picklefile, pickle.HIGHEST_PROTOCOL)
@@ -372,25 +413,46 @@ class BuildEnvironment:
domain.clear_doc(docname)
def doc2path(self, docname, base=True, suffix=None):
+ """Return the filename for the document name.
+
+ If *base* is True, return absolute path under self.srcdir.
+ If *base* is None, return relative path to self.srcdir.
+ If *base* is a path string, return absolute path under that.
+ If *suffix* is not None, add it instead of config.source_suffix.
"""
- Return the filename for the document name.
- If base is True, return absolute path under self.srcdir.
- If base is None, return relative path to self.srcdir.
- If base is a path string, return absolute path under that.
- If suffix is not None, add it instead of config.source_suffix.
- """
+ docname = docname.replace(SEP, path.sep)
suffix = suffix or self.config.source_suffix
if base is True:
- return path.join(self.srcdir,
- docname.replace(SEP, path.sep)) + suffix
+ return path.join(self.srcdir, docname) + suffix
elif base is None:
- return docname.replace(SEP, path.sep) + suffix
+ return docname + suffix
else:
- return path.join(base, docname.replace(SEP, path.sep)) + suffix
+ return path.join(base, docname) + suffix
- def find_files(self, config):
+ def relfn2path(self, filename, docname=None):
+ """Return paths to a file referenced from a document, relative to
+ documentation root and absolute.
+
+ Absolute filenames are relative to the source dir, while relative
+ filenames are relative to the dir of the containing document.
"""
- Find all source files in the source dir and put them in self.found_docs.
+ if filename.startswith('/') or filename.startswith(os.sep):
+ rel_fn = filename[1:]
+ else:
+ docdir = path.dirname(self.doc2path(docname or self.docname,
+ base=None))
+ rel_fn = path.join(docdir, filename)
+ try:
+ return rel_fn, path.join(self.srcdir, rel_fn)
+ except UnicodeDecodeError:
+ # the source directory is a bytestring with non-ASCII characters;
+ # let's try to encode the rel_fn in the file system encoding
+ enc_rel_fn = rel_fn.encode(sys.getfilesystemencoding())
+ return rel_fn, path.join(self.srcdir, enc_rel_fn)
+
+ def find_files(self, config):
+ """Find all source files in the source dir and put them in
+ self.found_docs.
"""
matchers = compile_matchers(
config.exclude_patterns[:] +
@@ -403,9 +465,7 @@ class BuildEnvironment:
self.srcdir, config.source_suffix, exclude_matchers=matchers))
def get_outdated_files(self, config_changed):
- """
- Return (added, changed, removed) sets.
- """
+ """Return (added, changed, removed) sets."""
# clear all files no longer present
removed = set(self.all_docs) - self.found_docs
@@ -451,12 +511,12 @@ class BuildEnvironment:
return added, changed, removed
def update(self, config, srcdir, doctreedir, app=None):
- """
- (Re-)read all files new or changed since last update. Returns a
- summary, the total count of documents to reread and an iterator that
- yields docnames as it processes them. Store all environment docnames in
- the canonical format (ie using SEP as a separator in place of
- os.path.sep).
+ """(Re-)read all files new or changed since last update.
+
+ Returns a summary, the total count of documents to reread and an
+ iterator that yields docnames as it processes them. Store all
+ environment docnames in the canonical format (ie using SEP as a
+ separator in place of os.path.sep).
"""
config_changed = False
if self.config is None:
@@ -586,8 +646,8 @@ class BuildEnvironment:
roles.role = role
def read_doc(self, docname, src_path=None, save_parsed=True, app=None):
- """
- Parse a file and add/update inventory entries for the doctree.
+ """Parse a file and add/update inventory entries for the doctree.
+
If srcpath is given, read from a different source file.
"""
# remove all inventory entries for that file
@@ -623,6 +683,8 @@ class BuildEnvironment:
class SphinxSourceClass(FileInput):
def decode(self_, data):
+ if isinstance(data, unicode):
+ return data
return data.decode(self_.encoding, 'sphinx')
def read(self_):
@@ -644,7 +706,7 @@ class BuildEnvironment:
destination_class=NullOutput)
pub.set_components(None, 'restructuredtext', None)
pub.process_programmatic_settings(None, self.settings, None)
- pub.set_source(None, src_path)
+ pub.set_source(None, src_path.encode(fs_encoding))
pub.set_destination(None, None)
try:
pub.publish()
@@ -737,18 +799,15 @@ class BuildEnvironment:
# post-processing of read doctrees
def filter_messages(self, doctree):
- """
- Filter system messages from a doctree.
- """
+ """Filter system messages from a doctree."""
filterlevel = self.config.keep_warnings and 2 or 5
for node in doctree.traverse(nodes.system_message):
if node['level'] < filterlevel:
node.parent.remove(node)
+
def process_dependencies(self, docname, doctree):
- """
- Process docutils-generated dependency info.
- """
+ """Process docutils-generated dependency info."""
cwd = os.getcwd()
frompath = path.join(path.normpath(self.srcdir), 'dummy')
deps = doctree.settings.record_dependencies
@@ -762,30 +821,20 @@ class BuildEnvironment:
self.dependencies.setdefault(docname, set()).add(relpath)
def process_downloads(self, docname, doctree):
- """
- Process downloadable file paths.
- """
- docdir = path.dirname(self.doc2path(docname, base=None))
+ """Process downloadable file paths. """
for node in doctree.traverse(addnodes.download_reference):
targetname = node['reftarget']
- if targetname.startswith('/') or targetname.startswith(os.sep):
- # absolute
- filepath = targetname[1:]
- else:
- filepath = path.normpath(path.join(docdir, node['reftarget']))
- self.dependencies.setdefault(docname, set()).add(filepath)
- if not os.access(path.join(self.srcdir, filepath), os.R_OK):
- self.warn(docname, 'download file not readable: %s' % filepath,
+ rel_filename, filename = self.relfn2path(targetname, docname)
+ self.dependencies.setdefault(docname, set()).add(rel_filename)
+ if not os.access(filename, os.R_OK):
+ self.warn(docname, 'download file not readable: %s' % filename,
getattr(node, 'line', None))
continue
- uniquename = self.dlfiles.add_file(docname, filepath)
+ uniquename = self.dlfiles.add_file(docname, filename)
node['filename'] = uniquename
def process_images(self, docname, doctree):
- """
- Process and rewrite image URIs.
- """
- docdir = path.dirname(self.doc2path(docname, base=None))
+ """Process and rewrite image URIs."""
for node in doctree.traverse(nodes.image):
# Map the mimetype to the corresponding image. The writer may
# choose the best image from these candidates. The special key * is
@@ -798,16 +847,11 @@ class BuildEnvironment:
node.line)
candidates['?'] = imguri
continue
- # imgpath is the image path *from srcdir*
- if imguri.startswith('/') or imguri.startswith(os.sep):
- # absolute path (= relative to srcdir)
- imgpath = path.normpath(imguri[1:])
- else:
- imgpath = path.normpath(path.join(docdir, imguri))
+ rel_imgpath, full_imgpath = self.relfn2path(imguri, docname)
# set imgpath as default URI
- node['uri'] = imgpath
- if imgpath.endswith(os.extsep + '*'):
- for filename in glob(path.join(self.srcdir, imgpath)):
+ node['uri'] = rel_imgpath
+ if rel_imgpath.endswith(os.extsep + '*'):
+ for filename in glob(full_imgpath):
new_imgpath = relative_path(self.srcdir, filename)
if filename.lower().endswith('.pdf'):
candidates['application/pdf'] = new_imgpath
@@ -827,7 +871,7 @@ class BuildEnvironment:
if imgtype:
candidates['image/' + imgtype] = new_imgpath
else:
- candidates['*'] = imgpath
+ candidates['*'] = rel_imgpath
# map image paths to unique image names (so that they can be put
# into a single directory)
for imgpath in candidates.itervalues():
@@ -839,8 +883,8 @@ class BuildEnvironment:
self.images.add_file(docname, imgpath)
def process_metadata(self, docname, doctree):
- """
- Process the docinfo part of the doctree as metadata.
+ """Process the docinfo part of the doctree as metadata.
+
Keep processing minimal -- just return what docutils says.
"""
self.metadata[docname] = md = {}
@@ -925,8 +969,7 @@ class BuildEnvironment:
item.replace(para, compact_para)
def create_title_from(self, docname, document):
- """
- Add a title node to the document (just copy the first section title),
+ """Add a title node to the document (just copy the first section title),
and store that title in the environment.
"""
titlenode = nodes.title()
@@ -964,7 +1007,8 @@ class BuildEnvironment:
def note_toctree(self, docname, toctreenode):
"""Note a TOC tree directive in a document and gather information about
- file relations from it."""
+ file relations from it.
+ """
if toctreenode['glob']:
self.glob_toctrees.add(docname)
if toctreenode.get('numbered'):
@@ -1070,7 +1114,9 @@ class BuildEnvironment:
def get_domain(self, domainname):
"""Return the domain instance with the specified name.
- Raises an ExtensionError if the domain is not registered."""
+
+ Raises an ExtensionError if the domain is not registered.
+ """
try:
return self.domains[domainname]
except KeyError:
@@ -1095,7 +1141,8 @@ class BuildEnvironment:
def get_and_resolve_doctree(self, docname, builder, doctree=None,
prune_toctrees=True):
"""Read the doctree from the pickle, resolve cross-references and
- toctrees and return it."""
+ toctrees and return it.
+ """
if doctree is None:
doctree = self.get_doctree(docname)
@@ -1115,8 +1162,7 @@ class BuildEnvironment:
def resolve_toctree(self, docname, builder, toctree, prune=True, maxdepth=0,
titles_only=False, collapse=False, includehidden=False):
- """
- Resolve a *toctree* node into individual bullet lists with titles
+ """Resolve a *toctree* node into individual bullet lists with titles
as items, returning None (if no containing titles are found) or
a new node.
@@ -1375,46 +1421,54 @@ class BuildEnvironment:
old_secnumbers = self.toc_secnumbers
self.toc_secnumbers = {}
- def _walk_toc(node, secnums, titlenode=None):
+ def _walk_toc(node, secnums, depth, titlenode=None):
# titlenode is the title of the document, it will get assigned a
# secnumber too, so that it shows up in next/prev/parent rellinks
for subnode in node.children:
if isinstance(subnode, nodes.bullet_list):
numstack.append(0)
- _walk_toc(subnode, secnums, titlenode)
+ _walk_toc(subnode, secnums, depth-1, titlenode)
numstack.pop()
titlenode = None
elif isinstance(subnode, nodes.list_item):
- _walk_toc(subnode, secnums, titlenode)
+ _walk_toc(subnode, secnums, depth, titlenode)
titlenode = None
elif isinstance(subnode, addnodes.compact_paragraph):
numstack[-1] += 1
+ if depth > 0:
+ number = tuple(numstack)
+ else:
+ number = None
secnums[subnode[0]['anchorname']] = \
- subnode[0]['secnumber'] = tuple(numstack)
+ subnode[0]['secnumber'] = number
if titlenode:
- titlenode['secnumber'] = tuple(numstack)
+ titlenode['secnumber'] = number
titlenode = None
elif isinstance(subnode, addnodes.toctree):
- _walk_toctree(subnode)
+ _walk_toctree(subnode, depth)
- def _walk_toctree(toctreenode):
+ def _walk_toctree(toctreenode, depth):
+ if depth == 0:
+ return
for (title, ref) in toctreenode['entries']:
if url_re.match(ref) or ref == 'self':
# don't mess with those
continue
if ref in self.tocs:
secnums = self.toc_secnumbers[ref] = {}
- _walk_toc(self.tocs[ref], secnums, self.titles.get(ref))
+ _walk_toc(self.tocs[ref], secnums, depth,
+ self.titles.get(ref))
if secnums != old_secnumbers.get(ref):
rewrite_needed.append(ref)
for docname in self.numbered_toctrees:
doctree = self.get_doctree(docname)
for toctreenode in doctree.traverse(addnodes.toctree):
- if toctreenode.get('numbered'):
+ depth = toctreenode.get('numbered', 0)
+ if depth:
# every numbered toctree gets new numbering
numstack = [0]
- _walk_toctree(toctreenode)
+ _walk_toctree(toctreenode, depth)
return rewrite_needed
@@ -1515,8 +1569,9 @@ class BuildEnvironment:
i += 1
# group the entries by letter
- def keyfunc2((k, v), letters=string.ascii_uppercase + '_'):
+ def keyfunc2(item, letters=string.ascii_uppercase + '_'):
# hack: mutating the subitems dicts to a list in the keyfunc
+ k, v = item
v[1] = sorted((si, se) for (si, (se, void)) in v[1].iteritems())
# now calculate the key
letter = k[0].upper()
@@ -1575,7 +1630,6 @@ class BuildEnvironment:
def check_consistency(self):
"""Do consistency checks."""
-
for docname in sorted(self.all_docs):
if docname not in self.files_to_rebuild:
if docname == self.config.master_doc:
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index 74d25af6..21308279 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -14,7 +14,7 @@
import re
import sys
import inspect
-from types import FunctionType, BuiltinFunctionType, MethodType, ClassType
+from types import FunctionType, BuiltinFunctionType, MethodType
from docutils import nodes
from docutils.utils import assemble_option_dict
@@ -27,15 +27,10 @@ from sphinx.application import ExtensionError
from sphinx.util.nodes import nested_parse_with_titles
from sphinx.util.compat import Directive
from sphinx.util.inspect import isdescriptor, safe_getmembers, safe_getattr
+from sphinx.util.pycompat import base_exception, class_types
from sphinx.util.docstrings import prepare_docstring
-try:
- base_exception = BaseException
-except NameError:
- base_exception = Exception
-
-
#: extended signature RE: with explicit module name separated by ::
py_ext_sig_re = re.compile(
r'''^ ([\w.]+::)? # explicit module name
@@ -90,7 +85,8 @@ def members_set_option(arg):
def bool_option(arg):
"""Used to convert flag options to auto directives. (Instead of
- directives.flag(), which returns None.)"""
+ directives.flag(), which returns None).
+ """
return True
@@ -138,8 +134,7 @@ class AutodocReporter(object):
# Some useful event listener factories for autodoc-process-docstring.
def cut_lines(pre, post=0, what=None):
- """
- Return a listener that removes the first *pre* and last *post*
+ """Return a listener that removes the first *pre* and last *post*
lines of every docstring. If *what* is a sequence of strings,
only docstrings of a type in *what* will be processed.
@@ -165,9 +160,8 @@ def cut_lines(pre, post=0, what=None):
return process
def between(marker, what=None, keepempty=False, exclude=False):
- """
- Return a listener that either keeps, or if *exclude* is True excludes, lines
- between lines that match the *marker* regular expression. If no line
+ """Return a listener that either keeps, or if *exclude* is True excludes,
+ lines between lines that match the *marker* regular expression. If no line
matches, the resulting docstring would be empty, so no change will be made
unless *keepempty* is true.
@@ -256,6 +250,9 @@ class Documenter(object):
self.retann = None
# the object to document (set after import_object succeeds)
self.object = None
+ self.object_name = None
+ # the parent/owner of the object to document
+ self.parent = None
# the module analyzer to get at attribute docs, or None
self.analyzer = None
@@ -264,8 +261,7 @@ class Documenter(object):
self.directive.result.append(self.indent + line, source, *lineno)
def resolve_name(self, modname, parents, path, base):
- """
- Resolve the module and name of the object to document given by the
+ """Resolve the module and name of the object to document given by the
arguments and the current module/class.
Must return a pair of the module name and a chain of attributes; for
@@ -275,8 +271,7 @@ class Documenter(object):
raise NotImplementedError('must be implemented in subclasses')
def parse_name(self):
- """
- Determine what module to import and what attribute to document.
+ """Determine what module to import and what attribute to document.
Returns True and sets *self.modname*, *self.objpath*, *self.fullname*,
*self.args* and *self.retann* if parsing and resolving was successful.
@@ -313,17 +308,20 @@ class Documenter(object):
return True
def import_object(self):
- """
- Import the object given by *self.modname* and *self.objpath* and sets
+ """Import the object given by *self.modname* and *self.objpath* and set
it as *self.object*.
Returns True if successful, False if an error occurred.
"""
try:
__import__(self.modname)
+ parent = None
obj = self.module = sys.modules[self.modname]
for part in self.objpath:
+ parent = obj
obj = self.get_attr(obj, part)
+ self.object_name = part
+ self.parent = parent
self.object = obj
return True
# this used to only catch SyntaxError, ImportError and AttributeError,
@@ -336,15 +334,15 @@ class Documenter(object):
return False
def get_real_modname(self):
- """
- Get the real module name of an object to document. (It can differ
- from the name of the module through which the object was imported.)
+ """Get the real module name of an object to document.
+
+ It can differ from the name of the module through which the object was
+ imported.
"""
return self.get_attr(self.object, '__module__', None) or self.modname
def check_module(self):
- """
- Check if *self.object* is really defined in the module given by
+ """Check if *self.object* is really defined in the module given by
*self.modname*.
"""
modname = self.get_attr(self.object, '__module__', None)
@@ -353,25 +351,26 @@ class Documenter(object):
return True
def format_args(self):
- """
- Format the argument signature of *self.object*. Should return None if
- the object does not have a signature.
+ """Format the argument signature of *self.object*.
+
+ Should return None if the object does not have a signature.
"""
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).
+ """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.
+ """Format the signature (arguments and return annotation) of the object.
+
Let the user process it via the ``autodoc-process-signature`` event.
"""
if self.args is not None:
@@ -413,13 +412,15 @@ class Documenter(object):
# etc. don't support a prepended module name
self.add_line(u' :module: %s' % self.modname, '<autodoc>')
- def get_doc(self, encoding=None):
+ def get_doc(self, encoding=None, ignore=1):
"""Decode and return lines of the docstring(s) for the object."""
docstring = self.get_attr(self.object, '__doc__', None)
- if docstring:
- # make sure we have Unicode docstrings, then sanitize and split
- # into lines
- return [prepare_docstring(force_decode(docstring, encoding))]
+ # make sure we have Unicode docstrings, then sanitize and split
+ # into lines
+ if isinstance(docstring, unicode):
+ return [prepare_docstring(docstring, ignore)]
+ elif docstring:
+ return [prepare_docstring(force_decode(docstring, encoding), ignore)]
return []
def process_doc(self, docstrings):
@@ -438,8 +439,11 @@ class Documenter(object):
# set sourcename and add content from attribute documentation
if self.analyzer:
# prevent encoding errors when the file name is non-ASCII
- filename = unicode(self.analyzer.srcname,
- sys.getfilesystemencoding(), 'replace')
+ if not isinstance(self.analyzer.srcname, unicode):
+ filename = unicode(self.analyzer.srcname,
+ sys.getfilesystemencoding(), 'replace')
+ else:
+ filename = self.analyzer.srcname
sourcename = u'%s:docstring of %s' % (filename, self.fullname)
attr_docs = self.analyzer.find_attr_docs()
@@ -471,8 +475,7 @@ class Documenter(object):
self.add_line(line, src[0], src[1])
def get_object_members(self, want_all):
- """
- Return `(members_check_module, members)` where `members` is a
+ """Return `(members_check_module, members)` where `members` is a
list of `(membername, member)` pairs of the members of *self.object*.
If *want_all* is True, return all members. Else, only return those
@@ -516,11 +519,15 @@ class Documenter(object):
return False, sorted(members)
def filter_members(self, members, want_all):
- """
- Filter the given member list: members are skipped if
+ """Filter the given member list.
- - they are private (except if given explicitly)
- - they are undocumented (except if undoc-members is given)
+ Members are skipped if
+
+ - they are private (except if given explicitly or the private-members
+ option is set)
+ - they are special methods (except if given explicitly or the
+ special-members option is set)
+ - they are undocumented (except if the undoc-members option is set)
The user can override the skipping decision by connecting to the
``autodoc-skip-member`` event.
@@ -540,9 +547,13 @@ class Documenter(object):
# if isattr is True, the member is documented as an attribute
isattr = False
- if want_all and membername.startswith('_'):
+ if want_all and membername.startswith('__') and \
+ membername.endswith('__') and len(membername) > 4:
+ # special __methods__
+ skip = not self.options.special_members
+ elif want_all and membername.startswith('_'):
# ignore members whose name starts with _ by default
- skip = True
+ skip = not self.options.private_members
elif (namespace, membername) in attr_docs:
# keep documented attributes
skip = False
@@ -570,9 +581,10 @@ class Documenter(object):
return ret
def document_members(self, all_members=False):
- """
- Generate reST for member documentation. If *all_members* is True,
- do all members, else those given by *self.options.members*.
+ """Generate reST for member documentation.
+
+ If *all_members* is True, do all members, else those given by
+ *self.options.members*.
"""
# set current namespace for finding members
self.env.temp_data['autodoc:module'] = self.modname
@@ -630,8 +642,8 @@ class Documenter(object):
def generate(self, more_content=None, real_modname=None,
check_module=False, all_members=False):
- """
- Generate reST for the object given by *self.name*, and possibly members.
+ """Generate reST for the object given by *self.name*, and possibly for
+ its members.
If *more_content* is given, include that content. If *real_modname* is
given, use that module name to find attribute docs. If *check_module* is
@@ -713,6 +725,7 @@ class ModuleDocumenter(Documenter):
'show-inheritance': bool_option, 'synopsis': identity,
'platform': identity, 'deprecated': bool_option,
'member-order': identity, 'exclude-members': members_set_option,
+ 'private-members': bool_option, 'special-members': bool_option,
}
@classmethod
@@ -819,7 +832,53 @@ class ClassLevelDocumenter(Documenter):
return modname, parents + [base]
-class FunctionDocumenter(ModuleLevelDocumenter):
+class DocstringSignatureMixin(object):
+ """
+ Mixin for FunctionDocumenter and MethodDocumenter to provide the
+ feature of reading the signature from the docstring.
+ """
+
+ def _find_signature(self, encoding=None):
+ docstrings = Documenter.get_doc(self, encoding, 2)
+ if len(docstrings) != 1:
+ return
+ doclines = docstrings[0]
+ setattr(self, '__new_doclines', doclines)
+ if not doclines:
+ return
+ # match first line of docstring against signature RE
+ match = py_ext_sig_re.match(doclines[0])
+ if not match:
+ return
+ exmod, path, base, args, retann = match.groups()
+ # the base name must match ours
+ if not self.objpath or base != self.objpath[-1]:
+ return
+ # ok, now jump over remaining empty lines and set the remaining
+ # lines as the new doclines
+ i = 1
+ while i < len(doclines) and not doclines[i].strip():
+ i += 1
+ setattr(self, '__new_doclines', doclines[i:])
+ return args, retann
+
+ def get_doc(self, encoding=None, ignore=1):
+ lines = getattr(self, '__new_doclines', None)
+ if lines is not None:
+ return [lines]
+ return Documenter.get_doc(self, encoding, ignore)
+
+ def format_signature(self):
+ if self.args is None and self.env.config.autodoc_docstring_signature:
+ # only act if a signature is not explicitly given already, and if
+ # the feature is enabled
+ result = self._find_signature()
+ if result is not None:
+ self.args, self.retann = result
+ return Documenter.format_signature(self)
+
+
+class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter):
"""
Specialized Documenter subclass for functions.
"""
@@ -833,8 +892,8 @@ class FunctionDocumenter(ModuleLevelDocumenter):
def format_args(self):
if inspect.isbuiltin(self.object) or \
inspect.ismethoddescriptor(self.object):
- # can never get arguments of a C function or method
- return None
+ # cannot introspect arguments of a C function or method
+ pass
try:
argspec = inspect.getargspec(self.object)
except TypeError:
@@ -867,11 +926,12 @@ class ClassDocumenter(ModuleLevelDocumenter):
'noindex': bool_option, 'inherited-members': bool_option,
'show-inheritance': bool_option, 'member-order': identity,
'exclude-members': members_set_option,
+ 'private-members': bool_option, 'special-members': bool_option,
}
@classmethod
def can_document_member(cls, member, membername, isattr, parent):
- return isinstance(member, (type, ClassType))
+ return isinstance(member, class_types)
def import_object(self):
ret = ModuleLevelDocumenter.import_object(self)
@@ -923,7 +983,7 @@ class ClassDocumenter(ModuleLevelDocumenter):
self.add_line(_(u' Bases: %s') % ', '.join(bases),
'<autodoc>')
- def get_doc(self, encoding=None):
+ def get_doc(self, encoding=None, ignore=1):
content = self.env.config.autoclass_content
docstrings = []
@@ -944,9 +1004,12 @@ class ClassDocumenter(ModuleLevelDocumenter):
docstrings = [initdocstring]
else:
docstrings.append(initdocstring)
-
- return [prepare_docstring(force_decode(docstring, encoding))
- for docstring in docstrings]
+ doc = []
+ for docstring in docstrings:
+ if not isinstance(docstring, unicode):
+ docstring = force_decode(docstring, encoding)
+ doc.append(prepare_docstring(docstring))
+ return doc
def add_content(self, more_content, no_docstring=False):
if self.doc_as_attr:
@@ -977,7 +1040,7 @@ class ExceptionDocumenter(ClassDocumenter):
@classmethod
def can_document_member(cls, member, membername, isattr, parent):
- return isinstance(member, (type, ClassType)) and \
+ return isinstance(member, class_types) and \
issubclass(member, base_exception)
@@ -996,7 +1059,7 @@ class DataDocumenter(ModuleLevelDocumenter):
pass
-class MethodDocumenter(ClassLevelDocumenter):
+class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter):
"""
Specialized Documenter subclass for methods (normal, static and class).
"""
@@ -1009,24 +1072,38 @@ class MethodDocumenter(ClassLevelDocumenter):
return inspect.isroutine(member) and \
not isinstance(parent, ModuleDocumenter)
- def import_object(self):
- ret = ClassLevelDocumenter.import_object(self)
- if isinstance(self.object, classmethod) or \
- (isinstance(self.object, MethodType) and
- self.object.im_self is not None):
- self.directivetype = 'classmethod'
- # document class and static members before ordinary ones
- self.member_order = self.member_order - 1
- elif isinstance(self.object, FunctionType) or \
- (isinstance(self.object, BuiltinFunctionType) and
- hasattr(self.object, '__self__') and
- self.object.__self__ is not None):
- self.directivetype = 'staticmethod'
- # document class and static members before ordinary ones
- self.member_order = self.member_order - 1
- else:
- self.directivetype = 'method'
- return ret
+ if sys.version_info >= (3, 0):
+ def import_object(self):
+ ret = ClassLevelDocumenter.import_object(self)
+ obj_from_parent = self.parent.__dict__.get(self.object_name)
+ if isinstance(obj_from_parent, classmethod):
+ self.directivetype = 'classmethod'
+ self.member_order = self.member_order - 1
+ elif isinstance(obj_from_parent, staticmethod):
+ self.directivetype = 'staticmethod'
+ self.member_order = self.member_order - 1
+ else:
+ self.directivetype = 'method'
+ return ret
+ else:
+ def import_object(self):
+ ret = ClassLevelDocumenter.import_object(self)
+ if isinstance(self.object, classmethod) or \
+ (isinstance(self.object, MethodType) and
+ self.object.im_self is not None):
+ self.directivetype = 'classmethod'
+ # document class and static members before ordinary ones
+ self.member_order = self.member_order - 1
+ elif isinstance(self.object, FunctionType) or \
+ (isinstance(self.object, BuiltinFunctionType) and
+ hasattr(self.object, '__self__') and
+ self.object.__self__ is not None):
+ self.directivetype = 'staticmethod'
+ # document class and static members before ordinary ones
+ self.member_order = self.member_order - 1
+ else:
+ self.directivetype = 'method'
+ return ret
def format_args(self):
if inspect.isbuiltin(self.object) or \
@@ -1116,8 +1193,10 @@ class AutoDirective(Directive):
_special_attrgetters = {}
# flags that can be given in autodoc_default_flags
- _default_flags = set(['members', 'undoc-members', 'inherited-members',
- 'show-inheritance'])
+ _default_flags = set([
+ 'members', 'undoc-members', 'inherited-members', 'show-inheritance',
+ 'private-members', 'special-members',
+ ])
# standard docutils directive settings
has_content = True
@@ -1207,6 +1286,7 @@ def setup(app):
app.add_config_value('autoclass_content', 'class', True)
app.add_config_value('autodoc_member_order', 'alphabetic', True)
app.add_config_value('autodoc_default_flags', [], True)
+ app.add_config_value('autodoc_docstring_signature', True, True)
app.add_event('autodoc-process-docstring')
app.add_event('autodoc-process-signature')
app.add_event('autodoc-skip-member')
diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py
index f75307e0..e0271697 100644
--- a/sphinx/ext/autosummary/__init__.py
+++ b/sphinx/ext/autosummary/__init__.py
@@ -73,8 +73,7 @@ class autosummary_toc(nodes.comment):
pass
def process_autosummary_toc(app, doctree):
- """
- Insert items described in autosummary:: to the TOC tree, but do
+ """Insert items described in autosummary:: to the TOC tree, but do
not generate the toctree:: list.
"""
env = app.builder.env
@@ -135,8 +134,8 @@ except AttributeError:
isgetsetdescriptor = ismemberdescriptor
def get_documenter(obj):
- """
- Get an autodoc.Documenter class suitable for documenting the given object
+ """Get an autodoc.Documenter class suitable for documenting the given
+ object.
"""
import sphinx.ext.autodoc as autodoc
@@ -218,8 +217,7 @@ class Autosummary(Directive):
return self.warnings + nodes
def get_items(self, names):
- """
- Try to import the given names, and return a list of
+ """Try to import the given names, and return a list of
``[(name, signature, summary_string, real_name), ...]``.
"""
env = self.state.document.settings.env
@@ -287,8 +285,7 @@ class Autosummary(Directive):
return items
def get_table(self, items):
- """
- Generate a proper list of table nodes for autosummary:: directive.
+ """Generate a proper list of table nodes for autosummary:: directive.
*items* is a list produced by :meth:`get_items`.
"""
@@ -351,8 +348,7 @@ def mangle_signature(sig, max_chars=30):
return u"(%s)" % sig
def limited_join(sep, items, max_chars=30, overflow_marker="..."):
- """
- Join a number of strings to one, limiting the length to *max_chars*.
+ """Join a number of strings to one, limiting the length to *max_chars*.
If the string overflows this limit, replace the last fitting item by
*overflow_marker*.
@@ -377,8 +373,7 @@ def limited_join(sep, items, max_chars=30, overflow_marker="..."):
# -- Importing items -----------------------------------------------------------
def import_by_name(name, prefixes=[None]):
- """
- Import a Python object that has the given *name*, under one of the
+ """Import a Python object that has the given *name*, under one of the
*prefixes*. The first name that succeeds is used.
"""
tried = []
@@ -435,8 +430,7 @@ def _import_by_name(name):
def autolink_role(typ, rawtext, etext, lineno, inliner,
options={}, content=[]):
- """
- Smart linking role.
+ """Smart linking role.
Expands to ':obj:`text`' if `text` is an object that can be imported;
otherwise expands to '*text*'.
@@ -487,12 +481,14 @@ def setup(app):
html=(autosummary_toc_visit_html, autosummary_noop),
latex=(autosummary_noop, autosummary_noop),
text=(autosummary_noop, autosummary_noop),
- man=(autosummary_noop, autosummary_noop))
+ man=(autosummary_noop, autosummary_noop),
+ texinfo=(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),
- man=(autosummary_noop, autosummary_noop))
+ man=(autosummary_noop, autosummary_noop),
+ texinfo=(autosummary_noop, autosummary_noop))
app.add_directive('autosummary', Autosummary)
app.add_role('autolink', autolink_role)
app.connect('doctree-read', process_autosummary_toc)
diff --git a/sphinx/ext/autosummary/generate.py b/sphinx/ext/autosummary/generate.py
index f8230216..a750e0a7 100644
--- a/sphinx/ext/autosummary/generate.py
+++ b/sphinx/ext/autosummary/generate.py
@@ -17,6 +17,7 @@
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
+
import os
import re
import sys
@@ -193,8 +194,8 @@ def generate_autosummary_docs(sources, output_dir=None, suffix='.rst',
# -- Finding documented entries in files ---------------------------------------
def find_autosummary_in_files(filenames):
- """
- Find out what items are documented in source/*.rst.
+ """Find out what items are documented in source/*.rst.
+
See `find_autosummary_in_lines`.
"""
documented = []
@@ -206,8 +207,8 @@ def find_autosummary_in_files(filenames):
return documented
def find_autosummary_in_docstring(name, module=None, filename=None):
- """
- Find out what items are documented in the given object's docstring.
+ """Find out what items are documented in the given object's docstring.
+
See `find_autosummary_in_lines`.
"""
try:
@@ -221,8 +222,8 @@ def find_autosummary_in_docstring(name, module=None, filename=None):
return []
def find_autosummary_in_lines(lines, module=None, filename=None):
- """
- Find out what items appear in autosummary:: directives in the given lines.
+ """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
diff --git a/sphinx/ext/coverage.py b/sphinx/ext/coverage.py
index 8d58b671..fe34ac10 100644
--- a/sphinx/ext/coverage.py
+++ b/sphinx/ext/coverage.py
@@ -173,8 +173,11 @@ class CoverageBuilder(Builder):
attrs = []
+ for attr_name in dir(obj):
+ attr = getattr(obj, attr_name)
for attr_name, attr in inspect.getmembers(
- obj, inspect.ismethod):
+ obj, lambda x: inspect.ismethod(x) or \
+ inspect.isfunction(x)):
if attr_name[0] == '_':
# starts with an underscore, ignore it
continue
diff --git a/sphinx/ext/doctest.py b/sphinx/ext/doctest.py
index dcee09f5..5fd8d114 100644
--- a/sphinx/ext/doctest.py
+++ b/sphinx/ext/doctest.py
@@ -56,7 +56,7 @@ class TestDirective(Directive):
test = code
code = doctestopt_re.sub('', code)
nodetype = nodes.literal_block
- if self.name == 'testsetup' or 'hide' in self.options:
+ if self.name in ('testsetup', 'testcleanup') or 'hide' in self.options:
nodetype = nodes.comment
if self.arguments:
groups = [x.strip() for x in self.arguments[0].split(',')]
@@ -86,6 +86,9 @@ class TestDirective(Directive):
class TestsetupDirective(TestDirective):
option_spec = {}
+class TestcleanupDirective(TestDirective):
+ option_spec = {}
+
class DoctestDirective(TestDirective):
option_spec = {
'hide': directives.flag,
@@ -113,6 +116,7 @@ class TestGroup(object):
self.name = name
self.setup = []
self.tests = []
+ self.cleanup = []
def add_code(self, code, prepend=False):
if code.type == 'testsetup':
@@ -120,6 +124,8 @@ class TestGroup(object):
self.setup.insert(0, code)
else:
self.setup.append(code)
+ elif code.type == 'testcleanup':
+ self.cleanup.append(code)
elif code.type == 'doctest':
self.tests.append([code])
elif code.type == 'testcode':
@@ -131,8 +137,8 @@ class TestGroup(object):
raise RuntimeError('invalid TestCode type')
def __repr__(self):
- return 'TestGroup(name=%r, setup=%r, tests=%r)' % (
- self.name, self.setup, self.tests)
+ return 'TestGroup(name=%r, setup=%r, cleanup=%r, tests=%r)' % (
+ self.name, self.setup, self.cleanup, self.tests)
class TestCode(object):
@@ -149,14 +155,14 @@ class TestCode(object):
class SphinxDocTestRunner(doctest.DocTestRunner):
def summarize(self, out, verbose=None):
- io = StringIO.StringIO()
+ string_io = StringIO.StringIO()
old_stdout = sys.stdout
- sys.stdout = io
+ sys.stdout = string_io
try:
res = doctest.DocTestRunner.summarize(self, verbose)
finally:
sys.stdout = old_stdout
- out(io.getvalue())
+ out(string_io.getvalue())
return res
def _DocTestRunner__patched_linecache_getlines(self, filename,
@@ -204,6 +210,8 @@ class DocTestBuilder(Builder):
self.total_tries = 0
self.setup_failures = 0
self.setup_tries = 0
+ self.cleanup_failures = 0
+ self.cleanup_tries = 0
date = time.strftime('%Y-%m-%d %H:%M:%S')
@@ -240,12 +248,14 @@ Doctest summary
%5d test%s
%5d failure%s in tests
%5d failure%s in setup code
+%5d failure%s in cleanup code
''' % (self.total_tries, s(self.total_tries),
self.total_failures, s(self.total_failures),
- self.setup_failures, s(self.setup_failures)))
+ self.setup_failures, s(self.setup_failures),
+ self.cleanup_failures, s(self.cleanup_failures)))
self.outfile.close()
- if self.total_failures or self.setup_failures:
+ if self.total_failures or self.setup_failures or self.cleanup_failures:
self.app.statuscode = 1
def write(self, build_docnames, updated_docnames, method='update'):
@@ -265,6 +275,12 @@ Doctest summary
optionflags=self.opt)
self.test_runner = SphinxDocTestRunner(verbose=False,
optionflags=self.opt)
+ self.cleanup_runner = SphinxDocTestRunner(verbose=False,
+ optionflags=self.opt)
+
+ self.test_runner._fakeout = self.setup_runner._fakeout
+ self.cleanup_runner._fakeout = self.setup_runner._fakeout
+
if self.config.doctest_test_doctest_blocks:
def condition(node):
return (isinstance(node, (nodes.literal_block, nodes.comment))
@@ -298,6 +314,11 @@ Doctest summary
'testsetup', lineno=0)
for group in groups.itervalues():
group.add_code(code, prepend=True)
+ if self.config.doctest_global_cleanup:
+ code = TestCode(self.config.doctest_global_cleanup,
+ 'testcleanup', lineno=0)
+ for group in groups.itervalues():
+ group.add_code(code)
if not groups:
return
@@ -313,29 +334,42 @@ Doctest summary
res_f, res_t = self.test_runner.summarize(self._out, verbose=True)
self.total_failures += res_f
self.total_tries += res_t
+ if self.cleanup_runner.tries:
+ res_f, res_t = self.cleanup_runner.summarize(self._out, verbose=True)
+ self.cleanup_failures += res_f
+ self.cleanup_tries += res_t
def compile(self, code, name, type, flags, dont_inherit):
return compile(code, name, self.type, flags, dont_inherit)
def test_group(self, group, filename):
ns = {}
- setup_examples = []
- for setup in group.setup:
- setup_examples.append(doctest.Example(setup.code, '',
- lineno=setup.lineno))
- if setup_examples:
- # simulate a doctest with the setup code
- setup_doctest = doctest.DocTest(setup_examples, {},
- '%s (setup code)' % group.name,
- filename, 0, None)
- setup_doctest.globs = ns
- old_f = self.setup_runner.failures
- self.type = 'exec' # the snippet may contain multiple statements
- self.setup_runner.run(setup_doctest, out=self._warn_out,
- clear_globs=False)
- if self.setup_runner.failures > old_f:
- # don't run the group
+
+ def run_setup_cleanup(runner, testcodes, what):
+ examples = []
+ for testcode in testcodes:
+ examples.append(doctest.Example(testcode.code, '',
+ lineno=testcode.lineno))
+ if not examples:
return
+ # simulate a doctest with the code
+ sim_doctest = doctest.DocTest(examples, {},
+ '%s (%s code)' % (group.name, what),
+ filename, 0, None)
+ sim_doctest.globs = ns
+ old_f = runner.failures
+ self.type = 'exec' # the snippet may contain multiple statements
+ runner.run(sim_doctest, out=self._warn_out, clear_globs=False)
+ if runner.failures > old_f:
+ return False
+ return True
+
+ # run the setup code
+ if not run_setup_cleanup(self.setup_runner, group.setup, 'setup'):
+ # if setup failed, don't run the group
+ return
+
+ # run the tests
for code in group.tests:
if len(code) == 1:
# ordinary doctests (code/output interleaved)
@@ -373,9 +407,13 @@ Doctest summary
# also don't clear the globs namespace after running the doctest
self.test_runner.run(test, out=self._warn_out, clear_globs=False)
+ # run the cleanup
+ run_setup_cleanup(self.cleanup_runner, group.cleanup, 'cleanup')
+
def setup(app):
app.add_directive('testsetup', TestsetupDirective)
+ app.add_directive('testcleanup', TestcleanupDirective)
app.add_directive('doctest', DoctestDirective)
app.add_directive('testcode', TestcodeDirective)
app.add_directive('testoutput', TestoutputDirective)
@@ -384,3 +422,4 @@ def setup(app):
app.add_config_value('doctest_path', [], False)
app.add_config_value('doctest_test_doctest_blocks', 'default', False)
app.add_config_value('doctest_global_setup', '', False)
+ app.add_config_value('doctest_global_cleanup', '', False)
diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py
index c83eaa21..0b8e050b 100644
--- a/sphinx/ext/graphviz.py
+++ b/sphinx/ext/graphviz.py
@@ -11,6 +11,7 @@
"""
import re
+import codecs
import posixpath
from os import path
from math import ceil
@@ -46,23 +47,45 @@ class Graphviz(Directive):
"""
has_content = True
required_arguments = 0
- optional_arguments = 0
+ optional_arguments = 1
final_argument_whitespace = False
option_spec = {
'alt': directives.unchanged,
+ 'inline': directives.flag,
}
def run(self):
- dotcode = '\n'.join(self.content)
- if not dotcode.strip():
- return [self.state_machine.reporter.warning(
- 'Ignoring "graphviz" directive without content.',
- line=self.lineno)]
+ if self.arguments:
+ document = self.state.document
+ if self.content:
+ return [document.reporter.warning(
+ 'Graphviz directive cannot have both content and '
+ 'a filename argument', line=self.lineno)]
+ env = self.state.document.settings.env
+ rel_filename, filename = env.relfn2path(self.arguments[0])
+ env.note_dependency(rel_filename)
+ try:
+ fp = codecs.open(filename, 'r', 'utf-8')
+ try:
+ dotcode = fp.read()
+ finally:
+ fp.close()
+ except (IOError, OSError):
+ return [document.reporter.warning(
+ 'External Graphviz file %r not found or reading '
+ 'it failed' % filename, line=self.lineno)]
+ else:
+ dotcode = '\n'.join(self.content)
+ if not dotcode.strip():
+ return [self.state_machine.reporter.warning(
+ 'Ignoring "graphviz" directive without content.',
+ line=self.lineno)]
node = graphviz()
node['code'] = dotcode
node['options'] = []
if 'alt' in self.options:
node['alt'] = self.options['alt']
+ node['inline'] = 'inline' in self.options
return [node]
@@ -76,6 +99,7 @@ class GraphvizSimple(Directive):
final_argument_whitespace = False
option_spec = {
'alt': directives.unchanged,
+ 'inline': directives.flag,
}
def run(self):
@@ -85,14 +109,14 @@ class GraphvizSimple(Directive):
node['options'] = []
if 'alt' in self.options:
node['alt'] = self.options['alt']
+ node['inline'] = 'inline' in self.options
return [node]
def render_dot(self, code, options, format, prefix='graphviz'):
- """
- Render graphviz code into a PNG or PDF output file.
- """
+ """Render graphviz code into a PNG or PDF output file."""
hashkey = code.encode('utf-8') + str(options) + \
+ str(self.builder.config.graphviz_dot) + \
str(self.builder.config.graphviz_dot_args)
fname = '%s-%s.%s' % (prefix, sha(hashkey).hexdigest(), format)
if hasattr(self.builder, 'imgpath'):
@@ -193,7 +217,12 @@ def render_dot_html(self, node, code, options, prefix='graphviz',
self.builder.warn('dot code %r: ' % code + str(exc))
raise nodes.SkipNode
- self.body.append(self.starttag(node, 'p', CLASS='graphviz'))
+ if node.get('inline', False):
+ wrapper = 'span'
+ else:
+ wrapper = 'p'
+
+ self.body.append(self.starttag(node, wrapper, CLASS='graphviz'))
if fname is None:
self.body.append(self.encode(code))
else:
@@ -220,7 +249,7 @@ def render_dot_html(self, node, code, options, prefix='graphviz',
(fname, alt, mapname, imgcss))
self.body.extend(imgmap)
- self.body.append('</p>\n')
+ self.body.append('</%s>\n' % wrapper)
raise nodes.SkipNode
@@ -235,8 +264,14 @@ def render_dot_latex(self, node, code, options, prefix='graphviz'):
self.builder.warn('dot code %r: ' % code + str(exc))
raise nodes.SkipNode
+ if node.get('inline', False):
+ para_separator = ''
+ else:
+ para_separator = '\n'
+
if fname is not None:
- self.body.append('\\includegraphics{%s}' % fname)
+ self.body.append('%s\\includegraphics{%s}%s' % (para_separator, fname,
+ para_separator))
raise nodes.SkipNode
diff --git a/sphinx/ext/inheritance_diagram.py b/sphinx/ext/inheritance_diagram.py
index ad0c253a..231b3762 100644
--- a/sphinx/ext/inheritance_diagram.py
+++ b/sphinx/ext/inheritance_diagram.py
@@ -67,8 +67,7 @@ class InheritanceGraph(object):
graphviz dot graph from them.
"""
def __init__(self, class_names, currmodule, show_builtins=False, parts=0):
- """
- *class_names* is a list of child classes to show bases from.
+ """*class_names* is a list of child classes to show bases from.
If *show_builtins* is True, then Python builtins will be shown
in the graph.
@@ -81,9 +80,7 @@ class InheritanceGraph(object):
'inheritance diagram')
def _import_class_or_module(self, name, currmodule):
- """
- Import a class using its fully-qualified *name*.
- """
+ """Import a class using its fully-qualified *name*."""
try:
path, base = class_sig_re.match(name).groups()
except ValueError:
@@ -182,9 +179,7 @@ class InheritanceGraph(object):
return '.'.join(name_parts[-parts:])
def get_all_class_names(self):
- """
- Get all of the class names involved in the graph.
- """
+ """Get all of the class names involved in the graph."""
return [fullname for (_, fullname, _) in self.class_info]
# These are the default attrs for graphviz
@@ -213,9 +208,8 @@ class InheritanceGraph(object):
def generate_dot(self, name, urls={}, env=None,
graph_attrs={}, node_attrs={}, edge_attrs={}):
- """
- Generate a graphviz dot graph from the classes that
- were passed in to __init__.
+ """Generate a graphviz dot graph from the classes that were passed in
+ to __init__.
*name* is the name of the graph.
@@ -363,7 +357,8 @@ def setup(app):
latex=(latex_visit_inheritance_diagram, None),
html=(html_visit_inheritance_diagram, None),
text=(skip, None),
- man=(skip, None))
+ man=(skip, None),
+ texinfo=(skip, None))
app.add_directive('inheritance-diagram', InheritanceDiagram)
app.add_config_value('inheritance_graph_attrs', {}, False),
app.add_config_value('inheritance_node_attrs', {}, False),
diff --git a/sphinx/ext/intersphinx.py b/sphinx/ext/intersphinx.py
index 578dddee..709428a3 100644
--- a/sphinx/ext/intersphinx.py
+++ b/sphinx/ext/intersphinx.py
@@ -26,6 +26,7 @@
import time
import zlib
+import codecs
import urllib2
import posixpath
from os import path
@@ -33,19 +34,26 @@ from os import path
from docutils import nodes
from sphinx.builders.html import INVENTORY_FILENAME
+from sphinx.util.pycompat import b
+
handlers = [urllib2.ProxyHandler(), urllib2.HTTPRedirectHandler(),
urllib2.HTTPHandler()]
-if hasattr(urllib2, 'HTTPSHandler'):
+try:
handlers.append(urllib2.HTTPSHandler)
+except NameError:
+ pass
urllib2.install_opener(urllib2.build_opener(*handlers))
+UTF8StreamReader = codecs.lookup('utf-8')[2]
+
def read_inventory_v1(f, uri, join):
+ f = UTF8StreamReader(f)
invdata = {}
line = f.next()
- projname = line.rstrip()[11:].decode('utf-8')
+ projname = line.rstrip()[11:]
line = f.next()
version = line.rstrip()[11:]
for line in f:
@@ -68,25 +76,25 @@ def read_inventory_v2(f, uri, join, bufsize=16*1024):
projname = line.rstrip()[11:].decode('utf-8')
line = f.readline()
version = line.rstrip()[11:].decode('utf-8')
- line = f.readline()
+ line = f.readline().decode('utf-8')
if 'zlib' not in line:
raise ValueError
def read_chunks():
decompressor = zlib.decompressobj()
- for chunk in iter(lambda: f.read(bufsize), ''):
+ for chunk in iter(lambda: f.read(bufsize), b('')):
yield decompressor.decompress(chunk)
yield decompressor.flush()
def split_lines(iter):
- buf = ''
+ buf = b('')
for chunk in iter:
buf += chunk
- lineend = buf.find('\n')
+ lineend = buf.find(b('\n'))
while lineend != -1:
yield buf[:lineend].decode('utf-8')
buf = buf[lineend+1:]
- lineend = buf.find('\n')
+ lineend = buf.find(b('\n'))
assert not buf
for line in split_lines(read_chunks()):
@@ -115,7 +123,7 @@ def fetch_inventory(app, uri, inv):
'%s: %s' % (inv, err.__class__, err))
return
try:
- line = f.readline().rstrip()
+ line = f.readline().rstrip().decode('utf-8')
try:
if line == '# Sphinx inventory version 1':
invdata = read_inventory_v1(f, uri, join)
diff --git a/sphinx/ext/mathbase.py b/sphinx/ext/mathbase.py
index 27c211ef..0f4093bb 100644
--- a/sphinx/ext/mathbase.py
+++ b/sphinx/ext/mathbase.py
@@ -12,6 +12,7 @@
from docutils import nodes, utils
from docutils.parsers.rst import directives
+from sphinx.writers import texinfo
from sphinx.util.compat import Directive
@@ -122,6 +123,20 @@ def man_visit_eqref(self, node):
raise nodes.SkipNode
+def texinfo_visit_math(self, node):
+ self.body.append('@math{' + texinfo.escape_arg(node['latex']) + '}')
+ raise nodes.SkipNode
+
+def texinfo_visit_displaymath(self, node):
+ self.visit_paragraph(node)
+def texinfo_depart_displaymath(self, node):
+ self.depart_paragraph(node)
+
+def texinfo_visit_eqref(self, node):
+ self.body.append(node['target'])
+ raise nodes.SkipNode
+
+
def html_visit_eqref(self, node):
self.body.append('<a href="#equation-%s">' % node['target'])
@@ -148,20 +163,23 @@ def number_equations(app, doctree, docname):
def setup_math(app, htmlinlinevisitors, htmldisplayvisitors):
app.add_node(math,
- latex=(latex_visit_math, None),
- text=(text_visit_math, None),
- man=(man_visit_math, None),
- html=htmlinlinevisitors)
+ latex=(latex_visit_math, None),
+ text=(text_visit_math, None),
+ man=(man_visit_math, None),
+ texinfo=(texinfo_visit_math, None),
+ html=htmlinlinevisitors)
app.add_node(displaymath,
- latex=(latex_visit_displaymath, None),
- text=(text_visit_displaymath, None),
- man=(man_visit_displaymath, man_depart_displaymath),
- html=htmldisplayvisitors)
+ latex=(latex_visit_displaymath, None),
+ text=(text_visit_displaymath, None),
+ man=(man_visit_displaymath, man_depart_displaymath),
+ texinfo=(texinfo_visit_displaymath, texinfo_depart_displaymath),
+ html=htmldisplayvisitors)
app.add_node(eqref,
- latex=(latex_visit_eqref, None),
- text=(text_visit_eqref, None),
- man=(man_visit_eqref, None),
- html=(html_visit_eqref, html_depart_eqref))
+ latex=(latex_visit_eqref, None),
+ text=(text_visit_eqref, None),
+ man=(man_visit_eqref, None),
+ texinfo=(texinfo_visit_eqref, None),
+ html=(html_visit_eqref, html_depart_eqref))
app.add_role('math', math_role)
app.add_role('eq', eq_role)
app.add_directive('math', MathDirective)
diff --git a/sphinx/ext/oldcmarkup.py b/sphinx/ext/oldcmarkup.py
index 2bf9b65d..41969c36 100644
--- a/sphinx/ext/oldcmarkup.py
+++ b/sphinx/ext/oldcmarkup.py
@@ -18,6 +18,7 @@ WARNING_MSG = 'using old C markup; please migrate to new-style markup ' \
'(e.g. c:function instead of cfunction), see ' \
'http://sphinx.pocoo.org/domains.html'
+
class OldCDirective(Directive):
has_content = True
required_arguments = 1
diff --git a/sphinx/ext/pngmath.py b/sphinx/ext/pngmath.py
index 6fdfbfe7..015a4904 100644
--- a/sphinx/ext/pngmath.py
+++ b/sphinx/ext/pngmath.py
@@ -26,6 +26,7 @@ from docutils import nodes
from sphinx.errors import SphinxError
from sphinx.util.png import read_png_depth, write_png_depth
from sphinx.util.osutil import ensuredir, ENOENT
+from sphinx.util.pycompat import b
from sphinx.ext.mathbase import setup_math as mathbase_setup, wrap_displaymath
class MathExtError(SphinxError):
@@ -58,11 +59,10 @@ DOC_BODY_PREVIEW = r'''
\end{document}
'''
-depth_re = re.compile(r'\[\d+ depth=(-?\d+)\]')
+depth_re = re.compile(b(r'\[\d+ depth=(-?\d+)\]'))
def render_math(self, math):
- """
- Render the LaTeX math expression *math* using latex and dvipng.
+ """Render the LaTeX math expression *math* using latex and dvipng.
Return the filename relative to the built document and the "depth",
that is, the distance of image bottom and baseline in pixels, if the
diff --git a/sphinx/ext/todo.py b/sphinx/ext/todo.py
index 2ba9d5e1..6a44a9b4 100644
--- a/sphinx/ext/todo.py
+++ b/sphinx/ext/todo.py
@@ -159,7 +159,8 @@ def setup(app):
html=(visit_todo_node, depart_todo_node),
latex=(visit_todo_node, depart_todo_node),
text=(visit_todo_node, depart_todo_node),
- man=(visit_todo_node, depart_todo_node))
+ man=(visit_todo_node, depart_todo_node),
+ texinfo=(visit_todo_node, depart_todo_node))
app.add_directive('todo', Todo)
app.add_directive('todolist', TodoList)
diff --git a/sphinx/ext/viewcode.py b/sphinx/ext/viewcode.py
index 4994f125..020db697 100644
--- a/sphinx/ext/viewcode.py
+++ b/sphinx/ext/viewcode.py
@@ -31,7 +31,11 @@ def doctree_read(app, doctree):
env._viewcode_modules[modname] = False
return
analyzer.find_tags()
- entry = analyzer.code.decode(analyzer.encoding), analyzer.tags, {}
+ if not isinstance(analyzer.code, unicode):
+ code = analyzer.code.decode(analyzer.encoding)
+ else:
+ code = analyzer.code
+ entry = code, analyzer.tags, {}
env._viewcode_modules[modname] = entry
elif entry is False:
return
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
index 8cbd647a..aa093d80 100644
--- a/sphinx/highlighting.py
+++ b/sphinx/highlighting.py
@@ -156,7 +156,7 @@ class PygmentsBridge(object):
if sys.version_info >= (2, 5):
src = 'from __future__ import with_statement\n' + src
- if isinstance(src, unicode):
+ if sys.version_info < (3, 0) and isinstance(src, unicode):
# Non-ASCII chars will only occur in string literals
# and comments. If we wanted to give them to the parser
# correctly, we'd have to find out the correct source
@@ -175,7 +175,7 @@ class PygmentsBridge(object):
return True
def highlight_block(self, source, lang, linenos=False, warn=None):
- if isinstance(source, str):
+ if not isinstance(source, unicode):
source = source.decode()
if not pygments:
return self.unhighlighted(source)
diff --git a/sphinx/jinja2glue.py b/sphinx/jinja2glue.py
index f3639867..1c5390dc 100644
--- a/sphinx/jinja2glue.py
+++ b/sphinx/jinja2glue.py
@@ -37,8 +37,10 @@ def accesskey(context, key):
class SphinxFileSystemLoader(FileSystemLoader):
- """FileSystemLoader subclass that is not so strict about '..'
- entries in template names."""
+ """
+ FileSystemLoader subclass that is not so strict about '..' entries in
+ template names.
+ """
def get_source(self, environment, template):
for searchpath in self.searchpath:
diff --git a/sphinx/locale/__init__.py b/sphinx/locale/__init__.py
index e40a7eab..5174f495 100644
--- a/sphinx/locale/__init__.py
+++ b/sphinx/locale/__init__.py
@@ -8,13 +8,16 @@
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
+
+import sys
import gettext
import UserString
class _TranslationProxy(UserString.UserString, object):
- """Class for proxy strings from gettext translations. This is a helper
- for the lazy_* functions from this module.
+ """
+ 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.
@@ -135,7 +138,8 @@ class _TranslationProxy(UserString.UserString, object):
def mygettext(string):
"""Used instead of _ when creating TranslationProxies, because _ is
- not bound yet at that time."""
+ not bound yet at that time.
+ """
return _(string)
def lazy_gettext(string):
@@ -176,18 +180,32 @@ pairindextypes = {
'builtin': l_('built-in function'),
}
-translator = None
+translators = {}
-def _(message):
- return translator.ugettext(message)
+if sys.version_info >= (3, 0):
+ def _(message):
+ return translators['sphinx'].gettext(message)
+else:
+ def _(message):
+ return translators['sphinx'].ugettext(message)
-def init(locale_dirs, language):
- global translator
+
+def init(locale_dirs, language, catalog='sphinx'):
+ """Look for message catalogs in `locale_dirs` and *ensure* that there is at
+ least a NullTranslations catalog set in `translators`. If called multiple
+ times or if several ``.mo`` files are found, their contents are merged
+ together (thus making ``init`` reentrable).
+ """
+ global translators
+ translator = translators.get(catalog)
+ # ignore previously failed attempts to find message catalogs
+ if isinstance(translator, gettext.NullTranslations):
+ translator = None
# the None entry is the system's default locale path
has_translation = True
for dir_ in locale_dirs:
try:
- trans = gettext.translation('sphinx', localedir=dir_,
+ trans = gettext.translation(catalog, localedir=dir_,
languages=[language])
if translator is None:
translator = trans
@@ -196,7 +214,11 @@ def init(locale_dirs, language):
except Exception:
# Language couldn't be found in the specified path
pass
+ # guarantee translations[catalog] exists
if translator is None:
translator = gettext.NullTranslations()
has_translation = False
+ translators[catalog] = translator
+ if hasattr(translator, 'ugettext'):
+ translator.gettext = translator.ugettext
return translator, has_translation
diff --git a/sphinx/locale/bn/LC_MESSAGES/sphinx.js b/sphinx/locale/bn/LC_MESSAGES/sphinx.js
index 277cd3d0..6ffd0c0b 100644
--- a/sphinx/locale/bn/LC_MESSAGES/sphinx.js
+++ b/sphinx/locale/bn/LC_MESSAGES/sphinx.js
@@ -1 +1 @@
-Documentation.addTranslations({"locale": "bn", "plural_expr": "(n != 1)", "messages": {"Search Results": "\u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8\u09c7\u09b0 \u09ab\u09b2\u09be\u09ab\u09b2", "Preparing search...": "\u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8\u09c7\u09b0 \u09aa\u09cd\u09b0\u09b8\u09cd\u09a4\u09c1\u09a4\u09bf \u099a\u09b2\u099b\u09c7...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "\u0986\u09aa\u09a8\u09be\u09b0 \u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8\u09c7 \u0995\u09c7\u09be\u09a8 \u09ab\u09b2\u09be\u09ab\u09b2 \u09aa\u09be\u0993\u09df\u09be \u09af\u09be\u09df\u09a8\u09bf\u0964 \u0986\u09aa\u09a8\u09be\u09b0 \u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8\u09c7\u09b0 \u09b6\u09ac\u09cd\u09a6\u0997\u09c1\u09b2\u09c7\u09be\u09b0 \u09b8\u09a0\u09bf\u0995 \u09ac\u09be\u09a8\u09be\u09a8 \u0993 \u09ac\u09bf\u09ad\u09be\u0997 \u09a8\u09bf\u09b0\u09cd\u09ac\u09be\u099a\u09a8 \u09a8\u09bf\u09b6\u09cd\u099a\u09bf\u09a4 \u0995\u09b0\u09c1\u09a8\u0964", "Search finished, found %s page(s) matching the search query.": "\u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8 \u09b6\u09c7\u09b7 \u09b9\u09df\u09c7\u099b\u09c7, \u09ab\u09b2\u09be\u09ab\u09b2\u09c7 %s-\u099f\u09bf \u09aa\u09be\u09a4\u09be \u09aa\u09be\u0993\u09df\u09be \u0997\u09c7\u099b\u09c7\u0964", ", in ": ", -", "Permalink to this headline": "\u098f\u0987 \u09b6\u09bf\u09b0\u09c7\u09be\u09a8\u09be\u09ae\u09c7\u09b0 \u09aa\u09be\u09b0\u09cd\u09ae\u09be\u09b2\u09bf\u0999\u09cd\u0995", "Searching": "\u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8 \u099a\u09b2\u099b\u09c7", "Permalink to this definition": "\u098f\u0987 \u09b8\u0982\u099c\u09cd\u099e\u09be\u09b0 \u09aa\u09be\u09b0\u09cd\u09ae\u09be\u09b2\u09bf\u0999\u09cd\u0995", "Hide Search Matches": "\u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8\u09c7\u09b0 \u09ae\u09cd\u09af\u09be\u099a\u0997\u09c1\u09b2\u09c7\u09be \u09b2\u09c1\u0995\u09be\u09a8"}}); \ No newline at end of file
+Documentation.addTranslations({"locale": "bn", "plural_expr": "(n != 1)", "messages": {"Search Results": "\u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8\u09c7\u09b0 \u09ab\u09b2\u09be\u09ab\u09b2", "Preparing search...": "\u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8\u09c7\u09b0 \u09aa\u09cd\u09b0\u09b8\u09cd\u09a4\u09c1\u09a4\u09bf \u099a\u09b2\u099b\u09c7...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "\u0986\u09aa\u09a8\u09be\u09b0 \u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8\u09c7 \u0995\u09c7\u09be\u09a8 \u09ab\u09b2\u09be\u09ab\u09b2 \u09aa\u09be\u0993\u09df\u09be \u09af\u09be\u09df\u09a8\u09bf\u0964 \u0986\u09aa\u09a8\u09be\u09b0 \u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8\u09c7\u09b0 \u09b6\u09ac\u09cd\u09a6\u0997\u09c1\u09b2\u09c7\u09be\u09b0 \u09b8\u09a0\u09bf\u0995 \u09ac\u09be\u09a8\u09be\u09a8 \u0993 \u09ac\u09bf\u09ad\u09be\u0997 \u09a8\u09bf\u09b0\u09cd\u09ac\u09be\u099a\u09a8 \u09a8\u09bf\u09b6\u09cd\u099a\u09bf\u09a4 \u0995\u09b0\u09c1\u09a8\u0964", "Search finished, found %s page(s) matching the search query.": "\u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8 \u09b6\u09c7\u09b7 \u09b9\u09df\u09c7\u099b\u09c7, \u09ab\u09b2\u09be\u09ab\u09b2\u09c7 %s-\u099f\u09bf \u09aa\u09be\u09a4\u09be \u09aa\u09be\u0993\u09df\u09be \u0997\u09c7\u099b\u09c7\u0964", ", in ": ", -", "Expand sidebar": "", "Permalink to this headline": "\u098f\u0987 \u09b6\u09bf\u09b0\u09c7\u09be\u09a8\u09be\u09ae\u09c7\u09b0 \u09aa\u09be\u09b0\u09cd\u09ae\u09be\u09b2\u09bf\u0999\u09cd\u0995", "Searching": "\u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8 \u099a\u09b2\u099b\u09c7", "Collapse sidebar": "", "Permalink to this definition": "\u098f\u0987 \u09b8\u0982\u099c\u09cd\u099e\u09be\u09b0 \u09aa\u09be\u09b0\u09cd\u09ae\u09be\u09b2\u09bf\u0999\u09cd\u0995", "Hide Search Matches": "\u0985\u09a8\u09c1\u09b8\u09a8\u09cd\u09a7\u09be\u09a8\u09c7\u09b0 \u09ae\u09cd\u09af\u09be\u099a\u0997\u09c1\u09b2\u09c7\u09be \u09b2\u09c1\u0995\u09be\u09a8"}}); \ No newline at end of file
diff --git a/sphinx/locale/bn/LC_MESSAGES/sphinx.mo b/sphinx/locale/bn/LC_MESSAGES/sphinx.mo
index 9b60397e..db568e1b 100644
--- a/sphinx/locale/bn/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/bn/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/bn/LC_MESSAGES/sphinx.po b/sphinx/locale/bn/LC_MESSAGES/sphinx.po
index d5141c79..88aed5e4 100644
--- a/sphinx/locale/bn/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/bn/LC_MESSAGES/sphinx.po
@@ -1,4 +1,4 @@
-# Translations template for Sphinx.
+# Bengali translations for Sphinx.
# Copyright (C) 2009 ORGANIZATION
# This file is distributed under the same license as the Sphinx project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
@@ -8,573 +8,654 @@ msgstr ""
"Project-Id-Version: Sphinx 1.0pre/[?1034h2e1ab15e035e\n"
"Report-Msgid-Bugs-To: nasim.haque@gmail.com\n"
"POT-Creation-Date: 2009-11-08 16:28+0100\n"
-"PO-Revision-Date: 2009-11-10 13:42+0100\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Nasimul Haque <nasim.haque@gmail.com>\n"
"Language-Team: Nasimul Haque <nasim.haque@gmail.com>\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\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.5\n"
-#: sphinx/environment.py:130
-#: sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
+#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%B %d, %Y"
-#: sphinx/environment.py:348
-#: 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:134
-#: sphinx/writers/latex.py:190
-msgid "Index"
-msgstr "ইনডেক্স"
-
-#: sphinx/environment.py:349
-#: sphinx/writers/latex.py:189
-msgid "Module Index"
-msgstr "মডিউল ইনডেক্স"
-
-#: sphinx/environment.py:350
-#: sphinx/themes/basic/defindex.html:16
-msgid "Search Page"
-msgstr "অনুসন্ধান পাতা"
-
-#: sphinx/roles.py:167
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "পাইথন উন্নয়ন পরামর্শ!PEP %s"
-#: sphinx/builders/changes.py:70
+#: sphinx/builders/changes.py:72
msgid "Builtins"
msgstr "বিল্টইন সমূহ"
-#: sphinx/builders/changes.py:72
+#: sphinx/builders/changes.py:74
msgid "Module level"
msgstr "মডিউল লেভেল"
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%b %d, %Y"
-#: sphinx/builders/html.py:243
-#: sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "সাধারণ ইনডেক্স"
-#: sphinx/builders/html.py:243
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "ইনডেক্স"
-#: sphinx/builders/html.py:247
-#: sphinx/builders/htmlhelp.py:220
-#: sphinx/builders/qthelp.py:133
-#: 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:248
-msgid "modules"
-msgstr "মডিউল সমূহ"
-
-#: sphinx/builders/html.py:304
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "পরবর্তী"
-#: sphinx/builders/html.py:313
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "পূর্ববর্তী"
-#: sphinx/builders/latex.py:162
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr "(-"
-#: sphinx/directives/__init__.py:78
-#: sphinx/directives/__init__.py:79
-#: sphinx/directives/__init__.py:80
-#: sphinx/directives/__init__.py:81
-msgid "Raises"
-msgstr "রেইজেস"
-
-#: sphinx/directives/__init__.py:82
-#: sphinx/directives/__init__.py:83
-#: sphinx/directives/__init__.py:84
-msgid "Variable"
-msgstr "ভ্যারিয়েবল"
-
-#: sphinx/directives/__init__.py:85
-#: sphinx/directives/__init__.py:86
-#: sphinx/directives/__init__.py:92
-#: sphinx/directives/__init__.py:93
-msgid "Returns"
-msgstr "রিটার্নস"
-
-#: sphinx/directives/__init__.py:94
-msgid "Return type"
-msgstr "রিটার্ন টাইপ"
-
-#: sphinx/directives/__init__.py:169
-msgid "Parameter"
-msgstr "প্যারামিটার"
-
-#: sphinx/directives/__init__.py:173
-msgid "Parameters"
-msgstr "প্যারামিটার"
-
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "অনুচ্ছেদ লেখক:"
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "মডিউল লেখক:"
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
+#, fuzzy
+msgid "Code author: "
+msgstr "মডিউল লেখক:"
+
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "লেখক:"
-#: sphinx/directives/other.py:233
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "আরও দেখুন"
-#: sphinx/domains/c.py:124
+#: sphinx/domains/__init__.py:242
+#, python-format
+msgid "%s %s"
+msgstr ""
+
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
+msgid "Parameters"
+msgstr "প্যারামিটার"
+
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
+msgid "Returns"
+msgstr "রিটার্নস"
+
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
+msgid "Return type"
+msgstr "রিটার্ন টাইপ"
+
+#: sphinx/domains/c.py:133
#, python-format
msgid "%s (C function)"
msgstr "%s (C ফাংশন)"
-#: sphinx/domains/c.py:126
+#: sphinx/domains/c.py:135
#, python-format
msgid "%s (C member)"
msgstr "%s (C মেম্বার)"
-#: sphinx/domains/c.py:128
+#: sphinx/domains/c.py:137
#, python-format
msgid "%s (C macro)"
msgstr "%s (C ম্যাক্রো)"
-#: sphinx/domains/c.py:130
+#: sphinx/domains/c.py:139
#, python-format
msgid "%s (C type)"
msgstr "%s (C টাইপ)"
-#: sphinx/domains/c.py:132
+#: sphinx/domains/c.py:141
#, python-format
msgid "%s (C variable)"
msgstr "%s (C ভ্যারিয়েবল)"
-#: sphinx/domains/c.py:162
-msgid "C function"
-msgstr "C ফাংশন"
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
+msgid "function"
+msgstr "ফাংশন"
-#: sphinx/domains/c.py:163
-msgid "C member"
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
+#, fuzzy
+msgid "member"
msgstr "C মেম্বার"
-#: sphinx/domains/c.py:164
-msgid "C macro"
+#: sphinx/domains/c.py:173
+#, fuzzy
+msgid "macro"
msgstr "C ম্যাক্রো"
-#: sphinx/domains/c.py:165
-msgid "C type"
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
+#, fuzzy
+msgid "type"
msgstr "C টাইপ"
-#: sphinx/domains/c.py:166
-msgid "C variable"
+#: sphinx/domains/c.py:175
+#, fuzzy
+msgid "variable"
msgstr "C ভ্যারিয়েবল"
-#: sphinx/domains/python.py:186
+#: sphinx/domains/cpp.py:883
+#, python-format
+msgid "%s (C++ class)"
+msgstr "%s (C++ ক্লাসে)"
+
+#: sphinx/domains/cpp.py:898
+#, python-format
+msgid "%s (C++ type)"
+msgstr "%s (C++ টাইপ)"
+
+#: sphinx/domains/cpp.py:917
+#, python-format
+msgid "%s (C++ member)"
+msgstr "%s (C++ মেম্বার)"
+
+#: sphinx/domains/cpp.py:969
+#, python-format
+msgid "%s (C++ function)"
+msgstr "%s (C++ ফাংশন)"
+
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
+msgid "class"
+msgstr "ক্লাস"
+
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (বিল্ট-ইন ফাংশন)"
-#: sphinx/domains/python.py:187
-#: sphinx/domains/python.py:244
-#: sphinx/domains/python.py:256
-#: sphinx/domains/python.py:269
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
+#, python-format
+msgid "%s() (%s method)"
+msgstr "%s() (%s মেথড)"
+
+#: sphinx/domains/javascript.py:108
+#, python-format
+msgid "%s() (class)"
+msgstr "%s() (ক্লাসে)"
+
+#: sphinx/domains/javascript.py:110
+#, python-format
+msgid "%s (global variable or constant)"
+msgstr ""
+
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
+#, python-format
+msgid "%s (%s attribute)"
+msgstr "%s (%s এ্যট্রিবিউট)"
+
+#: sphinx/domains/javascript.py:121
+#, fuzzy
+msgid "Arguments"
+msgstr "প্যারামিটার"
+
+#: sphinx/domains/javascript.py:124
+msgid "Throws"
+msgstr ""
+
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
+msgid "data"
+msgstr "ডাটা"
+
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
+msgid "attribute"
+msgstr "এ্যট্রিবিউট"
+
+#: sphinx/domains/python.py:98
+#, fuzzy
+msgid "Variables"
+msgstr "ভ্যারিয়েবল"
+
+#: sphinx/domains/python.py:101
+msgid "Raises"
+msgstr "রেইজেস"
+
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (%s মডিউলে)"
-#: sphinx/domains/python.py:190
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (বিল্ট-ইন ভ্যারিয়েবল)"
-#: sphinx/domains/python.py:191
-#: sphinx/domains/python.py:282
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (%s মডিউলে)"
-#: sphinx/domains/python.py:207
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (বিল্ট-ইন ক্লাস)"
-#: sphinx/domains/python.py:208
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (%s ক্লাসে)"
-#: sphinx/domains/python.py:248
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s (%s.%s মেথড)"
-#: sphinx/domains/python.py:250
-#, python-format
-msgid "%s() (%s method)"
-msgstr "%s() (%s মেথড)"
-
-#: sphinx/domains/python.py:260
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s (%s.%s স্ট্যাটিক মেথড)"
-#: sphinx/domains/python.py:263
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s স্ট্যাটিক মেথড)"
-#: sphinx/domains/python.py:273
+#: sphinx/domains/python.py:331
#, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s ক্লাস মেথড)"
-#: sphinx/domains/python.py:276
+#: sphinx/domains/python.py:334
#, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s ক্লাস মেথড)"
-#: sphinx/domains/python.py:286
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s এ্যট্রিবিউট)"
-#: sphinx/domains/python.py:288
-#, python-format
-msgid "%s (%s attribute)"
-msgstr "%s (%s এ্যট্রিবিউট)"
-
-#: sphinx/domains/python.py:334
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "প্লাটফরম:"
-#: sphinx/domains/python.py:340
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (মডিউল)"
-#: sphinx/domains/python.py:396
-msgid "function"
-msgstr "ফাংশন"
+#: sphinx/domains/python.py:455
+#, fuzzy
+msgid "Python Module Index"
+msgstr "মডিউল ইনডেক্স"
-#: sphinx/domains/python.py:397
-msgid "data"
-msgstr "ডাটা"
+#: sphinx/domains/python.py:456
+msgid "modules"
+msgstr "মডিউল সমূহ"
-#: sphinx/domains/python.py:398
-msgid "class"
-msgstr "ক্লাস"
+#: sphinx/domains/python.py:501
+msgid "Deprecated"
+msgstr "ডেপ্রিকেটেড"
-#: sphinx/domains/python.py:399
-#: sphinx/locale/__init__.py:161
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "এক্সেপশন"
-#: sphinx/domains/python.py:400
+#: sphinx/domains/python.py:527
msgid "method"
msgstr "মেথড"
-#: sphinx/domains/python.py:401
-msgid "attribute"
-msgstr "এ্যট্রিবিউট"
+#: sphinx/domains/python.py:528
+msgid "class method"
+msgstr "ক্লাস মেথড"
-#: sphinx/domains/python.py:402
-#: sphinx/locale/__init__.py:157
+#: sphinx/domains/python.py:529
+msgid "static method"
+msgstr "স্ট্যাটিক মেথড"
+
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "মডিউল"
-#: sphinx/domains/std.py:67
-#: sphinx/domains/std.py:83
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "ডেপ্রিকেটেড"
+
+#: sphinx/domains/rst.py:55
+#, python-format
+msgid "%s (directive)"
+msgstr ""
+
+#: sphinx/domains/rst.py:57
+#, fuzzy, python-format
+msgid "%s (role)"
+msgstr "%s (মডিউল)"
+
+#: sphinx/domains/rst.py:106
+msgid "directive"
+msgstr ""
+
+#: sphinx/domains/rst.py:107
+#, fuzzy
+msgid "role"
+msgstr "মডিউল"
+
+#: sphinx/domains/std.py:68 sphinx/domains/std.py:84
#, python-format
msgid "environment variable; %s"
msgstr "এনভায়রনমেন্ট ভ্যারিয়েবল; %s"
-#: sphinx/domains/std.py:156
+#: sphinx/domains/std.py:160
#, python-format
msgid "%scommand line option; %s"
msgstr "%sকমান্ড লাইন অপশন; %s"
-#: sphinx/domains/std.py:324
+#: sphinx/domains/std.py:328
msgid "glossary term"
msgstr "শব্দকোষ"
-#: sphinx/domains/std.py:325
+#: sphinx/domains/std.py:329
msgid "grammar token"
msgstr "ব্যকরণ টোকেন"
-#: sphinx/domains/std.py:326
+#: sphinx/domains/std.py:330
+msgid "reference label"
+msgstr ""
+
+#: sphinx/domains/std.py:331
msgid "environment variable"
msgstr "এনভায়রনমেন্ট ভ্যারিয়েবল"
-#: sphinx/domains/std.py:327
+#: sphinx/domains/std.py:332
msgid "program option"
msgstr "প্রোগ্রাম অপশন"
-#: sphinx/ext/autodoc.py:892
+#: sphinx/domains/std.py:360 sphinx/themes/basic/genindex-single.html:11
+#: sphinx/themes/basic/genindex-split.html:11
+#: sphinx/themes/basic/genindex-split.html:14
+#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
+#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
+#: sphinx/writers/latex.py:174
+msgid "Index"
+msgstr "ইনডেক্স"
+
+#: sphinx/domains/std.py:361
+msgid "Module Index"
+msgstr "মডিউল ইনডেক্স"
+
+#: sphinx/domains/std.py:362 sphinx/themes/basic/defindex.html:25
+msgid "Search Page"
+msgstr "অনুসন্ধান পাতা"
+
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr "বেস: %s"
-#: sphinx/ext/autodoc.py:925
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr ":class:`%s` এর উপনাম"
-#: sphinx/ext/todo.py:40
+#: sphinx/ext/todo.py:41
msgid "Todo"
msgstr "অসমাপ্ত কাজ"
-#: sphinx/ext/todo.py:98
+#: sphinx/ext/todo.py:109
+#, fuzzy, python-format
+msgid "(The <<original entry>> is located in %s, line %d.)"
+msgstr "(%s, %d লাইনে মূল অন্তর্ভুক্তিটি রয়েছে.)"
+
+#: sphinx/ext/todo.py:117
+msgid "original entry"
+msgstr ""
+
+#: sphinx/ext/viewcode.py:70
+msgid "[source]"
+msgstr ""
+
+#: sphinx/ext/viewcode.py:117
+msgid "[docs]"
+msgstr ""
+
+#: sphinx/ext/viewcode.py:131
+#, fuzzy
+msgid "Module code"
+msgstr "মডিউল"
+
+#: sphinx/ext/viewcode.py:137
#, python-format
-msgid "(The original entry is located in %s, line %d and can be found "
-msgstr "(%s, %d লাইনে মূল অন্তর্ভুক্তিটি রয়েছে, যা পাওয়া যাবে"
+msgid "<h1>Source code for %s</h1>"
+msgstr ""
-#: sphinx/ext/todo.py:104
-msgid "here"
-msgstr "এখানে"
+#: sphinx/ext/viewcode.py:164
+msgid "Overview: module code"
+msgstr ""
-#: sphinx/locale/__init__.py:138
+#: sphinx/ext/viewcode.py:165
+msgid "<h1>All modules for which code is available</h1>"
+msgstr ""
+
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "দৃষ্টি আকর্ষণ"
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "সতর্কীকরণ"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "বিপজ্জনক"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "ভুল (এরর)"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "আভাস"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "গুরুত্বপূর্ণ"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "নোট"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "আরও দেখুন"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "পরামর্শ"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "সতর্কতা"
-#: sphinx/locale/__init__.py:151
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "%s ভার্সনে নতুন"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "%s ভার্সনে পরিবর্তিত"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "%s ভার্সন থেকে ডেপ্রিকেটেড"
-#: sphinx/locale/__init__.py:158
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "কিওয়ার্ড"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "অপারেটর"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "অবজেক্ট"
-#: sphinx/locale/__init__.py:162
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "স্ট্যাটমেন্ট"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "বিল্ট-ইন ফাংশন"
-#: sphinx/themes/basic/defindex.html:2
+#: sphinx/themes/agogo/layout.html:45 sphinx/themes/basic/globaltoc.html:10
+#: sphinx/themes/basic/localtoc.html:11
+msgid "Table Of Contents"
+msgstr "সূচীপত্র"
+
+#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
+msgid "Search"
+msgstr "অনুসন্ধান"
+
+#: sphinx/themes/agogo/layout.html:52 sphinx/themes/basic/searchbox.html:15
+msgid "Go"
+msgstr "যান"
+
+#: sphinx/themes/agogo/layout.html:57 sphinx/themes/basic/searchbox.html:20
+msgid "Enter search terms or a module, class or function name."
+msgstr "অনুসন্ধানের জন্য টার্ম, মডিউল, ক্লাস অথবা ফাংশনের নাম দিন।"
+
+#: sphinx/themes/agogo/layout.html:78 sphinx/themes/basic/sourcelink.html:14
+msgid "Show Source"
+msgstr "সোর্স দেখুন"
+
+#: sphinx/themes/basic/defindex.html:11
msgid "Overview"
msgstr "ভুমিকা"
-#: sphinx/themes/basic/defindex.html:11
+#: sphinx/themes/basic/defindex.html:20
msgid "Indices and tables:"
msgstr "ইনডেক্স ও টেবিল সমূহ:"
-#: sphinx/themes/basic/defindex.html:14
+#: sphinx/themes/basic/defindex.html:23
msgid "Complete Table of Contents"
msgstr "পূর্ণাঙ্গ সূচীপত্র"
-#: sphinx/themes/basic/defindex.html:15
+#: sphinx/themes/basic/defindex.html:24
msgid "lists all sections and subsections"
msgstr "সকল অনুচ্ছেদ সমূহের তালিকা"
-#: sphinx/themes/basic/defindex.html:17
+#: sphinx/themes/basic/defindex.html:26
msgid "search this documentation"
msgstr "এই সহায়িকাতে অনুসন্ধা করুন"
-#: sphinx/themes/basic/defindex.html:20
+#: sphinx/themes/basic/defindex.html:28
+msgid "Global Module Index"
+msgstr "গ্লোবাল মডিউল ইনডেক্স"
+
+#: sphinx/themes/basic/defindex.html:29
msgid "quick access to all modules"
msgstr "সকল মডিউলে দ্রুত প্রবেশ"
-#: sphinx/themes/basic/defindex.html:22
+#: sphinx/themes/basic/defindex.html:31
msgid "all functions, classes, terms"
msgstr "সকল ফাংশন, ক্লাস, টার্ম"
-#: sphinx/themes/basic/genindex-single.html:5
+#: sphinx/themes/basic/genindex-single.html:14
#, 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
+#: sphinx/themes/basic/genindex-single.html:46
+#: sphinx/themes/basic/genindex-split.html:24
+#: sphinx/themes/basic/genindex-split.html:38
+#: sphinx/themes/basic/genindex.html:56
msgid "Full index on one page"
msgstr "এক পাতায় সম্পূর্ণ ইনডেক্স"
-#: sphinx/themes/basic/genindex-split.html:7
+#: sphinx/themes/basic/genindex-split.html:16
msgid "Index pages by letter"
msgstr "বর্ণানুসারে ইনডেক্স পাতা"
-#: sphinx/themes/basic/genindex-split.html:15
+#: sphinx/themes/basic/genindex-split.html:25
msgid "can be huge"
msgstr "খুব বড় হতে পারে"
-#: sphinx/themes/basic/layout.html:10
+#: sphinx/themes/basic/layout.html:23
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:122
+#: sphinx/themes/basic/layout.html:113
#, python-format
msgid "Search within %(docstitle)s"
msgstr "%(docstitle)s এর মধ্যে খুঁজুন"
-#: sphinx/themes/basic/layout.html:131
+#: sphinx/themes/basic/layout.html:122
msgid "About these documents"
msgstr "এই ডকুমেন্ট সম্পর্কে"
-#: 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:140
+#: sphinx/themes/basic/layout.html:131
msgid "Copyright"
msgstr "কপিরাইট"
-#: sphinx/themes/basic/layout.html:187
-#: sphinx/themes/scrolls/layout.html:83
+#: sphinx/themes/basic/layout.html:180
#, 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:189
-#: sphinx/themes/scrolls/layout.html:85
+#: sphinx/themes/basic/layout.html:182
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; কপিরাইট %(copyright)s."
-#: sphinx/themes/basic/layout.html:193
-#: sphinx/themes/scrolls/layout.html:89
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "%(last_updated)s সর্বশেষ পরিবর্তন করা হয়েছে।"
-#: sphinx/themes/basic/layout.html:196
-#: sphinx/themes/scrolls/layout.html:92
+#: sphinx/themes/basic/layout.html:189
#, 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
-#: sphinx/themes/scrolls/modindex.html:37
-msgid "Deprecated"
-msgstr "ডেপ্রিকেটেড"
+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/opensearch.xml:4
#, python-format
msgid "Search %(docstitle)s"
msgstr "%(docstitle)s-এ খুঁজুন"
-#: sphinx/themes/basic/search.html:9
+#: sphinx/themes/basic/relations.html:11
+msgid "Previous topic"
+msgstr "পূর্ববর্তী টপিক"
+
+#: sphinx/themes/basic/relations.html:13
+msgid "previous chapter"
+msgstr "পূর্ববর্তী অধ্যায়"
+
+#: sphinx/themes/basic/relations.html:16
+msgid "Next topic"
+msgstr "পরবর্তী টপিক"
+
+#: sphinx/themes/basic/relations.html:18
+msgid "next chapter"
+msgstr "পরবর্তী অধ্যায়"
+
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
@@ -582,7 +663,7 @@ msgstr ""
"অনুসন্ধান করার জন্য অনুগ্রহপূর্বক জাভাস্ক্রিপ্ট \n"
" সক্রিয় করুন।"
-#: sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:29
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"
@@ -590,23 +671,33 @@ msgid ""
" containing fewer words won't appear in the result list."
msgstr ""
"এখান থেকে এই নথিগুলোতে আপনি অনুসন্ধান করতে পারবেন। \n"
-" আপনার কাঙ্ক্ষিত শব্দসমূহ নিচের বাক্সে লিখুন এবং \"অনুসন্ধান\" বাটনে ক্লিক করুন।\n"
-" উল্লেখ্য, সকল শব্দসমূহের উপস্থিতি নিয়ে অনুসন্ধান করা হবে। যেসব পাতায় সকল\n"
+" আপনার কাঙ্ক্ষিত শব্দসমূহ নিচের বাক্সে লিখুন এবং \"অনুসন্ধান\" বাটনে "
+"ক্লিক করুন।\n"
+" উল্লেখ্য, সকল শব্দসমূহের উপস্থিতি নিয়ে অনুসন্ধান করা হবে। যেসব পাতায় "
+"সকল\n"
" শব্দ নেই সেগুলো বাদ দেয়া হবে।"
-#: sphinx/themes/basic/search.html:21
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "খুঁজুন"
-#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:473
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "অনুসন্ধানের ফলাফল"
-#: sphinx/themes/basic/search.html:27
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "আপনার অনুসন্ধানে কোন ফলাফল পাওয়া যায়নি।"
+#: sphinx/themes/basic/searchbox.html:12
+msgid "Quick search"
+msgstr "দ্রুত অনুসন্ধান"
+
+#: sphinx/themes/basic/sourcelink.html:11
+msgid "This Page"
+msgstr "এই পাতা"
+
#: sphinx/themes/basic/changes/frameset.html:5
#: sphinx/themes/basic/changes/versionchanges.html:12
#, python-format
@@ -635,64 +726,89 @@ msgstr "C API পরিবর্তন"
msgid "Other changes"
msgstr "অন্যান্য পরিবর্তন"
-#: sphinx/themes/basic/static/doctools.js:138
-#: sphinx/writers/html.py:462
-#: sphinx/writers/html.py:467
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "এই শিরোনামের পার্মালিঙ্ক"
-#: sphinx/themes/basic/static/doctools.js:144
-#: sphinx/writers/html.py:80
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "এই সংজ্ঞার পার্মালিঙ্ক"
-#: sphinx/themes/basic/static/doctools.js:173
+#: sphinx/themes/basic/static/doctools.js:189
msgid "Hide Search Matches"
msgstr "অনুসন্ধানের ম্যাচগুলো লুকান"
-#: sphinx/themes/basic/static/searchtools.js:274
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "অনুসন্ধান চলছে"
-#: sphinx/themes/basic/static/searchtools.js:279
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "অনুসন্ধানের প্রস্তুতি চলছে..."
-#: sphinx/themes/basic/static/searchtools.js:352
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", -"
-#: sphinx/themes/basic/static/searchtools.js:475
-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:506
+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:477
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "অনুসন্ধান শেষ হয়েছে, ফলাফলে %s-টি পাতা পাওয়া গেছে।"
-#: sphinx/writers/latex.py:187
+#: sphinx/themes/default/static/sidebar.js:66
+msgid "Expand sidebar"
+msgstr ""
+
+#: sphinx/themes/default/static/sidebar.js:79
+#: sphinx/themes/default/static/sidebar.js:107
+msgid "Collapse sidebar"
+msgstr ""
+
+#: sphinx/themes/haiku/layout.html:26
+msgid "Contents"
+msgstr ""
+
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "রিলিজ"
-#: sphinx/writers/latex.py:579
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "পাদটীকা"
-#: sphinx/writers/latex.py:647
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "পূর্ববর্তী পাতা হতে চলমান"
-#: sphinx/writers/latex.py:652
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "পরবর্তী পাতাতে চলমান"
-#: sphinx/writers/text.py:166
-#, python-format
-msgid "Platform: %s"
-msgstr "প্লাটফরম: %s"
-
-#: sphinx/writers/text.py:428
+#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[ছবি]"
+#~ msgid "Variable"
+#~ msgstr "ভ্যারিয়েবল"
+
+#~ msgid "Parameter"
+#~ msgstr "প্যারামিটার"
+
+#~ msgid "C function"
+#~ msgstr "C ফাংশন"
+
+#~ msgid "here"
+#~ msgstr "এখানে"
+
+#~ msgid "Platform: %s"
+#~ msgstr "প্লাটফরম: %s"
+
diff --git a/sphinx/locale/ca/LC_MESSAGES/sphinx.mo b/sphinx/locale/ca/LC_MESSAGES/sphinx.mo
index 339c787f..c6343149 100644
--- a/sphinx/locale/ca/LC_MESSAGES/sphinx.mo
+++ 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
index 7bfb6642..a5fd94f4 100644
--- a/sphinx/locale/ca/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/ca/LC_MESSAGES/sphinx.po
@@ -8,22 +8,22 @@ 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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Pau Fernández <pau.fernandez@upc.edu>\n"
"Language-Team: ca <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\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.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d de %B de %Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -36,67 +36,67 @@ msgstr "Mòduls Interns"
msgid "Module level"
msgstr "Nivell de mòdul"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d %b, %Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Índex General"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "índex"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "següent"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "anterior"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (a "
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Autor de la secció:"
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Autor del mòdul: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "Autor del mòdul: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Autor: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Vegeu també"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Paràmetres"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Retorna"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Tipus de retorn"
@@ -125,12 +125,12 @@ msgstr "%s (tipus de C)"
msgid "%s (C variable)"
msgstr "%s (variable de C)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "funció"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "membre"
@@ -138,7 +138,7 @@ msgstr "membre"
msgid "macro"
msgstr "macro"
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "tipus"
@@ -147,190 +147,201 @@ msgstr "tipus"
msgid "variable"
msgstr "Variable"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (class de C++)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (tipus de C++)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (membre de C++)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (funció de C++)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "class"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (funció interna)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (mètode %s)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (class de C++)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (atribut %s)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "Paràmetres"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "atribut"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "Variable"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Llença"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (al mòdul %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (variable interna)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (al mòdul %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (classe interna)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (class a %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (mètode %s.%s)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (mètode estàtic %s.%s)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (mètode estàtic %s)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (mètode %s.%s)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (mètode %s)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (atribut %s.%s)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Plataformes: "
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (mòdul)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "Índex de Mòduls"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "mòduls"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Obsolet"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "excepció"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (mètode %s)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "mètode estàtic"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "mòdul"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Obsolet"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (mòdul)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "mòdul"
@@ -370,7 +381,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Índex"
@@ -382,12 +393,12 @@ msgstr "Índex de Mòduls"
msgid "Search Page"
msgstr "Pàgina de Cerca"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " Bases: %s"
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "àlies de :class:`%s`"
@@ -405,104 +416,104 @@ msgstr "(La <<entrada original>> està a %s, línia %d i.)"
msgid "original entry"
msgstr ""
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "mòdul"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Atenció"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Compte"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Perill"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Error"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Suggerència"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Important"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Nota"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Vegeu També"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Truc"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Avís"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Novetat de la versió %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Canviat a la versió %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Obsolet desde la versió %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "paraula clau"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "operador"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "objecte"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "sentència"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "funció interna"
@@ -512,7 +523,7 @@ msgid "Table Of Contents"
msgstr "Taula de Contingut"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Cerca"
@@ -642,7 +653,7 @@ msgstr "Tema següent"
msgid "next chapter"
msgstr "capítol següent"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
@@ -650,7 +661,7 @@ msgstr ""
"Activa JavaScript per utilitzar la funcionalitat\n"
"de cerca."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -662,16 +673,16 @@ msgstr ""
"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:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "cerca"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Resultats de la Cerca"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "La teva cerca no té resultats."
@@ -711,12 +722,12 @@ msgstr "Canvis a la API de C"
msgid "Other changes"
msgstr "Altres canvis"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Link permanent a aquest títol"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Link permanent a aquesta definició"
@@ -724,19 +735,19 @@ msgstr "Link permanent a aquesta definició"
msgid "Hide Search Matches"
msgstr "Oculta Resultats de Cerca"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Cercant"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Preparant la cerca..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", a "
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -744,7 +755,7 @@ 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:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, 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."
@@ -754,7 +765,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -762,22 +773,23 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Versió"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "ve de la pàgina anterior"
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "Continua a la pàgina següent"
#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[imatge]"
+
diff --git a/sphinx/locale/cs/LC_MESSAGES/sphinx.mo b/sphinx/locale/cs/LC_MESSAGES/sphinx.mo
index 8092a992..99db2eeb 100644
--- a/sphinx/locale/cs/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/cs/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/cs/LC_MESSAGES/sphinx.po b/sphinx/locale/cs/LC_MESSAGES/sphinx.po
index 535d4b9f..eda1e9ab 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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\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 && "
@@ -16,15 +16,15 @@ msgstr ""
"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.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d.%m.%Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -37,67 +37,67 @@ msgstr "Vestavěné funkce "
msgid "Module level"
msgstr "Úroveň modulů"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d.%m.%Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Rejstřík indexů"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "index"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "další"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "předchozí"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr "(v"
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Autor sekce: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Autor modulu: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "Autor modulu: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Autor: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Viz také"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Parametry"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Vrací"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Typ navrácené hodnoty"
@@ -126,12 +126,12 @@ msgstr "%s (C typ)"
msgid "%s (C variable)"
msgstr "%s (C proměnná)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "funkce"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "člen"
@@ -139,7 +139,7 @@ msgstr "člen"
msgid "macro"
msgstr ""
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "typ"
@@ -148,190 +148,201 @@ msgstr "typ"
msgid "variable"
msgstr "Proměnná"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (C++ třída)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++ typ)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (člen C++)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++ funkce)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "třída"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (vestavěná funkce)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (metoda %s)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (C++ třída)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s() (atribut %s)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "Parametry"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "atribut"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "Proměnná"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Vyvolá"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (v modulu %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s() (vestavěná proměnná)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s() (v modulu %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s () (vestavěná proměnná)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s() (třída v %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (metoda %s.%s)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (statická metoda %s.%s)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (statická metoda %s)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (metoda %s.%s)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (metoda %s)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s() (atribut %s.%s)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Platformy: "
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (module)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "Rejstřík modulů "
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "moduly"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Zastaralé"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "výjimka"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (metoda %s)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "statická metoda"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "modul"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Zastaralé"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (module)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "modul"
@@ -371,7 +382,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Index"
@@ -383,12 +394,12 @@ msgstr "Rejstřík modulů "
msgid "Search Page"
msgstr "Vyhledávací stránka"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -406,104 +417,104 @@ msgstr "(Původní záznam je v %s, řádka %d a lze jej nalézt"
msgid "original entry"
msgstr ""
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "modul"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Výstraha"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Upozornění"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Nebezpečí"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Chyba"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Rada"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Důležité"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Poznámka"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Viz také"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Tip"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Varování"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Nové ve verzi %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Změněno ve verzi %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Zastaralé od verze %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "klíčové slovo"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "operátor"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "objekt"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "příkaz"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "vestavěná funkce"
@@ -513,7 +524,7 @@ msgid "Table Of Contents"
msgstr "Obsah"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Hledání"
@@ -644,13 +655,13 @@ msgstr "Další téma"
msgid "next chapter"
msgstr "další kapitola"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr ""
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -662,16 +673,16 @@ msgstr ""
"Vyhledávání hledá automaticky všechna slova. Nebudou tedy nalezeny "
"stránky, obsahující méně slov."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "hledej"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Výsledky hledání"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Nic jsme nenašli."
@@ -711,12 +722,12 @@ msgstr "Změny API"
msgid "Other changes"
msgstr "Ostatní změny"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Trvalý odkaz na tento nadpis"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Trvalý odkaz na tuto definici"
@@ -724,19 +735,19 @@ msgstr "Trvalý odkaz na tuto definici"
msgid "Hide Search Matches"
msgstr "Skrýt výsledky vyhledávání"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Hledám"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Připravuji vyhledávání...."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", v"
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -744,7 +755,7 @@ 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:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Vyhledávání skončilo, nalezeno %s stran."
@@ -754,7 +765,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -762,19 +773,19 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Vydání"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
#, fuzzy
msgid "Continued on next page"
msgstr "Plný index na jedné stránce"
@@ -782,3 +793,4 @@ msgstr "Plný index na jedné stránce"
#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[obrázek]"
+
diff --git a/sphinx/locale/da/LC_MESSAGES/sphinx.js b/sphinx/locale/da/LC_MESSAGES/sphinx.js
index d17efc47..9bb070cd 100644
--- a/sphinx/locale/da/LC_MESSAGES/sphinx.js
+++ b/sphinx/locale/da/LC_MESSAGES/sphinx.js
@@ -1 +1 @@
-Documentation.addTranslations({"locale": "da", "plural_expr": "(n != 1)", "messages": {"Search Results": "S\u00f8geresultater", "Preparing search...": "Forbereder s\u00f8gning...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Din s\u00f8gning gav ingen resultater. Kontroll\u00e9r venligst at alle ord er stavet korrekt, og at du har valgt nok kategorier.", "Search finished, found %s page(s) matching the search query.": "S\u00f8gningen fuldf\u00f8rt - fandt %s sider for denne s\u00f8gning.", ", in ": ", i ", "Permalink to this headline": "Permalink til denne overskrift", "Searching": "S\u00f8ger", "Permalink to this definition": "Permalink til denne definition", "Hide Search Matches": "Skjul s\u00f8geresultater"}}); \ No newline at end of file
+Documentation.addTranslations({"locale": "da", "plural_expr": "(n != 1)", "messages": {"Search Results": "S\u00f8geresultater", "Preparing search...": "Forbereder s\u00f8gning...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Din s\u00f8gning gav ingen resultater. Kontroll\u00e9r venligst at alle ord er stavet korrekt, og at du har valgt nok kategorier.", "Search finished, found %s page(s) matching the search query.": "S\u00f8gningen fuldf\u00f8rt - fandt %s sider for denne s\u00f8gning.", ", in ": ", i ", "Expand sidebar": "", "Permalink to this headline": "Permalink til denne overskrift", "Searching": "S\u00f8ger", "Collapse sidebar": "", "Permalink to this definition": "Permalink til denne definition", "Hide Search Matches": "Skjul s\u00f8geresultater"}}); \ No newline at end of file
diff --git a/sphinx/locale/da/LC_MESSAGES/sphinx.mo b/sphinx/locale/da/LC_MESSAGES/sphinx.mo
index a47f10de..bc95a44f 100644
--- a/sphinx/locale/da/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/da/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/da/LC_MESSAGES/sphinx.po b/sphinx/locale/da/LC_MESSAGES/sphinx.po
index c975e747..f83c7c04 100644
--- a/sphinx/locale/da/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/da/LC_MESSAGES/sphinx.po
@@ -1,4 +1,4 @@
-# Translations template for Sphinx.
+# Danish translations for Sphinx.
# Copyright (C) 2009 The Sphinx Team
# This file is distributed under the same license as the Sphinx project.
#
@@ -8,553 +8,649 @@ msgstr ""
"Project-Id-Version: Sphinx 1.0pre/[?1034h2e1ab15e035e\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2009-11-08 16:28+0100\n"
-"PO-Revision-Date: 2010-06-03 23:47+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Ask Hjorth Larsen <asklarsen@gmail.com>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\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.5\n"
-# 21. april, 2010
-#: sphinx/environment.py:130 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
+#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d. %B, %Y"
-#: sphinx/environment.py:348 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:134
-#: sphinx/writers/latex.py:190
-msgid "Index"
-msgstr "Indeks"
-
-#: sphinx/environment.py:349 sphinx/writers/latex.py:189
-msgid "Module Index"
-msgstr "Modulindeks"
-
-# Ikke 'Søg på side'
-#: sphinx/environment.py:350 sphinx/themes/basic/defindex.html:16
-msgid "Search Page"
-msgstr "Søgeside"
-
-#: sphinx/roles.py:167
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
-#: sphinx/builders/changes.py:70
+#: sphinx/builders/changes.py:72
msgid "Builtins"
msgstr "Indbyggede"
-#: sphinx/builders/changes.py:72
+#: sphinx/builders/changes.py:74
msgid "Module level"
msgstr "Modulniveau"
-# Apr 21, 2010
-#: sphinx/builders/html.py:224
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d. %b, %Y"
-#: sphinx/builders/html.py:243 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Generelt indeks"
-#: sphinx/builders/html.py:243
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "indeks"
-#: sphinx/builders/html.py:247 sphinx/builders/htmlhelp.py:220
-#: sphinx/builders/qthelp.py:133 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 "Globalt modulindeks"
-
-#: sphinx/builders/html.py:248
-msgid "modules"
-msgstr "moduler"
-
-#: sphinx/builders/html.py:304
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "næste"
-#: sphinx/builders/html.py:313
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "forrige"
-#: sphinx/builders/latex.py:162
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (i "
-#: sphinx/directives/__init__.py:78 sphinx/directives/__init__.py:79
-#: sphinx/directives/__init__.py:80 sphinx/directives/__init__.py:81
-msgid "Raises"
-msgstr "Rejser"
-
-#: sphinx/directives/__init__.py:82 sphinx/directives/__init__.py:83
-#: sphinx/directives/__init__.py:84
-msgid "Variable"
-msgstr "Variabel"
-
-#: sphinx/directives/__init__.py:85 sphinx/directives/__init__.py:86
-#: sphinx/directives/__init__.py:92 sphinx/directives/__init__.py:93
-msgid "Returns"
-msgstr "Returnerer"
-
-#: sphinx/directives/__init__.py:94
-msgid "Return type"
-msgstr "Returtype"
-
-#: sphinx/directives/__init__.py:169
-msgid "Parameter"
-msgstr "Parameter"
-
-#: sphinx/directives/__init__.py:173
-msgid "Parameters"
-msgstr "Parametre"
-
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Afsnitsforfatter: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Modulforfatter: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
+#, fuzzy
+msgid "Code author: "
+msgstr "Modulforfatter: "
+
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Forfatter: "
-#: sphinx/directives/other.py:233
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Se også"
-#: sphinx/domains/c.py:124
+#: sphinx/domains/__init__.py:242
+#, python-format
+msgid "%s %s"
+msgstr ""
+
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
+msgid "Parameters"
+msgstr "Parametre"
+
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
+msgid "Returns"
+msgstr "Returnerer"
+
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
+msgid "Return type"
+msgstr "Returtype"
+
+#: sphinx/domains/c.py:133
#, python-format
msgid "%s (C function)"
msgstr "%s (C-funktion)"
-#: sphinx/domains/c.py:126
+#: sphinx/domains/c.py:135
#, python-format
msgid "%s (C member)"
msgstr "%s (C-medlem)"
-#: sphinx/domains/c.py:128
+#: sphinx/domains/c.py:137
#, python-format
msgid "%s (C macro)"
msgstr "%s (C-makro)"
-#: sphinx/domains/c.py:130
+#: sphinx/domains/c.py:139
#, python-format
msgid "%s (C type)"
msgstr "%s (C-type)"
-#: sphinx/domains/c.py:132
+#: sphinx/domains/c.py:141
#, python-format
msgid "%s (C variable)"
msgstr "%s (C-variabel)"
-#: sphinx/domains/c.py:162
-msgid "C function"
-msgstr "C-funktion"
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
+msgid "function"
+msgstr "funktion"
+
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
+msgid "member"
+msgstr "medlem"
-#: sphinx/domains/c.py:163
-msgid "C member"
-msgstr "C-medlem"
+#: sphinx/domains/c.py:173
+msgid "macro"
+msgstr "makro"
-#: sphinx/domains/c.py:164
-msgid "C macro"
-msgstr "C-makro"
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
+msgid "type"
+msgstr "type"
-#: sphinx/domains/c.py:165
-msgid "C type"
-msgstr "C-type"
+#: sphinx/domains/c.py:175
+msgid "variable"
+msgstr "variabel"
-#: sphinx/domains/c.py:166
-msgid "C variable"
-msgstr "C-variabel"
+#: sphinx/domains/cpp.py:883
+#, python-format
+msgid "%s (C++ class)"
+msgstr "%s (C++-klasse)"
+
+#: sphinx/domains/cpp.py:898
+#, python-format
+msgid "%s (C++ type)"
+msgstr "%s (C++-type)"
+
+#: sphinx/domains/cpp.py:917
+#, python-format
+msgid "%s (C++ member)"
+msgstr "%s (C++-medlem)"
+
+#: sphinx/domains/cpp.py:969
+#, python-format
+msgid "%s (C++ function)"
+msgstr "%s (C++-funktion)"
+
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
+msgid "class"
+msgstr "klasse"
-#: sphinx/domains/python.py:186
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (indbygget funktion)"
-#: sphinx/domains/python.py:187 sphinx/domains/python.py:244
-#: sphinx/domains/python.py:256 sphinx/domains/python.py:269
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
+#, python-format
+msgid "%s() (%s method)"
+msgstr "%s() (metode i %s)"
+
+#: sphinx/domains/javascript.py:108
+#, python-format
+msgid "%s() (class)"
+msgstr "%s() (klasse)"
+
+#: sphinx/domains/javascript.py:110
+#, python-format
+msgid "%s (global variable or constant)"
+msgstr ""
+
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
+#, python-format
+msgid "%s (%s attribute)"
+msgstr "%s (attribut i %s)"
+
+#: sphinx/domains/javascript.py:121
+#, fuzzy
+msgid "Arguments"
+msgstr "Parametre"
+
+#: sphinx/domains/javascript.py:124
+msgid "Throws"
+msgstr ""
+
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
+msgid "data"
+msgstr "data"
+
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
+msgid "attribute"
+msgstr "attribut"
+
+#: sphinx/domains/python.py:98
+#, fuzzy
+msgid "Variables"
+msgstr "Variabel"
+
+#: sphinx/domains/python.py:101
+msgid "Raises"
+msgstr "Rejser"
+
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (i modulet %s)"
-#: sphinx/domains/python.py:190
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (indbygget variabel)"
-#: sphinx/domains/python.py:191 sphinx/domains/python.py:282
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (i modulet %s)"
-#: sphinx/domains/python.py:207
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (indbygget klasse)"
-#: sphinx/domains/python.py:208
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (klasse i %s)"
-#: sphinx/domains/python.py:248
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (metode i %s.%s)"
-#: sphinx/domains/python.py:250
-#, python-format
-msgid "%s() (%s method)"
-msgstr "%s() (metode i %s)"
-
-#: sphinx/domains/python.py:260
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (statisk metode i %s.%s)"
-#: sphinx/domains/python.py:263
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (statisk metode i %s)"
-#: sphinx/domains/python.py:273
+#: sphinx/domains/python.py:331
#, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (klassemetode i %s.%s)"
-#: sphinx/domains/python.py:276
+#: sphinx/domains/python.py:334
#, python-format
msgid "%s() (%s class method)"
msgstr "%s() (klassemetode i %s)"
-#: sphinx/domains/python.py:286
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (attribut i %s.%s)"
-#: sphinx/domains/python.py:288
-#, python-format
-msgid "%s (%s attribute)"
-msgstr "%s (attribut i %s)"
-
-#: sphinx/domains/python.py:334
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Platforme: "
-#: sphinx/domains/python.py:340
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (modul)"
-#: sphinx/domains/python.py:396
-msgid "function"
-msgstr "funktion"
+#: sphinx/domains/python.py:455
+#, fuzzy
+msgid "Python Module Index"
+msgstr "Modulindeks"
-#: sphinx/domains/python.py:397
-msgid "data"
-msgstr "data"
+#: sphinx/domains/python.py:456
+msgid "modules"
+msgstr "moduler"
-#: sphinx/domains/python.py:398
-msgid "class"
-msgstr "klasse"
+#: sphinx/domains/python.py:501
+msgid "Deprecated"
+msgstr "Deprecieret"
-#: sphinx/domains/python.py:399 sphinx/locale/__init__.py:161
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "undtagelse"
-#: sphinx/domains/python.py:400
+#: sphinx/domains/python.py:527
msgid "method"
msgstr "metode"
-#: sphinx/domains/python.py:401
-msgid "attribute"
-msgstr "attribut"
+#: sphinx/domains/python.py:528
+msgid "class method"
+msgstr "klassemetode"
+
+#: sphinx/domains/python.py:529
+msgid "static method"
+msgstr "statisk metode"
-#: sphinx/domains/python.py:402 sphinx/locale/__init__.py:157
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "modul"
-#: sphinx/domains/std.py:67 sphinx/domains/std.py:83
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr " (deprecieret)"
+
+#: sphinx/domains/rst.py:55
+#, python-format
+msgid "%s (directive)"
+msgstr ""
+
+#: sphinx/domains/rst.py:57
+#, python-format
+msgid "%s (role)"
+msgstr ""
+
+#: sphinx/domains/rst.py:106
+msgid "directive"
+msgstr ""
+
+#: sphinx/domains/rst.py:107
+msgid "role"
+msgstr ""
+
+#: sphinx/domains/std.py:68 sphinx/domains/std.py:84
#, python-format
msgid "environment variable; %s"
msgstr "miljøvariabel; %s"
-#: sphinx/domains/std.py:156
+#: sphinx/domains/std.py:160
#, python-format
msgid "%scommand line option; %s"
msgstr "%skommandolinjetilvalg; %s"
-#: sphinx/domains/std.py:324
+#: sphinx/domains/std.py:328
msgid "glossary term"
msgstr "begreb i ordliste"
-#: sphinx/domains/std.py:325
+#: sphinx/domains/std.py:329
msgid "grammar token"
msgstr "grammatisk element"
-#: sphinx/domains/std.py:326
+#: sphinx/domains/std.py:330
+msgid "reference label"
+msgstr ""
+
+#: sphinx/domains/std.py:331
msgid "environment variable"
msgstr "miljøvariabel"
-#: sphinx/domains/std.py:327
+#: sphinx/domains/std.py:332
msgid "program option"
msgstr "programtilvalg"
-#: sphinx/ext/autodoc.py:892
+#: sphinx/domains/std.py:360 sphinx/themes/basic/genindex-single.html:11
+#: sphinx/themes/basic/genindex-split.html:11
+#: sphinx/themes/basic/genindex-split.html:14
+#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
+#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
+#: sphinx/writers/latex.py:174
+msgid "Index"
+msgstr "Indeks"
+
+#: sphinx/domains/std.py:361
+msgid "Module Index"
+msgstr "Modulindeks"
+
+#: sphinx/domains/std.py:362 sphinx/themes/basic/defindex.html:25
+msgid "Search Page"
+msgstr "Søgeside"
+
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " Baser: %s"
-#: sphinx/ext/autodoc.py:925
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "alias for :class:`%s`"
-#: sphinx/ext/todo.py:40
+#: sphinx/ext/todo.py:41
msgid "Todo"
msgstr "Todo"
-#: sphinx/ext/todo.py:98
+#: sphinx/ext/todo.py:109
+#, fuzzy, python-format
+msgid "(The <<original entry>> is located in %s, line %d.)"
+msgstr "(Det <<oprindelige punkt>> befinder sig i %s, linje %d.)"
+
+#: sphinx/ext/todo.py:117
+msgid "original entry"
+msgstr ""
+
+#: sphinx/ext/viewcode.py:70
+msgid "[source]"
+msgstr ""
+
+#: sphinx/ext/viewcode.py:117
+msgid "[docs]"
+msgstr ""
+
+#: sphinx/ext/viewcode.py:131
+#, fuzzy
+msgid "Module code"
+msgstr "modul"
+
+#: sphinx/ext/viewcode.py:137
#, python-format
-msgid "(The original entry is located in %s, line %d and can be found "
-msgstr "(Det oprindelige punkt befinder sig i %s, linje %d, og kan findes "
+msgid "<h1>Source code for %s</h1>"
+msgstr ""
+
+#: sphinx/ext/viewcode.py:164
+msgid "Overview: module code"
+msgstr ""
-#: sphinx/ext/todo.py:104
-msgid "here"
-msgstr "her"
+#: sphinx/ext/viewcode.py:165
+msgid "<h1>All modules for which code is available</h1>"
+msgstr ""
-#: sphinx/locale/__init__.py:138
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Vær opmærksom"
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Forsigtig"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Fare"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Fejl"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Fif"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Vigtigt"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Bemærk"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Se også"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Tip"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Advarsel"
-#: sphinx/locale/__init__.py:151
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Ny i version %s"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Ændret i version %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Deprecieret siden version %s"
-#: sphinx/locale/__init__.py:158
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "nøgleord"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "operator"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "objekt"
-#: sphinx/locale/__init__.py:162
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "erklæring"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "indbygget funktion"
-#: sphinx/themes/basic/defindex.html:2
+#: sphinx/themes/agogo/layout.html:45 sphinx/themes/basic/globaltoc.html:10
+#: sphinx/themes/basic/localtoc.html:11
+msgid "Table Of Contents"
+msgstr "Indholdsfortegnelse"
+
+#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
+msgid "Search"
+msgstr "Søg"
+
+#: sphinx/themes/agogo/layout.html:52 sphinx/themes/basic/searchbox.html:15
+msgid "Go"
+msgstr "Søg"
+
+#: sphinx/themes/agogo/layout.html:57 sphinx/themes/basic/searchbox.html:20
+msgid "Enter search terms or a module, class or function name."
+msgstr "Indtast søgeord eller navnet på et modul, en klasse eller en funktion."
+
+#: sphinx/themes/agogo/layout.html:78 sphinx/themes/basic/sourcelink.html:14
+msgid "Show Source"
+msgstr "Vis kilde"
+
+#: sphinx/themes/basic/defindex.html:11
msgid "Overview"
msgstr "Oversigt"
-#: sphinx/themes/basic/defindex.html:11
+#: sphinx/themes/basic/defindex.html:20
msgid "Indices and tables:"
msgstr "Indeks og tabeller:"
-#: sphinx/themes/basic/defindex.html:14
+#: sphinx/themes/basic/defindex.html:23
msgid "Complete Table of Contents"
msgstr "Fuldstændig indholdsfortegnelse"
-#: sphinx/themes/basic/defindex.html:15
+#: sphinx/themes/basic/defindex.html:24
msgid "lists all sections and subsections"
msgstr "viser alle afsnit og underafsnit"
-#: sphinx/themes/basic/defindex.html:17
+#: sphinx/themes/basic/defindex.html:26
msgid "search this documentation"
msgstr "søg i denne dokumentation"
-#: sphinx/themes/basic/defindex.html:20
+#: sphinx/themes/basic/defindex.html:28
+msgid "Global Module Index"
+msgstr "Globalt modulindeks"
+
+#: sphinx/themes/basic/defindex.html:29
msgid "quick access to all modules"
msgstr "hurtig adgang til alle moduler"
-#: sphinx/themes/basic/defindex.html:22
+#: sphinx/themes/basic/defindex.html:31
msgid "all functions, classes, terms"
msgstr "alle funktioner, klasser, begreber"
-#: sphinx/themes/basic/genindex-single.html:5
+#: sphinx/themes/basic/genindex-single.html:14
#, 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/themes/basic/genindex-single.html:46
+#: sphinx/themes/basic/genindex-split.html:24
+#: sphinx/themes/basic/genindex-split.html:38
+#: sphinx/themes/basic/genindex.html:56
msgid "Full index on one page"
msgstr "Fuldt indeks på én side"
-#: sphinx/themes/basic/genindex-split.html:7
+#: sphinx/themes/basic/genindex-split.html:16
msgid "Index pages by letter"
msgstr "Indeksér sider efter bogstav"
-# refererer til indeks
-#: sphinx/themes/basic/genindex-split.html:15
+#: sphinx/themes/basic/genindex-split.html:25
msgid "can be huge"
msgstr "kan være enormt"
-#: sphinx/themes/basic/layout.html:10
+#: sphinx/themes/basic/layout.html:23
msgid "Navigation"
msgstr "Navigation"
-#: sphinx/themes/basic/layout.html:42
-msgid "Table Of Contents"
-msgstr "Indholdsfortegnelse"
-
-#: sphinx/themes/basic/layout.html:48
-msgid "Previous topic"
-msgstr "Forrige emne"
-
-#: sphinx/themes/basic/layout.html:50
-msgid "previous chapter"
-msgstr "forrige kapitel"
-
-#: sphinx/themes/basic/layout.html:53
-msgid "Next topic"
-msgstr "Næste emne"
-
-#: sphinx/themes/basic/layout.html:55
-msgid "next chapter"
-msgstr "næste kapitel"
-
-#: sphinx/themes/basic/layout.html:60
-msgid "This Page"
-msgstr "Denne side"
-
-#: sphinx/themes/basic/layout.html:63
-msgid "Show Source"
-msgstr "Vis kilde"
-
-#: sphinx/themes/basic/layout.html:73
-msgid "Quick search"
-msgstr "Hurtig søgning"
-
-# Referencen fra layout.html:76 er til en søgeknap
-#: sphinx/themes/basic/layout.html:76
-msgid "Go"
-msgstr "Søg"
-
-#: sphinx/themes/basic/layout.html:81
-msgid "Enter search terms or a module, class or function name."
-msgstr "Indtast søgeord eller navnet på et modul, en klasse eller en funktion."
-
-#: sphinx/themes/basic/layout.html:122
+#: sphinx/themes/basic/layout.html:113
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Søg i %(docstitle)s"
-#: sphinx/themes/basic/layout.html:131
+#: sphinx/themes/basic/layout.html:122
msgid "About these documents"
msgstr "Om disse dokumenter"
-#: sphinx/themes/basic/layout.html:137 sphinx/themes/basic/search.html:2
-#: sphinx/themes/basic/search.html:5
-msgid "Search"
-msgstr "Søg"
-
-#: sphinx/themes/basic/layout.html:140
+#: sphinx/themes/basic/layout.html:131
msgid "Copyright"
msgstr "Ophavsret"
-#: sphinx/themes/basic/layout.html:187 sphinx/themes/scrolls/layout.html:83
+#: sphinx/themes/basic/layout.html:180
#, python-format
msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
msgstr "&copy; <a href=\"%(path)s\">Ophavsret</a> %(copyright)s."
-#: sphinx/themes/basic/layout.html:189 sphinx/themes/scrolls/layout.html:85
+#: sphinx/themes/basic/layout.html:182
#, python-format
msgid "&copy; Copyright %(copyright)s."
msgstr "&copy; Ophavsret %(copyright)s."
-# datoformatet passer ikke med "den %(last_updated)s"
-#: sphinx/themes/basic/layout.html:193 sphinx/themes/scrolls/layout.html:89
+#: sphinx/themes/basic/layout.html:186
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr "Sidst opdateret %(last_updated)s."
-#: sphinx/themes/basic/layout.html:196 sphinx/themes/scrolls/layout.html:92
+#: sphinx/themes/basic/layout.html:189
#, python-format
msgid ""
"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
"%(sphinx_version)s."
-msgstr "Bygget med <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)s."
-
-#: sphinx/themes/basic/modindex.html:36 sphinx/themes/scrolls/modindex.html:37
-msgid "Deprecated"
-msgstr "Deprecieret"
+msgstr ""
+"Bygget med <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
+"%(sphinx_version)s."
#: sphinx/themes/basic/opensearch.xml:4
#, python-format
msgid "Search %(docstitle)s"
msgstr "Søg i %(docstitle)s"
-#: sphinx/themes/basic/search.html:9
+#: sphinx/themes/basic/relations.html:11
+msgid "Previous topic"
+msgstr "Forrige emne"
+
+#: sphinx/themes/basic/relations.html:13
+msgid "previous chapter"
+msgstr "forrige kapitel"
+
+#: sphinx/themes/basic/relations.html:16
+msgid "Next topic"
+msgstr "Næste emne"
+
+#: sphinx/themes/basic/relations.html:18
+msgid "next chapter"
+msgstr "næste kapitel"
+
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
@@ -562,7 +658,7 @@ msgstr ""
"Aktivér venligst JavaScript for at aktivere\n"
" søgefunktionalitet."
-#: sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:29
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"
@@ -574,19 +670,27 @@ msgstr ""
" automatisk vil søge på alle ordene. Sider, der indeholder\n"
" færre ord, vil ikke indgå i resultaterne."
-#: sphinx/themes/basic/search.html:21
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "søg"
-#: sphinx/themes/basic/search.html:25
-#: sphinx/themes/basic/static/searchtools.js:473
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Søgeresultater"
-#: sphinx/themes/basic/search.html:27
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Din søgning gav ingen resultater."
+#: sphinx/themes/basic/searchbox.html:12
+msgid "Quick search"
+msgstr "Hurtig søgning"
+
+#: sphinx/themes/basic/sourcelink.html:11
+msgid "This Page"
+msgstr "Denne side"
+
#: sphinx/themes/basic/changes/frameset.html:5
#: sphinx/themes/basic/changes/versionchanges.html:12
#, python-format
@@ -615,64 +719,89 @@ msgstr "Ændringer i C-API"
msgid "Other changes"
msgstr "Andre ændringer"
-#: sphinx/themes/basic/static/doctools.js:138 sphinx/writers/html.py:462
-#: sphinx/writers/html.py:467
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Permalink til denne overskrift"
-#: sphinx/themes/basic/static/doctools.js:144 sphinx/writers/html.py:80
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Permalink til denne definition"
-#: sphinx/themes/basic/static/doctools.js:173
+#: sphinx/themes/basic/static/doctools.js:189
msgid "Hide Search Matches"
msgstr "Skjul søgeresultater"
-#: sphinx/themes/basic/static/searchtools.js:274
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Søger"
-#: sphinx/themes/basic/static/searchtools.js:279
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Forbereder søgning..."
-#: sphinx/themes/basic/static/searchtools.js:352
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", i "
-#: sphinx/themes/basic/static/searchtools.js:475
+#: sphinx/themes/basic/static/searchtools.js:506
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 "Din søgning gav ingen resultater. Kontrollér venligst at alle ord er stavet korrekt, og at du har valgt nok kategorier."
+msgstr ""
+"Din søgning gav ingen resultater. Kontrollér venligst at alle ord er "
+"stavet korrekt, og at du har valgt nok kategorier."
-#: sphinx/themes/basic/static/searchtools.js:477
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Søgningen fuldført - fandt %s sider for denne søgning."
-#: sphinx/writers/latex.py:187
+#: sphinx/themes/default/static/sidebar.js:66
+msgid "Expand sidebar"
+msgstr ""
+
+#: sphinx/themes/default/static/sidebar.js:79
+#: sphinx/themes/default/static/sidebar.js:107
+msgid "Collapse sidebar"
+msgstr ""
+
+#: sphinx/themes/haiku/layout.html:26
+msgid "Contents"
+msgstr ""
+
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Udgave"
-#: sphinx/writers/latex.py:579
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "Fodnoter"
-#: sphinx/writers/latex.py:647
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "fortsat fra forrige side"
-#: sphinx/writers/latex.py:652
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "Fortsættes på næste side"
-#: sphinx/writers/text.py:166
-#, python-format
-msgid "Platform: %s"
-msgstr "Platform: %s"
-
-#: sphinx/writers/text.py:428
+#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[billede]"
+#~ msgid "Variable"
+#~ msgstr "Variabel"
+
+#~ msgid "Parameter"
+#~ msgstr "Parameter"
+
+#~ msgid "C function"
+#~ msgstr "C-funktion"
+
+#~ msgid "here"
+#~ msgstr "her"
+
+#~ msgid "Platform: %s"
+#~ msgstr "Platform: %s"
+
diff --git a/sphinx/locale/de/LC_MESSAGES/sphinx.mo b/sphinx/locale/de/LC_MESSAGES/sphinx.mo
index 5657b0ab..de6b4082 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 f92ba23c..4d2aebc7 100644
--- a/sphinx/locale/de/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/de/LC_MESSAGES/sphinx.po
@@ -7,22 +7,22 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2008-08-07 21:40+0200\n"
-"PO-Revision-Date: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Georg Brandl <georg@python.org>\n"
"Language-Team: de <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\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.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d. %m. %Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -35,66 +35,66 @@ msgstr "Builtins"
msgid "Module level"
msgstr "Modulebene"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d. %m. %Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Allgemeiner Index"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "Index"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "weiter"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "zurück"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (in "
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Autor des Abschnitts: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Autor des Moduls: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
msgid "Code author: "
msgstr "Autor des Quellcode: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Autor: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Siehe auch"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr "%s-%s"
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Parameter"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Rückgabe"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Rückgabetyp"
@@ -123,12 +123,12 @@ msgstr "%s (C-Typ)"
msgid "%s (C variable)"
msgstr "%s (C-Variable)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "Funktion"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "Member"
@@ -136,7 +136,7 @@ msgstr "Member"
msgid "macro"
msgstr "Makro"
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "Typ"
@@ -144,188 +144,197 @@ msgstr "Typ"
msgid "variable"
msgstr "Variable"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (C++-Klasse)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++-Typ)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (C++-Member)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++-Funktion)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "Klasse"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (Standard-Funktion)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (Methode von %s)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (C++-Klasse)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr "%s (globale Variable oder Konstante)"
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (Attribut von %s)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
msgid "Arguments"
msgstr "Parameter"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr "Wirft"
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr "Daten"
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
-#, python-format
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "Attribut"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
msgid "Variables"
msgstr "Variablen"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Verursacht"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (in Modul %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (Standard-Variable)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (in Modul %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (Standard-Klasse)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (Klasse in %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (Methode von %s.%s)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (statische Methode von %s.%s)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (statische Methode von %s)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (Klassenmethode von %s.%s)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, python-format
msgid "%s() (%s class method)"
msgstr "%s() (Klassenmethode von %s)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (Attribut von %s.%s)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Plattformen: "
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (Modul)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
msgid "Python Module Index"
msgstr "Python-Modulindex"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "Module"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Veraltet"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "Exception"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr "Methode"
-#: sphinx/domains/python.py:502
-#, python-format
+#: sphinx/domains/python.py:528
msgid "class method"
msgstr "Klassenmethode"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "statische Methode"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "Module"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Veraltet"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr "%s (Direktive)"
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, python-format
msgid "%s (role)"
msgstr "%s (Rolle)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr "Direktive"
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
msgid "role"
msgstr "Rolle"
@@ -352,7 +361,6 @@ msgid "reference label"
msgstr "Referenz-Label"
#: sphinx/domains/std.py:331
-#, python-format
msgid "environment variable"
msgstr "Umgebungsvariable"
@@ -365,7 +373,7 @@ msgstr "Programmoption"
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Stichwortverzeichnis"
@@ -377,12 +385,12 @@ msgstr "Modulindex"
msgid "Search Page"
msgstr "Suche"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " Basisklassen: %s"
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "Alias von :class:`%s`"
@@ -400,103 +408,103 @@ msgstr "(Der <<ursprüngliche Eintrag>> steht in %s, Zeile %d.)"
msgid "original entry"
msgstr "ursprüngliche Eintrag"
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr "[Quelle]"
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr "[Doku]"
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
msgid "Module code"
msgstr "Modul-Quellcode"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr "<h1>Quellcode für %s</h1>"
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr "Überblick: Modul-Quellcode"
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr "<h1>Alle Module, für die Quellcode verfügbar ist</h1>"
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Achtung"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Vorsicht"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Gefahr"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Fehler"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Hinweis"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Wichtig"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Bemerkung"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Siehe auch"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Tipp"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Warnung"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Neu in Version %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Geändert in Version %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Veraltet ab Version %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "Schlüsselwort"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "Operator"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "Objekt"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "Anweisung"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "Standard-Funktion"
@@ -506,7 +514,7 @@ msgid "Table Of Contents"
msgstr "Inhalt"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Suche"
@@ -638,13 +646,13 @@ msgstr "Nächstes Thema"
msgid "next chapter"
msgstr "nächstes Kapitel"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr "Bitte aktivieren Sie JavaScript, wenn Sie die Suchfunktion nutzen wollen."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -657,16 +665,16 @@ msgstr ""
"all diesen Worten suchen wird. Seiten, die nicht alle Worte enthalten, "
"werden nicht in der Ergebnisliste erscheinen."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "suchen"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Suchergebnisse"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Deine Suche ergab leider keine Treffer."
@@ -706,12 +714,12 @@ msgstr "C API-Änderungen"
msgid "Other changes"
msgstr "Andere Änderungen"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Permalink zu dieser Überschrift"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Permalink zu dieser Definition"
@@ -719,19 +727,19 @@ msgstr "Permalink zu dieser Definition"
msgid "Hide Search Matches"
msgstr "Suchergebnisse ausblenden"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Suche..."
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Suche wird vorbereitet..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", in "
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -739,7 +747,7 @@ 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:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Suche beendet, %s zutreffende Seite(n) gefunden."
@@ -749,7 +757,7 @@ msgid "Expand sidebar"
msgstr "Sidebar ausklappen"
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr "Sidebar einklappen"
@@ -757,19 +765,19 @@ msgstr "Sidebar einklappen"
msgid "Contents"
msgstr "Inhalt"
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Release"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "Fußnoten"
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "Fortsetzung der vorherigen Seite"
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "Fortsetzung auf der nächsten Seite"
diff --git a/sphinx/locale/es/LC_MESSAGES/sphinx.mo b/sphinx/locale/es/LC_MESSAGES/sphinx.mo
index c1ee0bfe..6115878f 100644
--- a/sphinx/locale/es/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/es/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/es/LC_MESSAGES/sphinx.po b/sphinx/locale/es/LC_MESSAGES/sphinx.po
index a380a416..b9698c9b 100644
--- a/sphinx/locale/es/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/es/LC_MESSAGES/sphinx.po
@@ -8,22 +8,22 @@ 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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\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"
"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.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, fuzzy, python-format
msgid "%B %d, %Y"
msgstr "%d de %B de %Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -38,67 +38,67 @@ msgstr "Funciones de base"
msgid "Module level"
msgstr "Módulos"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d %b, %Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Índice General"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "índice"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "siguiente"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "anterior"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr ""
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Autor de la sección: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Autor del módulo: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "Autor del módulo: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Autor:"
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Ver también"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Parámetros"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Devuelve"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
#, fuzzy
msgid "Return type"
msgstr "Tipo del argumento devuelto"
@@ -128,12 +128,12 @@ msgstr "%s (tipo C)"
msgid "%s (C variable)"
msgstr "%s (variable C)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "función"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "miembro"
@@ -141,7 +141,7 @@ msgstr "miembro"
msgid "macro"
msgstr ""
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "tipo"
@@ -150,190 +150,201 @@ msgstr "tipo"
msgid "variable"
msgstr "Variable"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (clase C++)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (tipo C++)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, fuzzy, python-format
msgid "%s (C++ member)"
msgstr "%s (miembro C++)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, fuzzy, python-format
msgid "%s (C++ function)"
msgstr "%s (función C++)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "clase"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, fuzzy, python-format
msgid "%s() (built-in function)"
msgstr "%s() (función de base)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s método)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (clase C++)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s atributo)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "Parámetros"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "atributo"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "Variable"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Muestra"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (en el módulo %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, fuzzy, python-format
msgid "%s (built-in variable)"
msgstr "%s (variable de base)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (en el módulo %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, fuzzy, python-format
msgid "%s (built-in class)"
msgstr "%s (variable de base)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (clase en %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s método)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s método estático)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s método estático)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s método)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s método)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s atributo)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Plataformas:"
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (módulo)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "Índice de Módulos"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "módulos"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Obsoleto"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "excepción"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (%s método)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "método estático"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "módulo"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Obsoleto"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (módulo)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "módulo"
@@ -373,7 +384,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Índice"
@@ -385,12 +396,12 @@ msgstr "Índice de Módulos"
msgid "Search Page"
msgstr "Página de Búsqueda"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -408,104 +419,104 @@ msgstr ""
msgid "original entry"
msgstr ""
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "módulo"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Atención"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Prudencia"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Peligro"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Error"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Consejo"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Importante"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Nota"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Ver También"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Truco"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Advertencia"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Nuevo en la versión %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Distinto en la versión %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Obsoleto desde la versión %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "palabra clave"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "operador"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "objeto"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "sentencia"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
#, fuzzy
msgid "built-in function"
msgstr "función de base"
@@ -516,7 +527,7 @@ msgid "Table Of Contents"
msgstr "Contenidos"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Búsqueda"
@@ -647,13 +658,13 @@ msgstr "Próximo tema"
msgid "next chapter"
msgstr "Próximo capítulo"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr ""
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
#, fuzzy
msgid ""
"From here you can search these documents. Enter your search\n"
@@ -666,16 +677,16 @@ msgstr ""
" las palabras. Las páginas que contengan menos palabras no aparecerán en"
" la lista de resultados."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "buscar"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Resultados de la búsqueda"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Tu consulta no obtuvo ningún resultado"
@@ -715,12 +726,12 @@ msgstr "Cambios en la API C"
msgid "Other changes"
msgstr "Otros cambios"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Enlazar permanentemente con este título"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Enlazar permanentemente con esta definición"
@@ -729,19 +740,19 @@ msgstr "Enlazar permanentemente con esta definición"
msgid "Hide Search Matches"
msgstr "Coincidencias de la búsqueda"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Buscando"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Preparando la búsqueda"
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -750,7 +761,7 @@ msgstr ""
"todas las palabras correctamente y que ha seleccionado suficientes "
"categorías"
-#: sphinx/themes/basic/static/searchtools.js:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr ""
@@ -762,7 +773,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -770,20 +781,20 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
#, fuzzy
msgid "Release"
msgstr "Versión"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
#, fuzzy
msgid "Continued on next page"
msgstr "Índice completo en una página"
@@ -791,3 +802,4 @@ msgstr "Índice completo en una página"
#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[imagen]"
+
diff --git a/sphinx/locale/fa/LC_MESSAGES/sphinx.js b/sphinx/locale/fa/LC_MESSAGES/sphinx.js
new file mode 100644
index 00000000..c268479a
--- /dev/null
+++ b/sphinx/locale/fa/LC_MESSAGES/sphinx.js
@@ -0,0 +1 @@
+Documentation.addTranslations({"locale": "fa", "plural_expr": "(n > 1)", "messages": {"module, in ": "\u0645\u0627\u0698\u0648\u0644, \u062f\u0631", "Preparing search...": "...\u0622\u0645\u0627\u062f\u0647 \u062c\u0633\u062a\u062c\u0648", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": ". \u0647\u06cc\u0686 \u0633\u0646\u062f\u06cc \u0628\u0631\u0627\u06cc \u062c\u0633\u062a\u062c\u0648\u06cc \u0634\u0645\u0627 \u06cc\u0627\u0641\u062a \u0646\u0634\u062f\u060c \u0644\u0637\u0641\u0627 \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062d\u0627\u0635\u0644 \u0646\u0645\u0627\u0626\u06cc\u062f \u06a9\u0647 \u0627\u0645\u0644\u0627\u06cc \u062a\u0645\u0627\u0645\u06cc \u06a9\u0644\u0645\u0627\u062a \u0635\u062d\u06cc\u062d \u0645\u06cc \u0628\u0627\u0634\u062f \u0648 \u0647\u0645\u0686\u0646\u06cc\u0646 \u0645\u0648\u0636\u0648\u0639\u0627\u062a \u06a9\u0627\u0641\u06cc \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u062c\u0633\u062a\u062c\u0648 \u0627\u0646\u062a\u062e\u0627\u0628 \u0646\u0645\u0648\u062f\u0647 \u0627\u06cc\u062f", "Search finished, found %s page(s) matching the search query.": "\u062c\u0633\u062a\u062c\u0648 \u0627\u0646\u062c\u0627\u0645 \u0634\u062f \u060c %s \u0635\u0641\u062d\u0647 \u0645\u0637\u0627\u0628\u0642 \u0628\u0627 \u067e\u0631\u0633 \u0648 \u062c\u0648 \u067e\u06cc\u062f\u0627 \u0634\u062f", ", in ": ", \u062f\u0631", "Permalink to this headline": "\u0644\u06cc\u0646\u06a9 \u062b\u0627\u0628\u062a \u0628\u0647 \u0627\u06cc\u0646 \u0633\u0631 \u0645\u0642\u0627\u0644\u0647", "Searching": "\u062f\u0631 \u062d\u0627\u0644 \u062c\u0633\u062a\u062c\u0648", "Permalink to this definition": "\u0644\u06cc\u0646\u06a9 \u062b\u0627\u0628\u062a \u0628\u0647 \u0627\u06cc\u0646 \u062a\u0639\u0631\u06cc\u0641", "Hide Search Matches": "\u0639\u062f\u0645 \u0646\u0645\u0627\u06cc\u0634 \u0646\u062a\u0627\u06cc\u062c \u06cc\u0627\u0641\u062a \u0634\u062f\u0647", "Search Results": "\u0646\u062a\u0627\u06cc\u062c \u062c\u0633\u062a\u062c\u0648"}}); \ No newline at end of file
diff --git a/sphinx/locale/fa/LC_MESSAGES/sphinx.mo b/sphinx/locale/fa/LC_MESSAGES/sphinx.mo
new file mode 100644
index 00000000..c988b75c
--- /dev/null
+++ b/sphinx/locale/fa/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/fa/LC_MESSAGES/sphinx.po b/sphinx/locale/fa/LC_MESSAGES/sphinx.po
new file mode 100644
index 00000000..fe75951e
--- /dev/null
+++ b/sphinx/locale/fa/LC_MESSAGES/sphinx.po
@@ -0,0 +1,596 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: Sphinx 1.0.3\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2008-11-09 19:46+0100\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Omid Raha <omidraha.com@gmail.com>\n"
+"Language-Team: Omid Raha <omidraha.com@gmail.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"X-Poedit-Language: Persian\n"
+"X-Poedit-Country: IRAN, ISLAMIC REPUBLIC OF\n"
+
+#: sphinx/builder.py:408
+#, python-format
+msgid "%b %d, %Y"
+msgstr ""
+
+#: sphinx/builder.py:427
+#: sphinx/templates/defindex.html:21
+msgid "General Index"
+msgstr "فهرست کلی"
+
+#: sphinx/builder.py:427
+msgid "index"
+msgstr "فهرست"
+
+#: sphinx/builder.py:429
+#: sphinx/htmlhelp.py:155
+#: sphinx/templates/defindex.html:19
+#: sphinx/templates/modindex.html:2
+#: sphinx/templates/modindex.html:13
+msgid "Global Module Index"
+msgstr "فهرست کلی ماژول ها"
+
+#: sphinx/builder.py:429
+msgid "modules"
+msgstr "ماژول ها"
+
+#: sphinx/builder.py:466
+msgid "next"
+msgstr "بعدی"
+
+#: sphinx/builder.py:473
+msgid "previous"
+msgstr "قبلی"
+
+#: sphinx/builder.py:1054
+msgid " (in "
+msgstr ""
+
+#: sphinx/builder.py:1129
+msgid "Builtins"
+msgstr "درونی سازی"
+
+#: sphinx/builder.py:1131
+msgid "Module level"
+msgstr "در سطح ماژول"
+
+#: sphinx/environment.py:102
+#: sphinx/latexwriter.py:164
+#, python-format
+msgid "%B %d, %Y"
+msgstr ""
+
+#: sphinx/environment.py:290
+#: sphinx/latexwriter.py:170
+#: 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:130
+msgid "Index"
+msgstr "فهرست"
+
+#: sphinx/environment.py:291
+#: sphinx/latexwriter.py:169
+msgid "Module Index"
+msgstr "فهرست ماژول ها"
+
+#: sphinx/environment.py:292
+#: sphinx/templates/defindex.html:16
+msgid "Search Page"
+msgstr "صفحه جستجو"
+
+#: sphinx/htmlwriter.py:79
+#: sphinx/static/doctools.js:145
+msgid "Permalink to this definition"
+msgstr "لینک ثابت به این تعریف"
+
+#: sphinx/htmlwriter.py:402
+#: sphinx/static/doctools.js:139
+msgid "Permalink to this headline"
+msgstr "لینک ثابت به این سر مقاله"
+
+#: sphinx/latexwriter.py:167
+msgid "Release"
+msgstr "انتشار"
+
+#: sphinx/roles.py:53
+#: sphinx/directives/desc.py:525
+#, python-format
+msgid "environment variable; %s"
+msgstr "%s متغیرهای عمومی؛"
+
+#: sphinx/roles.py:60
+#, python-format
+msgid "Python Enhancement Proposals!PEP %s"
+msgstr ""
+
+#: sphinx/textwriter.py:166
+#, python-format
+msgid "Platform: %s"
+msgstr "%s:پلتفرم"
+
+#: sphinx/textwriter.py:422
+msgid "[image]"
+msgstr ""
+
+#: sphinx/directives/desc.py:25
+#, python-format
+msgid "%s() (built-in function)"
+msgstr "%s() (توابع درونی)"
+
+#: sphinx/directives/desc.py:26
+#: sphinx/directives/desc.py:42
+#: sphinx/directives/desc.py:54
+#, python-format
+msgid "%s() (in module %s)"
+msgstr "%s() (در ماژول %s)"
+
+#: sphinx/directives/desc.py:29
+#, python-format
+msgid "%s (built-in variable)"
+msgstr "%s (متغیر درونی)"
+
+#: sphinx/directives/desc.py:30
+#: sphinx/directives/desc.py:66
+#, python-format
+msgid "%s (in module %s)"
+msgstr "%s (در ماژول %s)"
+
+#: sphinx/directives/desc.py:33
+#, python-format
+msgid "%s (built-in class)"
+msgstr "%s (کلاس درونی)"
+
+#: sphinx/directives/desc.py:34
+#, python-format
+msgid "%s (class in %s)"
+msgstr "%s (کلاس در %s)"
+
+#: sphinx/directives/desc.py:46
+#, python-format
+msgid "%s() (%s.%s method)"
+msgstr "%s() (%s.%s متد)"
+
+#: sphinx/directives/desc.py:48
+#, python-format
+msgid "%s() (%s method)"
+msgstr "%s() (%s متد)"
+
+#: sphinx/directives/desc.py:58
+#, python-format
+msgid "%s() (%s.%s static method)"
+msgstr "%s() (%s.%s متد استاتیک)"
+
+#: sphinx/directives/desc.py:60
+#, python-format
+msgid "%s() (%s static method)"
+msgstr "%s() (%s متد استاتیک)"
+
+#: sphinx/directives/desc.py:70
+#, python-format
+msgid "%s (%s.%s attribute)"
+msgstr "%s (%s.%s مشخصه)"
+
+#: sphinx/directives/desc.py:72
+#, python-format
+msgid "%s (%s attribute)"
+msgstr "%s (%s مشخصه)"
+
+#: sphinx/directives/desc.py:74
+#, python-format
+msgid "%s (C function)"
+msgstr "%s (C تابع)"
+
+#: sphinx/directives/desc.py:76
+#, python-format
+msgid "%s (C member)"
+msgstr "%s (C عضو)"
+
+#: sphinx/directives/desc.py:78
+#, python-format
+msgid "%s (C macro)"
+msgstr "%s (C ماکرو)"
+
+#: sphinx/directives/desc.py:80
+#, python-format
+msgid "%s (C type)"
+msgstr "%s (C نوع)"
+
+#: sphinx/directives/desc.py:82
+#, python-format
+msgid "%s (C variable)"
+msgstr "%s (C متغیر)"
+
+#: sphinx/directives/desc.py:100
+msgid "Raises"
+msgstr "برانگیختن"
+
+#: sphinx/directives/desc.py:104
+msgid "Variable"
+msgstr "متغیر"
+
+#: sphinx/directives/desc.py:107
+msgid "Returns"
+msgstr ""
+
+#: sphinx/directives/desc.py:114
+msgid "Return type"
+msgstr "نوع برگشتی"
+
+#: sphinx/directives/desc.py:141
+msgid "Parameters"
+msgstr "پارامترها"
+
+#: sphinx/directives/desc.py:411
+#, python-format
+msgid "%scommand line option; %s"
+msgstr "%sگزینه خط فرمان; %s"
+
+#: sphinx/directives/other.py:101
+msgid "Platforms: "
+msgstr ":پلتفرم ها"
+
+#: sphinx/directives/other.py:106
+#, python-format
+msgid "%s (module)"
+msgstr "%s (ماژول)"
+
+#: sphinx/directives/other.py:146
+msgid "Section author: "
+msgstr ":نویسنده این بخش"
+
+#: sphinx/directives/other.py:148
+msgid "Module author: "
+msgstr "نویسنده این ماژول:"
+
+#: sphinx/directives/other.py:150
+msgid "Author: "
+msgstr ":نویسنده"
+
+#: sphinx/directives/other.py:246
+msgid "See also"
+msgstr "همچنین ملاحظه نمائید"
+
+#: sphinx/ext/todo.py:32
+msgid "Todo"
+msgstr "در دست انجام"
+
+#: sphinx/ext/todo.py:78
+#, python-format
+msgid "(The original entry is located in %s, line %d and can be found "
+msgstr "( ورودی اصلی در %s ، در خط %d واقع شده است و می تواند یافت بشود"
+
+#: sphinx/ext/todo.py:84
+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/static/doctools.js:174
+msgid "Hide Search Matches"
+msgstr "عدم نمایش نتایج یافت شده"
+
+#: sphinx/static/searchtools.js:274
+msgid "Searching"
+msgstr "در حال جستجو"
+
+#: sphinx/static/searchtools.js:279
+msgid "Preparing search..."
+msgstr "...آماده جستجو"
+
+#: sphinx/static/searchtools.js:338
+msgid "module, in "
+msgstr "ماژول, در"
+
+#: sphinx/static/searchtools.js:347
+msgid ", in "
+msgstr ", در"
+
+#: sphinx/static/searchtools.js:447
+#: sphinx/templates/search.html:18
+msgid "Search Results"
+msgstr "نتایج جستجو"
+
+#: sphinx/static/searchtools.js:449
+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/static/searchtools.js:451
+#, python-format
+msgid "Search finished, found %s page(s) matching the search query."
+msgstr "جستجو انجام شد ، %s صفحه مطابق با پرس و جو پیدا شد"
+
+#: sphinx/templates/defindex.html:2
+msgid "Overview"
+msgstr "بررسی اجمالی"
+
+#: sphinx/templates/defindex.html:11
+msgid "Indices and tables:"
+msgstr "ایندکس ها و جداول:"
+
+#: sphinx/templates/defindex.html:14
+msgid "Complete Table of Contents"
+msgstr "فهرست کامل مطالب"
+
+#: sphinx/templates/defindex.html:15
+msgid "lists all sections and subsections"
+msgstr "فهرست تمامی بخش ها و زیر مجموعه ها"
+
+#: sphinx/templates/defindex.html:17
+msgid "search this documentation"
+msgstr "جستجو در این اسناد"
+
+#: sphinx/templates/defindex.html:20
+msgid "quick access to all modules"
+msgstr "دسترسی سریع به تمامی متدها"
+
+#: sphinx/templates/defindex.html:22
+msgid "all functions, classes, terms"
+msgstr "تمامی توابع ، کلاس ها ، اصطلاحات"
+
+#: sphinx/templates/genindex-single.html:5
+#, python-format
+msgid "Index &ndash; %(key)s"
+msgstr "فهرست &ndash; %(key)s"
+
+#: 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 "فهرست کامل در یک صفحه"
+
+#: sphinx/templates/genindex-split.html:7
+msgid "Index pages by letter"
+msgstr "فهرست صفحات بر اساس حروف"
+
+#: sphinx/templates/genindex-split.html:15
+msgid "can be huge"
+msgstr ""
+
+#: sphinx/templates/layout.html:9
+msgid "Navigation"
+msgstr "ناوبری"
+
+#: sphinx/templates/layout.html:40
+msgid "Table Of Contents"
+msgstr "فهرست عناوین"
+
+#: sphinx/templates/layout.html:46
+msgid "Previous topic"
+msgstr "موضوع قبلی"
+
+#: sphinx/templates/layout.html:47
+msgid "previous chapter"
+msgstr "فصل قبلی"
+
+#: sphinx/templates/layout.html:50
+msgid "Next topic"
+msgstr "موضوع بعدی"
+
+#: sphinx/templates/layout.html:51
+msgid "next chapter"
+msgstr "فصل بعدی"
+
+#: sphinx/templates/layout.html:55
+msgid "This Page"
+msgstr "صفحه فعلی"
+
+#: sphinx/templates/layout.html:59
+msgid "Suggest Change"
+msgstr ""
+
+#: sphinx/templates/layout.html:60
+#: sphinx/templates/layout.html:62
+msgid "Show Source"
+msgstr "نمایش سورس"
+
+#: sphinx/templates/layout.html:71
+msgid "Quick search"
+msgstr "جستجو سریع"
+
+#: sphinx/templates/layout.html:71
+msgid "Keyword search"
+msgstr "جستجو کلید واژه"
+
+#: sphinx/templates/layout.html:73
+msgid "Go"
+msgstr "برو"
+
+#: sphinx/templates/layout.html:78
+msgid "Enter a module, class or function name."
+msgstr "نام یک ماژول ، کلاس و یا تابع را وارد نمائید"
+
+#: sphinx/templates/layout.html:119
+#, python-format
+msgid "Search within %(docstitle)s"
+msgstr "جستجو در %(docstitle)s"
+
+#: sphinx/templates/layout.html:128
+msgid "About these documents"
+msgstr "درباره این مستندات"
+
+#: sphinx/templates/layout.html:131
+#: sphinx/templates/search.html:2
+#: sphinx/templates/search.html:5
+msgid "Search"
+msgstr "جستجو"
+
+#: sphinx/templates/layout.html:133
+msgid "Copyright"
+msgstr "کپی رایت"
+
+#: sphinx/templates/layout.html:178
+#, python-format
+msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
+msgstr ""
+
+#: sphinx/templates/layout.html:180
+#, python-format
+msgid "&copy; Copyright %(copyright)s."
+msgstr ""
+
+#: sphinx/templates/layout.html:183
+#, python-format
+msgid "Last updated on %(last_updated)s."
+msgstr ". %(last_updated)s آخرین بروز رسانی در"
+
+#: sphinx/templates/layout.html:186
+#, 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/templates/modindex.html:15
+msgid "Most popular modules:"
+msgstr "متداول ترین ماژول ها:"
+
+#: sphinx/templates/modindex.html:24
+msgid "Show modules only available on these platforms"
+msgstr "تنها ماژول هایی که در این پلتفرم در دسترس هستند را نشان بده"
+
+#: sphinx/templates/modindex.html:56
+msgid "Deprecated"
+msgstr "منسوخ شده"
+
+#: sphinx/templates/opensearch.xml:4
+#, python-format
+msgid "Search %(docstitle)s"
+msgstr "جستجو %(docstitle)s"
+
+#: sphinx/templates/page.html:8
+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 ""
+
+#: sphinx/templates/search.html:7
+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 less words won't appear in the result list."
+msgstr "در اینجا شما می توانید مستندات را جستجو نمائید ، کلماتی را در کادر جستجو وارد کنید و سپس بر روی دکمه جستجو کلیک نمائید ، توجه کنید که تابع جستجو گر امر جستجو را بطور خودکار برای تمامی کلمات دنبال خواهد کرد .صفحاتی که شامل کلمات کمتری هستند ، در لیست جستجو نمایش داده نخواهند شد."
+
+#: sphinx/templates/search.html:14
+msgid "search"
+msgstr "جستجو"
+
+#: sphinx/templates/search.html:20
+msgid "Your search did not match any results."
+msgstr ".جستجوی شما نتیجه ایی در بر نداشت"
+
+#: sphinx/templates/changes/frameset.html:5
+#: sphinx/templates/changes/versionchanges.html:12
+#, python-format
+msgid "Changes in Version %(version)s &mdash; %(docstitle)s"
+msgstr "تغییرات در نسخه %(version)s &mdash; %(docstitle)s"
+
+#: sphinx/templates/changes/rstsource.html:5
+#, python-format
+msgid "%(filename)s &mdash; %(docstitle)s"
+msgstr ""
+
+#: sphinx/templates/changes/versionchanges.html:17
+#, python-format
+msgid "Automatically generated list of changes in version %(version)s"
+msgstr "لیست تولید شده خودکار از تغییرات در نسخه %(version)s"
+
+#: sphinx/templates/changes/versionchanges.html:18
+msgid "Library changes"
+msgstr "تغییرات کتابخانه ایی"
+
+#: sphinx/templates/changes/versionchanges.html:23
+msgid "C API changes"
+msgstr "C API تغییرات"
+
+#: sphinx/templates/changes/versionchanges.html:25
+msgid "Other changes"
+msgstr "دگر تغییرات"
+
diff --git a/sphinx/locale/fi/LC_MESSAGES/sphinx.mo b/sphinx/locale/fi/LC_MESSAGES/sphinx.mo
index 7c300006..0195b3dd 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 04839bba..8b649a26 100644
--- a/sphinx/locale/fi/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/fi/LC_MESSAGES/sphinx.po
@@ -8,22 +8,22 @@ 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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Jukka Inkeri <sphinx@awot.fi>\n"
"Language-Team: fi <sphinx@awot.fi>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\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.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d.%m.%Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr ""
@@ -36,67 +36,67 @@ msgstr ""
msgid "Module level"
msgstr "Moduulitaso"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d.%m.%Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Yleinen sisällysluettelo"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "hakemisto"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr ">"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "<"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr ""
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Luvun kirjoittaja: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Moduulin kirjoittaja: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "Moduulin kirjoittaja: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Tekijä: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Katso myös"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr ""
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr ""
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr ""
@@ -125,13 +125,13 @@ msgstr ""
msgid "%s (C variable)"
msgstr ""
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
#, fuzzy
msgid "function"
msgstr "Varoitus"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr ""
@@ -139,7 +139,7 @@ msgstr ""
msgid "macro"
msgstr ""
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr ""
@@ -147,187 +147,198 @@ msgstr ""
msgid "variable"
msgstr ""
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr ""
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr ""
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr ""
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr ""
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr ""
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr ""
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr ""
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, python-format
+msgid "%s() (class)"
+msgstr ""
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr ""
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
msgid "Arguments"
msgstr ""
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr ""
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
msgid "Variables"
msgstr ""
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr ""
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr ""
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr ""
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr ""
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr ""
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr ""
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr ""
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr ""
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr ""
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, python-format
msgid "%s() (%s.%s class method)"
msgstr ""
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, python-format
msgid "%s() (%s class method)"
msgstr ""
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr ""
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Ympäristö"
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (moduuli)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "Moduuli sisällysluettelo"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "moduulit"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Poistettu"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr ""
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
+#: sphinx/domains/python.py:528
msgid "class method"
msgstr ""
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr ""
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "moduuli"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Poistettu"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (moduuli)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "moduuli"
@@ -367,7 +378,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Sisällysluettelo"
@@ -379,12 +390,12 @@ msgstr "Moduuli sisällysluettelo"
msgid "Search Page"
msgstr "Etsi sivu"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -402,104 +413,104 @@ msgstr ""
msgid "original entry"
msgstr ""
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "moduuli"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Huom"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Varoitus"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Vaara"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Virhe"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Vihje"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Tärkeä"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Muista"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Katso myös"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Vihje"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Varoitus"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Uusi versiossa %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Muutettu versiossa %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Poistettu versiosta %s alkaen"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr ""
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr ""
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr ""
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr ""
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr ""
@@ -509,7 +520,7 @@ msgid "Table Of Contents"
msgstr "Sisällysluettelo"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Etsi"
@@ -637,13 +648,13 @@ msgstr ">>"
msgid "next chapter"
msgstr ">>"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr "Javascript pitää olla sallittu, jotta etsintä toimii."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -651,16 +662,16 @@ msgid ""
" containing fewer words won't appear in the result list."
msgstr "Anna hakusanat kokonaan, osasanoilla ei haeta."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "etsi"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Etsinnän tulos"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Ei löytynyt ko. ehdoilla yhtään."
@@ -700,12 +711,12 @@ msgstr ""
msgid "Other changes"
msgstr ""
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr ""
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr ""
@@ -713,25 +724,25 @@ msgstr ""
msgid "Hide Search Matches"
msgstr "Piilota löydetyt"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Etsitään"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Valmistellaan etsintää..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
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:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Etsintä tehty, löydetty %s sivu(a)."
@@ -741,7 +752,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -749,19 +760,19 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr ""
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
#, fuzzy
msgid "Continued on next page"
msgstr ""
diff --git a/sphinx/locale/fr/LC_MESSAGES/sphinx.mo b/sphinx/locale/fr/LC_MESSAGES/sphinx.mo
index bfa97b19..e17b5c78 100644
--- a/sphinx/locale/fr/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/fr/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/fr/LC_MESSAGES/sphinx.po b/sphinx/locale/fr/LC_MESSAGES/sphinx.po
index 8afcf435..24da5c39 100644
--- a/sphinx/locale/fr/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/fr/LC_MESSAGES/sphinx.po
@@ -11,22 +11,22 @@ 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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\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"
"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.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d %B %Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -39,67 +39,67 @@ msgstr "Fonctions de base"
msgid "Module level"
msgstr "Module"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d %b %Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Index général"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "index"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "suivant"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "précédent"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr "(dans"
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Auteur de la section : "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Auteur du module : "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "Auteur du module : "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Auteur : "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Voir aussi"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Paramètres"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Retourne"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Type retourné"
@@ -128,12 +128,12 @@ msgstr "%s (type C)"
msgid "%s (C variable)"
msgstr "%s (variable C)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "fonction"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "membre"
@@ -141,7 +141,7 @@ msgstr "membre"
msgid "macro"
msgstr ""
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "type"
@@ -150,190 +150,201 @@ msgstr "type"
msgid "variable"
msgstr "Variable"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (classe C++)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (type C++)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (membre C++)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (fonction C++)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "classe"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (fonction de base)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (méthode %s)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (classe C++)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr "%s (variable globale ou constante)"
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (attribut %s)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "Paramètres"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr "Lance"
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr "données"
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "attribut"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "Variable"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Lève"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (dans le module %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (variable de base)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (dans le module %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (classe de base)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (classe dans %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (méthode %s.%s)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (méthode statique %s.%s)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (méthode statique %s)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (méthode %s.%s)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (méthode %s)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (attribut %s.%s)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Plateformes : "
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (module)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "Index du module"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "modules"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Obsolète"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "exception"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr "méthode"
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (méthode %s)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "méthode statique"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "module"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Obsolète"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (module)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "module"
@@ -373,7 +384,7 @@ msgstr "option du programme"
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Index"
@@ -385,12 +396,12 @@ msgstr "Index du module"
msgid "Search Page"
msgstr "Page de recherche"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "alias de :class:`%s`"
@@ -408,104 +419,104 @@ msgstr "(L'<<entrée orginale>> se trouve dans %s, à la ligne %d.)"
msgid "original entry"
msgstr "entrée orginale"
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "module"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr "<h1>Code source de %s</h1>"
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr "Vue d'ensemble : code du module"
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr "<h1>Modules pour lesquels le code est disponible</h1>"
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Attention"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Prudence"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Danger"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Erreur"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Indice"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Important"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Note"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Voir aussi"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Astuce"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Warning"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Introduit dans la version %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Modifié dans la version %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Obsolète depuis la version %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "mot-clé"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "opérateur"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "objet"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "état"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "fonction de base"
@@ -515,7 +526,7 @@ msgid "Table Of Contents"
msgstr "Table des matières"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Recherche"
@@ -646,13 +657,13 @@ msgstr "Sujet suivant"
msgid "next chapter"
msgstr "Chapitre suivant"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr "Activez le JavaScript pour que la recherche fonctionne\n"
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
#, fuzzy
msgid ""
"From here you can search these documents. Enter your search\n"
@@ -668,16 +679,16 @@ msgstr ""
" contenant moins de mots n'apparaîtront pas dans la liste des "
"résultats."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "rechercher"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Résultats de la recherche"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Votre recherche n'a retourné aucun résultat"
@@ -717,12 +728,12 @@ msgstr "Modifications de l'API C"
msgid "Other changes"
msgstr "Autres modifications"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Lien permanent vers ce titre"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Lien permanent vers cette définition"
@@ -730,19 +741,19 @@ msgstr "Lien permanent vers cette définition"
msgid "Hide Search Matches"
msgstr "Cacher les résultats de la recherche"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "En cours de recherche"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Préparation de la recherche..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", dans"
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -751,7 +762,7 @@ msgstr ""
"des termes de recherche et que vous avez sélectionné suffisamment de "
"catégories."
-#: sphinx/themes/basic/static/searchtools.js:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, 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."
@@ -761,7 +772,7 @@ msgid "Expand sidebar"
msgstr "Agrandir le menu"
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr "Réduire le menu"
@@ -769,19 +780,19 @@ msgstr "Réduire le menu"
msgid "Contents"
msgstr "Contenu"
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Version"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "Notes de bas de page"
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "Suite de la page précédente"
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
#, fuzzy
msgid "Continued on next page"
msgstr "Suite sur la page suivante"
@@ -790,15 +801,3 @@ msgstr "Suite sur la page suivante"
msgid "[image]"
msgstr "[image]"
-#~ msgid "Parameter"
-#~ msgstr "Paramètres"
-
-#~ msgid "here"
-#~ msgstr "ici"
-
-#~ msgid "module, in "
-#~ msgstr "module, dans"
-
-#~ msgid "Platform: %s"
-#~ msgstr "Plateforme : %s"
-
diff --git a/sphinx/locale/hr/LC_MESSAGES/sphinx.mo b/sphinx/locale/hr/LC_MESSAGES/sphinx.mo
index e032adeb..c6b1b384 100644
--- a/sphinx/locale/hr/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/hr/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/hr/LC_MESSAGES/sphinx.po b/sphinx/locale/hr/LC_MESSAGES/sphinx.po
index ddcf2299..1b9f9c80 100644
--- a/sphinx/locale/hr/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/hr/LC_MESSAGES/sphinx.po
@@ -4,22 +4,22 @@ msgstr ""
"Project-Id-Version: Sphinx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2010-09-11 23:58+0200\n"
-"PO-Revision-Date: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Bojan Mihelač <bmihelac@mihelac.org>\n"
"Language-Team: Bojan Mihelač <bmihelac@mihelac.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"
+"Generated-By: Babel 0.9.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d %B, %Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -32,67 +32,67 @@ msgstr "Ugrađeni dijelovi"
msgid "Module level"
msgstr "Nivo modula"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d %b, %Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Opceniti abecedni indeks"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "abecedni indeks"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "naprijed"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "nazad"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (u "
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Autor sekcije:"
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Autor modula:"
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "Autor modula:"
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Autor:"
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Pogledaj i"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Parametri"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Vraća"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Vraća tip"
@@ -121,12 +121,12 @@ msgstr "%s (C tip)"
msgid "%s (C variable)"
msgstr "%s (C varijabla)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "funkcija"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "član"
@@ -134,7 +134,7 @@ msgstr "član"
msgid "macro"
msgstr ""
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "tip"
@@ -143,191 +143,202 @@ msgstr "tip"
msgid "variable"
msgstr "Varijabla"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (C++ razred)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++ tip)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (C++ član)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++ funkcija)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
#, fuzzy
msgid "class"
msgstr "razred"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (ugrađene funkcije)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s metoda)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (C++ razred)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s atribut)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "Parametri"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "atribut"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "Varijabla"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Podiže"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (u modulu %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (ugrađene variable)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (u modulu %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (ugrađen razred)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (razred u %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s metoda)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s statična metoda)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s statična metoda)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s metoda)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s metoda)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s atribut)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Platforme:"
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (modul)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "Popis modula"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "Moduli"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Zastarjelo"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "izuzetak"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (%s metoda)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "statična metoda"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "modul"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Zastarjelo"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (modul)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "modul"
@@ -367,7 +378,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Abecedni popis"
@@ -379,12 +390,12 @@ msgstr "Popis modula"
msgid "Search Page"
msgstr "Tražilica"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " Osnove: %s"
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "nadimak za :class:`%s`"
@@ -402,104 +413,104 @@ msgstr "(Originalan unos se nalazi u %s, u retku %d, i može biti pronađen "
msgid "original entry"
msgstr ""
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "modul"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Pozor"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Pažnja"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Opasnost"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Greška"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Savjet"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Važno"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Napomena"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Pogledaj i"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Savjet"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Upozorenje"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Novo u verziji %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Promijenjeno u verziji %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Zastarijelo od verzije %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "ključna riječ"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "operator"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "objekt"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "izjava"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "ugrađen funkcije"
@@ -509,7 +520,7 @@ msgid "Table Of Contents"
msgstr "Pregled sadržaja"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Traži"
@@ -639,7 +650,7 @@ msgstr "Slijedeća tema"
msgid "next chapter"
msgstr "slijedeće poglavje"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
@@ -647,7 +658,7 @@ msgstr ""
"Molimo omogućite JavaScript\n"
" za djelovanje tražilice."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -659,16 +670,16 @@ msgstr ""
" function will automatically search for all of the words. Pages\n"
" containing fewer words won't appear in the result list."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "traži"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Rezultati pretrage"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Your search did not match any results."
@@ -708,12 +719,12 @@ msgstr "C API changes"
msgid "Other changes"
msgstr "Ostale promjene"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Link na taj naslov"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Link na tu definiciju"
@@ -721,19 +732,19 @@ msgstr "Link na tu definiciju"
msgid "Hide Search Matches"
msgstr "Sakrij rezultate pretrage"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Tražim"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Pripremam pretraživanje..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", u "
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -741,7 +752,7 @@ msgstr ""
"Za vašu pretragu nema rezultata. Molimo pregledajte da li so sve riječi "
"ispravno napisane i da li ste izbrali dovoljno kategorija."
-#: sphinx/themes/basic/static/searchtools.js:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr ""
@@ -753,7 +764,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -761,19 +772,19 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Distribucija"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "nastavak sa prethodne stranice"
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "nastavak na slijedećoj stranici"
@@ -781,15 +792,3 @@ msgstr "nastavak na slijedećoj stranici"
msgid "[image]"
msgstr "[slika]"
-#~ msgid "Parameter"
-#~ msgstr "Parametar"
-
-#~ msgid "here"
-#~ msgstr "ovdje"
-
-#~ msgid "module, in "
-#~ msgstr "modul, u "
-
-#~ msgid "Platform: %s"
-#~ msgstr "Platforma: %s"
-
diff --git a/sphinx/locale/it/LC_MESSAGES/sphinx.mo b/sphinx/locale/it/LC_MESSAGES/sphinx.mo
index 10ca29a5..c07af572 100644
--- a/sphinx/locale/it/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/it/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/it/LC_MESSAGES/sphinx.po b/sphinx/locale/it/LC_MESSAGES/sphinx.po
index 40a2ca2a..590c5c86 100644
--- a/sphinx/locale/it/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/it/LC_MESSAGES/sphinx.po
@@ -7,22 +7,22 @@ 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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\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"
"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.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d %B %Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -35,67 +35,67 @@ msgstr "Builtin"
msgid "Module level"
msgstr "Modulo"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d/%b/%Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Indice generale"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "indice"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "successivo"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "precedente"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (in "
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Autore della sezione: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Autore del modulo: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "Autore del modulo: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Autore: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Vedi anche"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Parametri"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Ritorna"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Tipo di ritorno"
@@ -124,12 +124,12 @@ msgstr "%s (tipo C)"
msgid "%s (C variable)"
msgstr "%s (variabile C)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "funzione"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "membro"
@@ -137,7 +137,7 @@ msgstr "membro"
msgid "macro"
msgstr ""
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "tipo"
@@ -146,190 +146,201 @@ msgstr "tipo"
msgid "variable"
msgstr "Variabile"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (classe C++)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (tipo C++)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (membro C++)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (funzione C++)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr ""
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (funzione built-in)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s metodo)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (classe C++)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s attributo)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "Parametri"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "attributo"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "Variabile"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Solleva"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (nel modulo %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (variabile built-in)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (nel modulo %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (classe built-in)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (classe in %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s metodo)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s metodo statico)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s metodo statico)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s metodo)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s metodo)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s attributo)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Piattaforme:"
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (modulo)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "Indice dei Moduli"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "moduli"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Deprecato"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "eccezione"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (%s metodo)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "metodo statico"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "modulo"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Deprecato"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (modulo)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "modulo"
@@ -369,7 +380,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Indice"
@@ -381,12 +392,12 @@ msgstr "Indice dei Moduli"
msgid "Search Page"
msgstr "Cerca"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "alias per :class:`%s`"
@@ -404,104 +415,104 @@ msgstr "(La <<riga originale>> si trova in %s, linea %d.)"
msgid "original entry"
msgstr "riga originale"
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "modulo"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Attenzione"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Attenzione"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Pericolo"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Errore"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Consiglio"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Importante"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Nota"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Vedi anche"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Suggerimento"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Avvertimento"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Nuovo nella versione %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Cambiato nella versione %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Deprecato dalla versione %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "keyword"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "operatore"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "oggetto"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "statement"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "funzione built-in"
@@ -511,7 +522,7 @@ msgid "Table Of Contents"
msgstr "Tabella dei contenuti"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Cerca"
@@ -641,13 +652,13 @@ msgstr "Argomento successivo"
msgid "next chapter"
msgstr "capitolo successivo"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr ""
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -661,16 +672,16 @@ msgstr ""
" di ricerca cerca automaticamente per tutte le parole. Le pagine\n"
" che contendono meno parole non compariranno nei risultati di ricerca."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "cerca"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Risultati della ricerca"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "La tua ricerca non ha ottenuto risultati"
@@ -710,12 +721,12 @@ msgstr "Modifiche nelle API C"
msgid "Other changes"
msgstr "Altre modifiche"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "link permanente per questa intestazione"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "link permanente per questa definizione"
@@ -723,19 +734,19 @@ msgstr "link permanente per questa definizione"
msgid "Hide Search Matches"
msgstr "Nascondi i risultati della ricerca"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Ricerca in corso"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Preparazione della ricerca"
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", in "
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -744,7 +755,7 @@ msgstr ""
"dei termini di ricerca e di avere selezionato un numero sufficiente di "
"categorie"
-#: sphinx/themes/basic/static/searchtools.js:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Ricerca terminata, trovate %s pagine corrispondenti alla ricerca."
@@ -754,7 +765,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -762,19 +773,19 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Release"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
#, fuzzy
msgid "Continued on next page"
msgstr "Indice completo in una pagina"
@@ -782,3 +793,4 @@ msgstr "Indice completo in una pagina"
#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[immagine]"
+
diff --git a/sphinx/locale/ja/LC_MESSAGES/sphinx.js b/sphinx/locale/ja/LC_MESSAGES/sphinx.js
index 6b63245e..0a135540 100644
--- a/sphinx/locale/ja/LC_MESSAGES/sphinx.js
+++ b/sphinx/locale/ja/LC_MESSAGES/sphinx.js
@@ -1 +1 @@
-Documentation.addTranslations({"locale": "ja", "plural_expr": "0", "messages": {"Search Results": "\u691c\u7d22\u7d50\u679c", "Preparing search...": "\u691c\u7d22\u306e\u6e96\u5099\u4e2d...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "\u691c\u7d22\u6761\u4ef6\u306b\u4e00\u81f4\u3059\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u691c\u7d22\u3057\u305f\u3044\u8a00\u8449\u3092\u6b63\u3057\u3044\u3064\u3065\u308a\u3067\u5165\u529b\u3057\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u3001\u6b63\u3057\u3044\u30ab\u30c6\u30b4\u30ea\u306e\u691c\u7d22\u3092\u884c\u3063\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002", "Search finished, found %s page(s) matching the search query.": "\u691c\u7d22\u304c\u7d42\u4e86\u3057\u3001\u6761\u4ef6\u306b\u4e00\u81f4\u3059\u308b\u30da\u30fc\u30b8\u304c %s \u500b\u307f\u3064\u304b\u308a\u307e\u3057\u305f\u3002", ", in ": "", "Expand sidebar": "", "Permalink to this headline": "\u3053\u306e\u30d8\u30c3\u30c9\u30e9\u30a4\u30f3\u3078\u306e\u30d1\u30fc\u30de\u30ea\u30f3\u30af", "Searching": "\u691c\u7d22\u4e2d", "Collapse sidebar": "", "Permalink to this definition": "\u3053\u306e\u5b9a\u7fa9\u3078\u306e\u30d1\u30fc\u30de\u30ea\u30f3\u30af", "Hide Search Matches": "\u691c\u7d22\u7d50\u679c\u3092\u96a0\u3059"}}); \ No newline at end of file
+Documentation.addTranslations({"locale": "ja", "plural_expr": "0", "messages": {"Search Results": "\u691c\u7d22\u7d50\u679c", "Preparing search...": "\u691c\u7d22\u306e\u6e96\u5099\u4e2d...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "\u691c\u7d22\u6761\u4ef6\u306b\u4e00\u81f4\u3059\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u691c\u7d22\u3057\u305f\u3044\u8a00\u8449\u3092\u6b63\u3057\u3044\u3064\u3065\u308a\u3067\u5165\u529b\u3057\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u3001\u6b63\u3057\u3044\u30ab\u30c6\u30b4\u30ea\u306e\u691c\u7d22\u3092\u884c\u3063\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002", "Search finished, found %s page(s) matching the search query.": "\u691c\u7d22\u304c\u7d42\u4e86\u3057\u3001\u6761\u4ef6\u306b\u4e00\u81f4\u3059\u308b\u30da\u30fc\u30b8\u304c %s \u500b\u307f\u3064\u304b\u308a\u307e\u3057\u305f\u3002", ", in ": "", "Expand sidebar": "\u30b5\u30a4\u30c9\u30d0\u30fc\u3092\u5c55\u958b", "Permalink to this headline": "\u3053\u306e\u30d8\u30c3\u30c9\u30e9\u30a4\u30f3\u3078\u306e\u30d1\u30fc\u30de\u30ea\u30f3\u30af", "Searching": "\u691c\u7d22\u4e2d", "Collapse sidebar": "\u30b5\u30a4\u30c9\u30d0\u30fc\u3092\u305f\u305f\u3080", "Permalink to this definition": "\u3053\u306e\u5b9a\u7fa9\u3078\u306e\u30d1\u30fc\u30de\u30ea\u30f3\u30af", "Hide Search Matches": "\u691c\u7d22\u7d50\u679c\u3092\u96a0\u3059"}}); \ No newline at end of file
diff --git a/sphinx/locale/ja/LC_MESSAGES/sphinx.mo b/sphinx/locale/ja/LC_MESSAGES/sphinx.mo
index b0284f91..d77e83a4 100644
--- a/sphinx/locale/ja/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/ja/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/ja/LC_MESSAGES/sphinx.po b/sphinx/locale/ja/LC_MESSAGES/sphinx.po
index 5f65a6c3..03e7123d 100644
--- a/sphinx/locale/ja/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/ja/LC_MESSAGES/sphinx.po
@@ -8,22 +8,22 @@ 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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Yasushi MASUDA <whosaysni@gmail.com>\n"
"Language-Team: ja <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"
+"Generated-By: Babel 0.9.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%Y 年 %m 月 %d 日"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -36,67 +36,67 @@ msgstr "組み込み"
msgid "Module level"
msgstr "モジュールレベル"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%Y 年 %m 月 %d 日"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "総合索引"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "索引"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "次へ"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "前へ"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr ""
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "この節の作者: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "モジュールの作者: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "モジュールの作者: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "作者: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "参考"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "パラメタ"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "戻り値"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "戻り値の型"
@@ -125,12 +125,12 @@ msgstr "%s (C のデータ型)"
msgid "%s (C variable)"
msgstr "%s (C の変数)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "の関数"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "のメンバ変数"
@@ -138,7 +138,7 @@ msgstr "のメンバ変数"
msgid "macro"
msgstr "のマクロ"
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "のデータ型"
@@ -147,193 +147,204 @@ msgstr "のデータ型"
msgid "variable"
msgstr "変数"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, fuzzy, python-format
msgid "%s (C++ class)"
msgstr "%s (のクラス)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++ のデータ型)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (C++ のメンバ変数)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++ の関数)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
-msgstr ""
+msgstr "クラス"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (組み込み関数)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s のメソッド)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (のクラス)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
-msgstr ""
+msgstr "%s (グローバル変数または定数)"
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s の属性)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "パラメタ"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
-msgstr ""
+msgstr "例外"
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
-msgstr ""
+msgstr "データ"
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "の属性"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "変数"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "例外"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (%s モジュール)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (組み込み変数)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (%s モジュール)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (組み込み変数)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (%s のクラス)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s のメソッド)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s の静的メソッド)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s の静的メソッド)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s のメソッド)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s のメソッド)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s の属性)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "プラットフォーム: "
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (モジュール)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "モジュール索引"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "モジュール"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "撤廃"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "例外"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
-msgstr ""
+msgstr "メソッド"
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (%s のメソッド)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "の静的メソッド"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "モジュール"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "撤廃"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
-msgstr ""
+msgstr "%s (ディレクティブ)"
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (モジュール)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
-msgstr ""
+msgstr "ディレクティブ"
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
-msgstr "モジュール"
+msgstr "ロール"
#: sphinx/domains/std.py:68 sphinx/domains/std.py:84
#, python-format
@@ -347,15 +358,15 @@ msgstr "%sコマンドラインオプション; %s"
#: sphinx/domains/std.py:328
msgid "glossary term"
-msgstr ""
+msgstr "用語集の項目"
#: sphinx/domains/std.py:329
msgid "grammar token"
-msgstr ""
+msgstr "文法トークン"
#: sphinx/domains/std.py:330
msgid "reference label"
-msgstr ""
+msgstr "参照ラベル"
#: sphinx/domains/std.py:331
msgid "environment variable"
@@ -363,14 +374,14 @@ msgstr "環境変数"
#: sphinx/domains/std.py:332
msgid "program option"
-msgstr ""
+msgstr "プログラムオプション"
#: sphinx/domains/std.py:360 sphinx/themes/basic/genindex-single.html:11
#: sphinx/themes/basic/genindex-split.html:11
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "索引"
@@ -382,12 +393,12 @@ msgstr "モジュール索引"
msgid "Search Page"
msgstr "検索ページ"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " ベースクラス: %s"
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr ":class:`%s` のエイリアス"
@@ -399,110 +410,110 @@ msgstr "課題"
#: sphinx/ext/todo.py:109
#, python-format
msgid "(The <<original entry>> is located in %s, line %d.)"
-msgstr ""
+msgstr "(<<元のエントリ>> は、 %s の %d 行目です)"
#: sphinx/ext/todo.py:117
msgid "original entry"
-msgstr ""
+msgstr "元のエントリ"
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
-msgstr ""
+msgstr "[ソース]"
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
-msgstr ""
+msgstr "[ドキュメント]"
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
-msgstr "モジュール"
+msgstr "モジュールコード"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
-msgstr ""
+msgstr "<h1>%s のソースコード</h1>"
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
-msgstr ""
+msgstr "概要: モジュールコード"
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
-msgstr ""
+msgstr "<h1>全モジュールのうち、コードを読めるもの</h1>"
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "注意"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "ご用心"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "危険"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "エラー"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "ヒント"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "重要"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "ノート"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "参考"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "ちなみに"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "警告"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "バージョン %s で追加"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "バージョン %s で変更"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "バージョン %s で撤廃"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "キーワード"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "演算子"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "オブジェクト"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "文"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "組み込み関数"
@@ -512,7 +523,7 @@ msgid "Table Of Contents"
msgstr "目次"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "検索"
@@ -642,13 +653,13 @@ msgstr "次のトピックへ"
msgid "next chapter"
msgstr "次の章へ"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr "検索機能を使うには JavaScript を有効にしてください。"
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -656,16 +667,16 @@ msgid ""
" containing fewer words won't appear in the result list."
msgstr "このページからドキュメントを検索できます。キーワードを下のボックスに入力して、「検索」をクリックしてください。入力された全てのキーワードを含むページが検索されます。一部のキーワードしか含まないページは検索結果に表示されないので注意してください。"
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "検索"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "検索結果"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "検索条件に一致する項目がありませんでした。"
@@ -705,12 +716,12 @@ msgstr "C API に関する変更"
msgid "Other changes"
msgstr "その多の変更"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "このヘッドラインへのパーマリンク"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "この定義へのパーマリンク"
@@ -718,58 +729,59 @@ msgstr "この定義へのパーマリンク"
msgid "Hide Search Matches"
msgstr "検索結果を隠す"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "検索中"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "検索の準備中..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
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:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "検索が終了し、条件に一致するページが %s 個みつかりました。"
#: sphinx/themes/default/static/sidebar.js:66
msgid "Expand sidebar"
-msgstr ""
+msgstr "サイドバーを展開"
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
-msgstr ""
+msgstr "サイドバーをたたむ"
#: sphinx/themes/haiku/layout.html:26
msgid "Contents"
-msgstr ""
+msgstr "コンテンツ"
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "リリース"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "注記"
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "前のページからの続き"
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "総索引"
#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[画像]"
+
diff --git a/sphinx/locale/lt/LC_MESSAGES/sphinx.mo b/sphinx/locale/lt/LC_MESSAGES/sphinx.mo
index 794ae655..1ed94be5 100644
--- a/sphinx/locale/lt/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/lt/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/lt/LC_MESSAGES/sphinx.po b/sphinx/locale/lt/LC_MESSAGES/sphinx.po
index 48618e30..081c4994 100644
--- a/sphinx/locale/lt/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/lt/LC_MESSAGES/sphinx.po
@@ -7,8 +7,9 @@ msgstr ""
"Project-Id-Version: Sphinx 1.0pre/8b971dbc7d36\n"
"Report-Msgid-Bugs-To: dalius@sandbox.lt\n"
"POT-Creation-Date: 2010-05-24 23:53+0200\n"
-"PO-Revision-Date: 2010-06-19 12:02+0300\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Dalius Dobravolskas <dalius@sandbox.lt>\n"
+"Language-Team: lt <LL@li.org>\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"(n%100<10 || n%100>=20) ? 1 : 2)\n"
"MIME-Version: 1.0\n"
@@ -16,13 +17,13 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 0.9.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%Y-%m-%d"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr ""
@@ -35,66 +36,66 @@ msgstr "Įtaisytieji"
msgid "Module level"
msgstr "Modulio lygis"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%Y-%m-%d"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Bendras indeksas"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "indeksas"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "kitas"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "praeitas"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (kuris yra "
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Skyriaus autorius: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Modulio autorius: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
msgid "Code author: "
msgstr "Kodo autorius: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Autorius: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Taip pat žiūrėkite"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr "%s %s"
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Parametrai"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Grąžinamos reikšmės"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Grąžinamos reikšmės tipas"
@@ -123,12 +124,12 @@ msgstr "%s (C tipas)"
msgid "%s (C variable)"
msgstr "%s (C kintamasis)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "funkcija"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "narys"
@@ -136,7 +137,7 @@ msgstr "narys"
msgid "macro"
msgstr "makrokomanda"
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "tipas"
@@ -144,186 +145,197 @@ msgstr "tipas"
msgid "variable"
msgstr "kintamasis"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr ""
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++ tipas)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (C++ narys)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++ funkcija)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "klasė"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (itaisytoji funkcija)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s metodas)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, python-format
+msgid "%s() (class)"
+msgstr "%s() (klasė)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr "%s (globalus kintamasis arba konstanta)"
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s atributas)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
msgid "Arguments"
msgstr "Argumentais"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr "Išmeta"
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr "duomenys"
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "atribudas"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
msgid "Variables"
msgstr "Kintamieji"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Sukelia"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (modulyje %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (įtaisytasis kintamasis)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (modulje %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (įtaisytoji klasė)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (klasė iš %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s metodas)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s statinis metodas)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s statinis metodas)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s klasės metodas)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s klasės metodas)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s atributas)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Platformos: "
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (modulis)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
msgid "Python Module Index"
msgstr ""
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "moduliai"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Atmestas"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "išimtis"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr "metodas"
-#: sphinx/domains/python.py:502
+#: sphinx/domains/python.py:528
msgid "class method"
msgstr "klasės metodas"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "statinis metodas"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "modulis"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Atmestas"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr "%s (direktyva)"
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, python-format
msgid "%s (role)"
msgstr "%s (rolė)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr "direktyva"
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
msgid "role"
msgstr "rolė"
@@ -362,7 +374,7 @@ msgstr "programos parinktis"
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Indeksas"
@@ -374,12 +386,12 @@ msgstr "Modulio indeksas"
msgid "Search Page"
msgstr "Paieškos puslapis"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " Bazės: %s"
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr ":class:`%s` alternatyvus vardas"
@@ -397,103 +409,103 @@ msgstr "(<<original entry>> galima rasti %s, eilutėje %d.)"
msgid "original entry"
msgstr "originalus įrašas"
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr "[šaltinis]"
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr "[dokumentai]"
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
msgid "Module code"
msgstr "Modulio kodas"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr "<h1>Kodas %s</h1>"
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr "Apžvalga: modulio kodas"
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr "<h1>Visi moduliai turintys kodą</h1>"
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Dėmesio"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Atsargiai"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Pavojinga"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Klaida"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Patarimas"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Svarbu"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Pastaba"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Taip pat žiūrėkite"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Patarimas"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Įspėjimas"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Nauja %s versijoje"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Pakeista %s versijoje"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Nebepalaikoma nuo %s versijos"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "bazinis žodis"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "operatorius"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "objektas"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "sakinis"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "įtaisytoji funkcija"
@@ -503,7 +515,7 @@ msgid "Table Of Contents"
msgstr "Turinys"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Paieška"
@@ -633,7 +645,7 @@ msgstr "Kita tema"
msgid "next chapter"
msgstr "kita dalis"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
@@ -641,25 +653,29 @@ msgstr ""
"Prašome aktyvuoti JavaScript, kad veiktų paieškos\n"
" funkcionalumas."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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 ""
-"Čia jūs galite ieškoti šiuose dokumentuose. Įveskite savo paieškos\n žodžius į lauką apačioje ir paspauskite \"ieškoti\". Pastebėsime, kad paieškos\n funkcija automatiškai ieškos visų žodžių. Puslapiai,\n kuriuose yra mažiau žodžių nepasirodys tarp paieškos rezultatų."
+"Čia jūs galite ieškoti šiuose dokumentuose. Įveskite savo paieškos\n"
+" žodžius į lauką apačioje ir paspauskite \"ieškoti\". Pastebėsime, kad"
+" paieškos\n"
+" funkcija automatiškai ieškos visų žodžių. Puslapiai,\n"
+" kuriuose yra mažiau žodžių nepasirodys tarp paieškos rezultatų."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "ieškoti"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Paieškos rezultatai"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Jūsų paieška neatitiko jokių rezultatų"
@@ -699,12 +715,12 @@ msgstr "C API pakeitimai"
msgid "Other changes"
msgstr "Kiti pakeitimai"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Nuoroda į šią antraštę"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Nuoroda į šį apibrėžimą"
@@ -712,25 +728,27 @@ msgstr "Nuoroda į šį apibrėžimą"
msgid "Hide Search Matches"
msgstr "Paslėpti paieškos rezultatus"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Ieškoma"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Ruošiama paieška..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", kuris yra "
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
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 "Jūsų paieška neatitiko jokių dokumentų. Prašom patikrinti ar visi žodžiai teisingai įvesti ir ar pasirinkote pakankamai kategorijų."
+msgstr ""
+"Jūsų paieška neatitiko jokių dokumentų. Prašom patikrinti ar visi žodžiai"
+" teisingai įvesti ir ar pasirinkote pakankamai kategorijų."
-#: sphinx/themes/basic/static/searchtools.js:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Paieška baigta, paieškos rezultatus atitiko %s puslapis(-iai,-ių)"
@@ -740,7 +758,7 @@ msgid "Expand sidebar"
msgstr "Išplėsti šoninę juostą"
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr "Paslėpti šoninę juostą"
@@ -748,19 +766,19 @@ msgstr "Paslėpti šoninę juostą"
msgid "Contents"
msgstr "Turinys"
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Leidimas"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "Išnašos"
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "tęsinys iš praeito puslapio"
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "Tęsinys kitame puslapyje"
diff --git a/sphinx/locale/nl/LC_MESSAGES/sphinx.mo b/sphinx/locale/nl/LC_MESSAGES/sphinx.mo
index 2002607f..39f46af0 100644
--- a/sphinx/locale/nl/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/nl/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/nl/LC_MESSAGES/sphinx.po b/sphinx/locale/nl/LC_MESSAGES/sphinx.po
index 8683db4f..1e321591 100644
--- a/sphinx/locale/nl/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/nl/LC_MESSAGES/sphinx.po
@@ -7,23 +7,22 @@ msgstr ""
"Project-Id-Version: Sphinx 0.5\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2009-08-06 23:04+0200\n"
-"PO-Revision-Date: 2010-05-29 16:22+0100\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Marijn van der Zee <marijn.vanderzee@gmail.com>\n"
"Language-Team: nl <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\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.5\n"
-#: sphinx/environment.py:106
-#: sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d. %B %Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -36,71 +35,67 @@ msgstr "Builtins"
msgid "Module level"
msgstr "Moduleniveau"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d.%b.%Y"
-#: sphinx/builders/html.py:285
-#: sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Algemene index"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "Index"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "volgende"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "vorige"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr ""
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Auteur van deze sectie: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Auteur van deze module: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "Auteur van deze module: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Auteur: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Zie ook"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51
-#: sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Parameters"
-#: sphinx/domains/c.py:54
-#: sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Returns"
-#: sphinx/domains/c.py:56
-#: sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Return type"
@@ -129,15 +124,12 @@ msgstr "%s (C type)"
msgid "%s (C variable)"
msgstr "%s (C-variabele)"
-#: sphinx/domains/c.py:171
-#: sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166
-#: sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "functie"
-#: sphinx/domains/c.py:172
-#: sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "member"
@@ -145,8 +137,7 @@ msgstr "member"
msgid "macro"
msgstr "macro"
-#: sphinx/domains/c.py:174
-#: sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "type"
@@ -155,207 +146,206 @@ msgstr "type"
msgid "variable"
msgstr "variabele"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (C++ klasse)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++ type)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (C++ member)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++ functie)"
-#: sphinx/domains/cpp.py:1030
-#: sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "klasse"
-#: sphinx/domains/javascript.py:117
-#: sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (geïntegreerde functie)"
-#: sphinx/domains/javascript.py:118
-#: sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s methode)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (C++ klasse)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr "%s (globale variabele of constante)"
-#: sphinx/domains/javascript.py:122
-#: sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s attribuut)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "Parameters"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167
-#: sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168
-#: sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "attribuut"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "Variabele"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Veroorzaakt"
-#: sphinx/domains/python.py:222
-#: sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291
-#: sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (in module %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (geïntegreerde variabele)"
-#: sphinx/domains/python.py:226
-#: sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (in module %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (geïntegreerde klasse)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (klasse in %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s methode)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s statische methode)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s statische methode)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s methode)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s methode)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s attribuut)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Platformen: "
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (module)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "Module-index"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "modules"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Verouderd"
-#: sphinx/domains/python.py:500
-#: sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "exceptie"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (%s methode)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "statische methode"
-#: sphinx/domains/python.py:505
-#: sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "module"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Verouderd"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (module)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "module"
-#: sphinx/domains/std.py:68
-#: sphinx/domains/std.py:84
+#: sphinx/domains/std.py:68 sphinx/domains/std.py:84
#, python-format
msgid "environment variable; %s"
msgstr "omgevingsvariabele; %s"
@@ -385,15 +375,12 @@ msgstr "omgevingsvariabele"
msgid "program option"
msgstr ""
-#: sphinx/domains/std.py:360
-#: sphinx/themes/basic/genindex-single.html:11
+#: sphinx/domains/std.py:360 sphinx/themes/basic/genindex-single.html:11
#: sphinx/themes/basic/genindex-split.html:11
#: sphinx/themes/basic/genindex-split.html:14
-#: sphinx/themes/basic/genindex.html:11
-#: sphinx/themes/basic/genindex.html:14
-#: sphinx/themes/basic/genindex.html:50
-#: sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
+#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Index"
@@ -401,17 +388,16 @@ msgstr "Index"
msgid "Module Index"
msgstr "Module-index"
-#: sphinx/domains/std.py:362
-#: sphinx/themes/basic/defindex.html:25
+#: sphinx/domains/std.py:362 sphinx/themes/basic/defindex.html:25
msgid "Search Page"
msgstr "Zoekpagina"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -429,132 +415,126 @@ msgstr "(Het <<originele item>> is te vinden in %s, regel %d.)"
msgid "original entry"
msgstr "originele item"
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "module"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Let op"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Pas op"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Gevaar"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Fout"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Hint"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Belangrijk"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Notitie"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Zie ook"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Tip"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Waarschuwing"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Nieuw in versie %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Veranderd in versie %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Verouderd sinds versie %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "trefwoord"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "operator"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "object"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "statement"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "ingebouwde functie"
-#: sphinx/themes/agogo/layout.html:45
-#: sphinx/themes/basic/globaltoc.html:10
+#: sphinx/themes/agogo/layout.html:45 sphinx/themes/basic/globaltoc.html:10
#: sphinx/themes/basic/localtoc.html:11
msgid "Table Of Contents"
msgstr "Inhoudsopgave"
-#: sphinx/themes/agogo/layout.html:49
-#: sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11
-#: sphinx/themes/basic/search.html:14
+#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Zoeken"
-#: sphinx/themes/agogo/layout.html:52
-#: sphinx/themes/basic/searchbox.html:15
+#: sphinx/themes/agogo/layout.html:52 sphinx/themes/basic/searchbox.html:15
msgid "Go"
msgstr "Ga"
-#: sphinx/themes/agogo/layout.html:57
-#: sphinx/themes/basic/searchbox.html:20
+#: sphinx/themes/agogo/layout.html:57 sphinx/themes/basic/searchbox.html:20
msgid "Enter search terms or a module, class or function name."
msgstr "Geef zoekterm of de naam van een module, klasse of functie."
-#: sphinx/themes/agogo/layout.html:78
-#: sphinx/themes/basic/sourcelink.html:14
+#: sphinx/themes/agogo/layout.html:78 sphinx/themes/basic/sourcelink.html:14
msgid "Show Source"
msgstr "Broncode weergeven"
@@ -644,8 +624,12 @@ msgstr "Laatste aanpassing op %(last_updated)s."
#: sphinx/themes/basic/layout.html:189
#, python-format
-msgid "Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)s."
-msgstr "Aangemaakt met <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 ""
+"Aangemaakt met <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
+"%(sphinx_version)s."
#: sphinx/themes/basic/opensearch.xml:4
#, python-format
@@ -668,13 +652,13 @@ msgstr "Volgend onderwerp"
msgid "next chapter"
msgstr "volgend hoofdstuk"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr "Activeer JavaSscript om de zoekfunctionaliteit in te schakelen."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -682,20 +666,22 @@ msgid ""
" containing fewer words won't appear in the result list."
msgstr ""
"Hier kan u de documenten doorzoeken. Geef enkele trefwoorden\n"
-" in het veld hieronder en klik \"zoeken\". Merk op dat de zoekfunctie\n"
-" steeds naar alle woorden zoekt. Pagina's die minder woorden bevatten\n"
+" in het veld hieronder en klik \"zoeken\". Merk op dat de zoekfunctie"
+"\n"
+" steeds naar alle woorden zoekt. Pagina's die minder woorden bevatten"
+"\n"
" zullen niet tussen de resultaten verschijnen."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "zoeken"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Zoekresultaten"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Uw zoekopdracht leverde geen resultaten op."
@@ -735,14 +721,12 @@ msgstr "Veranderingen in de C-API"
msgid "Other changes"
msgstr "Andere veranderingen"
-#: sphinx/themes/basic/static/doctools.js:154
-#: sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Permalink naar deze titel"
-#: sphinx/themes/basic/static/doctools.js:160
-#: sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Permalink naar deze definitie"
@@ -750,23 +734,27 @@ msgstr "Permalink naar deze definitie"
msgid "Hide Search Matches"
msgstr "Zoekresultaten verbergen"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Zoeken"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Het zoeken wordt voorbereid..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", in "
-#: sphinx/themes/basic/static/searchtools.js:491
-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 "Uw zoekopdracht leverde geen resultaten op. Controleer of alle woorden correct gespeld zijn en dat u genoeg categoriën hebt geselecteerd."
+#: sphinx/themes/basic/static/searchtools.js:506
+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 ""
+"Uw zoekopdracht leverde geen resultaten op. Controleer of alle woorden "
+"correct gespeld zijn en dat u genoeg categoriën hebt geselecteerd."
-#: sphinx/themes/basic/static/searchtools.js:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Zoeken voltooid, %s pagina(s) gevonden."
@@ -776,7 +764,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -784,20 +772,19 @@ msgstr ""
msgid "Contents"
msgstr "Inhoud"
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Release"
-#: sphinx/writers/latex.py:572
-#: sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "Voetnoten"
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "Vervolgd van vorige pagina"
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "Vervolgd op volgende pagina"
@@ -805,12 +792,3 @@ msgstr "Vervolgd op volgende pagina"
msgid "[image]"
msgstr "[afbeelding]"
-#~ msgid "Parameter"
-#~ msgstr "Parameter"
-#~ msgid "here"
-#~ msgstr "hier"
-#~ msgid "module, in "
-#~ msgstr "module, in"
-#~ msgid "Platform: %s"
-#~ msgstr "Platform: %s"
-
diff --git a/sphinx/locale/pl/LC_MESSAGES/sphinx.mo b/sphinx/locale/pl/LC_MESSAGES/sphinx.mo
index 3c6105cd..132e7da3 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 6044e8ee..f5260f9e 100644
--- a/sphinx/locale/pl/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/pl/LC_MESSAGES/sphinx.po
@@ -4,23 +4,23 @@ 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: 2010-05-24 23:54+0200\n"
-"Last-Translator: Michał Kandulski <Michal.Kandulski@poczta.onet.pl>\n"
+"PO-Revision-Date: 2010-12-17 13:36+0100\n"
+"Last-Translator: Michał Kandulski <michal.kandulski@gmail.com>\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"
"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.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%B %d %Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -33,67 +33,67 @@ msgstr "Wbudowane"
msgid "Module level"
msgstr "Poziom modułu"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%b %d %Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Indeks ogólny"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "indeks"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "dalej"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "wstecz"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (w "
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Autor rozdziału: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Autor modułu: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
-msgstr "Autor modułu: "
+msgstr "Autor kodu: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Autor: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Zobacz także"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
-msgstr ""
+msgstr "%s %s"
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Parametry"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Zwraca"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Typ zwracany"
@@ -122,215 +122,226 @@ msgstr "%s (typ C)"
msgid "%s (C variable)"
msgstr "%s (zmienna C)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "funkcja"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "pole"
#: sphinx/domains/c.py:173
msgid "macro"
-msgstr ""
+msgstr "makro"
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "typ"
#: sphinx/domains/c.py:175
#, fuzzy
msgid "variable"
-msgstr "Zmienna"
+msgstr "zmienna"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
-msgstr "%s (klasie C++)"
+msgstr "%s (klasa C++)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (typ C++)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (pole C++)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (funkcja C++)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
-msgstr "klasie"
+msgstr "klasa"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (funkcja wbudowana)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s metoda)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s() (klasa)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
-msgstr ""
+msgstr "%s (zmienna lub stała globalna)"
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s atrybut)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
-msgstr "Parametry"
+msgstr "Argumenty"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
-msgstr ""
+msgstr "Wyrzuca"
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
-msgstr ""
+msgstr "dane"
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "atrybut"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
-msgstr "Zmienna"
+msgstr "Zmienne"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Wyrzuca"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (w module %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (zmienna wbudowana)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (w module %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (klasa wbudowana)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
-msgstr "%s (w klasie %s)"
+msgstr "%s (klasa w module %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s metoda)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
-msgstr "%s() (%s.%s statyczna metoda)"
+msgstr "%s() (%s.%s metoda statyczna)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
-msgstr "%s() (%s statyczna metoda)"
+msgstr "%s() (%s metoda statyczna)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
-msgstr "%s() (%s.%s metoda)"
+msgstr "%s() (%s.%s metoda klasy)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
-msgstr "%s() (%s metoda)"
+msgstr "%s() (%s metoda klasy)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
-msgstr "%s (%s.%s atrybut)"
+msgstr "%s (atrybut %s.%s)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Platformy: "
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (moduł)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
-msgstr "Indeks modułów"
+msgstr "Indeks modułów pythona"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "moduły"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Niezalecane"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "wyjątek"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
-msgstr ""
+msgstr "metoda"
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
-msgstr "%s() (%s metoda)"
+msgstr "metoda klasy"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "statyczna metoda"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "moduł"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr " (niezalecane)"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
-msgstr ""
+msgstr "%s (dyrektywa)"
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
-msgstr "%s (moduł)"
+msgstr "%s (rola)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
-msgstr ""
+msgstr "dyrektywa"
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
-msgstr "moduł"
+msgstr "rola"
#: sphinx/domains/std.py:68 sphinx/domains/std.py:84
#, python-format
@@ -344,15 +355,15 @@ msgstr "%sopcja linii komend; %s"
#: sphinx/domains/std.py:328
msgid "glossary term"
-msgstr ""
+msgstr "termin glosariusza"
#: sphinx/domains/std.py:329
msgid "grammar token"
-msgstr ""
+msgstr "symbol gramatyki"
#: sphinx/domains/std.py:330
msgid "reference label"
-msgstr ""
+msgstr "etykieta odsyłacza"
#: sphinx/domains/std.py:331
msgid "environment variable"
@@ -360,14 +371,14 @@ msgstr "zmienna środowiskowa"
#: sphinx/domains/std.py:332
msgid "program option"
-msgstr ""
+msgstr "opcja programu"
#: sphinx/domains/std.py:360 sphinx/themes/basic/genindex-single.html:11
#: sphinx/themes/basic/genindex-split.html:11
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Indeks"
@@ -379,129 +390,127 @@ msgstr "Indeks modułów"
msgid "Search Page"
msgstr "Wyszukiwanie"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " Klasy bazowe: %s"
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "alias klasy :class:`%s`"
#: sphinx/ext/todo.py:41
msgid "Todo"
-msgstr "Do zrobienia"
+msgstr "Todo"
#: sphinx/ext/todo.py:109
#, fuzzy, python-format
msgid "(The <<original entry>> is located in %s, line %d.)"
-msgstr ""
-"(Oryginalny wpis znajduje się w pliku %s, w linii %d i może być "
-"odnaleziony "
+msgstr "(<<Oryginalny wpis>> znajduje się w pliku %s, w linii %d.)"
#: sphinx/ext/todo.py:117
msgid "original entry"
-msgstr ""
+msgstr "oryginalny wpis"
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
-msgstr ""
+msgstr "[źródło]"
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
-msgstr ""
+msgstr "[dokumenty]"
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
-msgstr "moduł"
+msgstr "Kod modułu"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
-msgstr ""
+msgstr "<h1>Kod źródłowy modułu %s</h1>"
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
-msgstr ""
+msgstr "Przeglądanie: kod modułu"
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
-msgstr ""
+msgstr "<h1>Wszystkie moduły, dla których jest dostępny kod</h1>"
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Uwaga"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Ostrożnie"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Niebezpieczeństwo"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Błąd"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Podpowiedź"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Ważne"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Uwaga"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Zobacz także"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Wskazówka"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Ostrzeżenie"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Nowe w wersji %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Zmienione w wersji %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Niezalecane od wersji %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "słowo kluczowe"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "operator"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "obiekt"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "instrukcja"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "funkcja wbudowana"
@@ -511,7 +520,7 @@ msgid "Table Of Contents"
msgstr "Spis treści"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Szukaj"
@@ -541,15 +550,15 @@ msgstr "Kompletny spis treści"
#: sphinx/themes/basic/defindex.html:24
msgid "lists all sections and subsections"
-msgstr "wymień wszystkie rozdziały i podrozdziały"
+msgstr "wszystkie rozdziały i podrozdziały"
#: sphinx/themes/basic/defindex.html:26
msgid "search this documentation"
-msgstr "wyszukaj w dokumentacji"
+msgstr "przyszukaj tę dokumentację"
#: sphinx/themes/basic/defindex.html:28
msgid "Global Module Index"
-msgstr "Indeks modułów"
+msgstr "Globalny indeks modułów"
#: sphinx/themes/basic/defindex.html:29
msgid "quick access to all modules"
@@ -641,13 +650,13 @@ msgstr "Następny temat"
msgid "next chapter"
msgstr "następny rozdział"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr "Aby umożliwić wuszukiwanie, proszę włączyć JavaScript."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -661,16 +670,16 @@ msgstr ""
" nie zawierające wszystkich wpisanych słów nie znajdą się na wynikowej"
" liście."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
-msgstr "Szukaj"
+msgstr "szukaj"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Wyniki wyszukiwania"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Nie znaleziono żadnych pasujących stron."
@@ -710,12 +719,12 @@ msgstr "Zmiany w C API"
msgid "Other changes"
msgstr "Inne zmiany"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Stały odnośnik do tego nagłówka"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Stały odnośnik do tej definicji"
@@ -723,73 +732,61 @@ msgstr "Stały odnośnik do tej definicji"
msgid "Hide Search Matches"
msgstr "Ukryj wyniki wyszukiwania"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Wyszukiwanie"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Przygotowanie wyszukiwania..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", w "
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
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."
+"słowa są poprawnie wpisane i że wybrałeś wystarczającą liczbę kategorii."
-#: sphinx/themes/basic/static/searchtools.js:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Przeszukiwanie zakończone, znaleziono %s pasujących stron."
#: sphinx/themes/default/static/sidebar.js:66
msgid "Expand sidebar"
-msgstr ""
+msgstr "Rozwiń pasek boczny"
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
-msgstr ""
+msgstr "Zwiń pasek boczny"
#: sphinx/themes/haiku/layout.html:26
msgid "Contents"
-msgstr ""
+msgstr "Treść"
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Wydanie"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "Przypisy"
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "kontynuacja poprzedniej strony"
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "Kontynuacja na następnej stronie"
#: sphinx/writers/text.py:422
msgid "[image]"
-msgstr "[obrazek]"
-
-#~ msgid "Parameter"
-#~ msgstr "Parametr"
-
-#~ msgid "here"
-#~ msgstr "tutaj"
-
-#~ msgid "module, in "
-#~ msgstr "moduł, w "
-
-#~ msgid "Platform: %s"
-#~ msgstr "Platforma: %s"
+msgstr "[obraz]"
diff --git a/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo b/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo
index 67c1ce54..31558971 100644
--- a/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po b/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po
index 7df9013e..75770ee9 100644
--- a/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po
@@ -8,23 +8,22 @@ 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: 2010-06-20 18:34-0300\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\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"
"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.5\n"
-#: sphinx/environment.py:106
-#: sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d/%m/%Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -37,70 +36,66 @@ msgstr "Internos"
msgid "Module level"
msgstr "Módulo"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d/%m/%Y"
-#: sphinx/builders/html.py:285
-#: sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Índice Geral"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "índice"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "próximo"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "anterior"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (em "
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Autor da seção: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Autor do módulo: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
msgid "Code author: "
msgstr "Autor do código: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Autor: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Veja também"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr "%s %s"
-#: sphinx/domains/c.py:51
-#: sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Parâmetros"
-#: sphinx/domains/c.py:54
-#: sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Retorna"
-#: sphinx/domains/c.py:56
-#: sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Tipo de retorno"
@@ -129,15 +124,12 @@ msgstr "%s (tipo C)"
msgid "%s (C variable)"
msgstr "%s (variável C)"
-#: sphinx/domains/c.py:171
-#: sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166
-#: sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "função"
-#: sphinx/domains/c.py:172
-#: sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "membro"
@@ -145,8 +137,7 @@ msgstr "membro"
msgid "macro"
msgstr "macro"
-#: sphinx/domains/c.py:174
-#: sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "tipo"
@@ -154,203 +145,201 @@ msgstr "tipo"
msgid "variable"
msgstr "variável"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (classe C++)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (tipo C++)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (membro C++)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (função C++)"
-#: sphinx/domains/cpp.py:1030
-#: sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "classe"
-#: sphinx/domains/javascript.py:117
-#: sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (função interna)"
-#: sphinx/domains/javascript.py:118
-#: sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (método %s)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (classe C++)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr "%s (variável global ou constante)"
-#: sphinx/domains/javascript.py:122
-#: sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (atributo %s)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
msgid "Arguments"
msgstr "Parâmetros"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr "Gera"
-#: sphinx/domains/javascript.py:167
-#: sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr "dado"
-#: sphinx/domains/javascript.py:168
-#: sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "atributo"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
msgid "Variables"
msgstr "Variáveis"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Levanta"
-#: sphinx/domains/python.py:222
-#: sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291
-#: sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (no módulo %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (variável interna)"
-#: sphinx/domains/python.py:226
-#: sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (no módulo %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (classe interna)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (classe em %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (método %s.%s)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (método estático %s.%s)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (método estático %s)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (método de classe %s.%s)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, python-format
msgid "%s() (%s class method)"
msgstr "%s() (método de classe %s)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (atributo %s.%s)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Plataformas: "
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (módulo)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
msgid "Python Module Index"
msgstr "Índice de Módulos do Python"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "módulos"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Obsoleto"
-#: sphinx/domains/python.py:500
-#: sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "exceção"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr "método"
-#: sphinx/domains/python.py:502
-#, python-format
+#: sphinx/domains/python.py:528
msgid "class method"
msgstr "método de classe"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "método estático"
-#: sphinx/domains/python.py:505
-#: sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "módulo"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Obsoleto"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr "%s (diretiva)"
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, python-format
msgid "%s (role)"
msgstr "%s (papel)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr "diretiva"
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
msgid "role"
msgstr "papel"
-#: sphinx/domains/std.py:68
-#: sphinx/domains/std.py:84
+#: sphinx/domains/std.py:68 sphinx/domains/std.py:84
#, python-format
msgid "environment variable; %s"
msgstr "váriavel de ambiente; %s"
@@ -380,15 +369,12 @@ msgstr "váriavel de ambiente"
msgid "program option"
msgstr "opção de programa"
-#: sphinx/domains/std.py:360
-#: sphinx/themes/basic/genindex-single.html:11
+#: sphinx/domains/std.py:360 sphinx/themes/basic/genindex-single.html:11
#: sphinx/themes/basic/genindex-split.html:11
#: sphinx/themes/basic/genindex-split.html:14
-#: sphinx/themes/basic/genindex.html:11
-#: sphinx/themes/basic/genindex.html:14
-#: sphinx/themes/basic/genindex.html:50
-#: sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
+#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Índice"
@@ -396,17 +382,16 @@ msgstr "Índice"
msgid "Module Index"
msgstr "Índice do Módulo"
-#: sphinx/domains/std.py:362
-#: sphinx/themes/basic/defindex.html:25
+#: sphinx/domains/std.py:362 sphinx/themes/basic/defindex.html:25
msgid "Search Page"
msgstr "Página de Pesquisa"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " Bases: %s"
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "apelido de :class:`%s`"
@@ -424,131 +409,125 @@ msgstr "(A <<entrada original>> está localizada em %s, linha %d.)"
msgid "original entry"
msgstr "entrada original"
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr "[código fonte]"
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr "[documentos]"
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
msgid "Module code"
msgstr "Código do módulo"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr "<h1>Código fonte de %s</h1>"
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr "Visão geral: código do módulo"
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr "<h1>Todos os módulos onde este código está disponível</h1>"
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Atenção"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Cuidado"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Perigo"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Erro"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Dica"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Importante"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Nota"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Veja Também"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Dica"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Aviso"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Novo na versão %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Alterado na versão %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Obsoleto desde a versão %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "palavra-chave"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "operador"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "objeto"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "comando"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "função interna"
-#: sphinx/themes/agogo/layout.html:45
-#: sphinx/themes/basic/globaltoc.html:10
+#: sphinx/themes/agogo/layout.html:45 sphinx/themes/basic/globaltoc.html:10
#: sphinx/themes/basic/localtoc.html:11
msgid "Table Of Contents"
msgstr "Tabela de Conteúdo"
-#: sphinx/themes/agogo/layout.html:49
-#: sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11
-#: sphinx/themes/basic/search.html:14
+#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Pesquisar"
-#: sphinx/themes/agogo/layout.html:52
-#: sphinx/themes/basic/searchbox.html:15
+#: sphinx/themes/agogo/layout.html:52 sphinx/themes/basic/searchbox.html:15
msgid "Go"
msgstr "Ir"
-#: sphinx/themes/agogo/layout.html:57
-#: sphinx/themes/basic/searchbox.html:20
+#: sphinx/themes/agogo/layout.html:57 sphinx/themes/basic/searchbox.html:20
msgid "Enter search terms or a module, class or function name."
msgstr "Digite os termos da busca ou o nome de um módulo, classe ou função."
-#: sphinx/themes/agogo/layout.html:78
-#: sphinx/themes/basic/sourcelink.html:14
+#: sphinx/themes/agogo/layout.html:78 sphinx/themes/basic/sourcelink.html:14
msgid "Show Source"
msgstr "Exibir Fonte"
@@ -638,8 +617,12 @@ msgstr "Última atualização em %(last_updated)s."
#: sphinx/themes/basic/layout.html:189
#, python-format
-msgid "Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)s."
-msgstr "Criado com <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 ""
+"Criado com <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
+"%(sphinx_version)s."
#: sphinx/themes/basic/opensearch.xml:4
#, python-format
@@ -662,13 +645,13 @@ msgstr "Próximo tópico"
msgid "next chapter"
msgstr "próximo capítulo"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr "Por favor ative o JavaScript para habilitar a funcionalidade de pesquisa."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -676,20 +659,22 @@ msgid ""
" containing fewer words won't appear in the result list."
msgstr ""
"A partir daqui você pode pesquisar estes documentos. Preencha suas \n"
-" palavras de pesquisa na caixa abaixo e clique em \"pesquisar\". Observe que a função de pesquisa\n"
+" palavras de pesquisa na caixa abaixo e clique em \"pesquisar\". "
+"Observe que a função de pesquisa\n"
" irá pesquisar automaticamente por todas as palavras.\n"
-" Páginas contendo menos palavras não irão aparecer na lista de resultado."
+" Páginas contendo menos palavras não irão aparecer na lista de "
+"resultado."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "pesquisar"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Resultados da Pesquisa"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Sua pesquisa não encontrou nenhum resultado."
@@ -729,14 +714,12 @@ msgstr "Alterações na API C"
msgid "Other changes"
msgstr "Outras alterações"
-#: sphinx/themes/basic/static/doctools.js:154
-#: sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Link permanente para este título"
-#: sphinx/themes/basic/static/doctools.js:160
-#: sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Link permanente para esta definição"
@@ -744,33 +727,40 @@ msgstr "Link permanente para esta definição"
msgid "Hide Search Matches"
msgstr "Esconder Resultados da Pesquisa"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Pesquisando"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Preparando pesquisa..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", em "
-#: sphinx/themes/basic/static/searchtools.js:491
-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 "Sua pesquisa não encontrou nenhum documento. Por favor assegure-se de que todas as palavras foram digitadas corretamente e de que você tenha selecionado o mínimo de categorias."
+#: sphinx/themes/basic/static/searchtools.js:506
+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 ""
+"Sua pesquisa não encontrou nenhum documento. Por favor assegure-se de que"
+" todas as palavras foram digitadas corretamente e de que você tenha "
+"selecionado o mínimo de categorias."
-#: sphinx/themes/basic/static/searchtools.js:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, 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."
+msgstr ""
+"Pesquisa finalizada, foram encontrada(s) %s página(s) que conferem com o "
+"critério de pesquisa."
#: sphinx/themes/default/static/sidebar.js:66
msgid "Expand sidebar"
msgstr "Expandir painel lateral"
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr "Recolher painel lateral"
@@ -778,20 +768,19 @@ msgstr "Recolher painel lateral"
msgid "Contents"
msgstr "Conteúdo"
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Versão"
-#: sphinx/writers/latex.py:572
-#: sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "Notas de rodapé"
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "continuação da página anterior"
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "Continua na próxima página"
diff --git a/sphinx/locale/ru/LC_MESSAGES/sphinx.mo b/sphinx/locale/ru/LC_MESSAGES/sphinx.mo
index ecdc6860..a7d7b641 100644
--- a/sphinx/locale/ru/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/ru/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/ru/LC_MESSAGES/sphinx.po b/sphinx/locale/ru/LC_MESSAGES/sphinx.po
index e2b1e3a1..acd409a4 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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\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 && "
@@ -15,15 +15,15 @@ msgstr ""
"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.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d %B %Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -36,67 +36,67 @@ msgstr "Встроенные функции"
msgid "Module level"
msgstr "Модуль"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d %b %Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Словарь-указатель"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "словарь"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "следующий"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "предыдущий"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (в "
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Автор секции: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Автор модуля: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "Автор модуля: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Автор: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "См.также"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Параметры"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Результат"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Тип результата"
@@ -125,12 +125,12 @@ msgstr "%s (тип C)"
msgid "%s (C variable)"
msgstr "%s (переменная C)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "функция"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "поле"
@@ -138,7 +138,7 @@ msgstr "поле"
msgid "macro"
msgstr ""
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "тип"
@@ -147,190 +147,201 @@ msgstr "тип"
msgid "variable"
msgstr "Переменная"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (класс C++)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (тип C++)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (поле C++)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (функция C++)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "класс"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (встроенная функция)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (метод %s)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (класс C++)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (атрибут %s)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "Параметры"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "атрибут"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "Переменная"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Исключение"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (в модуле %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (встроенная переменная)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (в модуле %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (встроенный класс)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (класс в %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (метод %s.%s)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (статический метод %s.%s)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (статический метод %s)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (метод %s.%s)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (метод %s)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (атрибут %s.%s)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Платформы: "
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (модуль)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "Состав модуля"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "модули"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Не рекомендуется"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "исключение"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (метод %s)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "статический метод"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "модуль"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Не рекомендуется"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (модуль)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "модуль"
@@ -370,7 +381,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Алфавитный указатель"
@@ -382,12 +393,12 @@ msgstr "Состав модуля"
msgid "Search Page"
msgstr "Поиск"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " Базовые классы: %s"
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "псевдоним класса :class:`%s`"
@@ -405,104 +416,104 @@ msgstr "(Исходный элемент находится в %s, в строк
msgid "original entry"
msgstr ""
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "модуль"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Внимание"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Осторожно"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Опасно"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Ошибка"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Подсказка"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Важно"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Примечание"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "См.также"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Совет"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Предупреждение"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Добавлено в версии %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Изменено в версии %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Не рекомендуется, начиная с версии %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "ключевое слово"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "оператор"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "объект"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "команда"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "базовая функция"
@@ -512,7 +523,7 @@ msgid "Table Of Contents"
msgstr "Содержание"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Поиск"
@@ -642,13 +653,13 @@ msgstr "Следующий раздел"
msgid "next chapter"
msgstr "следующая глава"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr "Для выполнения поиска необходима поддержка JavaScript в браузере."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -661,16 +672,16 @@ msgstr ""
"упомянуты все указанные слова. Страницы, в которых встречается только "
"часть этих слов, отобраны не будут."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "искать"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Результаты поиска"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Результатов по вашему запросу не найдено."
@@ -710,12 +721,12 @@ msgstr "Изменения в C API"
msgid "Other changes"
msgstr "Другие изменения"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Ссылка на этот заголовок"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Ссылка на это определение"
@@ -723,19 +734,19 @@ msgstr "Ссылка на это определение"
msgid "Hide Search Matches"
msgstr "Снять выделение"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Поиск"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Подготовка к поиску..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", в "
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -743,7 +754,7 @@ msgstr ""
"Нет документов, соответствующих вашему запросу. Проверьте, правильно ли "
"выбраны категории и нет ли опечаток в запросе."
-#: sphinx/themes/basic/static/searchtools.js:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Поиск окончен, найдено страниц: %s."
@@ -753,7 +764,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -761,19 +772,19 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Выпуск"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
#, fuzzy
msgid "Continued on next page"
msgstr "Полный алфавитный указатель на одной странице"
@@ -781,3 +792,4 @@ msgstr "Полный алфавитный указатель на одной с
#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[рисунок]"
+
diff --git a/sphinx/locale/sl/LC_MESSAGES/sphinx.mo b/sphinx/locale/sl/LC_MESSAGES/sphinx.mo
index 21e64ffd..ad2b8aa8 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 6028c35c..f47aa3d3 100644
--- a/sphinx/locale/sl/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/sl/LC_MESSAGES/sphinx.po
@@ -4,22 +4,22 @@ msgstr ""
"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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Luka Marinko <luka.marinko@simt.si>\n"
"Language-Team: Rok Garbas <rok.garbas@gmail.com>\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"
+"Generated-By: Babel 0.9.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d %B, %Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -32,67 +32,67 @@ msgstr "Vgrajeni deli"
msgid "Module level"
msgstr "Nivo modula"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d %b, %Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Splošni abecedni seznam"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "abecedni seznam"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "naprej"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "nazaj"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (v "
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Avtor sekcije: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Avtor modula: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "Avtor modula: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Avtor: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Poglej Tudi"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Parametri"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Vrne"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Vrne tip"
@@ -121,12 +121,12 @@ msgstr "%s (C tip)"
msgid "%s (C variable)"
msgstr "%s (C spremenljivka)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "funkcija"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "član"
@@ -134,7 +134,7 @@ msgstr "član"
msgid "macro"
msgstr ""
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "tip"
@@ -143,190 +143,201 @@ msgstr "tip"
msgid "variable"
msgstr "Spremenljivka"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (C++ razred)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++ tip)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (C++ član)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++ funkcija)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "razred"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (vgrajene funkcije)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s metoda)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (C++ razred)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s atribut)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "Parametri"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "atribut"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "Spremenljivka"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Sproži izjemo"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (v modulu %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (vgrajene spremenljivke)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (v modulu %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (vgrajen razred)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (razred v %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s metoda)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s statična metoda)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s statična metoda)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s metoda)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s metoda)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s atribut)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Platforme:"
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (modul)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "Seznam modulov"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "Moduli"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Zastarelo"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "izjema"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (%s metoda)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "statična metoda"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "modul"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Zastarelo"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (modul)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "modul"
@@ -366,7 +377,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Abecedni seznam"
@@ -378,12 +389,12 @@ msgstr "Seznam modulov"
msgid "Search Page"
msgstr "Iskalnik"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " Baza: %s"
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "vzdevek za :class:`%s`"
@@ -401,104 +412,104 @@ msgstr "(Originalen vnos se nahaja v %s, v vrstici %d, in ga je moč poiskati "
msgid "original entry"
msgstr ""
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "modul"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Pozor"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Previdno"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Nevarno"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Napaka"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Nasvet"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Pomembno"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Opomba"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Poglej Tudi"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Nasvet"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Opozorilo"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Novo v verziji %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Spremenjeno v verziji %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Zastarelo od verzije %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "ključna beseda"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "operator"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "objekt"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "izjava"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "vgrajene funkcije"
@@ -508,7 +519,7 @@ msgid "Table Of Contents"
msgstr "Seznam Vsebine"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Išči"
@@ -638,7 +649,7 @@ msgstr "Naslednja tema"
msgid "next chapter"
msgstr "naslednje poglavje"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
@@ -646,7 +657,7 @@ msgstr ""
"Za pravilno delovanje Iskanja morete vklopiti\n"
" JavaScript."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -658,16 +669,16 @@ msgstr ""
" bo iskalo po vseh besedah v iskalnem nizu. Strani, ki ne\n"
" vsebujejo vseh besed ne bodo prikazane na seznamu rezultatov."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "išči"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Rezultati Iskanja"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Vaše iskanje ni imelo nobenega zadetka."
@@ -707,12 +718,12 @@ msgstr "C API spremembe"
msgid "Other changes"
msgstr "Ostale spremembe"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Povezava na naslov"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Povezava na to definicijo"
@@ -720,19 +731,19 @@ msgstr "Povezava na to definicijo"
msgid "Hide Search Matches"
msgstr "Skrij resultate iskanja"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Iščem"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Pripravljam iskanje..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", v "
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -740,7 +751,7 @@ 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:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Iskanje končano, najdeno %s strani, ki ustrezajo iskalnemu nizu."
@@ -750,7 +761,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -758,22 +769,23 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Izdaja"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "Opombe"
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "nadaljevanje iz prejšnje strani"
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "Nadaljevanje na naslednji strani"
#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[slika]"
+
diff --git a/sphinx/locale/sphinx.pot b/sphinx/locale/sphinx.pot
index 955663aa..5d60cd4e 100644
--- a/sphinx/locale/sphinx.pot
+++ b/sphinx/locale/sphinx.pot
@@ -6,24 +6,24 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: Sphinx 1.0pre/8b971dbc7d36\n"
+"Project-Id-Version: Sphinx 1.1pre/dd630cbbda23\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2010-05-24 23:53+0200\n"
+"POT-Creation-Date: 2010-08-26 11:44+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 0.9.4\n"
+"Generated-By: Babel 0.9.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr ""
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr ""
@@ -36,66 +36,66 @@ msgstr ""
msgid "Module level"
msgstr ""
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr ""
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr ""
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr ""
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr ""
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr ""
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr ""
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr ""
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr ""
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
msgid "Code author: "
msgstr ""
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr ""
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr ""
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr ""
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr ""
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr ""
@@ -124,12 +124,12 @@ msgstr ""
msgid "%s (C variable)"
msgstr ""
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr ""
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr ""
@@ -137,7 +137,7 @@ msgstr ""
msgid "macro"
msgstr ""
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr ""
@@ -145,186 +145,196 @@ msgstr ""
msgid "variable"
msgstr ""
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr ""
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr ""
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr ""
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr ""
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr ""
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr ""
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr ""
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, python-format
+msgid "%s() (class)"
+msgstr ""
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr ""
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
msgid "Arguments"
msgstr ""
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr ""
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
msgid "Variables"
msgstr ""
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr ""
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr ""
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr ""
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr ""
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr ""
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr ""
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr ""
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr ""
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr ""
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, python-format
msgid "%s() (%s.%s class method)"
msgstr ""
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, python-format
msgid "%s() (%s class method)"
msgstr ""
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr ""
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr ""
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr ""
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
msgid "Python Module Index"
msgstr ""
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr ""
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr ""
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr ""
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
+#: sphinx/domains/python.py:528
msgid "class method"
msgstr ""
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr ""
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr ""
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+msgid " (deprecated)"
+msgstr ""
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, python-format
msgid "%s (role)"
msgstr ""
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
msgid "role"
msgstr ""
@@ -363,7 +373,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr ""
@@ -375,12 +385,12 @@ msgstr ""
msgid "Search Page"
msgstr ""
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -398,103 +408,103 @@ msgstr ""
msgid "original entry"
msgstr ""
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
msgid "Module code"
msgstr ""
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr ""
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr ""
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr ""
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr ""
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr ""
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr ""
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr ""
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr ""
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr ""
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr ""
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr ""
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr ""
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr ""
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr ""
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr ""
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr ""
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr ""
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr ""
@@ -504,7 +514,7 @@ msgid "Table Of Contents"
msgstr ""
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr ""
@@ -632,13 +642,13 @@ msgstr ""
msgid "next chapter"
msgstr ""
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr ""
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -646,16 +656,16 @@ msgid ""
" containing fewer words won't appear in the result list."
msgstr ""
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr ""
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr ""
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr ""
@@ -695,12 +705,12 @@ msgstr ""
msgid "Other changes"
msgstr ""
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr ""
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr ""
@@ -708,25 +718,25 @@ msgstr ""
msgid "Hide Search Matches"
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
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:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr ""
@@ -736,7 +746,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -744,19 +754,19 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr ""
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr ""
diff --git a/sphinx/locale/sv/LC_MESSAGES/sphinx.js b/sphinx/locale/sv/LC_MESSAGES/sphinx.js
new file mode 100644
index 00000000..0cedfb45
--- /dev/null
+++ b/sphinx/locale/sv/LC_MESSAGES/sphinx.js
@@ -0,0 +1 @@
+Documentation.addTranslations({"locale": "sv", "plural_expr": "(n != 1)", "messages": {"Search Results": "S\u00f6kresultat", "Preparing search...": "F\u00f6rbereder s\u00f6kning...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Din s\u00f6kning gav inga resultat. Kolla stavning och att du valt tillr\u00e4ckligt med kategorier.", "Search finished, found %s page(s) matching the search query.": "S\u00f6kning f\u00e4rdig, hittade %s tr\u00e4ffar.", ", in ": ", i ", "Expand sidebar": "Expandera sidolist", "Permalink to this headline": "Permalink till denna rubrik", "Searching": "S\u00f6ker", "Collapse sidebar": "D\u00f6lj sidolist", "Permalink to this definition": "Permalink till denna definition", "Hide Search Matches": "D\u00f6lj S\u00f6kresultat"}}); \ No newline at end of file
diff --git a/sphinx/locale/sv/LC_MESSAGES/sphinx.mo b/sphinx/locale/sv/LC_MESSAGES/sphinx.mo
new file mode 100644
index 00000000..40e059e2
--- /dev/null
+++ b/sphinx/locale/sv/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/sv/LC_MESSAGES/sphinx.po b/sphinx/locale/sv/LC_MESSAGES/sphinx.po
new file mode 100644
index 00000000..33127180
--- /dev/null
+++ b/sphinx/locale/sv/LC_MESSAGES/sphinx.po
@@ -0,0 +1,780 @@
+
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2010-05-24 23:53+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
+"Last-Translator: Henrik Holmboe <henrik@holmboe.se>\n"
+"Language-Team: \n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.5\n"
+
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
+#: sphinx/writers/manpage.py:67
+#, python-format
+msgid "%B %d, %Y"
+msgstr "%B %d, %Y"
+
+#: sphinx/roles.py:173
+#, python-format
+msgid "Python Enhancement Proposals!PEP %s"
+msgstr "Python Enhancement Proposals!PEP %s"
+
+#: sphinx/builders/changes.py:72
+msgid "Builtins"
+msgstr "Inbyggda"
+
+#: sphinx/builders/changes.py:74
+msgid "Module level"
+msgstr "Modulnivå"
+
+#: sphinx/builders/html.py:260
+#, python-format
+msgid "%b %d, %Y"
+msgstr "%b %d, %Y"
+
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
+msgid "General Index"
+msgstr "Huvudindex"
+
+#: sphinx/builders/html.py:279
+msgid "index"
+msgstr "index"
+
+#: sphinx/builders/html.py:339
+msgid "next"
+msgstr "nästa"
+
+#: sphinx/builders/html.py:348
+msgid "previous"
+msgstr "föregående"
+
+#: sphinx/builders/latex.py:145
+msgid " (in "
+msgstr "(i "
+
+#: sphinx/directives/other.py:135
+msgid "Section author: "
+msgstr "Sektionsförfattare"
+
+#: sphinx/directives/other.py:137
+msgid "Module author: "
+msgstr "Modulförfattare"
+
+#: sphinx/directives/other.py:139
+msgid "Code author: "
+msgstr "Källkodsförfattare"
+
+#: sphinx/directives/other.py:141
+msgid "Author: "
+msgstr "Upphovsman:"
+
+#: sphinx/directives/other.py:213
+msgid "See also"
+msgstr "Se även"
+
+#: sphinx/domains/__init__.py:242
+#, python-format
+msgid "%s %s"
+msgstr "%s %s"
+
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
+msgid "Parameters"
+msgstr "Parametrar"
+
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
+msgid "Returns"
+msgstr "Returnerar"
+
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
+msgid "Return type"
+msgstr "Returtyp"
+
+#: sphinx/domains/c.py:133
+#, python-format
+msgid "%s (C function)"
+msgstr "%s (C-funktion)"
+
+#: sphinx/domains/c.py:135
+#, python-format
+msgid "%s (C member)"
+msgstr "%s (C-medlem)"
+
+#: sphinx/domains/c.py:137
+#, python-format
+msgid "%s (C macro)"
+msgstr "%s (C-makro)"
+
+#: sphinx/domains/c.py:139
+#, python-format
+msgid "%s (C type)"
+msgstr "%s (C-typ)"
+
+#: sphinx/domains/c.py:141
+#, python-format
+msgid "%s (C variable)"
+msgstr "%s (C-variabel)"
+
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
+msgid "function"
+msgstr "funktion"
+
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
+msgid "member"
+msgstr "medlem"
+
+#: sphinx/domains/c.py:173
+msgid "macro"
+msgstr "makro"
+
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
+msgid "type"
+msgstr "typ"
+
+#: sphinx/domains/c.py:175
+msgid "variable"
+msgstr "variabel"
+
+#: sphinx/domains/cpp.py:883
+#, python-format
+msgid "%s (C++ class)"
+msgstr "%s (C++-klass)"
+
+#: sphinx/domains/cpp.py:898
+#, python-format
+msgid "%s (C++ type)"
+msgstr "%s (C++-typ)"
+
+#: sphinx/domains/cpp.py:917
+#, python-format
+msgid "%s (C++ member)"
+msgstr "%s (C++-medlem)"
+
+#: sphinx/domains/cpp.py:969
+#, python-format
+msgid "%s (C++ function)"
+msgstr "%s (C++-funktion)"
+
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
+msgid "class"
+msgstr "klass"
+
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
+#, python-format
+msgid "%s() (built-in function)"
+msgstr "%s() (inbyggd funktion)"
+
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
+#, python-format
+msgid "%s() (%s method)"
+msgstr "%s() (%s metod)"
+
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (C++-klass)"
+
+#: sphinx/domains/javascript.py:110
+#, python-format
+msgid "%s (global variable or constant)"
+msgstr "%s (global variabel eller konstant)"
+
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
+#, python-format
+msgid "%s (%s attribute)"
+msgstr "%s (%s attribut)"
+
+#: sphinx/domains/javascript.py:121
+msgid "Arguments"
+msgstr "Argument"
+
+#: sphinx/domains/javascript.py:124
+msgid "Throws"
+msgstr "Kastar"
+
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
+msgid "data"
+msgstr "data"
+
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
+msgid "attribute"
+msgstr "attribut"
+
+#: sphinx/domains/python.py:98
+msgid "Variables"
+msgstr "Variabler"
+
+#: sphinx/domains/python.py:101
+msgid "Raises"
+msgstr "Väcker"
+
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
+#, python-format
+msgid "%s() (in module %s)"
+msgstr "%s() (i modul %s)"
+
+#: sphinx/domains/python.py:248
+#, python-format
+msgid "%s (built-in variable)"
+msgstr "%s (inbyggd variabel)"
+
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
+#, python-format
+msgid "%s (in module %s)"
+msgstr "%s (i modul %s)"
+
+#: sphinx/domains/python.py:265
+#, python-format
+msgid "%s (built-in class)"
+msgstr "%s (inbyggd klass)"
+
+#: sphinx/domains/python.py:266
+#, python-format
+msgid "%s (class in %s)"
+msgstr "%s (klass i %s)"
+
+#: sphinx/domains/python.py:306
+#, python-format
+msgid "%s() (%s.%s method)"
+msgstr "%s() (%s.%s metod)"
+
+#: sphinx/domains/python.py:318
+#, python-format
+msgid "%s() (%s.%s static method)"
+msgstr "%s() (%s.%s statisk metod)"
+
+#: sphinx/domains/python.py:321
+#, python-format
+msgid "%s() (%s static method)"
+msgstr "%s() (%s statisk metod)"
+
+#: sphinx/domains/python.py:331
+#, python-format
+msgid "%s() (%s.%s class method)"
+msgstr "%s() (%s.%s klassmetod)"
+
+#: sphinx/domains/python.py:334
+#, python-format
+msgid "%s() (%s class method)"
+msgstr "%s() (%s klassmetod)"
+
+#: sphinx/domains/python.py:344
+#, python-format
+msgid "%s (%s.%s attribute)"
+msgstr "%s (%s.%s attribut)"
+
+#: sphinx/domains/python.py:392
+msgid "Platforms: "
+msgstr "Plattformar:"
+
+#: sphinx/domains/python.py:398
+#, python-format
+msgid "%s (module)"
+msgstr "%s (modul)"
+
+#: sphinx/domains/python.py:455
+msgid "Python Module Index"
+msgstr "Python Modulindex"
+
+#: sphinx/domains/python.py:456
+msgid "modules"
+msgstr "moduler"
+
+#: sphinx/domains/python.py:501
+msgid "Deprecated"
+msgstr "Ersatt"
+
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
+msgid "exception"
+msgstr "undantag"
+
+#: sphinx/domains/python.py:527
+msgid "method"
+msgstr "metod"
+
+#: sphinx/domains/python.py:528
+msgid "class method"
+msgstr "klassmetod"
+
+#: sphinx/domains/python.py:529
+msgid "static method"
+msgstr "statisk metod"
+
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
+msgid "module"
+msgstr "modul"
+
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Ersatt"
+
+#: sphinx/domains/rst.py:55
+#, python-format
+msgid "%s (directive)"
+msgstr "%s (direktiv)"
+
+#: sphinx/domains/rst.py:57
+#, python-format
+msgid "%s (role)"
+msgstr "%s (roll)"
+
+#: sphinx/domains/rst.py:106
+msgid "directive"
+msgstr "direktiv"
+
+#: sphinx/domains/rst.py:107
+msgid "role"
+msgstr "roll"
+
+#: sphinx/domains/std.py:68 sphinx/domains/std.py:84
+#, python-format
+msgid "environment variable; %s"
+msgstr "miljövariabel; %s"
+
+#: sphinx/domains/std.py:160
+#, python-format
+msgid "%scommand line option; %s"
+msgstr "%skommandorad växel; %s"
+
+#: sphinx/domains/std.py:328
+msgid "glossary term"
+msgstr "ordlista"
+
+#: sphinx/domains/std.py:329
+msgid "grammar token"
+msgstr "grammatisk token"
+
+#: sphinx/domains/std.py:330
+msgid "reference label"
+msgstr "referensetikett"
+
+#: sphinx/domains/std.py:331
+msgid "environment variable"
+msgstr "miljövariabel"
+
+#: sphinx/domains/std.py:332
+msgid "program option"
+msgstr "programväxel"
+
+#: sphinx/domains/std.py:360 sphinx/themes/basic/genindex-single.html:11
+#: sphinx/themes/basic/genindex-split.html:11
+#: sphinx/themes/basic/genindex-split.html:14
+#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
+#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
+#: sphinx/writers/latex.py:174
+msgid "Index"
+msgstr "Index"
+
+#: sphinx/domains/std.py:361
+msgid "Module Index"
+msgstr "Modulindex"
+
+#: sphinx/domains/std.py:362 sphinx/themes/basic/defindex.html:25
+msgid "Search Page"
+msgstr "Söksida"
+
+#: sphinx/ext/autodoc.py:923
+#, python-format
+msgid " Bases: %s"
+msgstr " Baserad: %s"
+
+#: sphinx/ext/autodoc.py:959
+#, python-format
+msgid "alias of :class:`%s`"
+msgstr "alias för :class:`%s`"
+
+#: sphinx/ext/todo.py:41
+msgid "Todo"
+msgstr "Att göra"
+
+#: sphinx/ext/todo.py:109
+#, python-format
+msgid "(The <<original entry>> is located in %s, line %d.)"
+msgstr "(<<Ursprunget>> finns i %s, på rad %d.)"
+
+#: sphinx/ext/todo.py:117
+msgid "original entry"
+msgstr "ursprungsvärde"
+
+#: sphinx/ext/viewcode.py:70
+msgid "[source]"
+msgstr "[source]"
+
+#: sphinx/ext/viewcode.py:117
+msgid "[docs]"
+msgstr "[docs]"
+
+#: sphinx/ext/viewcode.py:131
+msgid "Module code"
+msgstr "Modulkällkod"
+
+#: sphinx/ext/viewcode.py:137
+#, python-format
+msgid "<h1>Source code for %s</h1>"
+msgstr "<h1>Källkod för %s</h1>"
+
+#: sphinx/ext/viewcode.py:164
+msgid "Overview: module code"
+msgstr "Översikt: modulkällkod"
+
+#: sphinx/ext/viewcode.py:165
+msgid "<h1>All modules for which code is available</h1>"
+msgstr "<h1>Alla moduler där källkod finns</h1>"
+
+#: sphinx/locale/__init__.py:155
+msgid "Attention"
+msgstr "Uppmärksamma"
+
+#: sphinx/locale/__init__.py:156
+msgid "Caution"
+msgstr "Varning"
+
+#: sphinx/locale/__init__.py:157
+msgid "Danger"
+msgstr "Risk"
+
+#: sphinx/locale/__init__.py:158
+msgid "Error"
+msgstr "Fel"
+
+#: sphinx/locale/__init__.py:159
+msgid "Hint"
+msgstr "Råd"
+
+#: sphinx/locale/__init__.py:160
+msgid "Important"
+msgstr "Viktigt"
+
+#: sphinx/locale/__init__.py:161
+msgid "Note"
+msgstr "Observera"
+
+#: sphinx/locale/__init__.py:162
+msgid "See Also"
+msgstr "Se även"
+
+#: sphinx/locale/__init__.py:163
+msgid "Tip"
+msgstr "Tips"
+
+#: sphinx/locale/__init__.py:164
+msgid "Warning"
+msgstr "Varning"
+
+#: sphinx/locale/__init__.py:168
+#, python-format
+msgid "New in version %s"
+msgstr "Nyheter i version %s"
+
+#: sphinx/locale/__init__.py:169
+#, python-format
+msgid "Changed in version %s"
+msgstr "Förändrat i version %s"
+
+#: sphinx/locale/__init__.py:170
+#, python-format
+msgid "Deprecated since version %s"
+msgstr "Ersatt sedan version %s"
+
+#: sphinx/locale/__init__.py:175
+msgid "keyword"
+msgstr "nyckelord"
+
+#: sphinx/locale/__init__.py:176
+msgid "operator"
+msgstr "operator"
+
+#: sphinx/locale/__init__.py:177
+msgid "object"
+msgstr "objekt"
+
+#: sphinx/locale/__init__.py:179
+msgid "statement"
+msgstr "uttryck"
+
+#: sphinx/locale/__init__.py:180
+msgid "built-in function"
+msgstr "inbyggda funktioner"
+
+#: sphinx/themes/agogo/layout.html:45 sphinx/themes/basic/globaltoc.html:10
+#: sphinx/themes/basic/localtoc.html:11
+msgid "Table Of Contents"
+msgstr "Innehållsförteckning"
+
+#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
+msgid "Search"
+msgstr "Sök"
+
+#: sphinx/themes/agogo/layout.html:52 sphinx/themes/basic/searchbox.html:15
+msgid "Go"
+msgstr "Gå"
+
+#: sphinx/themes/agogo/layout.html:57 sphinx/themes/basic/searchbox.html:20
+msgid "Enter search terms or a module, class or function name."
+msgstr "Ange sökord eller modul-, klass- eller funktionsnamn."
+
+#: sphinx/themes/agogo/layout.html:78 sphinx/themes/basic/sourcelink.html:14
+msgid "Show Source"
+msgstr "Visa källfil"
+
+#: sphinx/themes/basic/defindex.html:11
+msgid "Overview"
+msgstr "Översikt"
+
+#: sphinx/themes/basic/defindex.html:20
+msgid "Indices and tables:"
+msgstr "Index och tabeller"
+
+#: sphinx/themes/basic/defindex.html:23
+msgid "Complete Table of Contents"
+msgstr "Komplett Innehållsförteckning"
+
+#: sphinx/themes/basic/defindex.html:24
+msgid "lists all sections and subsections"
+msgstr "lista över alla paragrafer och underparagrafer"
+
+#: sphinx/themes/basic/defindex.html:26
+msgid "search this documentation"
+msgstr "sök i det här dokumentet"
+
+#: sphinx/themes/basic/defindex.html:28
+msgid "Global Module Index"
+msgstr "Global Modulindex"
+
+#: sphinx/themes/basic/defindex.html:29
+msgid "quick access to all modules"
+msgstr "genväg till alla moduler"
+
+#: sphinx/themes/basic/defindex.html:31
+msgid "all functions, classes, terms"
+msgstr "alla funktioner, klasser, villkor"
+
+#: sphinx/themes/basic/genindex-single.html:14
+#, python-format
+msgid "Index &ndash; %(key)s"
+msgstr "Index &ndash; %(key)s"
+
+#: sphinx/themes/basic/genindex-single.html:46
+#: sphinx/themes/basic/genindex-split.html:24
+#: sphinx/themes/basic/genindex-split.html:38
+#: sphinx/themes/basic/genindex.html:56
+msgid "Full index on one page"
+msgstr "Hela innehållsförteckningen på en sida"
+
+#: sphinx/themes/basic/genindex-split.html:16
+msgid "Index pages by letter"
+msgstr "Innehållsförteckning per inledande bokstav"
+
+#: sphinx/themes/basic/genindex-split.html:25
+msgid "can be huge"
+msgstr "kan bli stort"
+
+#: sphinx/themes/basic/layout.html:23
+msgid "Navigation"
+msgstr "Navigation"
+
+#: sphinx/themes/basic/layout.html:113
+#, python-format
+msgid "Search within %(docstitle)s"
+msgstr "Sök bland %(docstitle)s"
+
+#: sphinx/themes/basic/layout.html:122
+msgid "About these documents"
+msgstr "Om dessa dokument"
+
+#: sphinx/themes/basic/layout.html:131
+msgid "Copyright"
+msgstr "Copyright"
+
+#: sphinx/themes/basic/layout.html:180
+#, 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:182
+#, python-format
+msgid "&copy; Copyright %(copyright)s."
+msgstr "&copy; Copyright %(copyright)s."
+
+#: sphinx/themes/basic/layout.html:186
+#, python-format
+msgid "Last updated on %(last_updated)s."
+msgstr "Senast uppdaterad %(last_updated)s."
+
+#: sphinx/themes/basic/layout.html:189
+#, python-format
+msgid ""
+"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
+"%(sphinx_version)s."
+msgstr ""
+"Skapad med <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
+"%(sphinx_version)s."
+
+#: sphinx/themes/basic/opensearch.xml:4
+#, python-format
+msgid "Search %(docstitle)s"
+msgstr "Sök %(docstitle)s"
+
+#: sphinx/themes/basic/relations.html:11
+msgid "Previous topic"
+msgstr "Föregående titel"
+
+#: sphinx/themes/basic/relations.html:13
+msgid "previous chapter"
+msgstr "Föregående kapitel"
+
+#: sphinx/themes/basic/relations.html:16
+msgid "Next topic"
+msgstr "Nästa titel"
+
+#: sphinx/themes/basic/relations.html:18
+msgid "next chapter"
+msgstr "Nästa kapitel"
+
+#: sphinx/themes/basic/search.html:24
+msgid ""
+"Please activate JavaScript to enable the search\n"
+" functionality."
+msgstr "Var god aktivera JavaScript för sökfunktionalitet."
+
+#: sphinx/themes/basic/search.html:29
+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 ""
+"Här kan du söka bland dessa dokument. Ange sökord nedan och klicka "
+"\"sök\".\n"
+" Sökningen måste träffa på samtliga angivna sökord."
+
+#: sphinx/themes/basic/search.html:36
+msgid "search"
+msgstr "sök"
+
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
+msgid "Search Results"
+msgstr "Sökresultat"
+
+#: sphinx/themes/basic/search.html:42
+msgid "Your search did not match any results."
+msgstr "Din sökning gav inga resultat."
+
+#: sphinx/themes/basic/searchbox.html:12
+msgid "Quick search"
+msgstr "Snabbsök"
+
+#: sphinx/themes/basic/sourcelink.html:11
+msgid "This Page"
+msgstr "Denna Sida"
+
+#: 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 "Förändringar i Version %(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 "Automatiskt genererad lista över förändringar i version %(version)s"
+
+#: sphinx/themes/basic/changes/versionchanges.html:18
+msgid "Library changes"
+msgstr "Förändringar i bibliotek"
+
+#: sphinx/themes/basic/changes/versionchanges.html:23
+msgid "C API changes"
+msgstr "Förändringar i C-API"
+
+#: sphinx/themes/basic/changes/versionchanges.html:25
+msgid "Other changes"
+msgstr "Övriga förändringar"
+
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
+msgid "Permalink to this headline"
+msgstr "Permalink till denna rubrik"
+
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
+msgid "Permalink to this definition"
+msgstr "Permalink till denna definition"
+
+#: sphinx/themes/basic/static/doctools.js:189
+msgid "Hide Search Matches"
+msgstr "Dölj Sökresultat"
+
+#: sphinx/themes/basic/static/searchtools.js:287
+msgid "Searching"
+msgstr "Söker"
+
+#: sphinx/themes/basic/static/searchtools.js:292
+msgid "Preparing search..."
+msgstr "Förbereder sökning..."
+
+#: sphinx/themes/basic/static/searchtools.js:366
+msgid ", in "
+msgstr ", i "
+
+#: sphinx/themes/basic/static/searchtools.js:506
+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 ""
+"Din sökning gav inga resultat. Kolla stavning och att du valt "
+"tillräckligt med kategorier."
+
+#: sphinx/themes/basic/static/searchtools.js:508
+#, python-format
+msgid "Search finished, found %s page(s) matching the search query."
+msgstr "Sökning färdig, hittade %s träffar."
+
+#: sphinx/themes/default/static/sidebar.js:66
+msgid "Expand sidebar"
+msgstr "Expandera sidolist"
+
+#: sphinx/themes/default/static/sidebar.js:79
+#: sphinx/themes/default/static/sidebar.js:107
+msgid "Collapse sidebar"
+msgstr "Dölj sidolist"
+
+#: sphinx/themes/haiku/layout.html:26
+msgid "Contents"
+msgstr "Innehåll"
+
+#: sphinx/writers/latex.py:172
+msgid "Release"
+msgstr "Utgåva"
+
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
+msgid "Footnotes"
+msgstr "Fotnoter"
+
+#: sphinx/writers/latex.py:649
+msgid "continued from previous page"
+msgstr "fortsättning från föregående sida"
+
+#: sphinx/writers/latex.py:654
+msgid "Continued on next page"
+msgstr "Fortsätter på nästa sida"
+
+#: sphinx/writers/text.py:422
+msgid "[image]"
+msgstr "[image]"
+
diff --git a/sphinx/locale/tr/LC_MESSAGES/sphinx.mo b/sphinx/locale/tr/LC_MESSAGES/sphinx.mo
index 5054199c..746669eb 100644
--- a/sphinx/locale/tr/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/tr/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/tr/LC_MESSAGES/sphinx.po b/sphinx/locale/tr/LC_MESSAGES/sphinx.po
index e1e5c173..030097bf 100644
--- a/sphinx/locale/tr/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/tr/LC_MESSAGES/sphinx.po
@@ -8,23 +8,22 @@ msgstr ""
"Project-Id-Version: Sphinx 0.6.2+/6b02a19ccf31\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2009-08-06 22:48+0200\n"
-"PO-Revision-Date: 2010-05-28 10:18+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Firat Ozgul <ozgulfirat@gmail.com>\n"
"Language-Team: Turkish <kistihza@yahoo.com>\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"
+"Generated-By: Babel 0.9.5\n"
-#: sphinx/environment.py:106
-#: sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d %B %Y"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python'u İyileştirme Önerileri!PEP %s"
@@ -37,70 +36,66 @@ msgstr "Gömülüler"
msgid "Module level"
msgstr "Modül düzeyi"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%d %b %Y"
-#: sphinx/builders/html.py:285
-#: sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Genel Dizin"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "dizin"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "sonraki"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "önceki"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (şunun içinde: "
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Bölümü yazan: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Modülü yazan: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
msgid "Code author: "
msgstr "Kodu yazan: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Yazan: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Ayrıca bkz."
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr "%s %s"
-#: sphinx/domains/c.py:51
-#: sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Parametreler"
-#: sphinx/domains/c.py:54
-#: sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Şunu döndürür:"
-#: sphinx/domains/c.py:56
-#: sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Dönüş tipi"
@@ -129,15 +124,12 @@ msgstr "%s (C tipi)"
msgid "%s (C variable)"
msgstr "%s (C değişkeni)"
-#: sphinx/domains/c.py:171
-#: sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166
-#: sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "fonksiyonu"
-#: sphinx/domains/c.py:172
-#: sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "öğesi"
@@ -145,8 +137,7 @@ msgstr "öğesi"
msgid "macro"
msgstr "makrosu"
-#: sphinx/domains/c.py:174
-#: sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "tipi"
@@ -154,203 +145,201 @@ msgstr "tipi"
msgid "variable"
msgstr "değişkeni"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (C++ sınıfı)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++ tipi)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (C++ öğesi)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++ fonksiyonu)"
-#: sphinx/domains/cpp.py:1030
-#: sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "sınıfı"
-#: sphinx/domains/javascript.py:117
-#: sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (gömülü fonksiyon)"
-#: sphinx/domains/javascript.py:118
-#: sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s metodu)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (C++ sınıfı)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr "%s (global değişken veya sabit)"
-#: sphinx/domains/javascript.py:122
-#: sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s niteliği)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
msgid "Arguments"
msgstr "Argümanlar"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr "Şunu verir: "
-#: sphinx/domains/javascript.py:167
-#: sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr "verisi"
-#: sphinx/domains/javascript.py:168
-#: sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "niteliği"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
msgid "Variables"
msgstr "Değişkenler"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Şunu üretir:"
-#: sphinx/domains/python.py:222
-#: sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291
-#: sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (%s modülü içinde)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (gömülü değişken)"
-#: sphinx/domains/python.py:226
-#: sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (%s modülü içinde)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (gömülü sınıf)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (%s içinde bir sınıf)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s metodu)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s statik metodu)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s statik metodu)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s sınıf metodu)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s sınıf metodu)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s niteliği)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Platformlar:"
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (modül)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
msgid "Python Module Index"
msgstr "Python Modül Dizini"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "modüller"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Önerilmiyor"
-#: sphinx/domains/python.py:500
-#: sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "istisnası"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr "metodu"
-#: sphinx/domains/python.py:502
-#, python-format
+#: sphinx/domains/python.py:528
msgid "class method"
msgstr "sınıf metodu"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "statik metodu"
-#: sphinx/domains/python.py:505
-#: sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "modülü"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Önerilmiyor"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr "%s (yönerge)"
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, python-format
msgid "%s (role)"
msgstr "%s (rol)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr "yönergesi"
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
msgid "role"
msgstr "rolü"
-#: sphinx/domains/std.py:68
-#: sphinx/domains/std.py:84
+#: sphinx/domains/std.py:68 sphinx/domains/std.py:84
#, python-format
msgid "environment variable; %s"
msgstr "çevre değişkeni; %s"
@@ -380,15 +369,12 @@ msgstr "çevre değişkeni"
msgid "program option"
msgstr "program seçeneği"
-#: sphinx/domains/std.py:360
-#: sphinx/themes/basic/genindex-single.html:11
+#: sphinx/domains/std.py:360 sphinx/themes/basic/genindex-single.html:11
#: sphinx/themes/basic/genindex-split.html:11
#: sphinx/themes/basic/genindex-split.html:14
-#: sphinx/themes/basic/genindex.html:11
-#: sphinx/themes/basic/genindex.html:14
-#: sphinx/themes/basic/genindex.html:50
-#: sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
+#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Dizin"
@@ -396,17 +382,16 @@ msgstr "Dizin"
msgid "Module Index"
msgstr "Modül Dizini"
-#: sphinx/domains/std.py:362
-#: sphinx/themes/basic/defindex.html:25
+#: sphinx/domains/std.py:362 sphinx/themes/basic/defindex.html:25
msgid "Search Page"
msgstr "Arama Sayfası"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " Taban: %s"
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "şunun takma adı: :class:`%s`"
@@ -424,131 +409,125 @@ msgstr "(<<özgün girdi>> %s içinde ve %d satırında bulunuyor.)"
msgid "original entry"
msgstr "özgün girdi"
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr "[kaynak]"
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr "[belgeler]"
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
msgid "Module code"
msgstr "Modül kodu"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr "<h1>%s öğesinin kaynak kodu</h1>"
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr "Genel bakış: modül kodu"
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr "<h1>Kodları mevcut bütün modüller</h1>"
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Dikkat"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Uyarı"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Tehlike"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Hata"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "İpucu"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Önemli"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Not"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Ayrıca bkz."
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Tüyo"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Uyarı"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "%s sürümüyle geldi"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "%s sürümünde değişti"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "%s sürümünden beri önerilmiyor"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "anahtar kelime"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "işleç"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "nesne"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "deyim"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "gömülü fonksiyon"
-#: sphinx/themes/agogo/layout.html:45
-#: sphinx/themes/basic/globaltoc.html:10
+#: sphinx/themes/agogo/layout.html:45 sphinx/themes/basic/globaltoc.html:10
#: sphinx/themes/basic/localtoc.html:11
msgid "Table Of Contents"
msgstr "İçindekiler Tablosu"
-#: sphinx/themes/agogo/layout.html:49
-#: sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11
-#: sphinx/themes/basic/search.html:14
+#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Ara"
-#: sphinx/themes/agogo/layout.html:52
-#: sphinx/themes/basic/searchbox.html:15
+#: sphinx/themes/agogo/layout.html:52 sphinx/themes/basic/searchbox.html:15
msgid "Go"
msgstr "Git"
-#: sphinx/themes/agogo/layout.html:57
-#: sphinx/themes/basic/searchbox.html:20
+#: sphinx/themes/agogo/layout.html:57 sphinx/themes/basic/searchbox.html:20
msgid "Enter search terms or a module, class or function name."
msgstr "Aranacak terimleri veya modül, sınıf ya da fonksiyon adını yazınız"
-#: sphinx/themes/agogo/layout.html:78
-#: sphinx/themes/basic/sourcelink.html:14
+#: sphinx/themes/agogo/layout.html:78 sphinx/themes/basic/sourcelink.html:14
msgid "Show Source"
msgstr "Kaynağı Göster"
@@ -638,8 +617,12 @@ msgstr "Son güncelleme: %(last_updated)s."
#: sphinx/themes/basic/layout.html:189
#, 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 ile oluşturulmuştur."
+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 ile "
+"oluşturulmuştur."
#: sphinx/themes/basic/opensearch.xml:4
#, python-format
@@ -662,7 +645,7 @@ msgstr "Sonraki konu"
msgid "next chapter"
msgstr "sonraki bölüm"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
@@ -670,7 +653,7 @@ msgstr ""
"Arama işlevini kullanabilmek için lütfen JavaScript'i\n"
" etkinleştirin."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -682,16 +665,16 @@ msgstr ""
"otomatik olarak bütün kelimeleri arayacaktır. Eksik kelime içeren \n"
"sayfalar sonuç listesinde görünmez."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "ara"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Arama Sonuçları"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Arama sonucunda herhangi bir belge bulunamadı."
@@ -731,14 +714,12 @@ msgstr "C API'sindeki değişiklikler"
msgid "Other changes"
msgstr "Diğer değişiklikler"
-#: sphinx/themes/basic/static/doctools.js:154
-#: sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Bu başlığın kalıcı bağlantısı"
-#: sphinx/themes/basic/static/doctools.js:160
-#: sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Bu tanımın kalıcı bağlantısı"
@@ -746,23 +727,27 @@ msgstr "Bu tanımın kalıcı bağlantısı"
msgid "Hide Search Matches"
msgstr "Arama Sonuçlarını Gizle"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Arıyor"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Aramaya hazırlanıyor..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", şunun içinde: "
-#: sphinx/themes/basic/static/searchtools.js:491
-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 "Arama sonucunda hiçbir belge bulunamadı. Bütün kelimeleri doğru yazdığınızdan ve gereken kategorileri seçtiğinizden emin olun."
+#: sphinx/themes/basic/static/searchtools.js:506
+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 ""
+"Arama sonucunda hiçbir belge bulunamadı. Bütün kelimeleri doğru "
+"yazdığınızdan ve gereken kategorileri seçtiğinizden emin olun."
-#: sphinx/themes/basic/static/searchtools.js:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Arama sonuçlandı, aramayla eşleşen %s sayfa bulundu."
@@ -772,7 +757,7 @@ msgid "Expand sidebar"
msgstr "Yan çubuğu genişlet"
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr "Yan çubuğu daralt"
@@ -780,20 +765,19 @@ msgstr "Yan çubuğu daralt"
msgid "Contents"
msgstr "İçindekiler"
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Sürüm"
-#: sphinx/writers/latex.py:572
-#: sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "Dipnotları"
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr "önceki sayfadan devam"
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr "Devamı sonraki sayfada"
diff --git a/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo b/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo
index cfa0b8e0..18f4d8d6 100644
--- a/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po b/sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po
index a85eaebe..81c21d78 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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\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 && "
@@ -16,15 +16,15 @@ msgstr ""
"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.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr ""
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python Enhancement Proposals!PEP %s"
@@ -37,67 +37,67 @@ msgstr "Вбудовані елементи"
msgid "Module level"
msgstr "Рівень модуля"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%b %d, %Y"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Загальний індекс"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "індекс"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "наступний"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "попередній"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr " (в "
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Автор секції: "
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "Автор модуля: "
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "Автор модуля: "
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "Автор: "
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "Дивись також"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "Параметри"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "Повертає"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "Тип повернення"
@@ -126,12 +126,12 @@ msgstr "%s (C тип)"
msgid "%s (C variable)"
msgstr "%s (C змінна)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "функція"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "член"
@@ -139,7 +139,7 @@ msgstr "член"
msgid "macro"
msgstr "макрос"
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "тип"
@@ -148,191 +148,201 @@ msgstr "тип"
msgid "variable"
msgstr "Змінна"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, python-format
msgid "%s (C++ class)"
msgstr "%s (C++ клас)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++ тип)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (C++ член)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++ функція)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr "клас"
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (вбудована функція)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s метод)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (C++ клас)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s атрибут)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "Параметри"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
-#, python-format
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "атрибут"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "Змінна"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "Викликає"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (в модулі %s)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (вбудована змінна)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s (в модулі %s)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (вбудований клас)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr "%s (клас в %s)"
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s метод)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s статичний метод)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s статичний метод)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s метод)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s метод)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s атрибут)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "Платформи: "
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (модуль)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "Індекс модулів"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "модулі"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "Застарілий"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "виняткова ситуація"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (%s метод)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "статичний метод"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "модуль"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "Застарілий"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (модуль)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "модуль"
@@ -372,7 +382,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "Індекс"
@@ -384,12 +394,12 @@ msgstr "Індекс модулів"
msgid "Search Page"
msgstr "Сторінка пошуку"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr " Базовий: %s"
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr "синонім :class:`%s`"
@@ -407,104 +417,104 @@ msgstr "(Початкове входження знаходиться в %s, р
msgid "original entry"
msgstr ""
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "модуль"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "Увага"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "Застереження"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "Небезпека"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "Помилка"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "Підказка"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "Важливо"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "Примітка"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "Дивись також"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "Порада"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "Попередження"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "Нове в версії %s"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "Змінено в версії %s"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "Застаріло починаючи з версії %s"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "ключове слово"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "оператор"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "об'єкт"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "вираз"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "вбудована функція"
@@ -514,7 +524,7 @@ msgid "Table Of Contents"
msgstr "Зміст"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "Пошук"
@@ -644,7 +654,7 @@ msgstr "Наступна тема"
msgid "next chapter"
msgstr "наступний розділ"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
@@ -653,7 +663,7 @@ msgstr ""
"\"\n"
"\" пошук."
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -665,16 +675,16 @@ msgstr ""
" пошуку автоматично шукатиме за всіма словами. Сторінки\n"
" що містять менше слів не з'являться в результуючому списку."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "пошук"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "Результати пошуку"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "Ваш пошук не виявив жодних співпадінь."
@@ -714,12 +724,12 @@ msgstr "зміни C API"
msgid "Other changes"
msgstr "Інші зміни"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "Постійне посилання на цей заголовок"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "Постійне посилання на це визначення"
@@ -727,19 +737,19 @@ msgstr "Постійне посилання на це визначення"
msgid "Hide Search Matches"
msgstr "Приховати співпадіння пошуку"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "Шукаю"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "Підготовка до пошуку..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", в "
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
msgid ""
"Your search did not match any documents. Please make sure that all words "
"are spelled correctly and that you've selected enough categories."
@@ -747,7 +757,7 @@ msgstr ""
"Ваш пошук не виявив жодного співпадіння. Будь-ласка переконайтеся що всі "
"слова набрані правильно і ви обрали достатньо категорій."
-#: sphinx/themes/basic/static/searchtools.js:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Пошук закінчено, знайдено %s сторінок які співпали з пошуковим запитом."
@@ -757,7 +767,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -765,19 +775,19 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "Реліз"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
#, fuzzy
msgid "Continued on next page"
msgstr "Повний індекс на одній сторінці"
@@ -785,3 +795,4 @@ msgstr "Повний індекс на одній сторінці"
#: sphinx/writers/text.py:422
msgid "[image]"
msgstr ""
+
diff --git a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo
index b62c4c5b..11818de5 100644
--- a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo
+++ 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
index c1762043..b9dce085 100644
--- a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po
@@ -9,22 +9,22 @@ 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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\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"
+"Generated-By: Babel 0.9.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%Y 年 %m 月 %d 日"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python 建议文件!PEP %s"
@@ -37,67 +37,67 @@ msgstr "内置"
msgid "Module level"
msgstr "模块级别"
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%Y 年 %m 月 %d 日"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "总目录"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "索引"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "下一页"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "上一页"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr ""
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Section 作者:"
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "模块作者:"
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "模块作者:"
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "作者:"
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr "也可以参考"
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "参数"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "返回"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "返回类型"
@@ -126,12 +126,12 @@ msgstr "%s (C 类型)"
msgid "%s (C variable)"
msgstr "%s (C 变量)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "函数"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "成员"
@@ -139,7 +139,7 @@ msgstr "成员"
msgid "macro"
msgstr ""
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr ""
@@ -148,190 +148,201 @@ msgstr ""
msgid "variable"
msgstr "变量"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, fuzzy, python-format
msgid "%s (C++ class)"
msgstr "%s (內置类)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++ 类型)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (C++ 成员)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++ 函数)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr ""
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (內置函数)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s 方法)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (內置类)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s 属性)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "参数"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "属性"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "变量"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr "引发"
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (在 %s 模块中)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (內置变量)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s() (在 %s 模块中)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (內置类)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr ""
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s 方法)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s 静态方法)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s 静态方法)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s 方法)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s 方法)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s 属性)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "平台"
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (模块)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "模块索引"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "模块"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "已移除"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "例外"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (%s 方法)"
-#: sphinx/domains/python.py:503
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "静态方法"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "模块"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "已移除"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (模块)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "模块"
@@ -371,7 +382,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "索引"
@@ -383,12 +394,12 @@ msgstr "模块索引"
msgid "Search Page"
msgstr "搜索页面"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -406,104 +417,104 @@ msgstr "(最初的入口位于%s 的第%d行"
msgid "original entry"
msgstr ""
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "模块"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "注意"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "警告"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "危险"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "错误"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "提示"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "重要"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "注解"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr "也可以参考"
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "小技巧"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "警告"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "%s 新版功能"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "在 %s 版更改"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "%s 版后已移除"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "关键字"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "操作数"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "对象"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr "语句"
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "內置函数"
@@ -513,7 +524,7 @@ msgid "Table Of Contents"
msgstr "內容目录"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "搜索"
@@ -641,13 +652,13 @@ msgstr "下一个主题"
msgid "next chapter"
msgstr "下一章"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr ""
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -655,16 +666,16 @@ msgid ""
" containing fewer words won't appear in the result list."
msgstr "在这儿,你可以对这些文档进行搜索。向搜索框中输入你所要搜索的关键字并点击\"搜索\"。注意:搜索引擎会自动搜索所有的关键字。将不会搜索到部分关键字的页面."
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "搜索"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "搜索结果"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr "你的搜索没有找到任何的结果."
@@ -704,12 +715,12 @@ msgstr "C API 更改"
msgid "Other changes"
msgstr "其他更改"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr "永久链接至标题"
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr "永久链接至目标"
@@ -717,25 +728,25 @@ msgstr "永久链接至目标"
msgid "Hide Search Matches"
msgstr "隐藏搜索结果"
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "搜索中"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "准备搜索..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ", 位于"
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
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:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "搜索完成, 找到了 %s 页匹配所搜索的关键字"
@@ -745,7 +756,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -753,19 +764,19 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "发布"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
#, fuzzy
msgid "Continued on next page"
msgstr "一页的全部索引"
@@ -773,3 +784,4 @@ msgstr "一页的全部索引"
#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[图片]"
+
diff --git a/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo b/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo
index 008ecec0..d58c16ff 100644
--- a/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo
+++ b/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo
Binary files differ
diff --git a/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po b/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po
index 33dff8ca..cb2646ce 100644
--- a/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po
+++ b/sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po
@@ -8,22 +8,22 @@ 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: 2010-05-24 23:54+0200\n"
+"PO-Revision-Date: 2010-08-26 11:45+0000\n"
"Last-Translator: Fred Lin <gasolin@gmail.com>\n"
"Language-Team: tw <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"
+"Generated-By: Babel 0.9.5\n"
-#: sphinx/environment.py:106 sphinx/writers/latex.py:184
+#: sphinx/environment.py:111 sphinx/writers/latex.py:185
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%Y 年 %m 月 %d 日"
-#: sphinx/roles.py:174
+#: sphinx/roles.py:173
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr "Python 建議文件!PEP %s"
@@ -36,67 +36,67 @@ msgstr ""
msgid "Module level"
msgstr ""
-#: sphinx/builders/html.py:266
+#: sphinx/builders/html.py:260
#, python-format
msgid "%b %d, %Y"
msgstr "%Y 年 %m 月 %d 日"
-#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
+#: sphinx/builders/html.py:279 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "總索引"
-#: sphinx/builders/html.py:285
+#: sphinx/builders/html.py:279
msgid "index"
msgstr "索引"
-#: sphinx/builders/html.py:345
+#: sphinx/builders/html.py:339
msgid "next"
msgstr "下一頁"
-#: sphinx/builders/html.py:354
+#: sphinx/builders/html.py:348
msgid "previous"
msgstr "上一頁"
-#: sphinx/builders/latex.py:151
+#: sphinx/builders/latex.py:145
msgid " (in "
msgstr ""
-#: sphinx/directives/other.py:127
+#: sphinx/directives/other.py:135
msgid "Section author: "
msgstr "Section 作者:"
-#: sphinx/directives/other.py:129
+#: sphinx/directives/other.py:137
msgid "Module author: "
msgstr "模組作者:"
-#: sphinx/directives/other.py:131
+#: sphinx/directives/other.py:139
#, fuzzy
msgid "Code author: "
msgstr "模組作者:"
-#: sphinx/directives/other.py:133
+#: sphinx/directives/other.py:141
msgid "Author: "
msgstr "作者:"
-#: sphinx/directives/other.py:238
+#: sphinx/directives/other.py:213
msgid "See also"
msgstr ""
-#: sphinx/domains/__init__.py:253
+#: sphinx/domains/__init__.py:242
#, python-format
msgid "%s %s"
msgstr ""
-#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
+#: sphinx/domains/c.py:51 sphinx/domains/python.py:94
msgid "Parameters"
msgstr "參數"
-#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
-#: sphinx/domains/python.py:59
+#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:127
+#: sphinx/domains/python.py:104
msgid "Returns"
msgstr "返回"
-#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
+#: sphinx/domains/c.py:56 sphinx/domains/python.py:106
msgid "Return type"
msgstr "返回類別"
@@ -125,13 +125,12 @@ msgstr "%s (C 類別)"
msgid "%s (C variable)"
msgstr "%s (C 變數)"
-#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
-#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
-#, python-format
+#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1039
+#: sphinx/domains/javascript.py:161 sphinx/domains/python.py:523
msgid "function"
msgstr "函式"
-#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
+#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1040
msgid "member"
msgstr "成員"
@@ -139,7 +138,7 @@ msgstr "成員"
msgid "macro"
msgstr "巨集"
-#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
+#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1041
msgid "type"
msgstr "類別"
@@ -148,192 +147,201 @@ msgstr "類別"
msgid "variable"
msgstr "變數"
-#: sphinx/domains/cpp.py:876
+#: sphinx/domains/cpp.py:883
#, fuzzy, python-format
msgid "%s (C++ class)"
msgstr "%s (內建類別)"
-#: sphinx/domains/cpp.py:891
+#: sphinx/domains/cpp.py:898
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++ 類別)"
-#: sphinx/domains/cpp.py:910
+#: sphinx/domains/cpp.py:917
#, python-format
msgid "%s (C++ member)"
msgstr "%s (C++ 成員)"
-#: sphinx/domains/cpp.py:962
+#: sphinx/domains/cpp.py:969
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++ 函式)"
-#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
+#: sphinx/domains/cpp.py:1038 sphinx/domains/javascript.py:162
+#: sphinx/domains/python.py:525
msgid "class"
msgstr ""
-#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
+#: sphinx/domains/javascript.py:105 sphinx/domains/python.py:244
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (內建函式)"
-#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
+#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s 方法)"
-#: sphinx/domains/javascript.py:120
+#: sphinx/domains/javascript.py:108
+#, fuzzy, python-format
+msgid "%s() (class)"
+msgstr "%s (內建類別)"
+
+#: sphinx/domains/javascript.py:110
#, python-format
msgid "%s (global variable or constant)"
msgstr ""
-#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
+#: sphinx/domains/javascript.py:112 sphinx/domains/python.py:346
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s 屬性)"
-#: sphinx/domains/javascript.py:131
+#: sphinx/domains/javascript.py:121
#, fuzzy
msgid "Arguments"
msgstr "參數"
-#: sphinx/domains/javascript.py:134
+#: sphinx/domains/javascript.py:124
msgid "Throws"
msgstr ""
-#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
+#: sphinx/domains/javascript.py:163 sphinx/domains/python.py:524
msgid "data"
msgstr ""
-#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
-#, python-format
+#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:530
msgid "attribute"
msgstr "屬性"
-#: sphinx/domains/python.py:53
+#: sphinx/domains/python.py:98
#, fuzzy
msgid "Variables"
msgstr "變數"
-#: sphinx/domains/python.py:56
+#: sphinx/domains/python.py:101
msgid "Raises"
msgstr ""
-#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
-#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
+#: sphinx/domains/python.py:245 sphinx/domains/python.py:302
+#: sphinx/domains/python.py:314 sphinx/domains/python.py:327
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (在 %s 模組中)"
-#: sphinx/domains/python.py:225
+#: sphinx/domains/python.py:248
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (內建變數)"
-#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
+#: sphinx/domains/python.py:249 sphinx/domains/python.py:340
#, python-format
msgid "%s (in module %s)"
msgstr "%s() (在 %s 模組中)"
-#: sphinx/domains/python.py:242
+#: sphinx/domains/python.py:265
#, python-format
msgid "%s (built-in class)"
msgstr "%s (內建類別)"
-#: sphinx/domains/python.py:243
+#: sphinx/domains/python.py:266
#, python-format
msgid "%s (class in %s)"
msgstr ""
-#: sphinx/domains/python.py:283
+#: sphinx/domains/python.py:306
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s 方法)"
-#: sphinx/domains/python.py:295
+#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s 靜態方法)"
-#: sphinx/domains/python.py:298
+#: sphinx/domains/python.py:321
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s 靜態方法)"
-#: sphinx/domains/python.py:308
+#: sphinx/domains/python.py:331
#, fuzzy, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s 方法)"
-#: sphinx/domains/python.py:311
+#: sphinx/domains/python.py:334
#, fuzzy, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s 方法)"
-#: sphinx/domains/python.py:321
+#: sphinx/domains/python.py:344
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s 屬性)"
-#: sphinx/domains/python.py:366
+#: sphinx/domains/python.py:392
msgid "Platforms: "
msgstr "平台"
-#: sphinx/domains/python.py:372
+#: sphinx/domains/python.py:398
#, python-format
msgid "%s (module)"
msgstr "%s (模組)"
-#: sphinx/domains/python.py:429
+#: sphinx/domains/python.py:455
#, fuzzy
msgid "Python Module Index"
msgstr "模組索引"
-#: sphinx/domains/python.py:430
+#: sphinx/domains/python.py:456
msgid "modules"
msgstr "模組"
-#: sphinx/domains/python.py:475
+#: sphinx/domains/python.py:501
msgid "Deprecated"
msgstr "已移除"
-#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
+#: sphinx/domains/python.py:526 sphinx/locale/__init__.py:178
msgid "exception"
msgstr "例外"
-#: sphinx/domains/python.py:501
+#: sphinx/domains/python.py:527
msgid "method"
msgstr ""
-#: sphinx/domains/python.py:502
-#, fuzzy, python-format
+#: sphinx/domains/python.py:528
+#, fuzzy
msgid "class method"
msgstr "%s() (%s 方法)"
-#: sphinx/domains/python.py:503
-#, python-format
+#: sphinx/domains/python.py:529
msgid "static method"
msgstr "靜態方法"
-#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
+#: sphinx/domains/python.py:531 sphinx/locale/__init__.py:174
msgid "module"
msgstr "模組"
-#: sphinx/domains/rst.py:53
+#: sphinx/domains/python.py:657
+#, fuzzy
+msgid " (deprecated)"
+msgstr "已移除"
+
+#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (directive)"
msgstr ""
-#: sphinx/domains/rst.py:55
+#: sphinx/domains/rst.py:57
#, fuzzy, python-format
msgid "%s (role)"
msgstr "%s (模組)"
-#: sphinx/domains/rst.py:103
+#: sphinx/domains/rst.py:106
msgid "directive"
msgstr ""
-#: sphinx/domains/rst.py:104
+#: sphinx/domains/rst.py:107
#, fuzzy
msgid "role"
msgstr "模組"
@@ -373,7 +381,7 @@ msgstr ""
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:11 sphinx/themes/basic/genindex.html:14
#: sphinx/themes/basic/genindex.html:50 sphinx/themes/basic/layout.html:125
-#: sphinx/writers/latex.py:173
+#: sphinx/writers/latex.py:174
msgid "Index"
msgstr "索引"
@@ -385,12 +393,12 @@ msgstr "模組索引"
msgid "Search Page"
msgstr "搜尋頁面"
-#: sphinx/ext/autodoc.py:917
+#: sphinx/ext/autodoc.py:923
#, python-format
msgid " Bases: %s"
msgstr ""
-#: sphinx/ext/autodoc.py:950
+#: sphinx/ext/autodoc.py:959
#, python-format
msgid "alias of :class:`%s`"
msgstr ""
@@ -408,104 +416,104 @@ msgstr ""
msgid "original entry"
msgstr ""
-#: sphinx/ext/viewcode.py:66
+#: sphinx/ext/viewcode.py:70
msgid "[source]"
msgstr ""
-#: sphinx/ext/viewcode.py:109
+#: sphinx/ext/viewcode.py:117
msgid "[docs]"
msgstr ""
-#: sphinx/ext/viewcode.py:123
+#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "模組"
-#: sphinx/ext/viewcode.py:129
+#: sphinx/ext/viewcode.py:137
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr ""
-#: sphinx/ext/viewcode.py:156
+#: sphinx/ext/viewcode.py:164
msgid "Overview: module code"
msgstr ""
-#: sphinx/ext/viewcode.py:157
+#: sphinx/ext/viewcode.py:165
msgid "<h1>All modules for which code is available</h1>"
msgstr ""
-#: sphinx/locale/__init__.py:139
+#: sphinx/locale/__init__.py:155
msgid "Attention"
msgstr "注意"
-#: sphinx/locale/__init__.py:140
+#: sphinx/locale/__init__.py:156
msgid "Caution"
msgstr "警示"
-#: sphinx/locale/__init__.py:141
+#: sphinx/locale/__init__.py:157
msgid "Danger"
msgstr "危險"
-#: sphinx/locale/__init__.py:142
+#: sphinx/locale/__init__.py:158
msgid "Error"
msgstr "錯誤"
-#: sphinx/locale/__init__.py:143
+#: sphinx/locale/__init__.py:159
msgid "Hint"
msgstr "提示"
-#: sphinx/locale/__init__.py:144
+#: sphinx/locale/__init__.py:160
msgid "Important"
msgstr "重要"
-#: sphinx/locale/__init__.py:145
+#: sphinx/locale/__init__.py:161
msgid "Note"
msgstr "註解"
-#: sphinx/locale/__init__.py:146
+#: sphinx/locale/__init__.py:162
msgid "See Also"
msgstr ""
-#: sphinx/locale/__init__.py:147
+#: sphinx/locale/__init__.py:163
msgid "Tip"
msgstr "小技巧"
-#: sphinx/locale/__init__.py:148
+#: sphinx/locale/__init__.py:164
msgid "Warning"
msgstr "警告"
-#: sphinx/locale/__init__.py:152
+#: sphinx/locale/__init__.py:168
#, python-format
msgid "New in version %s"
msgstr "%s 版新功能"
-#: sphinx/locale/__init__.py:153
+#: sphinx/locale/__init__.py:169
#, python-format
msgid "Changed in version %s"
msgstr "在 %s 版改變"
-#: sphinx/locale/__init__.py:154
+#: sphinx/locale/__init__.py:170
#, python-format
msgid "Deprecated since version %s"
msgstr "%s 版後已移除"
-#: sphinx/locale/__init__.py:159
+#: sphinx/locale/__init__.py:175
msgid "keyword"
msgstr "關鍵字"
-#: sphinx/locale/__init__.py:160
+#: sphinx/locale/__init__.py:176
msgid "operator"
msgstr "運算子"
-#: sphinx/locale/__init__.py:161
+#: sphinx/locale/__init__.py:177
msgid "object"
msgstr "物件"
-#: sphinx/locale/__init__.py:163
+#: sphinx/locale/__init__.py:179
msgid "statement"
msgstr ""
-#: sphinx/locale/__init__.py:164
+#: sphinx/locale/__init__.py:180
msgid "built-in function"
msgstr "內建函式"
@@ -515,7 +523,7 @@ msgid "Table Of Contents"
msgstr "內容目錄"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
-#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
+#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
msgid "Search"
msgstr "搜尋"
@@ -644,13 +652,13 @@ msgstr "下一個主題"
msgid "next chapter"
msgstr "下一章"
-#: sphinx/themes/basic/search.html:18
+#: sphinx/themes/basic/search.html:24
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr ""
-#: sphinx/themes/basic/search.html:23
+#: sphinx/themes/basic/search.html:29
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"
@@ -658,16 +666,16 @@ msgid ""
" containing fewer words won't appear in the result list."
msgstr ""
-#: sphinx/themes/basic/search.html:30
+#: sphinx/themes/basic/search.html:36
msgid "search"
msgstr "搜尋"
-#: sphinx/themes/basic/search.html:34
-#: sphinx/themes/basic/static/searchtools.js:489
+#: sphinx/themes/basic/search.html:40
+#: sphinx/themes/basic/static/searchtools.js:504
msgid "Search Results"
msgstr "搜尋結果"
-#: sphinx/themes/basic/search.html:36
+#: sphinx/themes/basic/search.html:42
msgid "Your search did not match any results."
msgstr ""
@@ -707,12 +715,12 @@ msgstr "C API 改變"
msgid "Other changes"
msgstr "其他改變:"
-#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
-#: sphinx/writers/html.py:487
+#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:491
+#: sphinx/writers/html.py:496
msgid "Permalink to this headline"
msgstr ""
-#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
+#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:88
msgid "Permalink to this definition"
msgstr ""
@@ -720,25 +728,25 @@ msgstr ""
msgid "Hide Search Matches"
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:285
+#: sphinx/themes/basic/static/searchtools.js:287
msgid "Searching"
msgstr "搜尋中"
-#: sphinx/themes/basic/static/searchtools.js:290
+#: sphinx/themes/basic/static/searchtools.js:292
msgid "Preparing search..."
msgstr "準備搜尋..."
-#: sphinx/themes/basic/static/searchtools.js:364
+#: sphinx/themes/basic/static/searchtools.js:366
msgid ", in "
msgstr ""
-#: sphinx/themes/basic/static/searchtools.js:491
+#: sphinx/themes/basic/static/searchtools.js:506
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:493
+#: sphinx/themes/basic/static/searchtools.js:508
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr ""
@@ -748,7 +756,7 @@ msgid "Expand sidebar"
msgstr ""
#: sphinx/themes/default/static/sidebar.js:79
-#: sphinx/themes/default/static/sidebar.js:106
+#: sphinx/themes/default/static/sidebar.js:107
msgid "Collapse sidebar"
msgstr ""
@@ -756,22 +764,23 @@ msgstr ""
msgid "Contents"
msgstr ""
-#: sphinx/writers/latex.py:171
+#: sphinx/writers/latex.py:172
msgid "Release"
msgstr "釋出"
-#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
+#: sphinx/writers/latex.py:576 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr ""
-#: sphinx/writers/latex.py:641
+#: sphinx/writers/latex.py:649
msgid "continued from previous page"
msgstr ""
-#: sphinx/writers/latex.py:646
+#: sphinx/writers/latex.py:654
msgid "Continued on next page"
msgstr ""
#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[圖片]"
+
diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py
index 2d58ffd2..e4758835 100644
--- a/sphinx/pycode/__init__.py
+++ b/sphinx/pycode/__init__.py
@@ -18,6 +18,7 @@ from sphinx.errors import PycodeError
from sphinx.pycode import nodes
from sphinx.pycode.pgen2 import driver, token, tokenize, parse, literals
from sphinx.util import get_module_source
+from sphinx.util.pycompat import next
from sphinx.util.docstrings import prepare_docstring, prepare_commentdoc
@@ -98,7 +99,8 @@ class AttrDocVisitor(nodes.NodeVisitor):
if not pnode or pnode.type not in (token.INDENT, token.DEDENT):
break
prefix = pnode.get_prefix()
- prefix = prefix.decode(self.encoding)
+ if not isinstance(prefix, unicode):
+ prefix = prefix.decode(self.encoding)
docstring = prepare_commentdoc(prefix)
self.add_docstring(node, docstring)
@@ -278,7 +280,7 @@ class ModuleAnalyzer(object):
result[fullname] = (dtype, startline, endline)
expect_indent = False
if tok in ('def', 'class'):
- name = tokeniter.next()[1]
+ name = next(tokeniter)[1]
namespace.append(name)
fullname = '.'.join(namespace)
stack.append((tok, fullname, spos[0], indent))
diff --git a/sphinx/pycode/nodes.py b/sphinx/pycode/nodes.py
index 14388f37..7adacc1d 100644
--- a/sphinx/pycode/nodes.py
+++ b/sphinx/pycode/nodes.py
@@ -29,6 +29,8 @@ class BaseNode(object):
return NotImplemented
return not self._eq(other)
+ __hash__ = None
+
def get_prev_sibling(self):
"""Return previous child in parent's children, or None."""
if self.parent is None:
diff --git a/sphinx/pycode/pgen2/literals.py b/sphinx/pycode/pgen2/literals.py
index 31900291..d4893702 100644
--- a/sphinx/pycode/pgen2/literals.py
+++ b/sphinx/pycode/pgen2/literals.py
@@ -66,7 +66,7 @@ uni_escape_re = re.compile(r"\\(\'|\"|\\|[abfnrtv]|x.{0,2}|[0-7]{1,3}|"
def evalString(s, encoding=None):
regex = escape_re
repl = escape
- if encoding:
+ if encoding and not isinstance(s, unicode):
s = s.decode(encoding)
if s.startswith('u') or s.startswith('U'):
regex = uni_escape_re
diff --git a/sphinx/pycode/pgen2/tokenize.py b/sphinx/pycode/pgen2/tokenize.py
index 4489db89..7ad9f012 100644
--- a/sphinx/pycode/pgen2/tokenize.py
+++ b/sphinx/pycode/pgen2/tokenize.py
@@ -143,7 +143,9 @@ class TokenError(Exception): pass
class StopTokenizing(Exception): pass
-def printtoken(type, token, (srow, scol), (erow, ecol), line): # for testing
+def printtoken(type, token, scell, ecell, line): # for testing
+ srow, scol = scell
+ erow, ecol = ecell
print "%d,%d-%d,%d:\t%s\t%s" % \
(srow, scol, erow, ecol, tok_name[type], repr(token))
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index c825e9be..a896fb56 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -9,8 +9,9 @@
:license: BSD, see LICENSE for details.
"""
-import sys, os, time
+import sys, os, time, re
from os import path
+from codecs import open
TERM_ENCODING = getattr(sys.stdin, 'encoding', None)
@@ -20,10 +21,23 @@ from sphinx.util.console import purple, bold, red, turquoise, \
nocolor, color_terminal
from sphinx.util import texescape
+# function to get input from terminal -- overridden by the test suite
+try:
+ # this raw_input is not converted by 2to3
+ term_input = raw_input
+except NameError:
+ term_input = input
+
PROMPT_PREFIX = '> '
-QUICKSTART_CONF = '''\
+if sys.version_info >= (3, 0):
+ # prevents that the file is checked for being written in Python 2.x syntax
+ QUICKSTART_CONF = '#!/usr/bin/env python3\n'
+else:
+ QUICKSTART_CONF = ''
+
+QUICKSTART_CONF += '''\
# -*- coding: utf-8 -*-
#
# %(project)s documentation build configuration file, created by
@@ -240,6 +254,19 @@ man_pages = [
('%(master_str)s', '%(project_manpage)s', u'%(project_doc)s',
[u'%(author_str)s'], 1)
]
+
+# -- Options for Texinfo output ------------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ ('%(master_str)s', '%(project_fn)s', u'%(project_doc)s', u'%(author_str)s',
+ '%(project_fn)s', 'One line description of project.', 'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+texinfo_appendices = []
'''
EPUB_CONFIG = '''
@@ -266,6 +293,9 @@ epub_copyright = u'%(copyright_str)s'
# A unique identification for the text.
#epub_uid = ''
+# A tuple containing the cover image and cover page html template filenames.
+#epub_cover = ()
+
# HTML files that should be inserted before the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#epub_pre_files = []
@@ -330,7 +360,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) \
$(SPHINXOPTS) %(rsrcdir)s
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp \
-epub latex latexpdf text man changes linkcheck doctest
+epub latex latexpdf text man changes linkcheck doctest gettext
help:
\t@echo "Please use \\`make <target>' where <target> is one of"
@@ -347,6 +377,9 @@ help:
\t@echo " latexpdf to make LaTeX files and run them through pdflatex"
\t@echo " text to make text files"
\t@echo " man to make manual pages"
+\t@echo " texinfo to make Texinfo files"
+\t@echo " info to make Texinfo files and run them through makeinfo"
+\t@echo " gettext to make PO message catalogs"
\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 \
@@ -433,6 +466,24 @@ man:
\t@echo
\t@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+texinfo:
+\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+\t@echo
+\t@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+\t@echo "Run \\`make' in that directory to run these through makeinfo" \\
+\t "(use \\`make info' here to do that automatically)."
+
+info:
+\t$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+\t@echo "Running Texinfo files through makeinfo..."
+\tmake -C $(BUILDDIR)/texinfo info
+\t@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+\t$(SPHINXBUILD) -b gettext $(ALLSPHINXOPTS) $(BUILDDIR)/locale
+\t@echo
+\t@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
changes:
\t$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
\t@echo
@@ -481,6 +532,8 @@ if "%%1" == "help" (
\techo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
\techo. text to make text files
\techo. man to make manual pages
+\techo. texinfo to make Texinfo files
+\techo. gettext to make PO message catalogs
\techo. changes to make an overview over all changed/added/deprecated items
\techo. linkcheck to check all external links for integrity
\techo. doctest to run all doctests embedded in the documentation if enabled
@@ -594,6 +647,22 @@ if "%%1" == "man" (
\tgoto end
)
+if "%%1" == "texinfo" (
+\t%%SPHINXBUILD%% -b texinfo %%ALLSPHINXOPTS%% %%BUILDDIR%%/texinfo
+\tif errorlevel 1 exit /b 1
+\techo.
+\techo.Build finished. The Texinfo files are in %%BUILDDIR%%/texinfo.
+\tgoto end
+)
+
+if "%%1" == "gettext" (
+\t%%SPHINXBUILD%% -b gettext %%ALLSPHINXOPTS%% %%BUILDDIR%%/locale
+\tif errorlevel 1 exit /b 1
+\techo.
+\techo.Build finished. The message catalogs are in %%BUILDDIR%%/locale.
+\tgoto end
+)
+
if "%%1" == "changes" (
\t%%SPHINXBUILD%% -b changes %%ALLSPHINXOPTS%% %%BUILDDIR%%/changes
\tif errorlevel 1 exit /b 1
@@ -671,20 +740,22 @@ def do_prompt(d, key, text, default=None, validator=nonempty):
prompt = purple(PROMPT_PREFIX + '%s [%s]: ' % (text, default))
else:
prompt = purple(PROMPT_PREFIX + text + ': ')
- x = raw_input(prompt)
+ x = term_input(prompt)
if default and not x:
x = default
- if x.decode('ascii', 'replace').encode('ascii', 'replace') != x:
- if TERM_ENCODING:
- x = x.decode(TERM_ENCODING)
- else:
- print turquoise('* Note: non-ASCII characters entered '
- 'and terminal encoding unknown -- assuming '
- 'UTF-8 or Latin-1.')
- try:
- x = x.decode('utf-8')
- except UnicodeDecodeError:
- x = x.decode('latin1')
+ if not isinstance(x, unicode):
+ # for Python 2.x, try to get a Unicode string out of it
+ if x.decode('ascii', 'replace').encode('ascii', 'replace') != x:
+ if TERM_ENCODING:
+ x = x.decode(TERM_ENCODING)
+ else:
+ print turquoise('* Note: non-ASCII characters entered '
+ 'and terminal encoding unknown -- assuming '
+ 'UTF-8 or Latin-1.')
+ try:
+ x = x.decode('utf-8')
+ except UnicodeDecodeError:
+ x = x.decode('latin1')
try:
x = validator(x)
except ValidationError, err:
@@ -694,6 +765,18 @@ def do_prompt(d, key, text, default=None, validator=nonempty):
d[key] = x
+if sys.version_info >= (3, 0):
+ # remove Unicode literal prefixes
+ _unicode_string_re = re.compile(r"[uU]('.*?')")
+ def _convert_python_source(source):
+ return _unicode_string_re.sub('\\1', source)
+
+ for f in ['QUICKSTART_CONF', 'EPUB_CONFIG', 'INTERSPHINX_CONFIG']:
+ globals()[f] = _convert_python_source(globals()[f])
+
+ del _unicode_string_re, _convert_python_source
+
+
def inner_main(args):
d = {}
texescape.init()
@@ -701,14 +784,24 @@ def inner_main(args):
if not color_terminal():
nocolor()
+ if len(args) > 3:
+ print 'Usage: sphinx-quickstart [root]'
+ sys.exit(1)
+ elif len(args) == 2:
+ d['path'] = args[1]
+
print bold('Welcome to the Sphinx %s quickstart utility.') % __version__
print '''
Please enter values for the following settings (just press Enter to
accept a default value, if one is given in brackets).'''
- print '''
+ if 'path' in d:
+ print bold('''
+Selected root path: %s''' % d['path'])
+ else:
+ print '''
Enter the root path for documentation.'''
- do_prompt(d, 'path', 'Root path for the documentation', '.', is_path)
+ do_prompt(d, 'path', 'Root path for the documentation', '.', is_path)
while path.isfile(path.join(d['path'], 'conf.py')) or \
path.isfile(path.join(d['path'], 'source', 'conf.py')):
@@ -849,28 +942,28 @@ directly.'''
if d['ext_intersphinx']:
conf_text += INTERSPHINX_CONFIG
- f = open(path.join(srcdir, 'conf.py'), 'w')
- f.write(conf_text.encode('utf-8'))
+ f = open(path.join(srcdir, 'conf.py'), 'w', encoding='utf-8')
+ f.write(conf_text)
f.close()
masterfile = path.join(srcdir, d['master'] + d['suffix'])
- f = open(masterfile, 'w')
- f.write((MASTER_FILE % d).encode('utf-8'))
+ f = open(masterfile, 'w', encoding='utf-8')
+ f.write(MASTER_FILE % d)
f.close()
if d['makefile']:
d['rsrcdir'] = d['sep'] and 'source' or '.'
d['rbuilddir'] = d['sep'] and 'build' or d['dot'] + 'build'
# use binary mode, to avoid writing \r\n on Windows
- f = open(path.join(d['path'], 'Makefile'), 'wb')
- f.write((MAKEFILE % d).encode('utf-8'))
+ f = open(path.join(d['path'], 'Makefile'), 'wb', encoding='utf-8')
+ f.write(MAKEFILE % d)
f.close()
if d['batchfile']:
d['rsrcdir'] = d['sep'] and 'source' or '.'
d['rbuilddir'] = d['sep'] and 'build' or d['dot'] + 'build'
- f = open(path.join(d['path'], 'make.bat'), 'w')
- f.write((BATCHFILE % d).encode('utf-8'))
+ f = open(path.join(d['path'], 'make.bat'), 'w', encoding='utf-8')
+ f.write(BATCHFILE % d)
f.close()
print
diff --git a/sphinx/roles.py b/sphinx/roles.py
index fd3da416..6b22d20a 100644
--- a/sphinx/roles.py
+++ b/sphinx/roles.py
@@ -18,7 +18,7 @@ from docutils.parsers.rst import roles
from sphinx import addnodes
from sphinx.locale import _
from sphinx.util import ws_re
-from sphinx.util.nodes import split_explicit_title
+from sphinx.util.nodes import split_explicit_title, process_index_entry
generic_docroles = {
@@ -139,16 +139,15 @@ class XRefRole(object):
# methods that can be overwritten
def process_link(self, env, refnode, has_explicit_title, title, target):
- """
- Called after parsing title and target text, and creating the reference
- node (given in *refnode*). This method can alter the reference node and
- must return a new (or the same) ``(title, target)`` tuple.
+ """Called after parsing title and target text, and creating the
+ reference node (given in *refnode*). This method can alter the
+ reference node and must return a new (or the same) ``(title, target)``
+ tuple.
"""
return title, ws_re.sub(' ', target)
def result_nodes(self, document, env, node, is_ref):
- """
- Called before returning the finished nodes. *node* is the reference
+ """Called before returning the finished nodes. *node* is the reference
node if one was created (*is_ref* is then true), else the content node.
This method can add other nodes and must return a ``(nodes, messages)``
tuple (the usual return value of a role function).
@@ -269,6 +268,27 @@ def abbr_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
return [addnodes.abbreviation(abbr, abbr, explanation=expl)], []
+def index_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
+ # create new reference target
+ env = inliner.document.settings.env
+ targetid = 'index-%s' % env.new_serialno('index')
+ targetnode = nodes.target('', '', ids=[targetid])
+ # split text and target in role content
+ has_explicit_title, title, target = split_explicit_title(text)
+ title = utils.unescape(title)
+ target = utils.unescape(target)
+ # if an explicit target is given, we can process it as a full entry
+ if has_explicit_title:
+ entries = process_index_entry(target, targetid)
+ # otherwise we just create a "single" entry
+ else:
+ entries = [('single', target, targetid, target)]
+ indexnode = addnodes.index()
+ indexnode['entries'] = entries
+ textnode = nodes.Text(title, title)
+ return [indexnode, targetnode, textnode], []
+
+
specific_docroles = {
# links to download references
'download': XRefRole(nodeclass=addnodes.download_reference),
@@ -282,6 +302,7 @@ specific_docroles = {
'file': emph_literal_role,
'samp': emph_literal_role,
'abbr': abbr_role,
+ 'index': index_role,
}
for rolename, func in specific_docroles.iteritems():
diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py
index 5c705584..4cae738d 100644
--- a/sphinx/setup_command.py
+++ b/sphinx/setup_command.py
@@ -22,7 +22,8 @@ from sphinx.util.console import darkred, nocolor, color_terminal
class BuildDoc(Command):
- """Distutils command to build Sphinx documentation.
+ """
+ Distutils command to build Sphinx documentation.
The Sphinx build can then be triggered from distutils, and some Sphinx
options can be set in ``setup.py`` or ``setup.cfg`` instead of Sphinx own
diff --git a/sphinx/themes/basic/layout.html b/sphinx/themes/basic/layout.html
index 7aa03155..9fb989cb 100644
--- a/sphinx/themes/basic/layout.html
+++ b/sphinx/themes/basic/layout.html
@@ -16,7 +16,13 @@
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
(sidebars != []) %}
{%- set url_root = pathto('', 1) %}
+{# XXX necessary? #}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
+{%- if not embedded and docstitle %}
+ {%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
+{%- else %}
+ {%- set titlesuffix = "" %}
+{%- endif %}
{%- macro relbar() %}
<div class="related">
@@ -78,24 +84,7 @@
{%- endif %}
{%- endmacro %}
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
- {{ metatags }}
- {%- if not embedded and docstitle %}
- {%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
- {%- else %}
- {%- set titlesuffix = "" %}
- {%- endif %}
- {%- block htmltitle %}
- <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
- {%- endblock %}
- <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(cssfile, 1) }}" type="text/css" />
- {%- endfor %}
- {%- if not embedded %}
+{%- macro script() %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '{{ url_root }}',
@@ -108,6 +97,26 @@
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
+{%- endmacro %}
+
+{%- macro css() %}
+ <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(cssfile, 1) }}" type="text/css" />
+ {%- endfor %}
+{%- endmacro %}
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
+ {{ metatags }}
+ {%- block htmltitle %}
+ <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
+ {%- endblock %}
+ {{ css() }}
+ {%- if not embedded %}
+ {{ script() }}
{%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
diff --git a/sphinx/themes/basic/searchresults.html b/sphinx/themes/basic/searchresults.html
new file mode 100644
index 00000000..667abffd
--- /dev/null
+++ b/sphinx/themes/basic/searchresults.html
@@ -0,0 +1,36 @@
+{#
+ basic/searchresults.html
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Template for the body of the search results page.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+#}
+<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".
+</p>
+<form action="" method="get">
+ <input type="text" name="q" value="" />
+ <input type="submit" value="search" />
+ <span id="search-progress" style="padding-left: 10px"></span>
+</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 class="search">
+ {% for href, caption, context in search_results %}
+ <li><a href="{{ docroot }}{{ href }}/?highlight={{ q }}">{{ caption }}</a>
+ <div class="context">{{ context|e }}</div>
+ </li>
+ {% endfor %}
+ </ul>
+ {%- endif %}
+</div>
diff --git a/sphinx/themes/basic/static/ajax-loader.gif b/sphinx/themes/basic/static/ajax-loader.gif
new file mode 100644
index 00000000..61faf8ca
--- /dev/null
+++ b/sphinx/themes/basic/static/ajax-loader.gif
Binary files differ
diff --git a/sphinx/themes/basic/static/comment-bright.png b/sphinx/themes/basic/static/comment-bright.png
new file mode 100644
index 00000000..551517b8
--- /dev/null
+++ b/sphinx/themes/basic/static/comment-bright.png
Binary files differ
diff --git a/sphinx/themes/basic/static/comment-close.png b/sphinx/themes/basic/static/comment-close.png
new file mode 100644
index 00000000..09b54be4
--- /dev/null
+++ b/sphinx/themes/basic/static/comment-close.png
Binary files differ
diff --git a/sphinx/themes/basic/static/comment.png b/sphinx/themes/basic/static/comment.png
new file mode 100644
index 00000000..92feb52b
--- /dev/null
+++ b/sphinx/themes/basic/static/comment.png
Binary files differ
diff --git a/sphinx/themes/basic/static/down-pressed.png b/sphinx/themes/basic/static/down-pressed.png
new file mode 100644
index 00000000..6f7ad782
--- /dev/null
+++ b/sphinx/themes/basic/static/down-pressed.png
Binary files differ
diff --git a/sphinx/themes/basic/static/down.png b/sphinx/themes/basic/static/down.png
new file mode 100644
index 00000000..3003a887
--- /dev/null
+++ b/sphinx/themes/basic/static/down.png
Binary files differ
diff --git a/sphinx/themes/basic/static/up-pressed.png b/sphinx/themes/basic/static/up-pressed.png
new file mode 100644
index 00000000..8bd587af
--- /dev/null
+++ b/sphinx/themes/basic/static/up-pressed.png
Binary files differ
diff --git a/sphinx/themes/basic/static/up.png b/sphinx/themes/basic/static/up.png
new file mode 100644
index 00000000..b9462568
--- /dev/null
+++ b/sphinx/themes/basic/static/up.png
Binary files differ
diff --git a/sphinx/themes/basic/static/websupport.js b/sphinx/themes/basic/static/websupport.js
new file mode 100644
index 00000000..cbb60923
--- /dev/null
+++ b/sphinx/themes/basic/static/websupport.js
@@ -0,0 +1,808 @@
+/*
+ * websupport.js
+ * ~~~~~~~~~~~~~
+ *
+ * sphinx.websupport utilties for all documentation.
+ *
+ * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+(function($) {
+ $.fn.autogrow = function() {
+ return this.each(function() {
+ var textarea = this;
+
+ $.fn.autogrow.resize(textarea);
+
+ $(textarea)
+ .focus(function() {
+ textarea.interval = setInterval(function() {
+ $.fn.autogrow.resize(textarea);
+ }, 500);
+ })
+ .blur(function() {
+ clearInterval(textarea.interval);
+ });
+ });
+ };
+
+ $.fn.autogrow.resize = function(textarea) {
+ var lineHeight = parseInt($(textarea).css('line-height'), 10);
+ var lines = textarea.value.split('\n');
+ var columns = textarea.cols;
+ var lineCount = 0;
+ $.each(lines, function() {
+ lineCount += Math.ceil(this.length / columns) || 1;
+ });
+ var height = lineHeight * (lineCount + 1);
+ $(textarea).css('height', height);
+ };
+})(jQuery);
+
+(function($) {
+ var comp, by;
+
+ function init() {
+ initEvents();
+ initComparator();
+ }
+
+ function initEvents() {
+ $('a.comment-close').live("click", function(event) {
+ event.preventDefault();
+ hide($(this).attr('id').substring(2));
+ });
+ $('a.vote').live("click", function(event) {
+ event.preventDefault();
+ handleVote($(this));
+ });
+ $('a.reply').live("click", function(event) {
+ event.preventDefault();
+ openReply($(this).attr('id').substring(2));
+ });
+ $('a.close-reply').live("click", function(event) {
+ event.preventDefault();
+ closeReply($(this).attr('id').substring(2));
+ });
+ $('a.sort-option').live("click", function(event) {
+ event.preventDefault();
+ handleReSort($(this));
+ });
+ $('a.show-proposal').live("click", function(event) {
+ event.preventDefault();
+ showProposal($(this).attr('id').substring(2));
+ });
+ $('a.hide-proposal').live("click", function(event) {
+ event.preventDefault();
+ hideProposal($(this).attr('id').substring(2));
+ });
+ $('a.show-propose-change').live("click", function(event) {
+ event.preventDefault();
+ showProposeChange($(this).attr('id').substring(2));
+ });
+ $('a.hide-propose-change').live("click", function(event) {
+ event.preventDefault();
+ hideProposeChange($(this).attr('id').substring(2));
+ });
+ $('a.accept-comment').live("click", function(event) {
+ event.preventDefault();
+ acceptComment($(this).attr('id').substring(2));
+ });
+ $('a.delete-comment').live("click", function(event) {
+ event.preventDefault();
+ deleteComment($(this).attr('id').substring(2));
+ });
+ $('a.comment-markup').live("click", function(event) {
+ event.preventDefault();
+ toggleCommentMarkupBox($(this).attr('id').substring(2));
+ });
+ }
+
+ /**
+ * Set comp, which is a comparator function used for sorting and
+ * inserting comments into the list.
+ */
+ function setComparator() {
+ // If the first three letters are "asc", sort in ascending order
+ // and remove the prefix.
+ if (by.substring(0,3) == 'asc') {
+ var i = by.substring(3);
+ comp = function(a, b) { return a[i] - b[i]; };
+ } else {
+ // Otherwise sort in descending order.
+ comp = function(a, b) { return b[by] - a[by]; };
+ }
+
+ // Reset link styles and format the selected sort option.
+ $('a.sel').attr('href', '#').removeClass('sel');
+ $('a.by' + by).removeAttr('href').addClass('sel');
+ }
+
+ /**
+ * Create a comp function. If the user has preferences stored in
+ * the sortBy cookie, use those, otherwise use the default.
+ */
+ function initComparator() {
+ by = 'rating'; // Default to sort by rating.
+ // If the sortBy cookie is set, use that instead.
+ if (document.cookie.length > 0) {
+ var start = document.cookie.indexOf('sortBy=');
+ if (start != -1) {
+ start = start + 7;
+ var end = document.cookie.indexOf(";", start);
+ if (end == -1) {
+ end = document.cookie.length;
+ by = unescape(document.cookie.substring(start, end));
+ }
+ }
+ }
+ setComparator();
+ }
+
+ /**
+ * Show a comment div.
+ */
+ function show(id) {
+ $('#ao' + id).hide();
+ $('#ah' + id).show();
+ var context = $.extend({id: id}, opts);
+ var popup = $(renderTemplate(popupTemplate, context)).hide();
+ popup.find('textarea[name="proposal"]').hide();
+ popup.find('a.by' + by).addClass('sel');
+ var form = popup.find('#cf' + id);
+ form.submit(function(event) {
+ event.preventDefault();
+ addComment(form);
+ });
+ $('#s' + id).after(popup);
+ popup.slideDown('fast', function() {
+ getComments(id);
+ });
+ }
+
+ /**
+ * Hide a comment div.
+ */
+ function hide(id) {
+ $('#ah' + id).hide();
+ $('#ao' + id).show();
+ var div = $('#sc' + id);
+ div.slideUp('fast', function() {
+ div.remove();
+ });
+ }
+
+ /**
+ * Perform an ajax request to get comments for a node
+ * and insert the comments into the comments tree.
+ */
+ function getComments(id) {
+ $.ajax({
+ type: 'GET',
+ url: opts.getCommentsURL,
+ data: {node: id},
+ success: function(data, textStatus, request) {
+ var ul = $('#cl' + id);
+ var speed = 100;
+ $('#cf' + id)
+ .find('textarea[name="proposal"]')
+ .data('source', data.source);
+
+ if (data.comments.length === 0) {
+ ul.html('<li>No comments yet.</li>');
+ ul.data('empty', true);
+ } else {
+ // If there are comments, sort them and put them in the list.
+ var comments = sortComments(data.comments);
+ speed = data.comments.length * 100;
+ appendComments(comments, ul);
+ ul.data('empty', false);
+ }
+ $('#cn' + id).slideUp(speed + 200);
+ ul.slideDown(speed);
+ },
+ error: function(request, textStatus, error) {
+ showError('Oops, there was a problem retrieving the comments.');
+ },
+ dataType: 'json'
+ });
+ }
+
+ /**
+ * Add a comment via ajax and insert the comment into the comment tree.
+ */
+ function addComment(form) {
+ var node_id = form.find('input[name="node"]').val();
+ var parent_id = form.find('input[name="parent"]').val();
+ var text = form.find('textarea[name="comment"]').val();
+ var proposal = form.find('textarea[name="proposal"]').val();
+
+ if (text == '') {
+ showError('Please enter a comment.');
+ return;
+ }
+
+ // Disable the form that is being submitted.
+ form.find('textarea,input').attr('disabled', 'disabled');
+
+ // Send the comment to the server.
+ $.ajax({
+ type: "POST",
+ url: opts.addCommentURL,
+ dataType: 'json',
+ data: {
+ node: node_id,
+ parent: parent_id,
+ text: text,
+ proposal: proposal
+ },
+ success: function(data, textStatus, error) {
+ // Reset the form.
+ if (node_id) {
+ hideProposeChange(node_id);
+ }
+ form.find('textarea')
+ .val('')
+ .add(form.find('input'))
+ .removeAttr('disabled');
+ var ul = $('#cl' + (node_id || parent_id));
+ if (ul.data('empty')) {
+ $(ul).empty();
+ ul.data('empty', false);
+ }
+ insertComment(data.comment);
+ var ao = $('#ao' + node_id);
+ ao.find('img').attr({'src': opts.commentBrightImage});
+ if (node_id) {
+ // if this was a "root" comment, remove the commenting box
+ // (the user can get it back by reopening the comment popup)
+ $('#ca' + node_id).slideUp();
+ }
+ },
+ error: function(request, textStatus, error) {
+ form.find('textarea,input').removeAttr('disabled');
+ showError('Oops, there was a problem adding the comment.');
+ }
+ });
+ }
+
+ /**
+ * Recursively append comments to the main comment list and children
+ * lists, creating the comment tree.
+ */
+ function appendComments(comments, ul) {
+ $.each(comments, function() {
+ var div = createCommentDiv(this);
+ ul.append($(document.createElement('li')).html(div));
+ appendComments(this.children, div.find('ul.comment-children'));
+ // To avoid stagnating data, don't store the comments children in data.
+ this.children = null;
+ div.data('comment', this);
+ });
+ }
+
+ /**
+ * After adding a new comment, it must be inserted in the correct
+ * location in the comment tree.
+ */
+ function insertComment(comment) {
+ var div = createCommentDiv(comment);
+
+ // To avoid stagnating data, don't store the comments children in data.
+ comment.children = null;
+ div.data('comment', comment);
+
+ var ul = $('#cl' + (comment.node || comment.parent));
+ var siblings = getChildren(ul);
+
+ var li = $(document.createElement('li'));
+ li.hide();
+
+ // Determine where in the parents children list to insert this comment.
+ for(i=0; i < siblings.length; i++) {
+ if (comp(comment, siblings[i]) <= 0) {
+ $('#cd' + siblings[i].id)
+ .parent()
+ .before(li.html(div));
+ li.slideDown('fast');
+ return;
+ }
+ }
+
+ // If we get here, this comment rates lower than all the others,
+ // or it is the only comment in the list.
+ ul.append(li.html(div));
+ li.slideDown('fast');
+ }
+
+ function acceptComment(id) {
+ $.ajax({
+ type: 'POST',
+ url: opts.acceptCommentURL,
+ data: {id: id},
+ success: function(data, textStatus, request) {
+ $('#cm' + id).fadeOut('fast');
+ $('#cd' + id).removeClass('moderate');
+ },
+ error: function(request, textStatus, error) {
+ showError('Oops, there was a problem accepting the comment.');
+ }
+ });
+ }
+
+ function deleteComment(id) {
+ $.ajax({
+ type: 'POST',
+ url: opts.deleteCommentURL,
+ data: {id: id},
+ success: function(data, textStatus, request) {
+ var div = $('#cd' + id);
+ if (data == 'delete') {
+ // Moderator mode: remove the comment and all children immediately
+ div.slideUp('fast', function() {
+ div.remove();
+ });
+ return;
+ }
+ // User mode: only mark the comment as deleted
+ div
+ .find('span.user-id:first')
+ .text('[deleted]').end()
+ .find('div.comment-text:first')
+ .text('[deleted]').end()
+ .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
+ ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
+ .remove();
+ var comment = div.data('comment');
+ comment.username = '[deleted]';
+ comment.text = '[deleted]';
+ div.data('comment', comment);
+ },
+ error: function(request, textStatus, error) {
+ showError('Oops, there was a problem deleting the comment.');
+ }
+ });
+ }
+
+ function showProposal(id) {
+ $('#sp' + id).hide();
+ $('#hp' + id).show();
+ $('#pr' + id).slideDown('fast');
+ }
+
+ function hideProposal(id) {
+ $('#hp' + id).hide();
+ $('#sp' + id).show();
+ $('#pr' + id).slideUp('fast');
+ }
+
+ function showProposeChange(id) {
+ $('#pc' + id).hide();
+ $('#hc' + id).show();
+ var textarea = $('#pt' + id);
+ textarea.val(textarea.data('source'));
+ $.fn.autogrow.resize(textarea[0]);
+ textarea.slideDown('fast');
+ }
+
+ function hideProposeChange(id) {
+ $('#hc' + id).hide();
+ $('#pc' + id).show();
+ var textarea = $('#pt' + id);
+ textarea.val('').removeAttr('disabled');
+ textarea.slideUp('fast');
+ }
+
+ function toggleCommentMarkupBox(id) {
+ $('#mb' + id).toggle();
+ }
+
+ /** Handle when the user clicks on a sort by link. */
+ function handleReSort(link) {
+ var classes = link.attr('class').split(/\s+/);
+ for (var i=0; i<classes.length; i++) {
+ if (classes[i] != 'sort-option') {
+ by = classes[i].substring(2);
+ }
+ }
+ setComparator();
+ // Save/update the sortBy cookie.
+ var expiration = new Date();
+ expiration.setDate(expiration.getDate() + 365);
+ document.cookie= 'sortBy=' + escape(by) +
+ ';expires=' + expiration.toUTCString();
+ $('ul.comment-ul').each(function(index, ul) {
+ var comments = getChildren($(ul), true);
+ comments = sortComments(comments);
+ appendComments(comments, $(ul).empty());
+ });
+ }
+
+ /**
+ * Function to process a vote when a user clicks an arrow.
+ */
+ function handleVote(link) {
+ if (!opts.voting) {
+ showError("You'll need to login to vote.");
+ return;
+ }
+
+ var id = link.attr('id');
+ if (!id) {
+ // Didn't click on one of the voting arrows.
+ return;
+ }
+ // If it is an unvote, the new vote value is 0,
+ // Otherwise it's 1 for an upvote, or -1 for a downvote.
+ var value = 0;
+ if (id.charAt(1) != 'u') {
+ value = id.charAt(0) == 'u' ? 1 : -1;
+ }
+ // The data to be sent to the server.
+ var d = {
+ comment_id: id.substring(2),
+ value: value
+ };
+
+ // Swap the vote and unvote links.
+ link.hide();
+ $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
+ .show();
+
+ // The div the comment is displayed in.
+ var div = $('div#cd' + d.comment_id);
+ var data = div.data('comment');
+
+ // If this is not an unvote, and the other vote arrow has
+ // already been pressed, unpress it.
+ if ((d.value !== 0) && (data.vote === d.value * -1)) {
+ $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
+ $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
+ }
+
+ // Update the comments rating in the local data.
+ data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
+ data.vote = d.value;
+ div.data('comment', data);
+
+ // Change the rating text.
+ div.find('.rating:first')
+ .text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
+
+ // Send the vote information to the server.
+ $.ajax({
+ type: "POST",
+ url: opts.processVoteURL,
+ data: d,
+ error: function(request, textStatus, error) {
+ showError('Oops, there was a problem casting that vote.');
+ }
+ });
+ }
+
+ /**
+ * Open a reply form used to reply to an existing comment.
+ */
+ function openReply(id) {
+ // Swap out the reply link for the hide link
+ $('#rl' + id).hide();
+ $('#cr' + id).show();
+
+ // Add the reply li to the children ul.
+ var div = $(renderTemplate(replyTemplate, {id: id})).hide();
+ $('#cl' + id)
+ .prepend(div)
+ // Setup the submit handler for the reply form.
+ .find('#rf' + id)
+ .submit(function(event) {
+ event.preventDefault();
+ addComment($('#rf' + id));
+ closeReply(id);
+ })
+ .find('input[type=button]')
+ .click(function() {
+ closeReply(id);
+ });
+ div.slideDown('fast', function() {
+ $('#rf' + id).find('textarea').focus();
+ });
+ }
+
+ /**
+ * Close the reply form opened with openReply.
+ */
+ function closeReply(id) {
+ // Remove the reply div from the DOM.
+ $('#rd' + id).slideUp('fast', function() {
+ $(this).remove();
+ });
+
+ // Swap out the hide link for the reply link
+ $('#cr' + id).hide();
+ $('#rl' + id).show();
+ }
+
+ /**
+ * Recursively sort a tree of comments using the comp comparator.
+ */
+ function sortComments(comments) {
+ comments.sort(comp);
+ $.each(comments, function() {
+ this.children = sortComments(this.children);
+ });
+ return comments;
+ }
+
+ /**
+ * Get the children comments from a ul. If recursive is true,
+ * recursively include childrens' children.
+ */
+ function getChildren(ul, recursive) {
+ var children = [];
+ ul.children().children("[id^='cd']")
+ .each(function() {
+ var comment = $(this).data('comment');
+ if (recursive)
+ comment.children = getChildren($(this).find('#cl' + comment.id), true);
+ children.push(comment);
+ });
+ return children;
+ }
+
+ /** Create a div to display a comment in. */
+ function createCommentDiv(comment) {
+ if (!comment.displayed && !opts.moderator) {
+ return $('<div class="moderate">Thank you! Your comment will show up '
+ + 'once it is has been approved by a moderator.</div>');
+ }
+ // Prettify the comment rating.
+ comment.pretty_rating = comment.rating + ' point' +
+ (comment.rating == 1 ? '' : 's');
+ // Make a class (for displaying not yet moderated comments differently)
+ comment.css_class = comment.displayed ? '' : ' moderate';
+ // Create a div for this comment.
+ var context = $.extend({}, opts, comment);
+ var div = $(renderTemplate(commentTemplate, context));
+
+ // If the user has voted on this comment, highblight the correct arrow.
+ if (comment.vote) {
+ var direction = (comment.vote == 1) ? 'u' : 'd';
+ div.find('#' + direction + 'v' + comment.id).hide();
+ div.find('#' + direction + 'u' + comment.id).show();
+ }
+
+ if (opts.moderator || comment.text != '[deleted]') {
+ div.find('a.reply').show();
+ if (comment.proposal_diff)
+ div.find('#sp' + comment.id).show();
+ if (opts.moderator && !comment.displayed)
+ div.find('#cm' + comment.id).show();
+ if (opts.moderator || (opts.username == comment.username))
+ div.find('#dc' + comment.id).show();
+ }
+ return div;
+ }
+
+ /**
+ * A simple template renderer. Placeholders such as <%id%> are replaced
+ * by context['id'] with items being escaped. Placeholders such as <#id#>
+ * are not escaped.
+ */
+ function renderTemplate(template, context) {
+ var esc = $(document.createElement('div'));
+
+ function handle(ph, escape) {
+ var cur = context;
+ $.each(ph.split('.'), function() {
+ cur = cur[this];
+ });
+ return escape ? esc.text(cur || "").html() : cur;
+ }
+
+ return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
+ return handle(arguments[2], arguments[1] == '%' ? true : false);
+ });
+ }
+
+ /** Flash an error message briefly. */
+ function showError(message) {
+ $(document.createElement('div')).attr({'class': 'popup-error'})
+ .append($(document.createElement('div'))
+ .attr({'class': 'error-message'}).text(message))
+ .appendTo('body')
+ .fadeIn("slow")
+ .delay(2000)
+ .fadeOut("slow");
+ }
+
+ /** Add a link the user uses to open the comments popup. */
+ $.fn.comment = function() {
+ return this.each(function() {
+ var id = $(this).attr('id').substring(1);
+ var count = COMMENT_METADATA[id];
+ var title = count + ' comment' + (count == 1 ? '' : 's');
+ var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
+ var addcls = count == 0 ? ' nocomment' : '';
+ $(this)
+ .append(
+ $(document.createElement('a')).attr({
+ href: '#',
+ 'class': 'sphinx-comment-open' + addcls,
+ id: 'ao' + id
+ })
+ .append($(document.createElement('img')).attr({
+ src: image,
+ alt: 'comment',
+ title: title
+ }))
+ .click(function(event) {
+ event.preventDefault();
+ show($(this).attr('id').substring(2));
+ })
+ )
+ .append(
+ $(document.createElement('a')).attr({
+ href: '#',
+ 'class': 'sphinx-comment-close hidden',
+ id: 'ah' + id
+ })
+ .append($(document.createElement('img')).attr({
+ src: opts.closeCommentImage,
+ alt: 'close',
+ title: 'close'
+ }))
+ .click(function(event) {
+ event.preventDefault();
+ hide($(this).attr('id').substring(2));
+ })
+ );
+ });
+ };
+
+ var opts = {
+ processVoteURL: '/_process_vote',
+ addCommentURL: '/_add_comment',
+ getCommentsURL: '/_get_comments',
+ acceptCommentURL: '/_accept_comment',
+ deleteCommentURL: '/_delete_comment',
+ commentImage: '/static/_static/comment.png',
+ closeCommentImage: '/static/_static/comment-close.png',
+ loadingImage: '/static/_static/ajax-loader.gif',
+ commentBrightImage: '/static/_static/comment-bright.png',
+ upArrow: '/static/_static/up.png',
+ downArrow: '/static/_static/down.png',
+ upArrowPressed: '/static/_static/up-pressed.png',
+ downArrowPressed: '/static/_static/down-pressed.png',
+ voting: false,
+ moderator: false
+ };
+
+ if (typeof COMMENT_OPTIONS != "undefined") {
+ opts = jQuery.extend(opts, COMMENT_OPTIONS);
+ }
+
+ var popupTemplate = '\
+ <div class="sphinx-comments" id="sc<%id%>">\
+ <p class="sort-options">\
+ Sort by:\
+ <a href="#" class="sort-option byrating">best rated</a>\
+ <a href="#" class="sort-option byascage">newest</a>\
+ <a href="#" class="sort-option byage">oldest</a>\
+ </p>\
+ <div class="comment-header">Comments</div>\
+ <div class="comment-loading" id="cn<%id%>">\
+ loading comments... <img src="<%loadingImage%>" alt="" /></div>\
+ <ul id="cl<%id%>" class="comment-ul"></ul>\
+ <div id="ca<%id%>">\
+ <p class="add-a-comment">Add a comment\
+ (<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
+ <div class="comment-markup-box" id="mb<%id%>">\
+ reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
+ <tt>``code``</tt>, \
+ code blocks: <tt>::</tt> and an indented block after blank line</div>\
+ <form method="post" id="cf<%id%>" class="comment-form" action="">\
+ <textarea name="comment" cols="80"></textarea>\
+ <p class="propose-button">\
+ <a href="#" id="pc<%id%>" class="show-propose-change">\
+ Propose a change &#9657;\
+ </a>\
+ <a href="#" id="hc<%id%>" class="hide-propose-change">\
+ Propose a change &#9663;\
+ </a>\
+ </p>\
+ <textarea name="proposal" id="pt<%id%>" cols="80"\
+ spellcheck="false"></textarea>\
+ <input type="submit" value="Add comment" />\
+ <input type="hidden" name="node" value="<%id%>" />\
+ <input type="hidden" name="parent" value="" />\
+ </form>\
+ </div>\
+ </div>';
+
+ var commentTemplate = '\
+ <div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
+ <div class="vote">\
+ <div class="arrow">\
+ <a href="#" id="uv<%id%>" class="vote" title="vote up">\
+ <img src="<%upArrow%>" />\
+ </a>\
+ <a href="#" id="uu<%id%>" class="un vote" title="vote up">\
+ <img src="<%upArrowPressed%>" />\
+ </a>\
+ </div>\
+ <div class="arrow">\
+ <a href="#" id="dv<%id%>" class="vote" title="vote down">\
+ <img src="<%downArrow%>" id="da<%id%>" />\
+ </a>\
+ <a href="#" id="du<%id%>" class="un vote" title="vote down">\
+ <img src="<%downArrowPressed%>" />\
+ </a>\
+ </div>\
+ </div>\
+ <div class="comment-content">\
+ <p class="tagline comment">\
+ <span class="user-id"><%username%></span>\
+ <span class="rating"><%pretty_rating%></span>\
+ <span class="delta"><%time.delta%></span>\
+ </p>\
+ <div class="comment-text comment"><#text#></div>\
+ <p class="comment-opts comment">\
+ <a href="#" class="reply hidden" id="rl<%id%>">reply &#9657;</a>\
+ <a href="#" class="close-reply" id="cr<%id%>">reply &#9663;</a>\
+ <a href="#" id="sp<%id%>" class="show-proposal">proposal &#9657;</a>\
+ <a href="#" id="hp<%id%>" class="hide-proposal">proposal &#9663;</a>\
+ <a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
+ <span id="cm<%id%>" class="moderation hidden">\
+ <a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
+ </span>\
+ </p>\
+ <pre class="proposal" id="pr<%id%>">\
+<#proposal_diff#>\
+ </pre>\
+ <ul class="comment-children" id="cl<%id%>"></ul>\
+ </div>\
+ <div class="clearleft"></div>\
+ </div>\
+ </div>';
+
+ var replyTemplate = '\
+ <li>\
+ <div class="reply-div" id="rd<%id%>">\
+ <form id="rf<%id%>">\
+ <textarea name="comment" cols="80"></textarea>\
+ <input type="submit" value="Add reply" />\
+ <input type="button" value="Cancel" />\
+ <input type="hidden" name="parent" value="<%id%>" />\
+ <input type="hidden" name="node" value="" />\
+ </form>\
+ </div>\
+ </li>';
+
+ $(document).ready(function() {
+ init();
+ });
+})(jQuery);
+
+$(document).ready(function() {
+ // add comment anchors for all paragraphs that are commentable
+ $('.sphinx-has-comment').comment();
+
+ // highlight search words in search results
+ $("div.context").each(function() {
+ var params = $.getQueryParameters();
+ var terms = (params.q) ? params.q[0].split(/\s+/) : [];
+ var result = $(this);
+ $.each(terms, function() {
+ result.highlightText(this.toLowerCase(), 'highlighted');
+ });
+ });
+
+ // directly open comment window if requested
+ var anchor = document.location.hash;
+ if (anchor.substring(0, 9) == '#comment-') {
+ $('#ao' + anchor.substring(9)).click();
+ document.location.hash = '#s' + anchor.substring(9);
+ }
+});
diff --git a/sphinx/themes/default/static/sidebar.js b/sphinx/themes/default/static/sidebar.js
index e9ef491c..a45e1926 100644
--- a/sphinx/themes/default/static/sidebar.js
+++ b/sphinx/themes/default/static/sidebar.js
@@ -29,6 +29,9 @@ $(function() {
var sidebar = $('.sphinxsidebar');
var sidebarwrapper = $('.sphinxsidebarwrapper');
+ // for some reason, the document has no sidebar; do not run into errors
+ if (!sidebar.length) return;
+
// original margin-left of the bodywrapper and width of the sidebar
// with the sidebar expanded
var bw_margin_expanded = bodywrapper.css('margin-left');
diff --git a/sphinx/themes/epub/epub-cover.html b/sphinx/themes/epub/epub-cover.html
new file mode 100644
index 00000000..f8088925
--- /dev/null
+++ b/sphinx/themes/epub/epub-cover.html
@@ -0,0 +1,24 @@
+{#
+ epub/epub-cover.html
+ ~~~~~~~~~~~~~~~~~~~~
+
+ Sample template for the html cover page.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+#}
+{% extends "layout.html" %}
+{%- block rootrellink %}{% endblock %}
+{%- block relbaritems %}{% endblock %}
+{%- block sidebarlogo %}{% endblock %}
+{%- block linktags %}{% endblock %}
+{%- block relbar1 %}{% endblock %}
+{%- block sidebar1 %}{% endblock %}
+{%- block sidebar2 %}{% endblock %}
+{%- block footer %}{% endblock %}
+
+{% block content %}
+ <div class="epub-cover">
+ <img src="{{ image }}" alt="Cover image" />
+ </div>
+{% endblock %}
diff --git a/sphinx/theming.py b/sphinx/theming.py
index ebc88d27..68d11a49 100644
--- a/sphinx/theming.py
+++ b/sphinx/theming.py
@@ -30,13 +30,13 @@ class Theme(object):
themes = {}
@classmethod
- def init_themes(cls, builder):
+ def init_themes(cls, confdir, theme_path, warn=None):
"""Search all theme paths for available themes."""
- cls.themepath = list(builder.config.html_theme_path)
+ cls.themepath = list(theme_path)
cls.themepath.append(path.join(package_dir, 'themes'))
for themedir in cls.themepath[::-1]:
- themedir = path.join(builder.confdir, themedir)
+ themedir = path.join(confdir, themedir)
if not path.isdir(themedir):
continue
for theme in os.listdir(themedir):
@@ -48,8 +48,9 @@ class Theme(object):
tname = theme[:-4]
tinfo = zfile
except Exception:
- builder.warn('file %r on theme path is not a valid '
- 'zipfile or contains no theme' % theme)
+ if warn:
+ warn('file %r on theme path is not a valid '
+ 'zipfile or contains no theme' % theme)
continue
else:
if not path.isfile(path.join(themedir, theme, THEMECONF)):
@@ -98,8 +99,7 @@ class Theme(object):
self.base = Theme(inherit)
def get_confstr(self, section, name, default=NODEFAULT):
- """
- Return the value for a theme configuration setting, searching the
+ """Return the value for a theme configuration setting, searching the
base theme chain.
"""
try:
@@ -114,9 +114,7 @@ class Theme(object):
return default
def get_options(self, overrides):
- """
- Return a dictionary of theme options and their values.
- """
+ """Return a dictionary of theme options and their values."""
chain = [self.themeconf]
base = self.base
while base is not None:
@@ -135,8 +133,7 @@ class Theme(object):
return options
def get_dirchain(self):
- """
- Return a list of theme directories, beginning with this theme's,
+ """Return a list of theme directories, beginning with this theme's,
then the base theme's, then that one's base theme's, etc.
"""
chain = [self.themedir]
@@ -147,9 +144,7 @@ class Theme(object):
return chain
def cleanup(self):
- """
- Remove temporary directories.
- """
+ """Remove temporary directories."""
if self.themedir_created:
try:
shutil.rmtree(self.themedir)
diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py
index 621c45ae..d51f0208 100644
--- a/sphinx/util/__init__.py
+++ b/sphinx/util/__init__.py
@@ -18,6 +18,8 @@ import tempfile
import posixpath
import traceback
from os import path
+from codecs import open
+from collections import deque
import docutils
from docutils.utils import relative_path
@@ -48,8 +50,7 @@ def docname_join(basedocname, docname):
def get_matching_files(dirname, exclude_matchers=()):
- """
- Get all file names in a directory, recursively.
+ """Get all file names in a directory, recursively.
Exclude files and dirs matching some matcher in *exclude_matchers*.
"""
@@ -75,9 +76,8 @@ def get_matching_files(dirname, exclude_matchers=()):
def get_matching_docs(dirname, suffix, exclude_matchers=()):
- """
- Get all file names (without suffix) matching a suffix in a
- directory, recursively.
+ """Get all file names (without suffix) matching a suffix in a directory,
+ recursively.
Exclude files and dirs matching a pattern in *exclude_patterns*.
"""
@@ -140,8 +140,8 @@ def copy_static_entry(source, targetdir, builder, context={},
target = path.join(targetdir, path.basename(source))
if source.lower().endswith('_t') and builder.templates:
# templated!
- fsrc = open(source, 'rb')
- fdst = open(target[:-2], 'wb')
+ fsrc = open(source, 'r', encoding='utf-8')
+ fdst = open(target[:-2], 'w', encoding='utf-8')
fdst.write(builder.templates.render_string(fsrc.read(), context))
fsrc.close()
fdst.close()
@@ -162,19 +162,24 @@ def copy_static_entry(source, targetdir, builder, context={},
shutil.copytree(source, target)
+_DEBUG_HEADER = '''\
+# Sphinx version: %s
+# Python version: %s
+# Docutils version: %s %s
+# Jinja2 version: %s
+'''
+
def save_traceback():
- """
- Save the current exception's traceback in a temporary file.
- """
+ """Save the current exception's traceback in a temporary file."""
import platform
exc = traceback.format_exc()
fd, path = tempfile.mkstemp('.log', 'sphinx-err-')
- os.write(fd, '# Sphinx version: %s\n' % sphinx.__version__)
- os.write(fd, '# Python version: %s\n' % platform.python_version())
- os.write(fd, '# Docutils version: %s %s\n' % (docutils.__version__,
- docutils.__version_details__))
- os.write(fd, '# Jinja2 version: %s\n' % jinja2.__version__)
- os.write(fd, exc)
+ os.write(fd, (_DEBUG_HEADER %
+ (sphinx.__version__,
+ platform.python_version(),
+ docutils.__version__, docutils.__version_details__,
+ jinja2.__version__)).encode('utf-8'))
+ os.write(fd, exc.encode('utf-8'))
os.close(fd)
return path
@@ -227,8 +232,7 @@ class Tee(object):
def parselinenos(spec, total):
- """
- Parse a line number spec (such as "1,2,4-6") and return a list of
+ """Parse a line number spec (such as "1,2,4-6") and return a list of
wanted line numbers.
"""
items = list()
@@ -282,9 +286,7 @@ def rpartition(s, t):
def format_exception_cut_frames(x=1):
- """
- Format an exception with traceback, but only the last x frames.
- """
+ """Format an exception with traceback, but only the last x frames."""
typ, val, tb = sys.exc_info()
#res = ['Traceback (most recent call last):\n']
res = []
@@ -292,3 +294,34 @@ def format_exception_cut_frames(x=1):
res += tbres[-x:]
res += traceback.format_exception_only(typ, val)
return ''.join(res)
+
+
+class PeekableIterator(object):
+ """
+ An iterator which wraps any iterable and makes it possible to peek to see
+ what's the next item.
+ """
+ def __init__(self, iterable):
+ self.remaining = deque()
+ self._iterator = iter(iterable)
+
+ def __iter__(self):
+ return self
+
+ def next(self):
+ """Return the next item from the iterator."""
+ if self.remaining:
+ return self.remaining.popleft()
+ return self._iterator.next()
+
+ def push(self, item):
+ """Push the `item` on the internal stack, it will be returned on the
+ next :meth:`next` call.
+ """
+ self.remaining.append(item)
+
+ def peek(self):
+ """Return the next item without changing the state of the iterator."""
+ item = self.next()
+ self.push(item)
+ return item
diff --git a/sphinx/util/docstrings.py b/sphinx/util/docstrings.py
index fca79c3f..ba81bf00 100644
--- a/sphinx/util/docstrings.py
+++ b/sphinx/util/docstrings.py
@@ -12,26 +12,29 @@
import sys
-def prepare_docstring(s):
- """
- Convert a docstring into lines of parseable reST. Return it as a list of
- lines usable for inserting into a docutils ViewList (used as argument
- of nested_parse().) An empty line is added to act as a separator between
- this docstring and following content.
+def prepare_docstring(s, ignore=1):
+ """Convert a docstring into lines of parseable reST. Remove common leading
+ indentation, where the indentation of a given number of lines (usually just
+ one) is ignored.
+
+ Return the docstring as a list of lines usable for inserting into a docutils
+ ViewList (used as argument of nested_parse().) An empty line is added to
+ act as a separator between this docstring and following content.
"""
lines = s.expandtabs().splitlines()
- # Find minimum indentation of any non-blank lines after first line.
+ # Find minimum indentation of any non-blank lines after ignored lines.
margin = sys.maxint
- for line in lines[1:]:
+ for line in lines[ignore:]:
content = len(line.lstrip())
if content:
indent = len(line) - content
margin = min(margin, indent)
- # Remove indentation.
- if lines:
- lines[0] = lines[0].lstrip()
+ # Remove indentation from ignored lines.
+ for i in range(ignore):
+ if i < len(lines):
+ lines[i] = lines[i].lstrip()
if margin < sys.maxint:
- for i in range(1, len(lines)): lines[i] = lines[i][margin:]
+ for i in range(ignore, len(lines)): lines[i] = lines[i][margin:]
# Remove any leading blank lines.
while lines and not lines[0]:
lines.pop(0)
@@ -42,9 +45,8 @@ def prepare_docstring(s):
def prepare_commentdoc(s):
- """
- Extract documentation comment lines (starting with #:) and return them as a
- list of lines. Returns an empty list if there is no documentation.
+ """Extract documentation comment lines (starting with #:) and return them
+ as a list of lines. Returns an empty list if there is no documentation.
"""
result = []
lines = [line.strip() for line in s.expandtabs().splitlines()]
diff --git a/sphinx/util/jsdump.py b/sphinx/util/jsdump.py
index a0f6d0e3..191e2419 100644
--- a/sphinx/util/jsdump.py
+++ b/sphinx/util/jsdump.py
@@ -12,6 +12,8 @@
import re
+from sphinx.util.pycompat import u
+
_str_re = re.compile(r'"(\\\\|\\"|[^"])*"')
_int_re = re.compile(r'\d+')
_name_re = re.compile(r'[a-zA-Z]\w*')
@@ -50,7 +52,7 @@ def encode_string(s):
return '"' + str(ESCAPE_ASCII.sub(replace, s)) + '"'
def decode_string(s):
- return ESCAPED.sub(lambda m: eval('u"'+m.group()+'"'), s)
+ return ESCAPED.sub(lambda m: eval(u + '"' + m.group() + '"'), s)
reswords = set("""\
diff --git a/sphinx/util/jsonimpl.py b/sphinx/util/jsonimpl.py
index b1982d9f..cf5ddb42 100644
--- a/sphinx/util/jsonimpl.py
+++ b/sphinx/util/jsonimpl.py
@@ -13,7 +13,7 @@ import UserString
try:
import json
- # json-py's json module has not JSONEncoder; this will raise AttributeError
+ # json-py's json module has no JSONEncoder; this will raise AttributeError
# if json-py is imported instead of the built-in json module
JSONEncoder = json.JSONEncoder
except (ImportError, AttributeError):
diff --git a/sphinx/util/matching.py b/sphinx/util/matching.py
index d358a2a0..fa6cb7e0 100644
--- a/sphinx/util/matching.py
+++ b/sphinx/util/matching.py
@@ -13,8 +13,7 @@ import re
def _translate_pattern(pat):
- """
- Translate a shell-style glob pattern to a regular expression.
+ """Translate a shell-style glob pattern to a regular expression.
Adapted from the fnmatch module, but enhanced so that single stars don't
match slashes.
@@ -65,16 +64,14 @@ def compile_matchers(patterns):
_pat_cache = {}
def patmatch(name, pat):
- """
- Return if name matches pat. Adapted from fnmatch module.
- """
+ """Return if name matches pat. Adapted from fnmatch module."""
if pat not in _pat_cache:
_pat_cache[pat] = re.compile(_translate_pattern(pat))
return _pat_cache[pat].match(name)
def patfilter(names, pat):
- """
- Return the subset of the list NAMES that match PAT.
+ """Return the subset of the list NAMES that match PAT.
+
Adapted from fnmatch module.
"""
if pat not in _pat_cache:
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py
index fd6a2f83..09ab8b88 100644
--- a/sphinx/util/nodes.py
+++ b/sphinx/util/nodes.py
@@ -10,11 +10,12 @@
"""
import re
-import types
from docutils import nodes
from sphinx import addnodes
+from sphinx.locale import pairindextypes
+from sphinx.util.pycompat import class_types
# \x00 means the "<" was backslash-escaped
@@ -22,7 +23,28 @@ explicit_title_re = re.compile(r'^(.+?)\s*(?<!\x00)<(.*?)>$', re.DOTALL)
caption_ref_re = explicit_title_re # b/w compat alias
+def extract_messages(doctree):
+ """Extract translatable messages from a document tree."""
+ for node in doctree.traverse(nodes.TextElement):
+ if isinstance(node, (nodes.Invisible, nodes.Inline)):
+ continue
+ # <field_name>orphan</field_name>
+ # XXX ignore all metadata (== docinfo)
+ if isinstance(node, nodes.field_name) and node.children[0] == 'orphan':
+ continue
+ msg = node.rawsource.replace('\n', ' ').strip()
+ # XXX nodes rendering empty are likely a bug in sphinx.addnodes
+ if msg:
+ yield node, msg
+
+
def nested_parse_with_titles(state, content, node):
+ """Version of state.nested_parse() that allows titles and does not require
+ titles to have the same decoration as the calling document.
+
+ This is useful when the parsed content comes from a completely different
+ context, such as docstrings.
+ """
# hack around title style bookkeeping
surrounding_title_styles = state.memo.title_styles
surrounding_section_level = state.memo.section_level
@@ -51,6 +73,37 @@ def split_explicit_title(text):
return False, text, text
+indextypes = [
+ 'single', 'pair', 'double', 'triple',
+]
+
+def process_index_entry(entry, targetid):
+ indexentries = []
+ entry = entry.strip()
+ for type in pairindextypes:
+ if entry.startswith(type+':'):
+ value = entry[len(type)+1:].strip()
+ value = pairindextypes[type] + '; ' + value
+ indexentries.append(('pair', value, targetid, value))
+ break
+ else:
+ for type in indextypes:
+ if entry.startswith(type+':'):
+ value = entry[len(type)+1:].strip()
+ if type == 'double':
+ type = 'pair'
+ indexentries.append((type, value, targetid, value))
+ break
+ # shorthand notation for single entries
+ else:
+ for value in entry.split(','):
+ value = value.strip()
+ if not value:
+ continue
+ indexentries.append(('single', value, targetid, value))
+ return indexentries
+
+
def inline_all_toctrees(builder, docnameset, docname, tree, colorfunc):
"""Inline all toctrees in the *tree*.
@@ -115,7 +168,7 @@ def _new_traverse(self, condition=None,
if include_self and descend and not siblings and not ascend:
if condition is None:
return self._all_traverse([])
- elif isinstance(condition, (types.ClassType, type)):
+ elif isinstance(condition, class_types):
return self._fast_traverse(condition, [])
return self._old_traverse(condition, include_self,
descend, siblings, ascend)
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
index 6aeb2f4f..487a5afc 100644
--- a/sphinx/util/osutil.py
+++ b/sphinx/util/osutil.py
@@ -11,6 +11,7 @@
import os
import re
+import sys
import time
import errno
import shutil
@@ -58,8 +59,8 @@ def ensuredir(path):
def walk(top, topdown=True, followlinks=False):
- """
- Backport of os.walk from 2.6, where the followlinks argument was added.
+ """Backport of os.walk from 2.6, where the *followlinks* argument was
+ added.
"""
names = os.listdir(top)
@@ -124,7 +125,10 @@ no_fn_re = re.compile(r'[^a-zA-Z0-9_-]')
def make_filename(string):
return no_fn_re.sub('', string)
-
-def ustrftime(format, *args):
- # strftime for unicode strings
- return time.strftime(unicode(format).encode('utf-8'), *args).decode('utf-8')
+if sys.version_info < (3, 0):
+ def ustrftime(format, *args):
+ # strftime for unicode strings
+ return time.strftime(unicode(format).encode('utf-8'), *args) \
+ .decode('utf-8')
+else:
+ ustrftime = time.strftime
diff --git a/sphinx/util/png.py b/sphinx/util/png.py
index 5450bccf..50c72efd 100644
--- a/sphinx/util/png.py
+++ b/sphinx/util/png.py
@@ -12,18 +12,18 @@
import struct
import binascii
+from sphinx.util.pycompat import b
+
LEN_IEND = 12
LEN_DEPTH = 22
DEPTH_CHUNK_LEN = struct.pack('!i', 10)
-DEPTH_CHUNK_START = 'tEXtDepth\x00'
-IEND_CHUNK = '\x00\x00\x00\x00IEND\xAE\x42\x60\x82'
+DEPTH_CHUNK_START = b('tEXtDepth\x00')
+IEND_CHUNK = b('\x00\x00\x00\x00IEND\xAE\x42\x60\x82')
def read_png_depth(filename):
- """
- Read the special tEXt chunk indicating the depth from a PNG file.
- """
+ """Read the special tEXt chunk indicating the depth from a PNG file."""
result = None
f = open(filename, 'rb')
try:
@@ -39,8 +39,8 @@ def read_png_depth(filename):
def write_png_depth(filename, depth):
- """
- Write the special tEXt chunk indicating the depth to a PNG file.
+ """Write the special tEXt chunk indicating the depth to a PNG file.
+
The chunk is placed immediately before the special IEND chunk.
"""
data = struct.pack('!i', depth)
diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py
index bbaf4e23..a95c9332 100644
--- a/sphinx/util/pycompat.py
+++ b/sphinx/util/pycompat.py
@@ -13,11 +13,104 @@ import sys
import codecs
import encodings
-
-try:
+# ------------------------------------------------------------------------------
+# Python 2/3 compatibility
+
+if sys.version_info >= (3, 0):
+ # Python 3
+ class_types = (type,)
+ # the ubiquitous "bytes" helper functions
+ def b(s):
+ return s.encode('utf-8')
+ bytes = bytes
+ # prefix for Unicode strings
+ u = ''
+ # support for running 2to3 over config files
+ def convert_with_2to3(filepath):
+ from lib2to3.refactor import RefactoringTool, get_fixers_from_package
+ from lib2to3.pgen2.parse import ParseError
+ fixers = get_fixers_from_package('lib2to3.fixes')
+ refactoring_tool = RefactoringTool(fixers)
+ source = refactoring_tool._read_python_source(filepath)[0]
+ try:
+ tree = refactoring_tool.refactor_string(source, 'conf.py')
+ except ParseError, err:
+ # do not propagate lib2to3 exceptions
+ lineno, offset = err.context[1]
+ # try to match ParseError details with SyntaxError details
+ raise SyntaxError(err.msg, (filepath, lineno, offset, err.value))
+ return unicode(tree)
+
+else:
+ # Python 2
+ from types import ClassType
+ class_types = (type, ClassType)
+ b = str
+ bytes = str
+ u = 'u'
+ # no need to refactor on 2.x versions
+ convert_with_2to3 = None
+
+
+# ------------------------------------------------------------------------------
+# Missing builtins and itertools in Python < 2.6
+
+if sys.version_info >= (2, 6):
+ # Python >= 2.6
+ next = next
+
+ from itertools import product
+ try:
+ from itertools import zip_longest # Python 3 name
+ except ImportError:
+ from itertools import izip_longest as zip_longest
+
+else:
+ # Python < 2.6
+ from itertools import izip, repeat, chain
+
+ # this is on Python 2, where the method is called "next" (it is refactored
+ # to __next__ by 2to3, but in that case never executed)
+ def next(iterator):
+ return iterator.next()
+
+ # These replacement functions have been taken from the Python 2.6
+ # itertools documentation.
+ def product(*args, **kwargs):
+ pools = map(tuple, args) * kwargs.get('repeat', 1)
+ result = [[]]
+ for pool in pools:
+ result = [x + [y] for x in result for y in pool]
+ for prod in result:
+ yield tuple(prod)
+
+ def zip_longest(*args, **kwds):
+ # zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-
+ fillvalue = kwds.get('fillvalue')
+ def sentinel(counter = ([fillvalue]*(len(args)-1)).pop):
+ yield counter() # yields the fillvalue, or raises IndexError
+ fillers = repeat(fillvalue)
+ iters = [chain(it, sentinel(), fillers) for it in args]
+ try:
+ for tup in izip(*iters):
+ yield tup
+ except IndexError:
+ pass
+
+
+# ------------------------------------------------------------------------------
+# Missing builtins and codecs in Python < 2.5
+
+if sys.version_info >= (2, 5):
+ # Python >= 2.5
+ base_exception = BaseException
any = any
all = all
-except NameError:
+
+else:
+ # Python 2.4
+ base_exception = Exception
+
def all(gen):
for i in gen:
if not i:
@@ -30,8 +123,6 @@ except NameError:
return True
return False
-
-if sys.version_info < (2, 5):
# Python 2.4 doesn't know the utf-8-sig encoding, so deliver it here
def my_search_function(encoding):
diff --git a/sphinx/util/websupport.py b/sphinx/util/websupport.py
new file mode 100644
index 00000000..d9b47213
--- /dev/null
+++ b/sphinx/util/websupport.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.util.websupport
+ ~~~~~~~~~~~~~~~~~~~~~~
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+def is_commentable(node):
+ #return node.__class__.__name__ in ('paragraph', 'literal_block')
+ return node.__class__.__name__ == 'paragraph'
diff --git a/sphinx/versioning.py b/sphinx/versioning.py
new file mode 100644
index 00000000..f50f80b0
--- /dev/null
+++ b/sphinx/versioning.py
@@ -0,0 +1,128 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.versioning
+ ~~~~~~~~~~~~~~~~~
+
+ Implements the low-level algorithms Sphinx uses for the versioning of
+ doctrees.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+from uuid import uuid4
+from operator import itemgetter
+from collections import defaultdict
+
+from sphinx.util.pycompat import product, zip_longest
+
+
+# anything below that ratio is considered equal/changed
+VERSIONING_RATIO = 65
+
+
+def add_uids(doctree, condition):
+ """Add a unique id to every node in the `doctree` which matches the
+ condition and yield the nodes.
+
+ :param doctree:
+ A :class:`docutils.nodes.document` instance.
+
+ :param condition:
+ A callable which returns either ``True`` or ``False`` for a given node.
+ """
+ for node in doctree.traverse(condition):
+ node.uid = uuid4().hex
+ yield node
+
+
+def merge_doctrees(old, new, condition):
+ """Merge the `old` doctree with the `new` one while looking at nodes
+ matching the `condition`.
+
+ Each node which replaces another one or has been added to the `new` doctree
+ will be yielded.
+
+ :param condition:
+ A callable which returns either ``True`` or ``False`` for a given node.
+ """
+ old_iter = old.traverse(condition)
+ new_iter = new.traverse(condition)
+ old_nodes = []
+ new_nodes = []
+ ratios = defaultdict(list)
+ seen = set()
+ # compare the nodes each doctree in order
+ for old_node, new_node in zip_longest(old_iter, new_iter):
+ if old_node is None:
+ new_nodes.append(new_node)
+ continue
+ if new_node is None:
+ old_nodes.append(old_node)
+ continue
+ ratio = get_ratio(old_node.rawsource, new_node.rawsource)
+ if ratio == 0:
+ new_node.uid = old_node.uid
+ seen.add(new_node)
+ else:
+ ratios[old_node, new_node] = ratio
+ old_nodes.append(old_node)
+ new_nodes.append(new_node)
+ # calculate the ratios for each unequal pair of nodes, should we stumble
+ # on a pair which is equal we set the uid and add it to the seen ones
+ for old_node, new_node in product(old_nodes, new_nodes):
+ if new_node in seen or (old_node, new_node) in ratios:
+ continue
+ ratio = get_ratio(old_node.rawsource, new_node.rawsource)
+ if ratio == 0:
+ new_node.uid = old_node.uid
+ seen.add(new_node)
+ else:
+ ratios[old_node, new_node] = ratio
+ # choose the old node with the best ratio for each new node and set the uid
+ # as long as the ratio is under a certain value, in which case we consider
+ # them not changed but different
+ ratios = sorted(ratios.iteritems(), key=itemgetter(1))
+ for (old_node, new_node), ratio in ratios:
+ if new_node in seen:
+ continue
+ else:
+ seen.add(new_node)
+ if ratio < VERSIONING_RATIO:
+ new_node.uid = old_node.uid
+ else:
+ new_node.uid = uuid4().hex
+ yield new_node
+ # create new uuids for any new node we left out earlier, this happens
+ # if one or more nodes are simply added.
+ for new_node in set(new_nodes) - seen:
+ new_node.uid = uuid4().hex
+ yield new_node
+
+
+def get_ratio(old, new):
+ """Return a "similiarity ratio" (in percent) representing the similarity
+ between the two strings where 0 is equal and anything above less than equal.
+ """
+ if not all([old, new]):
+ return VERSIONING_RATIO
+ return levenshtein_distance(old, new) / (len(old) / 100.0)
+
+
+def levenshtein_distance(a, b):
+ """Return the Levenshtein edit distance between two strings *a* and *b*."""
+ if a == b:
+ return 0
+ if len(a) < len(b):
+ a, b = b, a
+ if not a:
+ return len(b)
+ previous_row = xrange(len(b) + 1)
+ for i, column1 in enumerate(a):
+ current_row = [i + 1]
+ for j, column2 in enumerate(b):
+ insertions = previous_row[j + 1] + 1
+ deletions = current_row[j] + 1
+ substitutions = previous_row[j] + (column1 != column2)
+ current_row.append(min(insertions, deletions, substitutions))
+ previous_row = current_row
+ return previous_row[-1]
diff --git a/sphinx/websupport/__init__.py b/sphinx/websupport/__init__.py
new file mode 100644
index 00000000..15c619af
--- /dev/null
+++ b/sphinx/websupport/__init__.py
@@ -0,0 +1,455 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.websupport
+ ~~~~~~~~~~~~~~~~~
+
+ Base Module for web support functions.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import cgi
+import sys
+import cPickle as pickle
+import posixpath
+from os import path
+
+from jinja2 import Environment, FileSystemLoader
+
+from docutils.core import publish_parts
+
+from sphinx.application import Sphinx
+from sphinx.util.osutil import ensuredir
+from sphinx.util.jsonimpl import dumps as dump_json
+from sphinx.websupport import errors
+from sphinx.websupport.search import BaseSearch, SEARCH_ADAPTERS
+from sphinx.websupport.storage import StorageBackend
+
+
+class WebSupport(object):
+ """The main API class for the web support package. All interactions
+ with the web support package should occur through this class.
+ """
+ def __init__(self,
+ srcdir=None, # only required for building
+ builddir='', # the dir with data/static/doctrees subdirs
+ datadir=None, # defaults to builddir/data
+ staticdir=None, # defaults to builddir/static
+ doctreedir=None, # defaults to builddir/doctrees
+ search=None, # defaults to no search
+ storage=None, # defaults to SQLite in datadir
+ status=sys.stdout,
+ warning=sys.stderr,
+ moderation_callback=None,
+ allow_anonymous_comments=True,
+ docroot='',
+ staticroot='static',
+ ):
+ # directories
+ self.srcdir = srcdir
+ self.builddir = builddir
+ self.outdir = path.join(builddir, 'data')
+ self.datadir = datadir or self.outdir
+ self.staticdir = staticdir or path.join(self.builddir, 'static')
+ self.doctreedir = staticdir or path.join(self.builddir, 'doctrees')
+ # web server virtual paths
+ self.staticroot = staticroot.strip('/')
+ self.docroot = docroot.strip('/')
+
+ self.status = status
+ self.warning = warning
+ self.moderation_callback = moderation_callback
+ self.allow_anonymous_comments = allow_anonymous_comments
+
+ self._init_templating()
+ self._init_search(search)
+ self._init_storage(storage)
+
+ self._globalcontext = None
+
+ self._make_base_comment_options()
+
+ def _init_storage(self, storage):
+ if isinstance(storage, StorageBackend):
+ self.storage = storage
+ else:
+ # If a StorageBackend isn't provided, use the default
+ # SQLAlchemy backend.
+ from sphinx.websupport.storage.sqlalchemystorage \
+ import SQLAlchemyStorage
+ if not storage:
+ # no explicit DB path given; create default sqlite database
+ db_path = path.join(self.datadir, 'db', 'websupport.db')
+ ensuredir(path.dirname(db_path))
+ storage = 'sqlite:///' + db_path
+ self.storage = SQLAlchemyStorage(storage)
+
+ def _init_templating(self):
+ import sphinx
+ template_path = path.join(path.dirname(sphinx.__file__),
+ 'themes', 'basic')
+ loader = FileSystemLoader(template_path)
+ self.template_env = Environment(loader=loader)
+
+ def _init_search(self, search):
+ if isinstance(search, BaseSearch):
+ self.search = search
+ else:
+ mod, cls = SEARCH_ADAPTERS[search or 'null']
+ mod = 'sphinx.websupport.search.' + mod
+ SearchClass = getattr(__import__(mod, None, None, [cls]), cls)
+ search_path = path.join(self.datadir, 'search')
+ self.search = SearchClass(search_path)
+ self.results_template = \
+ self.template_env.get_template('searchresults.html')
+
+ def build(self):
+ """Build the documentation. Places the data into the `outdir`
+ directory. Use it like this::
+
+ support = WebSupport(srcdir, builddir, search='xapian')
+ support.build()
+
+ This will read reStructured text files from `srcdir`. Then it will
+ build the pickles and search index, placing them into `builddir`.
+ It will also save node data to the database.
+ """
+ if not self.srcdir:
+ raise RuntimeError('No srcdir associated with WebSupport object')
+ app = Sphinx(self.srcdir, self.srcdir, self.outdir, self.doctreedir,
+ 'websupport', status=self.status, warning=self.warning)
+ app.builder.set_webinfo(self.staticdir, self.staticroot,
+ self.search, self.storage)
+
+ self.storage.pre_build()
+ app.build()
+ self.storage.post_build()
+
+ def get_globalcontext(self):
+ """Load and return the "global context" pickle."""
+ if not self._globalcontext:
+ infilename = path.join(self.datadir, 'globalcontext.pickle')
+ f = open(infilename, 'rb')
+ try:
+ self._globalcontext = pickle.load(f)
+ finally:
+ f.close()
+ return self._globalcontext
+
+ def get_document(self, docname, username='', moderator=False):
+ """Load and return a document from a pickle. The document will
+ be a dict object which can be used to render a template::
+
+ support = WebSupport(datadir=datadir)
+ support.get_document('index', username, moderator)
+
+ In most cases `docname` will be taken from the request path and
+ passed directly to this function. In Flask, that would be something
+ like this::
+
+ @app.route('/<path:docname>')
+ def index(docname):
+ username = g.user.name if g.user else ''
+ moderator = g.user.moderator if g.user else False
+ try:
+ document = support.get_document(docname, username,
+ moderator)
+ except DocumentNotFoundError:
+ abort(404)
+ render_template('doc.html', document=document)
+
+ The document dict that is returned contains the following items
+ to be used during template rendering.
+
+ * **body**: The main body of the document as HTML
+ * **sidebar**: The sidebar of the document as HTML
+ * **relbar**: A div containing links to related documents
+ * **title**: The title of the document
+ * **css**: Links to css files used by Sphinx
+ * **script**: Javascript containing comment options
+
+ This raises :class:`~sphinx.websupport.errors.DocumentNotFoundError`
+ if a document matching `docname` is not found.
+
+ :param docname: the name of the document to load.
+ """
+ docpath = path.join(self.datadir, 'pickles', docname)
+ if path.isdir(docpath):
+ infilename = docpath + '/index.fpickle'
+ if not docname:
+ docname = 'index'
+ else:
+ docname += '/index'
+ else:
+ infilename = docpath + '.fpickle'
+
+ try:
+ f = open(infilename, 'rb')
+ except IOError:
+ raise errors.DocumentNotFoundError(
+ 'The document "%s" could not be found' % docname)
+ try:
+ document = pickle.load(f)
+ finally:
+ f.close()
+
+ comment_opts = self._make_comment_options(username, moderator)
+ comment_meta = self._make_metadata(
+ self.storage.get_metadata(docname, moderator))
+
+ document['script'] = comment_opts + comment_meta + document['script']
+ return document
+
+ def get_search_results(self, q):
+ """Perform a search for the query `q`, and create a set
+ of search results. Then render the search results as html and
+ return a context dict like the one created by
+ :meth:`get_document`::
+
+ document = support.get_search_results(q)
+
+ :param q: the search query
+ """
+ results = self.search.query(q)
+ ctx = {
+ 'q': q,
+ 'search_performed': True,
+ 'search_results': results,
+ 'docroot': '../', # XXX
+ }
+ document = {
+ 'body': self.results_template.render(ctx),
+ 'title': 'Search Results',
+ 'sidebar': '',
+ 'relbar': ''
+ }
+ return document
+
+ def get_data(self, node_id, username=None, moderator=False):
+ """Get the comments and source associated with `node_id`. If
+ `username` is given vote information will be included with the
+ returned comments. The default CommentBackend returns a dict with
+ two keys, *source*, and *comments*. *source* is raw source of the
+ node and is used as the starting point for proposals a user can
+ add. *comments* is a list of dicts that represent a comment, each
+ having the following items:
+
+ ============= ======================================================
+ Key Contents
+ ============= ======================================================
+ text The comment text.
+ username The username that was stored with the comment.
+ id The comment's unique identifier.
+ rating The comment's current rating.
+ age The time in seconds since the comment was added.
+ time A dict containing time information. It contains the
+ following keys: year, month, day, hour, minute, second,
+ iso, and delta. `iso` is the time formatted in ISO
+ 8601 format. `delta` is a printable form of how old
+ the comment is (e.g. "3 hours ago").
+ vote If `user_id` was given, this will be an integer
+ representing the vote. 1 for an upvote, -1 for a
+ downvote, or 0 if unvoted.
+ node The id of the node that the comment is attached to.
+ If the comment's parent is another comment rather than
+ a node, this will be null.
+ parent The id of the comment that this comment is attached
+ to if it is not attached to a node.
+ children A list of all children, in this format.
+ proposal_diff An HTML representation of the differences between the
+ the current source and the user's proposed source.
+ ============= ======================================================
+
+ :param node_id: the id of the node to get comments for.
+ :param username: the username of the user viewing the comments.
+ :param moderator: whether the user is a moderator.
+ """
+ return self.storage.get_data(node_id, username, moderator)
+
+ def delete_comment(self, comment_id, username='', moderator=False):
+ """Delete a comment.
+
+ If `moderator` is True, the comment and all descendants will be deleted
+ from the database, and the function returns ``True``.
+
+ If `moderator` is False, the comment will be marked as deleted (but not
+ removed from the database so as not to leave any comments orphaned), but
+ only if the `username` matches the `username` on the comment. The
+ username and text files are replaced with "[deleted]" . In this case,
+ the function returns ``False``.
+
+ This raises :class:`~sphinx.websupport.errors.UserNotAuthorizedError`
+ if moderator is False and `username` doesn't match username on the
+ comment.
+
+ :param comment_id: the id of the comment to delete.
+ :param username: the username requesting the deletion.
+ :param moderator: whether the requestor is a moderator.
+ """
+ return self.storage.delete_comment(comment_id, username, moderator)
+
+ def add_comment(self, text, node_id='', parent_id='', displayed=True,
+ username=None, time=None, proposal=None,
+ moderator=False):
+ """Add a comment to a node or another comment. Returns the comment
+ in the same format as :meth:`get_comments`. If the comment is being
+ attached to a node, pass in the node's id (as a string) with the
+ node keyword argument::
+
+ comment = support.add_comment(text, node_id=node_id)
+
+ If the comment is the child of another comment, provide the parent's
+ id (as a string) with the parent keyword argument::
+
+ comment = support.add_comment(text, parent_id=parent_id)
+
+ If you would like to store a username with the comment, pass
+ in the optional `username` keyword argument::
+
+ comment = support.add_comment(text, node=node_id,
+ username=username)
+
+ :param parent_id: the prefixed id of the comment's parent.
+ :param text: the text of the comment.
+ :param displayed: for moderation purposes
+ :param username: the username of the user making the comment.
+ :param time: the time the comment was created, defaults to now.
+ """
+ if username is None:
+ if self.allow_anonymous_comments:
+ username = 'Anonymous'
+ else:
+ raise errors.UserNotAuthorizedError()
+ parsed = self._parse_comment_text(text)
+ comment = self.storage.add_comment(parsed, displayed, username,
+ time, proposal, node_id,
+ parent_id, moderator)
+ comment['original_text'] = text
+ if not displayed and self.moderation_callback:
+ self.moderation_callback(comment)
+ return comment
+
+ def process_vote(self, comment_id, username, value):
+ """Process a user's vote. The web support package relies
+ on the API user to perform authentication. The API user will
+ typically receive a comment_id and value from a form, and then
+ make sure the user is authenticated. A unique username must be
+ passed in, which will also be used to retrieve the user's past
+ voting data. An example, once again in Flask::
+
+ @app.route('/docs/process_vote', methods=['POST'])
+ def process_vote():
+ if g.user is None:
+ abort(401)
+ comment_id = request.form.get('comment_id')
+ value = request.form.get('value')
+ if value is None or comment_id is None:
+ abort(400)
+ support.process_vote(comment_id, g.user.name, value)
+ return "success"
+
+ :param comment_id: the comment being voted on
+ :param username: the unique username of the user voting
+ :param value: 1 for an upvote, -1 for a downvote, 0 for an unvote.
+ """
+ value = int(value)
+ if not -1 <= value <= 1:
+ raise ValueError('vote value %s out of range (-1, 1)' % value)
+ self.storage.process_vote(comment_id, username, value)
+
+ def update_username(self, old_username, new_username):
+ """To remain decoupled from a webapp's authentication system, the
+ web support package stores a user's username with each of their
+ comments and votes. If the authentication system allows a user to
+ change their username, this can lead to stagnate data in the web
+ support system. To avoid this, each time a username is changed, this
+ method should be called.
+
+ :param old_username: The original username.
+ :param new_username: The new username.
+ """
+ self.storage.update_username(old_username, new_username)
+
+ def accept_comment(self, comment_id, moderator=False):
+ """Accept a comment that is pending moderation.
+
+ This raises :class:`~sphinx.websupport.errors.UserNotAuthorizedError`
+ if moderator is False.
+
+ :param comment_id: The id of the comment that was accepted.
+ :param moderator: Whether the user making the request is a moderator.
+ """
+ if not moderator:
+ raise errors.UserNotAuthorizedError()
+ self.storage.accept_comment(comment_id)
+
+ def _make_base_comment_options(self):
+ """Helper method to create the part of the COMMENT_OPTIONS javascript
+ that remains the same throughout the lifetime of the
+ :class:`~sphinx.websupport.WebSupport` object.
+ """
+ self.base_comment_opts = {}
+
+ if self.docroot != '':
+ comment_urls = [
+ ('addCommentURL', '_add_comment'),
+ ('getCommentsURL', '_get_comments'),
+ ('processVoteURL', '_process_vote'),
+ ('acceptCommentURL', '_accept_comment'),
+ ('deleteCommentURL', '_delete_comment')
+ ]
+ for key, value in comment_urls:
+ self.base_comment_opts[key] = \
+ '/' + posixpath.join(self.docroot, value)
+ if self.staticroot != 'static':
+ static_urls = [
+ ('commentImage', 'comment.png'),
+ ('closeCommentImage', 'comment-close.png'),
+ ('loadingImage', 'ajax-loader.gif'),
+ ('commentBrightImage', 'comment-bright.png'),
+ ('upArrow', 'up.png'),
+ ('upArrowPressed', 'up-pressed.png'),
+ ('downArrow', 'down.png'),
+ ('downArrowPressed', 'down-pressed.png')
+ ]
+ for key, value in static_urls:
+ self.base_comment_opts[key] = \
+ '/' + posixpath.join(self.staticroot, '_static', value)
+
+ def _make_comment_options(self, username, moderator):
+ """Helper method to create the parts of the COMMENT_OPTIONS
+ javascript that are unique to each request.
+
+ :param username: The username of the user making the request.
+ :param moderator: Whether the user making the request is a moderator.
+ """
+ rv = self.base_comment_opts.copy()
+ if username:
+ rv.update({
+ 'voting': True,
+ 'username': username,
+ 'moderator': moderator,
+ })
+ return '''\
+ <script type="text/javascript">
+ var COMMENT_OPTIONS = %s;
+ </script>
+ ''' % dump_json(rv)
+
+ def _make_metadata(self, data):
+ return '''\
+ <script type="text/javascript">
+ var COMMENT_METADATA = %s;
+ </script>
+ ''' % dump_json(data)
+
+ def _parse_comment_text(self, text):
+ settings = {'file_insertion_enabled': False,
+ 'output_encoding': 'unicode'}
+ try:
+ ret = publish_parts(text, writer_name='html',
+ settings_overrides=settings)['fragment']
+ except Exception:
+ ret = cgi.escape(text)
+ return ret
diff --git a/sphinx/websupport/errors.py b/sphinx/websupport/errors.py
new file mode 100644
index 00000000..225b10c8
--- /dev/null
+++ b/sphinx/websupport/errors.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.websupport.errors
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Contains Error classes for the web support package.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+
+class DocumentNotFoundError(Exception):
+ pass
+
+
+class UserNotAuthorizedError(Exception):
+ pass
+
+
+class CommentNotAllowedError(Exception):
+ pass
+
+
+class NullSearchException(Exception):
+ pass
diff --git a/sphinx/websupport/search/__init__.py b/sphinx/websupport/search/__init__.py
new file mode 100644
index 00000000..58773fa0
--- /dev/null
+++ b/sphinx/websupport/search/__init__.py
@@ -0,0 +1,121 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.websupport.search
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Server side search support for the web support package.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import re
+
+
+class BaseSearch(object):
+ def __init__(self, path):
+ pass
+
+ def init_indexing(self, changed=[]):
+ """Called by the builder to initialize the search indexer. `changed`
+ is a list of pagenames that will be reindexed. You may want to remove
+ these from the search index before indexing begins.
+
+ :param changed: a list of pagenames that will be re-indexed
+ """
+ pass
+
+ def finish_indexing(self):
+ """Called by the builder when writing has been completed. Use this
+ to perform any finalization or cleanup actions after indexing is
+ complete.
+ """
+ pass
+
+ def feed(self, pagename, title, doctree):
+ """Called by the builder to add a doctree to the index. Converts the
+ `doctree` to text and passes it to :meth:`add_document`. You probably
+ won't want to override this unless you need access to the `doctree`.
+ Override :meth:`add_document` instead.
+
+ :param pagename: the name of the page to be indexed
+ :param title: the title of the page to be indexed
+ :param doctree: is the docutils doctree representation of the page
+ """
+ self.add_document(pagename, title, doctree.astext())
+
+ def add_document(self, pagename, title, text):
+ """Called by :meth:`feed` to add a document to the search index.
+ This method should should do everything necessary to add a single
+ document to the search index.
+
+ `pagename` is name of the page being indexed. It is the combination
+ of the source files relative path and filename,
+ minus the extension. For example, if the source file is
+ "ext/builders.rst", the `pagename` would be "ext/builders". This
+ will need to be returned with search results when processing a
+ query.
+
+ :param pagename: the name of the page being indexed
+ :param title: the page's title
+ :param text: the full text of the page
+ """
+ raise NotImplementedError()
+
+ def query(self, q):
+ """Called by the web support api to get search results. This method
+ compiles the regular expression to be used when :meth:`extracting
+ context <extract_context>`, then calls :meth:`handle_query`. You
+ won't want to override this unless you don't want to use the included
+ :meth:`extract_context` method. Override :meth:`handle_query` instead.
+
+ :param q: the search query string.
+ """
+ self.context_re = re.compile('|'.join(q.split()), re.I)
+ return self.handle_query(q)
+
+ def handle_query(self, q):
+ """Called by :meth:`query` to retrieve search results for a search
+ query `q`. This should return an iterable containing tuples of the
+ following format::
+
+ (<path>, <title>, <context>)
+
+ `path` and `title` are the same values that were passed to
+ :meth:`add_document`, and `context` should be a short text snippet
+ of the text surrounding the search query in the document.
+
+ The :meth:`extract_context` method is provided as a simple way
+ to create the `context`.
+
+ :param q: the search query
+ """
+ raise NotImplementedError()
+
+ def extract_context(self, text, length=240):
+ """Extract the context for the search query from the document's
+ full `text`.
+
+ :param text: the full text of the document to create the context for
+ :param length: the length of the context snippet to return.
+ """
+ res = self.context_re.search(text)
+ if res is None:
+ return ''
+ context_start = max(res.start() - length/2, 0)
+ context_end = context_start + length
+ context = ''.join(['...' if context_start > 0 else '',
+ text[context_start:context_end],
+ '...' if context_end < len(text) else ''])
+
+ try:
+ return unicode(context, errors='ignore')
+ except TypeError:
+ return context
+
+# The built-in search adapters.
+SEARCH_ADAPTERS = {
+ 'xapian': ('xapiansearch', 'XapianSearch'),
+ 'whoosh': ('whooshsearch', 'WhooshSearch'),
+ 'null': ('nullsearch', 'NullSearch'),
+}
diff --git a/sphinx/websupport/search/nullsearch.py b/sphinx/websupport/search/nullsearch.py
new file mode 100644
index 00000000..61f2d2fb
--- /dev/null
+++ b/sphinx/websupport/search/nullsearch.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.websupport.search.nullsearch
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ The default search adapter, does nothing.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from sphinx.websupport.search import BaseSearch
+from sphinx.websupport.errors import NullSearchException
+
+
+class NullSearch(BaseSearch):
+ """A search adapter that does nothing. Used when no search adapter
+ is specified.
+ """
+ def feed(self, pagename, title, doctree):
+ pass
+
+ def query(self, q):
+ raise NullSearchException('No search adapter specified.')
diff --git a/sphinx/websupport/search/whooshsearch.py b/sphinx/websupport/search/whooshsearch.py
new file mode 100644
index 00000000..1ed3d714
--- /dev/null
+++ b/sphinx/websupport/search/whooshsearch.py
@@ -0,0 +1,59 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.websupport.search.whooshsearch
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Whoosh search adapter.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from whoosh import index
+from whoosh.fields import Schema, ID, TEXT
+from whoosh.qparser import QueryParser
+from whoosh.analysis import StemmingAnalyzer
+
+from sphinx.util.osutil import ensuredir
+from sphinx.websupport.search import BaseSearch
+
+
+class WhooshSearch(BaseSearch):
+ """The whoosh search adapter for sphinx web support."""
+
+ # Define the Whoosh Schema for the search index.
+ schema = Schema(path=ID(stored=True, unique=True),
+ title=TEXT(field_boost=2.0, stored=True),
+ text=TEXT(analyzer=StemmingAnalyzer(), stored=True))
+
+ def __init__(self, db_path):
+ ensuredir(db_path)
+ if index.exists_in(db_path):
+ self.index = index.open_dir(db_path)
+ else:
+ self.index = index.create_in(db_path, schema=self.schema)
+ self.qparser = QueryParser('text', self.schema)
+
+ def init_indexing(self, changed=[]):
+ for changed_path in changed:
+ self.index.delete_by_term('path', changed_path)
+ self.index_writer = self.index.writer()
+
+ def finish_indexing(self):
+ self.index_writer.commit()
+
+ def add_document(self, pagename, title, text):
+ self.index_writer.add_document(path=unicode(pagename),
+ title=title,
+ text=text)
+
+ def handle_query(self, q):
+ searcher = self.index.searcher()
+ whoosh_results = searcher.search(self.qparser.parse(q))
+ results = []
+ for result in whoosh_results:
+ context = self.extract_context(result['text'])
+ results.append((result['path'],
+ result.get('title', ''),
+ context))
+ return results
diff --git a/sphinx/websupport/search/xapiansearch.py b/sphinx/websupport/search/xapiansearch.py
new file mode 100644
index 00000000..0615be84
--- /dev/null
+++ b/sphinx/websupport/search/xapiansearch.py
@@ -0,0 +1,81 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.websupport.search.xapiansearch
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Xapian search adapter.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import xapian
+
+from sphinx.util.osutil import ensuredir
+from sphinx.websupport.search import BaseSearch
+
+
+class XapianSearch(BaseSearch):
+ # Adapted from the GSOC 2009 webapp project.
+
+ # Xapian metadata constants
+ DOC_PATH = 0
+ DOC_TITLE = 1
+
+ def __init__(self, db_path):
+ self.db_path = db_path
+
+ def init_indexing(self, changed=[]):
+ ensuredir(self.db_path)
+ self.database = xapian.WritableDatabase(self.db_path,
+ xapian.DB_CREATE_OR_OPEN)
+ self.indexer = xapian.TermGenerator()
+ stemmer = xapian.Stem("english")
+ self.indexer.set_stemmer(stemmer)
+
+ def finish_indexing(self):
+ # Ensure the db lock is removed.
+ del self.database
+
+ def add_document(self, path, title, text):
+ self.database.begin_transaction()
+ # sphinx_page_path is used to easily retrieve documents by path.
+ sphinx_page_path = '"sphinxpagepath%s"' % path.replace('/', '_')
+ # Delete the old document if it exists.
+ self.database.delete_document(sphinx_page_path)
+
+ doc = xapian.Document()
+ doc.set_data(text)
+ doc.add_value(self.DOC_PATH, path)
+ doc.add_value(self.DOC_TITLE, title)
+ self.indexer.set_document(doc)
+ self.indexer.index_text(text)
+ doc.add_term(sphinx_page_path)
+ for word in text.split():
+ doc.add_posting(word, 1)
+ self.database.add_document(doc)
+ self.database.commit_transaction()
+
+ def handle_query(self, q):
+ database = xapian.Database(self.db_path)
+ enquire = xapian.Enquire(database)
+ qp = xapian.QueryParser()
+ stemmer = xapian.Stem("english")
+ qp.set_stemmer(stemmer)
+ qp.set_database(database)
+ qp.set_stemming_strategy(xapian.QueryParser.STEM_SOME)
+ query = qp.parse_query(q)
+
+ # Find the top 100 results for the query.
+ enquire.set_query(query)
+ matches = enquire.get_mset(0, 100)
+
+ results = []
+
+ for m in matches:
+ context = self.extract_context(m.document.get_data())
+ results.append((m.document.get_value(self.DOC_PATH),
+ m.document.get_value(self.DOC_TITLE),
+ ''.join(context) ))
+
+ return results
diff --git a/sphinx/websupport/storage/__init__.py b/sphinx/websupport/storage/__init__.py
new file mode 100644
index 00000000..77292812
--- /dev/null
+++ b/sphinx/websupport/storage/__init__.py
@@ -0,0 +1,115 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.websupport.storage
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Storage for the websupport package.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+class StorageBackend(object):
+ def pre_build(self):
+ """Called immediately before the build process begins. Use this
+ to prepare the StorageBackend for the addition of nodes.
+ """
+ pass
+
+ def has_node(self, id):
+ """Check to see if a node exists.
+
+ :param id: the id to check for.
+ """
+ raise NotImplementedError()
+
+ def add_node(self, id, document, source):
+ """Add a node to the StorageBackend.
+
+ :param id: a unique id for the comment.
+ :param document: the name of the document the node belongs to.
+ :param source: the source files name.
+ """
+ raise NotImplementedError()
+
+ def post_build(self):
+ """Called after a build has completed. Use this to finalize the
+ addition of nodes if needed.
+ """
+ pass
+
+ def add_comment(self, text, displayed, username, time,
+ proposal, node_id, parent_id, moderator):
+ """Called when a comment is being added.
+
+ :param text: the text of the comment
+ :param displayed: whether the comment should be displayed
+ :param username: the name of the user adding the comment
+ :param time: a date object with the time the comment was added
+ :param proposal: the text of the proposal the user made
+ :param node_id: the id of the node that the comment is being added to
+ :param parent_id: the id of the comment's parent comment.
+ :param moderator: whether the user adding the comment is a moderator
+ """
+ raise NotImplementedError()
+
+ def delete_comment(self, comment_id, username, moderator):
+ """Delete a comment.
+
+ Raises :class:`~sphinx.websupport.errors.UserNotAuthorizedError`
+ if moderator is False and `username` doesn't match the username
+ on the comment.
+
+ :param comment_id: The id of the comment being deleted.
+ :param username: The username of the user requesting the deletion.
+ :param moderator: Whether the user is a moderator.
+ """
+ raise NotImplementedError()
+
+ def get_metadata(self, docname, moderator):
+ """Get metadata for a document. This is currently just a dict
+ of node_id's with associated comment counts.
+
+ :param docname: the name of the document to get metadata for.
+ :param moderator: whether the requester is a moderator.
+ """
+ raise NotImplementedError()
+
+ def get_data(self, node_id, username, moderator):
+ """Called to retrieve all data for a node. This should return a
+ dict with two keys, *source* and *comments* as described by
+ :class:`~sphinx.websupport.WebSupport`'s
+ :meth:`~sphinx.websupport.WebSupport.get_data` method.
+
+ :param node_id: The id of the node to get data for.
+ :param username: The name of the user requesting the data.
+ :param moderator: Whether the requestor is a moderator.
+ """
+ raise NotImplementedError()
+
+ def process_vote(self, comment_id, username, value):
+ """Process a vote that is being cast. `value` will be either -1, 0,
+ or 1.
+
+ :param comment_id: The id of the comment being voted on.
+ :param username: The username of the user casting the vote.
+ :param value: The value of the vote being cast.
+ """
+ raise NotImplementedError()
+
+ def update_username(self, old_username, new_username):
+ """If a user is allowed to change their username this method should
+ be called so that there is not stagnate data in the storage system.
+
+ :param old_username: The username being changed.
+ :param new_username: What the username is being changed to.
+ """
+ raise NotImplementedError()
+
+ def accept_comment(self, comment_id):
+ """Called when a moderator accepts a comment. After the method is
+ called the comment should be displayed to all users.
+
+ :param comment_id: The id of the comment being accepted.
+ """
+ raise NotImplementedError()
diff --git a/sphinx/websupport/storage/differ.py b/sphinx/websupport/storage/differ.py
new file mode 100644
index 00000000..cd57bae8
--- /dev/null
+++ b/sphinx/websupport/storage/differ.py
@@ -0,0 +1,85 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.websupport.storage.differ
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ A differ for creating an HTML representations of proposal diffs
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import re
+from cgi import escape
+from difflib import Differ
+
+
+class CombinedHtmlDiff(object):
+ """Create an HTML representation of the differences between two pieces
+ of text.
+ """
+ highlight_regex = re.compile(r'([\+\-\^]+)')
+
+ def __init__(self, source, proposal):
+ proposal = escape(proposal)
+
+ differ = Differ()
+ self.diff = list(differ.compare(source.splitlines(1),
+ proposal.splitlines(1)))
+
+ def make_text(self):
+ return '\n'.join(self.diff)
+
+ def make_html(self):
+ """Return the HTML representation of the differences between
+ `source` and `proposal`.
+
+ :param source: the original text
+ :param proposal: the proposed text
+ """
+ html = []
+ diff = self.diff[:]
+ line = diff.pop(0)
+ next = diff.pop(0)
+ while True:
+ html.append(self._handle_line(line, next))
+ line = next
+ try:
+ next = diff.pop(0)
+ except IndexError:
+ html.append(self._handle_line(line))
+ break
+ return ''.join(html).rstrip()
+
+ def _handle_line(self, line, next=None):
+ """Handle an individual line in a diff."""
+ prefix = line[0]
+ text = line[2:]
+
+ if prefix == ' ':
+ return text
+ elif prefix == '?':
+ return ''
+
+ if next is not None and next[0] == '?':
+ tag = 'ins' if prefix == '+' else 'del'
+ text = self._highlight_text(text, next, tag)
+ css_class = 'prop-added' if prefix == '+' else 'prop-removed'
+
+ return '<span class="%s">%s</span>\n' % (css_class, text.rstrip())
+
+ def _highlight_text(self, text, next, tag):
+ """Highlight the specific changes made to a line by adding
+ <ins> and <del> tags.
+ """
+ next = next[2:]
+ new_text = []
+ start = 0
+ for match in self.highlight_regex.finditer(next):
+ new_text.append(text[start:match.start()])
+ new_text.append('<%s>' % tag)
+ new_text.append(text[match.start():match.end()])
+ new_text.append('</%s>' % tag)
+ start = match.end()
+ new_text.append(text[start:])
+ return ''.join(new_text)
diff --git a/sphinx/websupport/storage/sqlalchemy_db.py b/sphinx/websupport/storage/sqlalchemy_db.py
new file mode 100644
index 00000000..dc2ec6a7
--- /dev/null
+++ b/sphinx/websupport/storage/sqlalchemy_db.py
@@ -0,0 +1,208 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.websupport.storage.sqlalchemy_db
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ SQLAlchemy table and mapper definitions used by the
+ :class:`sphinx.websupport.storage.sqlalchemystorage.SQLAlchemyStorage`.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from datetime import datetime
+
+from sqlalchemy import Column, Integer, Text, String, Boolean, \
+ ForeignKey, DateTime
+from sqlalchemy.orm import relation, sessionmaker, aliased
+from sqlalchemy.ext.declarative import declarative_base
+
+Base = declarative_base()
+Session = sessionmaker()
+
+db_prefix = 'sphinx_'
+
+
+class Node(Base):
+ """Data about a Node in a doctree."""
+ __tablename__ = db_prefix + 'nodes'
+
+ id = Column(String(32), primary_key=True)
+ document = Column(String(256), nullable=False)
+ source = Column(Text, nullable=False)
+
+ def nested_comments(self, username, moderator):
+ """Create a tree of comments. First get all comments that are
+ descendants of this node, then convert them to a tree form.
+
+ :param username: the name of the user to get comments for.
+ :param moderator: whether the user is moderator.
+ """
+ session = Session()
+
+ if username:
+ # If a username is provided, create a subquery to retrieve all
+ # votes by this user. We will outerjoin with the comment query
+ # with this subquery so we have a user's voting information.
+ sq = session.query(CommentVote).\
+ filter(CommentVote.username == username).subquery()
+ cvalias = aliased(CommentVote, sq)
+ q = session.query(Comment, cvalias.value).outerjoin(cvalias)
+ else:
+ # If a username is not provided, we don't need to join with
+ # CommentVote.
+ q = session.query(Comment)
+
+ # Filter out all comments not descending from this node.
+ q = q.filter(Comment.path.like(str(self.id) + '.%'))
+
+ # Filter out all comments that are not moderated yet.
+ if not moderator:
+ q = q.filter(Comment.displayed == True)
+
+ # Retrieve all results. Results must be ordered by Comment.path
+ # so that we can easily transform them from a flat list to a tree.
+ results = q.order_by(Comment.path).all()
+ session.close()
+
+ return self._nest_comments(results, username)
+
+ def _nest_comments(self, results, username):
+ """Given the flat list of results, convert the list into a
+ tree.
+
+ :param results: the flat list of comments
+ :param username: the name of the user requesting the comments.
+ """
+ comments = []
+ list_stack = [comments]
+ for r in results:
+ comment, vote = r if username else (r, 0)
+
+ inheritance_chain = comment.path.split('.')[1:]
+
+ if len(inheritance_chain) == len(list_stack) + 1:
+ parent = list_stack[-1][-1]
+ list_stack.append(parent['children'])
+ elif len(inheritance_chain) < len(list_stack):
+ while len(inheritance_chain) < len(list_stack):
+ list_stack.pop()
+
+ list_stack[-1].append(comment.serializable(vote=vote))
+
+ return comments
+
+ def __init__(self, id, document, source):
+ self.id = id
+ self.document = document
+ self.source = source
+
+
+class CommentVote(Base):
+ """A vote a user has made on a Comment."""
+ __tablename__ = db_prefix + 'commentvote'
+
+ username = Column(String(64), primary_key=True)
+ comment_id = Column(Integer, ForeignKey(db_prefix + 'comments.id'),
+ primary_key=True)
+ # -1 if downvoted, +1 if upvoted, 0 if voted then unvoted.
+ value = Column(Integer, nullable=False)
+
+ def __init__(self, comment_id, username, value):
+ self.comment_id = comment_id
+ self.username = username
+ self.value = value
+
+
+class Comment(Base):
+ """An individual Comment being stored."""
+ __tablename__ = db_prefix + 'comments'
+
+ id = Column(Integer, primary_key=True)
+ rating = Column(Integer, nullable=False)
+ time = Column(DateTime, nullable=False)
+ text = Column(Text, nullable=False)
+ displayed = Column(Boolean, index=True, default=False)
+ username = Column(String(64))
+ proposal = Column(Text)
+ proposal_diff = Column(Text)
+ path = Column(String(256), index=True)
+
+ node_id = Column(String, ForeignKey(db_prefix + 'nodes.id'))
+ node = relation(Node, backref="comments")
+
+ votes = relation(CommentVote, backref="comment",
+ cascade="all")
+
+ def __init__(self, text, displayed, username, rating, time,
+ proposal, proposal_diff):
+ self.text = text
+ self.displayed = displayed
+ self.username = username
+ self.rating = rating
+ self.time = time
+ self.proposal = proposal
+ self.proposal_diff = proposal_diff
+
+ def set_path(self, node_id, parent_id):
+ """Set the materialized path for this comment."""
+ # This exists because the path can't be set until the session has
+ # been flushed and this Comment has an id.
+ if node_id:
+ self.node_id = node_id
+ self.path = '%s.%s' % (node_id, self.id)
+ else:
+ session = Session()
+ parent_path = session.query(Comment.path).\
+ filter(Comment.id == parent_id).one().path
+ session.close()
+ self.node_id = parent_path.split('.')[0]
+ self.path = '%s.%s' % (parent_path, self.id)
+
+ def serializable(self, vote=0):
+ """Creates a serializable representation of the comment. This is
+ converted to JSON, and used on the client side.
+ """
+ delta = datetime.now() - self.time
+
+ time = {'year': self.time.year,
+ 'month': self.time.month,
+ 'day': self.time.day,
+ 'hour': self.time.hour,
+ 'minute': self.time.minute,
+ 'second': self.time.second,
+ 'iso': self.time.isoformat(),
+ 'delta': self.pretty_delta(delta)}
+
+ path = self.path.split('.')
+ node = path[0]
+ parent = path[-2] if len(path) > 2 else None
+
+ return {'text': self.text,
+ 'username': self.username or 'Anonymous',
+ 'id': self.id,
+ 'node': node,
+ 'parent': parent,
+ 'rating': self.rating,
+ 'displayed': self.displayed,
+ 'age': delta.seconds,
+ 'time': time,
+ 'vote': vote or 0,
+ 'proposal_diff': self.proposal_diff,
+ 'children': []}
+
+ def pretty_delta(self, delta):
+ """Create a pretty representation of the Comment's age.
+ (e.g. 2 minutes).
+ """
+ days = delta.days
+ seconds = delta.seconds
+ hours = seconds / 3600
+ minutes = seconds / 60
+
+ if days == 0:
+ dt = (minutes, 'minute') if hours == 0 else (hours, 'hour')
+ else:
+ dt = (days, 'day')
+
+ return '%s %s ago' % dt if dt[0] == 1 else '%s %ss ago' % dt
diff --git a/sphinx/websupport/storage/sqlalchemystorage.py b/sphinx/websupport/storage/sqlalchemystorage.py
new file mode 100644
index 00000000..b2efe82b
--- /dev/null
+++ b/sphinx/websupport/storage/sqlalchemystorage.py
@@ -0,0 +1,177 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.websupport.storage.sqlalchemystorage
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ An SQLAlchemy storage backend.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from datetime import datetime
+
+import sqlalchemy
+from sqlalchemy.orm import aliased
+from sqlalchemy.sql import func
+
+if sqlalchemy.__version__[:3] < '0.5':
+ raise ImportError('SQLAlchemy version 0.5 or greater is required for this '
+ 'storage backend; you have version %s' % sqlalchemy.__version__)
+
+from sphinx.websupport.errors import CommentNotAllowedError, \
+ UserNotAuthorizedError
+from sphinx.websupport.storage import StorageBackend
+from sphinx.websupport.storage.sqlalchemy_db import Base, Node, \
+ Comment, CommentVote, Session
+from sphinx.websupport.storage.differ import CombinedHtmlDiff
+
+
+class SQLAlchemyStorage(StorageBackend):
+ """
+ A :class:`.StorageBackend` using SQLAlchemy.
+ """
+
+ def __init__(self, uri):
+ self.engine = sqlalchemy.create_engine(uri)
+ Base.metadata.bind = self.engine
+ Base.metadata.create_all()
+ Session.configure(bind=self.engine)
+
+ def pre_build(self):
+ self.build_session = Session()
+
+ def has_node(self, id):
+ session = Session()
+ node = session.query(Node).filter(Node.id == id).first()
+ session.close()
+ return True if node else False
+
+ def add_node(self, id, document, source):
+ node = Node(id, document, source)
+ self.build_session.add(node)
+ self.build_session.flush()
+
+ def post_build(self):
+ self.build_session.commit()
+ self.build_session.close()
+
+ def add_comment(self, text, displayed, username, time,
+ proposal, node_id, parent_id, moderator):
+ session = Session()
+ proposal_diff = None
+ proposal_diff_text = None
+
+ if node_id and proposal:
+ node = session.query(Node).filter(Node.id == node_id).one()
+ differ = CombinedHtmlDiff(node.source, proposal)
+ proposal_diff = differ.make_html()
+ proposal_diff_text = differ.make_text()
+ elif parent_id:
+ parent = session.query(Comment.displayed).\
+ filter(Comment.id == parent_id).one()
+ if not parent.displayed:
+ raise CommentNotAllowedError(
+ "Can't add child to a parent that is not displayed")
+
+ comment = Comment(text, displayed, username, 0,
+ time or datetime.now(), proposal, proposal_diff)
+ session.add(comment)
+ session.flush()
+ # We have to flush the session before setting the path so the
+ # Comment has an id.
+ comment.set_path(node_id, parent_id)
+ session.commit()
+ d = comment.serializable()
+ d['document'] = comment.node.document
+ d['proposal_diff_text'] = proposal_diff_text
+ session.close()
+ return d
+
+ def delete_comment(self, comment_id, username, moderator):
+ session = Session()
+ comment = session.query(Comment).\
+ filter(Comment.id == comment_id).one()
+ if moderator:
+ # moderator mode: delete the comment and all descendants
+ # find descendants via path
+ session.query(Comment).filter(
+ Comment.path.like(comment.path + '.%')).delete(False)
+ session.delete(comment)
+ session.commit()
+ session.close()
+ return True
+ elif comment.username == username:
+ # user mode: do not really delete, but remove text and proposal
+ comment.username = '[deleted]'
+ comment.text = '[deleted]'
+ comment.proposal = ''
+ session.commit()
+ session.close()
+ return False
+ else:
+ session.close()
+ raise UserNotAuthorizedError()
+
+ def get_metadata(self, docname, moderator):
+ session = Session()
+ subquery = session.query(
+ Comment.id, Comment.node_id,
+ func.count('*').label('comment_count')).group_by(
+ Comment.node_id).subquery()
+ nodes = session.query(Node.id, subquery.c.comment_count).outerjoin(
+ (subquery, Node.id==subquery.c.node_id)).filter(
+ Node.document==docname)
+ session.close()
+ session.commit()
+ return dict([(k, v or 0) for k, v in nodes])
+
+ def get_data(self, node_id, username, moderator):
+ session = Session()
+ node = session.query(Node).filter(Node.id == node_id).one()
+ session.close()
+ comments = node.nested_comments(username, moderator)
+ return {'source': node.source,
+ 'comments': comments}
+
+ def process_vote(self, comment_id, username, value):
+ session = Session()
+
+ subquery = session.query(CommentVote).filter(
+ CommentVote.username == username).subquery()
+ vote_alias = aliased(CommentVote, subquery)
+ q = session.query(Comment, vote_alias).outerjoin(vote_alias).filter(
+ Comment.id == comment_id)
+ comment, vote = q.one()
+
+ if vote is None:
+ vote = CommentVote(comment_id, username, value)
+ comment.rating += value
+ else:
+ comment.rating += value - vote.value
+ vote.value = value
+
+ session.add(vote)
+ session.commit()
+ session.close()
+
+ def update_username(self, old_username, new_username):
+ session = Session()
+
+ session.query(Comment).filter(Comment.username == old_username).\
+ update({Comment.username: new_username})
+ session.query(CommentVote).\
+ filter(CommentVote.username == old_username).\
+ update({CommentVote.username: new_username})
+
+ session.commit()
+ session.close()
+
+ def accept_comment(self, comment_id):
+ session = Session()
+ session.query(Comment).filter(Comment.id == comment_id).update(
+ {Comment.displayed: True}
+ )
+
+ session.commit()
+ session.close()
diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py
index f1c4d596..57d7a7d5 100644
--- a/sphinx/writers/html.py
+++ b/sphinx/writers/html.py
@@ -59,7 +59,11 @@ class HTMLTranslator(BaseTranslator):
self.highlightlang = builder.config.highlight_language
self.highlightlinenothreshold = sys.maxint
self.protect_literal_text = 0
- self.add_permalinks = builder.config.html_add_permalinks
+ self.permalink_text = builder.config.html_add_permalinks
+ # support backwards-compatible setting to a bool
+ if not isinstance(self.permalink_text, basestring):
+ self.permalink_text = self.permalink_text and u'\u00B6' or ''
+ self.permalink_text = self.encode(self.permalink_text)
self.secnumber_suffix = builder.config.html_secnumber_suffix
def visit_start_of_file(self, node):
@@ -81,11 +85,12 @@ class HTMLTranslator(BaseTranslator):
and node['ids'] and node['first']:
self.body.append('<!--[%s]-->' % node['ids'][0])
def depart_desc_signature(self, node):
- if node['ids'] and self.add_permalinks and self.builder.add_permalinks:
+ if node['ids'] and self.permalink_text and self.builder.add_permalinks:
self.body.append(u'<a class="headerlink" href="#%s" '
% node['ids'][0] +
- u'title="%s">\u00B6</a>' %
- _('Permalink to this definition'))
+ u'title="%s">%s</a>' % (
+ _('Permalink to this definition'),
+ self.permalink_text))
self.body.append('</dt>\n')
def visit_desc_addname(self, node):
@@ -180,7 +185,7 @@ class HTMLTranslator(BaseTranslator):
atts['title'] = node['reftitle']
self.body.append(self.starttag(node, 'a', '', **atts))
- if node.hasattr('secnumber'):
+ if node.get('secnumber'):
self.body.append(('%s' + self.secnumber_suffix) %
'.'.join(map(str, node['secnumber'])))
@@ -202,14 +207,14 @@ class HTMLTranslator(BaseTranslator):
self.depart_admonition(node)
def add_secnumber(self, node):
- if node.hasattr('secnumber'):
+ if node.get('secnumber'):
self.body.append('.'.join(map(str, node['secnumber'])) +
self.secnumber_suffix)
elif isinstance(node.parent, nodes.section):
anchorname = '#' + node.parent['ids'][0]
if anchorname not in self.builder.secnumbers:
anchorname = '' # try first heading which has no anchor
- if anchorname in self.builder.secnumbers:
+ if self.builder.secnumbers.get(anchorname):
numbers = self.builder.secnumbers[anchorname]
self.body.append('.'.join(map(str, numbers)) +
self.secnumber_suffix)
@@ -246,9 +251,6 @@ class HTMLTranslator(BaseTranslator):
# overwritten
def visit_literal(self, node):
- if len(node.children) == 1 and \
- node.children[0] in ('None', 'True', 'False'):
- node['classes'].append('xref')
self.body.append(self.starttag(node, 'tt', '',
CLASS='docutils literal'))
self.protect_literal_text += 1
@@ -483,19 +485,21 @@ class HTMLTranslator(BaseTranslator):
def depart_title(self, node):
close_tag = self.context[-1]
- if (self.add_permalinks and self.builder.add_permalinks and
+ if (self.permalink_text and self.builder.add_permalinks and
node.parent.hasattr('ids') and node.parent['ids']):
aname = node.parent['ids'][0]
# add permalink anchor
if close_tag.startswith('</h'):
self.body.append(u'<a class="headerlink" href="#%s" ' % aname +
- u'title="%s">\u00B6</a>' %
- _('Permalink to this headline'))
+ u'title="%s">%s</a>' % (
+ _('Permalink to this headline'),
+ self.permalink_text))
elif close_tag.startswith('</a></h'):
self.body.append(u'</a><a class="headerlink" href="#%s" ' %
aname +
- u'title="%s">\u00B6' %
- _('Permalink to this headline'))
+ u'title="%s">%s' % (
+ _('Permalink to this headline'),
+ self.permalink_text))
BaseTranslator.depart_title(self, node)
diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py
index ffe14943..dcba90f1 100644
--- a/sphinx/writers/latex.py
+++ b/sphinx/writers/latex.py
@@ -325,7 +325,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
# ... and all others are the appendices
self.body.append(u'\n\\appendix\n')
self.first_document = -1
- if node.has_key('docname'):
+ if 'docname' in node:
self.body.append(self.hypertarget(':doc'))
# "- 1" because the level is increased before the title is visited
self.sectionlevel = self.top_sectionlevel - 1
@@ -711,7 +711,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.table.rowcount += 1
def visit_entry(self, node):
- if node.has_key('morerows') or node.has_key('morecols'):
+ if 'morerows' in node or 'morecols' in node:
raise UnsupportedError('%s:%s: column or row spanning cells are '
'not yet implemented.' %
(self.curfilestack[-1], node.line or ''))
@@ -774,7 +774,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
def visit_term(self, node):
ctx = '}] \\leavevmode'
- if node.has_key('ids') and node['ids']:
+ if node.get('ids'):
ctx += self.hypertarget(node['ids'][0])
self.body.append('\\item[{')
self.context.append(ctx)
@@ -862,20 +862,20 @@ class LaTeXTranslator(nodes.NodeVisitor):
post = []
include_graphics_options = []
is_inline = self.is_inline(node)
- if attrs.has_key('scale'):
+ if 'scale' in attrs:
# Could also be done with ``scale`` option to
# ``\includegraphics``; doing it this way for consistency.
pre.append('\\scalebox{%f}{' % (attrs['scale'] / 100.0,))
post.append('}')
- if attrs.has_key('width'):
+ if 'width' in attrs:
w = self.latex_image_length(attrs['width'])
if w:
include_graphics_options.append('width=%s' % w)
- if attrs.has_key('height'):
+ if 'height' in attrs:
h = self.latex_image_length(attrs['height'])
if h:
include_graphics_options.append('height=%s' % h)
- if attrs.has_key('align'):
+ if 'align' in attrs:
align_prepost = {
# By default latex aligns the top of an image.
(1, 'top'): ('', ''),
@@ -920,13 +920,13 @@ class LaTeXTranslator(nodes.NodeVisitor):
for id in self.next_figure_ids:
ids += self.hypertarget(id, anchor=False)
self.next_figure_ids.clear()
- if node.has_key('width') and node.get('align', '') in ('left', 'right'):
+ if 'width' in node and node.get('align', '') in ('left', 'right'):
self.body.append('\\begin{wrapfigure}{%s}{%s}\n\\centering' %
(node['align'] == 'right' and 'r' or 'l',
node['width']))
self.context.append(ids + '\\end{wrapfigure}\n')
else:
- if (not node.attributes.has_key('align') or
+ if (not 'align' in node.attributes or
node.attributes['align'] == 'center'):
# centering does not add vertical space like center.
align = '\n\\centering'
@@ -1201,7 +1201,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.no_contractions -= 1
if self.in_title:
self.body.append(r'\texttt{%s}' % content)
- elif node.has_key('role') and node['role'] == 'samp':
+ elif node.get('role') == 'samp':
self.body.append(r'\samp{%s}' % content)
else:
self.body.append(r'\code{%s}' % content)
@@ -1230,10 +1230,10 @@ class LaTeXTranslator(nodes.NodeVisitor):
code = self.verbatim.rstrip('\n')
lang = self.hlsettingstack[-1][0]
linenos = code.count('\n') >= self.hlsettingstack[-1][1] - 1
- if node.has_key('language'):
+ if 'language' in node:
# code-block directives
lang = node['language']
- if node.has_key('linenos'):
+ if 'linenos' in node:
linenos = node['linenos']
def warner(msg):
self.builder.warn(msg, (self.curfilestack[-1], node.line))
diff --git a/sphinx/writers/texinfo.py b/sphinx/writers/texinfo.py
new file mode 100644
index 00000000..04bb04fb
--- /dev/null
+++ b/sphinx/writers/texinfo.py
@@ -0,0 +1,1217 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.writers.texinfo
+ ~~~~~~~~~~~~~~~~~~~~~~
+
+ Custom docutils writer for Texinfo.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from docutils import nodes, writers
+
+from sphinx import addnodes
+from sphinx.locale import versionlabels
+
+
+TEMPLATE = """\
+\\input texinfo @c -*-texinfo-*-
+@c %%**start of header
+@setfilename %(filename)s
+@documentencoding UTF-8
+@copying
+Generated by Sphinx
+@end copying
+@settitle %(title)s
+@defindex ge
+@paragraphindent %(paragraphindent)s
+@exampleindent %(exampleindent)s
+%(direntry)s
+@c %%**end of header
+
+@titlepage
+@title %(title)s
+@author %(author)s
+@end titlepage
+@contents
+
+@c %%** start of user preamble
+%(preamble)s
+@c %%** end of user preamble
+
+@ifnottex
+@node Top
+@top %(title)s
+@end ifnottex
+
+@c %%**start of body
+%(body)s
+@c %%**end of body
+@bye
+"""
+
+
+def find_subsections(section):
+ """Return a list of subsections for the given ``section``."""
+ result = []
+ for child in section.children:
+ if isinstance(child, nodes.section):
+ result.append(child)
+ continue
+ result.extend(find_subsections(child))
+ return result
+
+
+## Escaping
+# Which characters to escape depends on the context. In some cases,
+# namely menus and node names, it's not possible to escape certain
+# characters.
+
+def escape(s):
+ """Return a string with Texinfo command characters escaped."""
+ s = s.replace('@', '@@')
+ s = s.replace('{', '@{')
+ s = s.replace('}', '@}')
+ # Prevent "--" from being converted to an "em dash"
+ # s = s.replace('-', '@w{-}')
+ return s
+
+def escape_arg(s):
+ """Return an escaped string suitable for use as an argument
+ to a Texinfo command."""
+ s = escape(s)
+ # Commas are the argument delimeters
+ s = s.replace(',', '@comma{}')
+ # Normalize white space
+ s = ' '.join(s.split()).strip()
+ return s
+
+def escape_id(s):
+ """Return an escaped string suitable for node names, menu entries,
+ and xrefs anchors."""
+ bad_chars = ',:.()@{}'
+ for bc in bad_chars:
+ s = s.replace(bc, ' ')
+ s = ' '.join(s.split()).strip()
+ return s
+
+
+class TexinfoWriter(writers.Writer):
+ """Texinfo writer for generating Texinfo documents."""
+ supported = ('texinfo', 'texi')
+
+ settings_spec = (
+ 'Texinfo Specific Options',
+ None,
+ (
+ ("Name of the resulting Info file to be created by 'makeinfo'. "
+ "Should probably end with '.info'.",
+ ['--texinfo-filename'],
+ {'default': '', 'metavar': '<file>'}),
+
+ ('Specify the Info dir entry category.',
+ ['--texinfo-dir-category'],
+ {'default': 'Miscellaneous', 'metavar': '<name>'}),
+
+ ('The name to use for the Info dir entry. '
+ 'If not provided, no entry will be created.',
+ ['--texinfo-dir-entry'],
+ {'default': '', 'metavar': '<name>'}),
+
+ ('A brief description (one or two lines) to use for the '
+ 'Info dir entry.',
+ ['--texinfo-dir-description'],
+ {'default': '', 'metavar': '<desc>'}),
+ )
+ )
+
+ settings_defaults = {}
+ settings_default_overrides = {'docinfo_xform': 0}
+
+ output = None
+
+ visitor_attributes = ('output', 'fragment')
+
+ def __init__(self, builder):
+ writers.Writer.__init__(self)
+ self.builder = builder
+
+ def translate(self):
+ self.visitor = visitor = TexinfoTranslator(self.document, self.builder)
+ self.document.walkabout(visitor)
+ visitor.finish()
+ for attr in self.visitor_attributes:
+ setattr(self, attr, getattr(visitor, attr))
+
+
+class TexinfoTranslator(nodes.NodeVisitor):
+
+ default_elements = {
+ 'filename': '',
+ 'title': '',
+ 'paragraphindent': 2,
+ 'exampleindent': 4,
+ 'direntry': '',
+ 'preamble': '',
+ 'body': '',
+ }
+
+ def __init__(self, document, builder):
+ nodes.NodeVisitor.__init__(self, document)
+ self.builder = builder
+ self.init_settings()
+
+ self.written_ids = set() # node names and anchors in output
+ self.referenced_ids = set() # node names and anchors that should
+ # be in output
+ self.node_names = {} # node name --> node's name to display
+ self.node_menus = {} # node name --> node's menu entries
+ self.rellinks = {} # node name --> (next, previous, up)
+
+ self.collect_node_names()
+ self.collect_node_menus()
+ self.collect_rellinks()
+
+ self.short_ids = {}
+ self.body = []
+ self.context = []
+ self.previous_section = None
+ self.section_level = 0
+ self.seen_title = False
+ self.next_section_targets = []
+ self.escape_newlines = 0
+ self.curfilestack = []
+
+ def finish(self):
+ while self.referenced_ids:
+ # Handle xrefs with missing anchors
+ r = self.referenced_ids.pop()
+ if r not in self.written_ids:
+ self.document.reporter.info(
+ "Unknown cross-reference target: `%s'" % r)
+ self.add_text('@anchor{%s}@w{%s}\n' % (r, ' ' * 30))
+ self.fragment = ''.join(self.body).strip() + '\n'
+ self.elements['body'] = self.fragment
+ self.output = TEMPLATE % self.elements
+
+
+ ## Helper routines
+
+ def init_settings(self):
+ settings = self.settings = self.document.settings
+ elements = self.elements = self.default_elements.copy()
+ elements.update({
+ # if empty, the title is set to the first section title
+ 'title': settings.title,
+ 'author': escape_arg(settings.author),
+ # if empty, use basename of input file
+ 'filename': settings.texinfo_filename,
+ })
+ # Title
+ title = elements['title']
+ if not title:
+ title = self.document.next_node(nodes.title)
+ title = (title and title.astext()) or '<untitled>'
+ elements['title'] = escape_id(title) or '<untitled>'
+ # Filename
+ if not elements['filename']:
+ elements['filename'] = self.document.get('source') or 'untitled'
+ if elements['filename'][-4:] in ('.txt', '.rst'):
+ elements['filename'] = elements['filename'][:-4]
+ elements['filename'] += '.info'
+ # Direntry
+ if settings.texinfo_dir_entry:
+ elements['direntry'] = ('@dircategory %s\n'
+ '@direntry\n'
+ '* %s: (%s). %s\n'
+ '@end direntry\n') % (
+ escape_id(settings.texinfo_dir_category),
+ escape_id(settings.texinfo_dir_entry),
+ elements['filename'],
+ escape_arg(settings.texinfo_dir_description))
+ # allow the user to override them all
+ elements.update(settings.texinfo_elements)
+
+ def collect_node_names(self):
+ """Generates a unique id for each section.
+
+ Assigns the attribute ``node_name`` to each section."""
+ self.document['node_name'] = 'Top'
+ self.node_names['Top'] = 'Top'
+ self.written_ids.update(('Top', 'top'))
+
+ for section in self.document.traverse(nodes.section):
+ title = section.next_node(nodes.Titular)
+ name = (title and title.astext()) or '<untitled>'
+ node_id = name = escape_id(name) or '<untitled>'
+ assert node_id and name
+ nth, suffix = 1, ''
+ while (node_id + suffix).lower() in self.written_ids:
+ nth += 1
+ suffix = '<%s>' % nth
+ node_id += suffix
+ assert node_id not in self.node_names
+ assert node_id not in self.written_ids
+ assert node_id.lower() not in self.written_ids
+ section['node_name'] = node_id
+ self.node_names[node_id] = name
+ self.written_ids.update((node_id, node_id.lower()))
+
+ def collect_node_menus(self):
+ """Collect the menu entries for each "node" section."""
+ node_menus = self.node_menus
+ for node in ([self.document] +
+ self.document.traverse(nodes.section)):
+ assert 'node_name' in node and node['node_name']
+ entries = tuple(s['node_name']
+ for s in find_subsections(node))
+ node_menus[node['node_name']] = entries
+ # Try to find a suitable "Top" node
+ title = self.document.next_node(nodes.title)
+ top = (title and title.parent) or self.document
+ if not isinstance(top, (nodes.document, nodes.section)):
+ top = self.document
+ if top is not self.document:
+ entries = node_menus[top['node_name']]
+ entries += node_menus['Top'][1:]
+ node_menus['Top'] = entries
+ del node_menus[top['node_name']]
+ top['node_name'] = 'Top'
+
+ def collect_rellinks(self):
+ """Collect the relative links (next, previous, up) for each "node"."""
+ rellinks = self.rellinks
+ node_menus = self.node_menus
+ for id, entries in node_menus.items():
+ rellinks[id] = ['', '', '']
+ # Up's
+ for id, entries in node_menus.items():
+ for e in entries:
+ rellinks[e][2] = id
+ # Next's and prev's
+ for id, entries in node_menus.items():
+ for i, id in enumerate(entries):
+ # First child's prev is empty
+ if i != 0:
+ rellinks[id][1] = entries[i-1]
+ # Last child's next is empty
+ if i != len(entries) - 1:
+ rellinks[id][0] = entries[i+1]
+ # Top's next is its first child
+ try:
+ first = node_menus['Top'][0]
+ except IndexError:
+ pass
+ else:
+ rellinks['Top'][0] = first
+ rellinks[first][1] = 'Top'
+
+ def add_text(self, text, fresh=False):
+ """Add some text to the output.
+
+ Optional argument ``fresh`` means to insert a newline before
+ the text if the last character out was not a newline."""
+ if fresh:
+ if self.body and not self.body[-1].endswith('\n'):
+ self.body.append('\n')
+ self.body.append(text)
+
+ def rstrip(self):
+ """Strip trailing whitespace from the current output."""
+ while self.body and not self.body[-1].strip():
+ del self.body[-1]
+ if not self.body:
+ return
+ self.body[-1] = self.body[-1].rstrip()
+
+ def add_menu_entries(self, entries):
+ for entry in entries:
+ name = self.node_names[entry]
+ if name == entry:
+ self.add_text('* %s::\n' % name, fresh=1)
+ else:
+ self.add_text('* %s: %s.\n' % (name, entry), fresh=1)
+
+ def add_menu(self, section, master=False):
+ entries = self.node_menus[section['node_name']]
+ if not entries:
+ return
+ self.add_text('\n@menu\n')
+ self.add_menu_entries(entries)
+ if master:
+ # Write the "detailed menu"
+ started_detail = False
+ for entry in entries:
+ subentries = self.node_menus[entry]
+ if not subentries:
+ continue
+ if not started_detail:
+ started_detail = True
+ self.add_text('\n@detailmenu\n'
+ ' --- The Detailed Node Listing ---\n')
+ self.add_text('\n%s\n\n' % self.node_names[entry])
+ self.add_menu_entries(subentries)
+ if started_detail:
+ self.rstrip()
+ self.add_text('\n@end detailmenu\n')
+ self.rstrip()
+ self.add_text('\n@end menu\n\n')
+
+
+ ## xref handling
+
+ def get_short_id(self, id):
+ """Return a shorter 'id' associated with ``id``."""
+ # Shorter ids improve paragraph filling in places
+ # that the id is hidden by Emacs.
+ try:
+ sid = self.short_ids[id]
+ except KeyError:
+ sid = hex(len(self.short_ids))[2:]
+ self.short_ids[id] = sid
+ return sid
+
+ def add_anchor(self, id, msg_node=None):
+ # Anchors can be referenced by their original id
+ # or by the generated shortened id
+ id = escape_id(id).lower()
+ ids = (self.get_short_id(id), id)
+ for id in ids:
+ if id not in self.written_ids:
+ self.add_text('@anchor{%s}' % id)
+ self.written_ids.add(id)
+
+ def add_xref(self, ref, name, node):
+ ref = self.get_short_id(escape_id(ref).lower())
+ name = ' '.join(name.split()).strip()
+ if not name or ref == name:
+ self.add_text('@pxref{%s}' % ref)
+ else:
+ self.add_text('@pxref{%s,%s}' % (ref, name))
+ self.referenced_ids.add(ref)
+
+ ## Visiting
+
+ def visit_document(self, node):
+ pass
+ def depart_document(self, node):
+ pass
+
+ def visit_Text(self, node):
+ s = escape(node.astext())
+ if self.escape_newlines:
+ s = s.replace('\n', ' ')
+ self.add_text(s)
+ def depart_Text(self, node):
+ pass
+
+ def visit_section(self, node):
+ self.next_section_targets.extend(node.get('ids', []))
+ if not self.seen_title:
+ return
+ if self.previous_section:
+ self.add_menu(self.previous_section)
+ else:
+ self.add_menu(self.document, master=True)
+
+ node_name = node['node_name']
+ pointers = tuple([node_name] + self.rellinks[node_name])
+ self.add_text('\n@node %s,%s,%s,%s\n' % pointers)
+ if node_name != node_name.lower():
+ self.add_text('@anchor{%s}' % node_name.lower())
+ for id in self.next_section_targets:
+ self.add_anchor(id, node)
+
+ self.next_section_targets = []
+ self.previous_section = node
+ self.section_level += 1
+
+ def depart_section(self, node):
+ self.section_level -= 1
+
+ headings = (
+ '@unnumbered',
+ '@chapter',
+ '@section',
+ '@subsection',
+ '@subsubsection',
+ )
+
+ rubrics = (
+ '@heading',
+ '@subheading',
+ '@subsubheading',
+ )
+
+ def visit_title(self, node):
+ if not self.seen_title:
+ self.seen_title = 1
+ raise nodes.SkipNode
+ parent = node.parent
+ if isinstance(parent, nodes.table):
+ return
+ if isinstance(parent, nodes.Admonition):
+ raise nodes.SkipNode
+ elif isinstance(parent, nodes.sidebar):
+ self.visit_rubric(node)
+ elif isinstance(parent, nodes.topic):
+ raise nodes.SkipNode
+ elif not isinstance(parent, nodes.section):
+ self.document.reporter.warning(
+ 'encountered title node not in section, topic, table, '
+ 'admonition or sidebar', base_node=node)
+ self.visit_rubric(node)
+ else:
+ try:
+ heading = self.headings[self.section_level]
+ except IndexError:
+ heading = self.headings[-1]
+ self.add_text('%s ' % heading, fresh=1)
+
+ def depart_title(self, node):
+ self.add_text('', fresh=1)
+
+ def visit_rubric(self, node):
+ try:
+ rubric = self.rubrics[self.section_level]
+ except IndexError:
+ rubric = self.rubrics[-1]
+ self.add_text('%s ' % rubric, fresh=1)
+ def depart_rubric(self, node):
+ self.add_text('', fresh=1)
+
+ def visit_subtitle(self, node):
+ self.add_text('\n\n@noindent\n')
+ def depart_subtitle(self, node):
+ self.add_text('\n\n')
+
+ ## References
+
+ def visit_target(self, node):
+ if node.get('ids'):
+ self.add_anchor(node['ids'][0], node)
+ elif node.get('refid'):
+ # Section targets need to go after the start of the section.
+ next = node.next_node(ascend=1, siblings=1)
+ while isinstance(next, nodes.target):
+ next = next.next_node(ascend=1, siblings=1)
+ if isinstance(next, nodes.section):
+ self.next_section_targets.append(node['refid'])
+ return
+ self.add_anchor(node['refid'], node)
+ elif node.get('refuri'):
+ pass
+ else:
+ self.document.reporter.error("Unknown target type: %r" % node)
+
+ def visit_reference(self, node):
+ if isinstance(node.parent, nodes.title):
+ return
+ if isinstance(node[0], nodes.image):
+ return
+ if isinstance(node.parent, addnodes.desc_type):
+ return
+ name = node.get('name', node.astext()).strip()
+ if node.get('refid'):
+ self.add_xref(escape_id(node['refid']),
+ escape_id(name), node)
+ raise nodes.SkipNode
+ if not node.get('refuri'):
+ self.document.reporter.error("Unknown reference type: %s" % node)
+ return
+ uri = node['refuri']
+ if uri.startswith('#'):
+ self.add_xref(escape_id(uri[1:]), escape_id(name), node)
+ elif uri.startswith('%'):
+ id = uri[1:]
+ if '#' in id:
+ src, id = uri[1:].split('#', 1)
+ assert '#' not in id
+ self.add_xref(escape_id(id), escape_id(name), node)
+ elif uri.startswith('mailto:'):
+ uri = escape_arg(uri[7:])
+ name = escape_arg(name)
+ if not name or name == uri:
+ self.add_text('@email{%s}' % uri)
+ else:
+ self.add_text('@email{%s,%s}' % (uri, name))
+ elif uri.startswith('info:'):
+ uri = uri[5:].replace('_', ' ')
+ uri = escape_arg(uri)
+ id = 'Top'
+ if '#' in uri:
+ uri, id = uri.split('#', 1)
+ id = escape_id(id)
+ name = escape_id(name)
+ if name == id:
+ self.add_text('@pxref{%s,,,%s}' % (id, uri))
+ else:
+ self.add_text('@pxref{%s,,%s,%s}' % (id, name, uri))
+ else:
+ uri = escape_arg(uri)
+ name = escape_arg(name)
+ if not name or uri == name:
+ self.add_text('@indicateurl{%s}' % uri)
+ else:
+ self.add_text('@uref{%s,%s}' % (uri, name))
+ raise nodes.SkipNode
+
+ def depart_reference(self, node):
+ pass
+
+ def visit_title_reference(self, node):
+ text = node.astext()
+ self.add_text('@cite{%s}' % escape_arg(text))
+ raise nodes.SkipNode
+ def depart_title_reference(self, node):
+ pass
+
+ ## Blocks
+
+ def visit_paragraph(self, node):
+ if 'continued' in node or isinstance(node.parent, nodes.compound):
+ self.add_text('@noindent\n', fresh=1)
+ def depart_paragraph(self, node):
+ self.add_text('\n\n')
+
+ def visit_block_quote(self, node):
+ self.rstrip()
+ self.add_text('\n\n@quotation\n')
+ def depart_block_quote(self, node):
+ self.rstrip()
+ self.add_text('\n@end quotation\n\n')
+
+ def visit_literal_block(self, node):
+ self.rstrip()
+ self.add_text('\n\n@example\n')
+ def depart_literal_block(self, node):
+ self.rstrip()
+ self.add_text('\n@end example\n\n'
+ '@noindent\n')
+
+ visit_doctest_block = visit_literal_block
+ depart_doctest_block = depart_literal_block
+
+ def visit_line_block(self, node):
+ self.add_text('@display\n', fresh=1)
+ def depart_line_block(self, node):
+ self.add_text('@end display\n', fresh=1)
+
+ def visit_line(self, node):
+ self.rstrip()
+ self.add_text('\n')
+ self.escape_newlines += 1
+ def depart_line(self, node):
+ self.add_text('@w{ }\n')
+ self.escape_newlines -= 1
+
+ ## Inline
+
+ def visit_strong(self, node):
+ self.add_text('@strong{')
+ def depart_strong(self, node):
+ self.add_text('}')
+
+ def visit_emphasis(self, node):
+ self.add_text('@emph{')
+ def depart_emphasis(self, node):
+ self.add_text('}')
+
+ def visit_literal(self, node):
+ self.add_text('@code{')
+ def depart_literal(self, node):
+ self.add_text('}')
+
+ def visit_superscript(self, node):
+ self.add_text('@w{^')
+ def depart_superscript(self, node):
+ self.add_text('}')
+
+ def visit_subscript(self, node):
+ self.add_text('@w{[')
+ def depart_subscript(self, node):
+ self.add_text(']}')
+
+ ## Footnotes
+
+ def visit_footnote(self, node):
+ self.visit_block_quote(node)
+ def depart_footnote(self, node):
+ self.depart_block_quote(node)
+
+ def visit_footnote_reference(self, node):
+ self.add_text('@w{(')
+ def depart_footnote_reference(self, node):
+ self.add_text(')}')
+
+ visit_citation = visit_footnote
+ depart_citation = depart_footnote
+
+ def visit_citation_reference(self, node):
+ self.add_text('@w{[')
+ def depart_citation_reference(self, node):
+ self.add_text(']}')
+
+ ## Lists
+
+ def visit_bullet_list(self, node):
+ bullet = node.get('bullet', '*')
+ self.rstrip()
+ self.add_text('\n\n@itemize %s\n' % bullet)
+ def depart_bullet_list(self, node):
+ self.rstrip()
+ self.add_text('\n@end itemize\n\n')
+
+ def visit_enumerated_list(self, node):
+ # Doesn't support Roman numerals
+ enum = node.get('enumtype', 'arabic')
+ starters = {'arabic': '',
+ 'loweralpha': 'a',
+ 'upperalpha': 'A',}
+ start = node.get('start', starters.get(enum, ''))
+ self.rstrip()
+ self.add_text('\n\n@enumerate %s\n' % start)
+ def depart_enumerated_list(self, node):
+ self.rstrip()
+ self.add_text('\n@end enumerate\n\n')
+
+ def visit_list_item(self, node):
+ self.rstrip()
+ self.add_text('\n@item\n')
+ def depart_list_item(self, node):
+ pass
+
+ ## Option List
+
+ def visit_option_list(self, node):
+ self.add_text('\n@table @option\n')
+ def depart_option_list(self, node):
+ self.rstrip()
+ self.add_text('\n@end table\n\n')
+
+ def visit_option_list_item(self, node):
+ pass
+ def depart_option_list_item(self, node):
+ pass
+
+ def visit_option_group(self, node):
+ self.at_item_x = '@item'
+ def depart_option_group(self, node):
+ pass
+
+ def visit_option(self, node):
+ self.add_text(self.at_item_x + ' ', fresh=1)
+ self.at_item_x = '@itemx'
+ def depart_option(self, node):
+ pass
+
+ def visit_option_string(self, node):
+ pass
+ def depart_option_string(self, node):
+ pass
+
+ def visit_option_argument(self, node):
+ self.add_text(node.get('delimiter', ' '))
+ def depart_option_argument(self, node):
+ pass
+
+ def visit_description(self, node):
+ self.add_text('', fresh=1)
+ def depart_description(self, node):
+ pass
+
+ ## Definitions
+
+ def visit_definition_list(self, node):
+ self.add_text('\n@table @asis\n')
+ def depart_definition_list(self, node):
+ self.rstrip()
+ self.add_text('\n@end table\n\n')
+
+ def visit_definition_list_item(self, node):
+ self.at_item_x = '@item'
+ def depart_definition_list_item(self, node):
+ pass
+
+ def visit_term(self, node):
+ if node.get('ids') and node['ids'][0]:
+ self.add_anchor(node['ids'][0], node)
+ self.add_text(self.at_item_x + ' ', fresh=1)
+ self.at_item_x = '@itemx'
+ def depart_term(self, node):
+ pass
+
+ def visit_classifier(self, node):
+ self.add_text(' : ')
+ def depart_classifier(self, node):
+ pass
+
+ def visit_definition(self, node):
+ self.add_text('', fresh=1)
+ def depart_definition(self, node):
+ pass
+
+ ## Tables
+
+ def visit_table(self, node):
+ self.entry_sep = '@item'
+ def depart_table(self, node):
+ self.rstrip()
+ self.add_text('\n@end multitable\n\n')
+
+ def visit_tabular_col_spec(self, node):
+ pass
+ def depart_tabular_col_spec(self, node):
+ pass
+
+ def visit_colspec(self, node):
+ self.colwidths.append(node['colwidth'])
+ if len(self.colwidths) != self.n_cols:
+ return
+ self.add_text('@multitable ', fresh=1)
+ for i, n in enumerate(self.colwidths):
+ self.add_text('{%s} ' %('x' * (n+2)))
+ def depart_colspec(self, node):
+ pass
+
+ def visit_tgroup(self, node):
+ self.colwidths = []
+ self.n_cols = node['cols']
+ def depart_tgroup(self, node):
+ pass
+
+ def visit_thead(self, node):
+ self.entry_sep = '@headitem'
+ def depart_thead(self, node):
+ pass
+
+ def visit_tbody(self, node):
+ pass
+ def depart_tbody(self, node):
+ pass
+
+ def visit_row(self, node):
+ pass
+ def depart_row(self, node):
+ self.entry_sep = '@item'
+
+ def visit_entry(self, node):
+ self.rstrip()
+ self.add_text('\n%s ' % self.entry_sep)
+ self.entry_sep = '@tab'
+ def depart_entry(self, node):
+ for i in xrange(node.get('morecols', 0)):
+ self.add_text('@tab\n', fresh=1)
+ self.add_text('', fresh=1)
+
+ ## Field Lists
+
+ def visit_field_list(self, node):
+ self.add_text('\n@itemize @w\n')
+ def depart_field_list(self, node):
+ self.rstrip()
+ self.add_text('\n@end itemize\n\n')
+
+ def visit_field(self, node):
+ if not isinstance(node.parent, nodes.field_list):
+ self.visit_field_list(None)
+ def depart_field(self, node):
+ if not isinstance(node.parent, nodes.field_list):
+ self.depart_field_list(None)
+
+ def visit_field_name(self, node):
+ self.add_text('@item ', fresh=1)
+ def depart_field_name(self, node):
+ self.add_text(':')
+
+ def visit_field_body(self, node):
+ self.add_text('', fresh=1)
+ def depart_field_body(self, node):
+ pass
+
+ ## Admonitions
+
+ def visit_admonition(self, node):
+ title = escape(node[0].astext())
+ self.add_text('\n@cartouche\n'
+ '@quotation %s\n' % title)
+ def depart_admonition(self, node):
+ self.rstrip()
+ self.add_text('\n@end quotation\n'
+ '@end cartouche\n\n')
+
+ def _make_visit_admonition(typ):
+ def visit(self, node):
+ title = escape(typ)
+ self.add_text('\n@cartouche\n'
+ '@quotation %s\n' % title)
+ return visit
+
+ visit_attention = _make_visit_admonition('Attention')
+ visit_caution = _make_visit_admonition('Caution')
+ visit_danger = _make_visit_admonition('Danger')
+ visit_error = _make_visit_admonition('Error')
+ visit_important = _make_visit_admonition('Important')
+ visit_note = _make_visit_admonition('Note')
+ visit_tip = _make_visit_admonition('Tip')
+ visit_hint = _make_visit_admonition('Hint')
+ visit_warning = _make_visit_admonition('Warning')
+
+ depart_attention = depart_admonition
+ depart_caution = depart_admonition
+ depart_danger = depart_admonition
+ depart_error = depart_admonition
+ depart_important = depart_admonition
+ depart_note = depart_admonition
+ depart_tip = depart_admonition
+ depart_hint = depart_admonition
+ depart_warning = depart_admonition
+
+ ## Misc
+
+ def visit_docinfo(self, node):
+ # No 'docinfo_xform'
+ raise nodes.SkipNode
+
+ def visit_topic(self, node):
+ # Ignore TOC's since we have to have a "menu" anyway
+ if 'contents' in node.get('classes', []):
+ raise nodes.SkipNode
+ title = node[0]
+ self.visit_rubric(title)
+ self.add_text('%s\n' % escape(title.astext()))
+ self.visit_block_quote(node)
+ def depart_topic(self, node):
+ self.depart_block_quote(node)
+
+ def visit_generated(self, node):
+ raise nodes.SkipNode
+ def depart_generated(self, node):
+ pass
+
+ def visit_transition(self, node):
+ self.add_text('\n\n@noindent\n'
+ '@exdent @w{%s}\n\n'
+ '@noindent\n' % ('_' * 70))
+ def depart_transition(self, node):
+ pass
+
+ def visit_attribution(self, node):
+ self.add_text('@flushright\n', fresh=1)
+ def depart_attribution(self, node):
+ self.add_text('@end flushright\n', fresh=1)
+
+ def visit_raw(self, node):
+ format = node.get('format', '').split()
+ if 'texinfo' in format or 'texi' in format:
+ self.add_text(node.astext())
+ raise nodes.SkipNode
+ def depart_raw(self, node):
+ pass
+
+ def visit_figure(self, node):
+ self.add_text('\n@float Figure\n')
+ def depart_figure(self, node):
+ self.rstrip()
+ self.add_text('\n@end float\n\n')
+
+ def visit_caption(self, node):
+ if not isinstance(node.parent, nodes.figure):
+ self.document.reporter.warning('Caption not inside a figure.',
+ base_node=node)
+ return
+ self.add_text('@caption{', fresh=1)
+ def depart_caption(self, node):
+ if isinstance(node.parent, nodes.figure):
+ self.rstrip()
+ self.add_text('}\n')
+
+ def visit_image(self, node):
+ self.add_text('@w{[image]}')
+ raise nodes.SkipNode
+ def depart_image(self, node):
+ pass
+
+ def visit_compound(self, node):
+ pass
+ def depart_compound(self, node):
+ pass
+
+ def visit_sidebar(self, node):
+ pass
+ def depart_sidebar(self, node):
+ pass
+
+ def visit_label(self, node):
+ self.add_text('@w{(')
+ def depart_label(self, node):
+ self.add_text(')} ')
+
+ def visit_legend(self, node):
+ pass
+ def depart_legend(self, node):
+ pass
+
+ def visit_substitution_reference(self, node):
+ pass
+ def depart_substitution_reference(self, node):
+ pass
+
+ def visit_substitution_definition(self, node):
+ raise nodes.SkipNode
+ def depart_substitution_definition(self, node):
+ pass
+
+ def visit_system_message(self, node):
+ self.add_text('\n@format\n'
+ '---------- SYSTEM MESSAGE -----------\n')
+ def depart_system_message(self, node):
+ self.rstrip()
+ self.add_text('\n------------------------------------\n'
+ '@end format\n')
+
+ def visit_comment(self, node):
+ for line in node.astext().splitlines():
+ self.add_text('@c %s\n' % line, fresh=1)
+ raise nodes.SkipNode
+
+ def visit_problematic(self, node):
+ self.add_text('>')
+ def depart_problematic(self, node):
+ self.add_text('<')
+
+ def unimplemented_visit(self, node):
+ self.document.reporter.error("Unimplemented node type: `%s'"
+ % node.__class__.__name__, base_node=node)
+
+ def unknown_visit(self, node):
+ self.document.reporter.error("Unknown node type: `%s'"
+ % node.__class__.__name__, base_node=node)
+ def unknown_departure(self, node):
+ pass
+
+ ### Sphinx specific
+
+ def visit_productionlist(self, node):
+ self.visit_literal_block(None)
+ names = []
+ for production in node:
+ names.append(production['tokenname'])
+ maxlen = max(len(name) for name in names)
+ for production in node:
+ if production['tokenname']:
+ s = production['tokenname'].ljust(maxlen) + ' ::='
+ lastname = production['tokenname']
+ else:
+ s = '%s ' % (' '*len(lastname))
+ self.add_text(escape(s))
+ self.add_text(escape(production.astext() + '\n'))
+ self.depart_literal_block(None)
+ raise nodes.SkipNode
+ def depart_productionlist(self, node):
+ pass
+
+ def visit_literal_emphasis(self, node):
+ self.add_text('@code{')
+ def depart_literal_emphasis(self, node):
+ self.add_text('}')
+
+ def visit_module(self, node):
+ modname = escape_id(node['modname'])
+ self.add_anchor(modname, node)
+
+ def visit_index(self, node):
+ # Throws off table alignment
+ if isinstance(node.parent, nodes.term):
+ return
+ for entry in node['entries']:
+ typ, text, tid, text2 = entry
+ text = text.replace('!', ' ').replace(';', ' ')
+ text = escape_id(text)
+ self.add_text('@geindex %s\n' % text, fresh=1)
+
+ def visit_autosummary_table(self, node):
+ pass
+ def depart_autosummary_table(self, node):
+ pass
+
+ def visit_todo_node(self, node):
+ self.visit_transition(node)
+ self.visit_admonition(node)
+ def depart_todo_node(self, node):
+ self.depart_admonition(node)
+ self.visit_transition(node)
+
+ def visit_refcount(self, node):
+ self.add_text('\n')
+ def depart_refcount(self, node):
+ self.add_text('\n\n')
+
+ def visit_versionmodified(self, node):
+ intro = versionlabels[node['type']] % node['version']
+ if node.children:
+ intro += ': '
+ else:
+ intro += '.'
+ self.add_text('%s' % escape(intro), fresh=1)
+ def depart_versionmodified(self, node):
+ self.rstrip()
+ self.add_text('\n\n', fresh=1)
+
+ def visit_start_of_file(self, node):
+ self.curfilestack.append(node.get('docname', ''))
+ if node.get('docname'):
+ self.next_section_targets.append(node['docname'])
+ def depart_start_of_file(self, node):
+ self.curfilestack.pop()
+
+ def visit_centered(self, node):
+ txt = escape_arg(node.astext())
+ self.add_text('@center %s\n' % txt, fresh=1)
+ raise nodes.SkipNode
+ def depart_centered(self, node):
+ pass
+
+ def visit_seealso(self, node):
+ pass
+ def depart_seealso(self, node):
+ pass
+
+ def visit_meta(self, node):
+ raise nodes.SkipNode
+ def depart_meta(self, node):
+ pass
+
+ def visit_glossary(self, node):
+ pass
+ def depart_glossary(self, node):
+ pass
+
+ def visit_acks(self, node):
+ pass
+ def depart_acks(self, node):
+ pass
+
+ def visit_highlightlang(self, node):
+ pass
+ def depart_highlightlang(self, node):
+ pass
+
+ ## Desc
+
+ desc_map = {
+ 'function' : 'Function',
+ 'class': 'Class',
+ 'method': 'Method',
+ 'classmethod': 'Class Method',
+ 'staticmethod': 'Static Method',
+ 'exception': 'Exception',
+ 'data': 'Data',
+ 'attribute': 'Attribute',
+ 'opcode': 'Opcode',
+ 'cfunction': 'C Function',
+ 'cmember': 'C Member',
+ 'cmacro': 'C Macro',
+ 'ctype': 'C Type',
+ 'cvar': 'C Variable',
+ 'cmdoption': 'Option',
+ 'describe': 'Description',
+ }
+
+ def visit_desc(self, node):
+ self.at_deffnx = '@deffn'
+ def depart_desc(self, node):
+ self.rstrip()
+ self.add_text('@end deffn\n\n', fresh=1)
+ def visit_desc_signature(self, node):
+ self.desctype = node.parent['desctype'].strip()
+ if self.desctype != 'describe' and node['ids']:
+ self.add_anchor(node['ids'][0], node)
+ typ = self.desc_map.get(self.desctype, self.desctype)
+ self.add_text('%s {%s} ' % (self.at_deffnx, escape_arg(typ)), fresh=1)
+ self.at_deffnx = '@deffnx'
+ def depart_desc_signature(self, node):
+ self.add_text("", fresh=1)
+
+ def visit_desc_name(self, node):
+ pass
+ def depart_desc_name(self, node):
+ pass
+
+ def visit_desc_addname(self, node):
+ pass
+ def depart_desc_addname(self, node):
+ pass
+
+ def visit_desc_type(self, node):
+ pass
+ def depart_desc_type(self, node):
+ pass
+
+ def visit_desc_returns(self, node):
+ self.add_text(' -> ')
+ def depart_desc_returns(self, node):
+ pass
+
+ def visit_desc_parameterlist(self, node):
+ self.add_text(' (')
+ self.first_param = 1
+ def depart_desc_parameterlist(self, node):
+ self.add_text(')')
+
+ def visit_desc_parameter(self, node):
+ if not self.first_param:
+ self.add_text(', ')
+ else:
+ self.first_param = 0
+ self.add_text(escape(node.astext()))
+ raise nodes.SkipNode
+ def depart_desc_parameter(self, node):
+ pass
+
+ def visit_desc_optional(self, node):
+ self.add_text('[')
+ def depart_desc_optional(self, node):
+ self.add_text(']')
+
+ def visit_desc_annotation(self, node):
+ raise nodes.SkipNode
+ def depart_desc_annotation(self, node):
+ pass
+
+ def visit_desc_content(self, node):
+ self.add_text("", fresh=1)
+ def depart_desc_content(self, node):
+ pass
+
+ def visit_inline(self, node):
+ # stub
+ pass
+ def depart_inline(self, node):
+ pass
+
+ def visit_abbreviation(self, node):
+ self.add_text('@abbr{')
+ if node.hasattr('explanation'):
+ self.context.append(', %s}' % escape_arg(node['explanation']))
+ else:
+ self.context.append('}')
+ def depart_abbreviation(self, node):
+ self.body.append(self.context.pop())
+
+ def visit_download_reference(self, node):
+ pass
+ def depart_download_reference(self, node):
+ pass
+
+ def visit_hlist(self, node):
+ # stub
+ self.visit_bullet_list(node)
+ def depart_hlist(self, node):
+ self.depart_bullet_list(node)
+
+ def visit_hlistcol(self, node):
+ pass
+ def depart_hlistcol(self, node):
+ pass
diff --git a/sphinx/writers/text.py b/sphinx/writers/text.py
index 1d6ad648..09c1e535 100644
--- a/sphinx/writers/text.py
+++ b/sphinx/writers/text.py
@@ -390,7 +390,7 @@ class TextTranslator(nodes.NodeVisitor):
self.add_text(''.join(out) + '\n')
def writerow(row):
- lines = map(None, *row)
+ lines = zip(*row)
for line in lines:
out = ['|']
for i, cell in enumerate(line):
@@ -651,9 +651,9 @@ class TextTranslator(nodes.NodeVisitor):
self.add_text('*')
def visit_literal(self, node):
- self.add_text('``')
+ self.add_text('"')
def depart_literal(self, node):
- self.add_text('``')
+ self.add_text('"')
def visit_subscript(self, node):
self.add_text('_')
diff --git a/sphinx/writers/websupport.py b/sphinx/writers/websupport.py
new file mode 100644
index 00000000..f75cd47b
--- /dev/null
+++ b/sphinx/writers/websupport.py
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinx.writers.websupport
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ sphinx.websupport writer that adds comment-related annotations.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from sphinx.writers.html import HTMLTranslator
+from sphinx.util.websupport import is_commentable
+
+
+class WebSupportTranslator(HTMLTranslator):
+ """
+ Our custom HTML translator.
+ """
+
+ def __init__(self, builder, *args, **kwargs):
+ HTMLTranslator.__init__(self, builder, *args, **kwargs)
+ self.comment_class = 'sphinx-has-comment'
+
+ def dispatch_visit(self, node):
+ if is_commentable(node):
+ self.handle_visit_commentable(node)
+ HTMLTranslator.dispatch_visit(self, node)
+
+ def handle_visit_commentable(self, node):
+ # We will place the node in the HTML id attribute. If the node
+ # already has an id (for indexing purposes) put an empty
+ # span with the existing id directly before this node's HTML.
+ self.add_db_node(node)
+ if node.attributes['ids']:
+ self.body.append('<span id="%s"></span>'
+ % node.attributes['ids'][0])
+ node.attributes['ids'] = ['s%s' % node.uid]
+ node.attributes['classes'].append(self.comment_class)
+
+ def add_db_node(self, node):
+ storage = self.builder.storage
+ if not storage.has_node(node.uid):
+ storage.add_node(id=node.uid,
+ document=self.builder.cur_docname,
+ source=node.rawsource or node.astext())
diff --git a/tests/etree13/ElementTree.py b/tests/etree13/ElementTree.py
index d3732504..f459c7f8 100644
--- a/tests/etree13/ElementTree.py
+++ b/tests/etree13/ElementTree.py
@@ -1425,12 +1425,16 @@ class XMLParser(object):
err.position = value.lineno, value.offset
raise err
- def _fixtext(self, text):
- # convert text string to ascii, if possible
- try:
- return text.encode("ascii")
- except UnicodeError:
+ if sys.version_info >= (3, 0):
+ def _fixtext(self, text):
return text
+ else:
+ def _fixtext(self, text):
+ # convert text string to ascii, if possible
+ try:
+ return text.encode("ascii")
+ except UnicodeError:
+ return text
def _fixname(self, key):
# expand qname, and convert name string to ascii, if possible
diff --git a/tests/path.py b/tests/path.py
index ceb895f5..8e9afeaa 100644
--- a/tests/path.py
+++ b/tests/path.py
@@ -1,953 +1,196 @@
-""" path.py - An object representing a path to a file or directory.
-
-Example:
-
-from path import path
-d = path('/home/guido/bin')
-for f in d.files('*.py'):
- f.chmod(0755)
-
-This module requires Python 2.2 or later.
-
-
-URL: http://www.jorendorff.com/articles/python/path
-Author: Jason Orendorff <jason.orendorff\x40gmail\x2ecom> (and others - see the url!)
-Date: 9 Mar 2007
+#!/usr/bin/env python
+# coding: utf-8
"""
+ path
+ ~~~~
+ :copyright: Copyright 2010 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+import os
+import sys
+import shutil
+from codecs import open
-# TODO
-# - Tree-walking functions don't avoid symlink loops. Matt Harrison
-# sent me a patch for this.
-# - Bug in write_text(). It doesn't support Universal newline mode.
-# - Better error message in listdir() when self isn't a
-# directory. (On Windows, the error message really sucks.)
-# - Make sure everything has a good docstring.
-# - Add methods for regex find and replace.
-# - guess_content_type() method?
-# - Perhaps support arguments to touch().
-
-from __future__ import generators
-
-import sys, warnings, os, fnmatch, glob, shutil, codecs
-
-__version__ = '2.2'
-__all__ = ['path']
-
-# Platform-specific support for path.owner
-if os.name == 'nt':
- try:
- import win32security
- except ImportError:
- win32security = None
-else:
- try:
- import pwd
- except ImportError:
- pwd = None
-
-# Pre-2.3 support. Are unicode filenames supported?
-_base = str
-_getcwd = os.getcwd
-try:
- if os.path.supports_unicode_filenames:
- _base = unicode
- _getcwd = os.getcwdu
-except AttributeError:
- pass
-
-# Pre-2.3 workaround for booleans
-try:
- True, False
-except NameError:
- True, False = 1, 0
-
-# Pre-2.3 workaround for basestring.
-try:
- basestring
-except NameError:
- basestring = (str, unicode)
-
-# Universal newline support
-_textmode = 'r'
-if hasattr(file, 'newlines'):
- _textmode = 'U'
-
-
-class TreeWalkWarning(Warning):
- pass
-
-class path(_base):
- """ Represents a filesystem path.
-
- For documentation on individual methods, consult their
- counterparts in os.path.
- """
-
- # --- Special Python methods.
- def __repr__(self):
- return 'path(%s)' % _base.__repr__(self)
+FILESYSTEMENCODING = sys.getfilesystemencoding() or sys.getdefaultencoding()
- # Adding a path and a string yields a path.
- def __add__(self, more):
- try:
- resultStr = _base.__add__(self, more)
- except TypeError: #Python bug
- resultStr = NotImplemented
- if resultStr is NotImplemented:
- return resultStr
- return self.__class__(resultStr)
-
- def __radd__(self, other):
- if isinstance(other, basestring):
- return self.__class__(other.__add__(self))
- else:
- return NotImplemented
- # The / operator joins paths.
- def __div__(self, rel):
- """ fp.__div__(rel) == fp / rel == fp.joinpath(rel)
+class path(str):
+ """
+ Represents a path which behaves like a string.
+ """
+ if sys.version_info < (3, 0):
+ def __new__(cls, s, encoding=FILESYSTEMENCODING, errors='strict'):
+ if isinstance(s, unicode):
+ s = s.encode(encoding, errors=errors)
+ return str.__new__(cls, s)
+ return str.__new__(cls, s)
- Join two path components, adding a separator character if
- needed.
+ @property
+ def parent(self):
"""
- return self.__class__(os.path.join(self, rel))
-
- # Make the / operator work even when true division is enabled.
- __truediv__ = __div__
-
- def getcwd(cls):
- """ Return the current working directory as a path object. """
- return cls(_getcwd())
- getcwd = classmethod(getcwd)
-
-
- # --- Operations on path strings.
-
- isabs = os.path.isabs
- def abspath(self): return self.__class__(os.path.abspath(self))
- def normcase(self): return self.__class__(os.path.normcase(self))
- def normpath(self): return self.__class__(os.path.normpath(self))
- def realpath(self): return self.__class__(os.path.realpath(self))
- def expanduser(self): return self.__class__(os.path.expanduser(self))
- def expandvars(self): return self.__class__(os.path.expandvars(self))
- def dirname(self): return self.__class__(os.path.dirname(self))
- basename = os.path.basename
-
- def expand(self):
- """ Clean up a filename by calling expandvars(),
- expanduser(), and normpath() on it.
-
- This is commonly everything needed to clean up a filename
- read from a configuration file, for example.
+ The name of the directory the file or directory is in.
"""
- return self.expandvars().expanduser().normpath()
-
- def _get_namebase(self):
- base, ext = os.path.splitext(self.name)
- return base
-
- def _get_ext(self):
- f, ext = os.path.splitext(_base(self))
- return ext
-
- def _get_drive(self):
- drive, r = os.path.splitdrive(self)
- return self.__class__(drive)
-
- parent = property(
- dirname, None, None,
- """ This path's parent directory, as a new path object.
-
- For example, path('/usr/local/lib/libpython.so').parent == path('/usr/local/lib')
- """)
-
- name = property(
- basename, None, None,
- """ The name of this file or directory without the full path.
-
- For example, path('/usr/local/lib/libpython.so').name == 'libpython.so'
- """)
+ return self.__class__(os.path.dirname(self))
- namebase = property(
- _get_namebase, None, None,
- """ The same as path.name, but with one file extension stripped off.
-
- For example, path('/home/guido/python.tar.gz').name == 'python.tar.gz',
- but path('/home/guido/python.tar.gz').namebase == 'python.tar'
- """)
-
- ext = property(
- _get_ext, None, None,
- """ The file extension, for example '.py'. """)
-
- drive = property(
- _get_drive, None, None,
- """ The drive specifier, for example 'C:'.
- This is always empty on systems that don't use drive specifiers.
- """)
-
- def splitpath(self):
- """ p.splitpath() -> Return (p.parent, p.name). """
- parent, child = os.path.split(self)
- return self.__class__(parent), child
-
- def splitdrive(self):
- """ p.splitdrive() -> Return (p.drive, <the rest of p>).
-
- Split the drive specifier from this path. If there is
- no drive specifier, p.drive is empty, so the return value
- is simply (path(''), p). This is always the case on Unix.
+ def abspath(self):
"""
- drive, rel = os.path.splitdrive(self)
- return self.__class__(drive), rel
-
- def splitext(self):
- """ p.splitext() -> Return (p.stripext(), p.ext).
-
- Split the filename extension from this path and return
- the two parts. Either part may be empty.
-
- The extension is everything from '.' to the end of the
- last path segment. This has the property that if
- (a, b) == p.splitext(), then a + b == p.
+ Returns the absolute path.
"""
- filename, ext = os.path.splitext(self)
- return self.__class__(filename), ext
-
- def stripext(self):
- """ p.stripext() -> Remove one file extension from the path.
+ return self.__class__(os.path.abspath(self))
- For example, path('/home/guido/python.tar.gz').stripext()
- returns path('/home/guido/python.tar').
+ def isabs(self):
"""
- return self.splitext()[0]
-
- if hasattr(os.path, 'splitunc'):
- def splitunc(self):
- unc, rest = os.path.splitunc(self)
- return self.__class__(unc), rest
-
- def _get_uncshare(self):
- unc, r = os.path.splitunc(self)
- return self.__class__(unc)
-
- uncshare = property(
- _get_uncshare, None, None,
- """ The UNC mount point for this path.
- This is empty for paths on local drives. """)
-
- def joinpath(self, *args):
- """ Join two or more path components, adding a separator
- character (os.sep) if needed. Returns a new path
- object.
- """
- return self.__class__(os.path.join(self, *args))
-
- def splitall(self):
- r""" Return a list of the path components in this path.
-
- The first item in the list will be a path. Its value will be
- either os.curdir, os.pardir, empty, or the root directory of
- this path (for example, '/' or 'C:\\'). The other items in
- the list will be strings.
-
- path.path.joinpath(*result) will yield the original path.
- """
- parts = []
- loc = self
- while loc != os.curdir and loc != os.pardir:
- prev = loc
- loc, child = prev.splitpath()
- if loc == prev:
- break
- parts.append(child)
- parts.append(loc)
- parts.reverse()
- return parts
-
- def relpath(self):
- """ Return this path as a relative path,
- based from the current working directory.
- """
- cwd = self.__class__(os.getcwd())
- return cwd.relpathto(self)
-
- def relpathto(self, dest):
- """ Return a relative path from self to dest.
-
- If there is no relative path from self to dest, for example if
- they reside on different drives in Windows, then this returns
- dest.abspath().
- """
- origin = self.abspath()
- dest = self.__class__(dest).abspath()
-
- orig_list = origin.normcase().splitall()
- # Don't normcase dest! We want to preserve the case.
- dest_list = dest.splitall()
-
- if orig_list[0] != os.path.normcase(dest_list[0]):
- # Can't get here from there.
- return dest
-
- # Find the location where the two paths start to differ.
- i = 0
- for start_seg, dest_seg in zip(orig_list, dest_list):
- if start_seg != os.path.normcase(dest_seg):
- break
- i += 1
-
- # Now i is the point where the two paths diverge.
- # Need a certain number of "os.pardir"s to work up
- # from the origin to the point of divergence.
- segments = [os.pardir] * (len(orig_list) - i)
- # Need to add the diverging part of dest_list.
- segments += dest_list[i:]
- if len(segments) == 0:
- # If they happen to be identical, use os.curdir.
- relpath = os.curdir
- else:
- relpath = os.path.join(*segments)
- return self.__class__(relpath)
-
- # --- Listing, searching, walking, and matching
-
- def listdir(self, pattern=None):
- """ D.listdir() -> List of items in this directory.
-
- Use D.files() or D.dirs() instead if you want a listing
- of just files or just subdirectories.
+ Returns ``True`` if the path is absolute.
+ """
+ return os.path.isabs(self)
- The elements of the list are path objects.
+ def isdir(self):
+ """
+ Returns ``True`` if the path is a directory.
+ """
+ return os.path.isdir(self)
- With the optional 'pattern' argument, this only lists
- items whose names match the given pattern.
+ def isfile(self):
"""
- names = os.listdir(self)
- if pattern is not None:
- names = fnmatch.filter(names, pattern)
- return [self / child for child in names]
+ Returns ``True`` if the path is a file.
+ """
+ return os.path.isfile(self)
- def dirs(self, pattern=None):
- """ D.dirs() -> List of this directory's subdirectories.
+ def islink(self):
+ """
+ Returns ``True`` if the path is a symbolic link.
+ """
+ return os.path.islink(self)
- The elements of the list are path objects.
- This does not walk recursively into subdirectories
- (but see path.walkdirs).
+ def ismount(self):
+ """
+ Returns ``True`` if the path is a mount point.
+ """
+ return os.path.ismount(self)
- With the optional 'pattern' argument, this only lists
- directories whose names match the given pattern. For
- example, d.dirs('build-*').
+ def rmtree(self, ignore_errors=False, onerror=None):
"""
- return [p for p in self.listdir(pattern) if p.isdir()]
+ Removes the file or directory and any files or directories it may
+ contain.
- def files(self, pattern=None):
- """ D.files() -> List of the files in this directory.
+ :param ignore_errors:
+ If ``True`` errors are silently ignored, otherwise an exception
+ is raised in case an error occurs.
- The elements of the list are path objects.
- This does not walk into subdirectories (see path.walkfiles).
+ :param onerror:
+ A callback which gets called with the arguments `func`, `path` and
+ `exc_info`. `func` is one of :func:`os.listdir`, :func:`os.remove`
+ or :func:`os.rmdir`. `path` is the argument to the function which
+ caused it to fail and `exc_info` is a tuple as returned by
+ :func:`sys.exc_info`.
+ """
+ shutil.rmtree(self, ignore_errors=ignore_errors, onerror=onerror)
- With the optional 'pattern' argument, this only lists files
- whose names match the given pattern. For example,
- d.files('*.pyc').
+ def copytree(self, destination, symlinks=False):
"""
+ Recursively copy a directory to the given `destination`. If the given
+ `destination` does not exist it will be created.
- return [p for p in self.listdir(pattern) if p.isfile()]
+ :param symlinks:
+ If ``True`` symbolic links in the source tree result in symbolic
+ links in the destination tree otherwise the contents of the files
+ pointed to by the symbolic links are copied.
+ """
+ shutil.copytree(self, destination, symlinks=symlinks)
- def walk(self, pattern=None, errors='strict'):
- """ D.walk() -> iterator over files and subdirs, recursively.
+ def movetree(self, destination):
+ """
+ Recursively move the file or directory to the given `destination`
+ similar to the Unix "mv" command.
- The iterator yields path objects naming each child item of
- this directory and its descendants. This requires that
- D.isdir().
+ If the `destination` is a file it may be overwritten depending on the
+ :func:`os.rename` semantics.
+ """
+ shutil.move(self, destination)
- This performs a depth-first traversal of the directory tree.
- Each directory is returned just before all its children.
+ move = movetree
- The errors= keyword argument controls behavior when an
- error occurs. The default is 'strict', which causes an
- exception. The other allowed values are 'warn', which
- reports the error via warnings.warn(), and 'ignore'.
+ def unlink(self):
"""
- if errors not in ('strict', 'warn', 'ignore'):
- raise ValueError("invalid errors parameter")
-
- try:
- childList = self.listdir()
- except Exception:
- if errors == 'ignore':
- return
- elif errors == 'warn':
- warnings.warn(
- "Unable to list directory '%s': %s"
- % (self, sys.exc_info()[1]),
- TreeWalkWarning)
- return
- else:
- raise
-
- for child in childList:
- if pattern is None or child.fnmatch(pattern):
- yield child
- try:
- isdir = child.isdir()
- except Exception:
- if errors == 'ignore':
- isdir = False
- elif errors == 'warn':
- warnings.warn(
- "Unable to access '%s': %s"
- % (child, sys.exc_info()[1]),
- TreeWalkWarning)
- isdir = False
- else:
- raise
-
- if isdir:
- for item in child.walk(pattern, errors):
- yield item
-
- def walkdirs(self, pattern=None, errors='strict'):
- """ D.walkdirs() -> iterator over subdirs, recursively.
-
- With the optional 'pattern' argument, this yields only
- directories whose names match the given pattern. For
- example, mydir.walkdirs('*test') yields only directories
- with names ending in 'test'.
-
- The errors= keyword argument controls behavior when an
- error occurs. The default is 'strict', which causes an
- exception. The other allowed values are 'warn', which
- reports the error via warnings.warn(), and 'ignore'.
- """
- if errors not in ('strict', 'warn', 'ignore'):
- raise ValueError("invalid errors parameter")
+ Removes a file.
+ """
+ os.unlink(self)
+ def write_text(self, text, **kwargs):
+ """
+ Writes the given `text` to the file.
+ """
+ f = open(self, 'w', **kwargs)
try:
- dirs = self.dirs()
- except Exception:
- if errors == 'ignore':
- return
- elif errors == 'warn':
- warnings.warn(
- "Unable to list directory '%s': %s"
- % (self, sys.exc_info()[1]),
- TreeWalkWarning)
- return
- else:
- raise
-
- for child in dirs:
- if pattern is None or child.fnmatch(pattern):
- yield child
- for subsubdir in child.walkdirs(pattern, errors):
- yield subsubdir
-
- def walkfiles(self, pattern=None, errors='strict'):
- """ D.walkfiles() -> iterator over files in D, recursively.
-
- The optional argument, pattern, limits the results to files
- with names that match the pattern. For example,
- mydir.walkfiles('*.tmp') yields only files with the .tmp
- extension.
- """
- if errors not in ('strict', 'warn', 'ignore'):
- raise ValueError("invalid errors parameter")
+ f.write(text)
+ finally:
+ f.close()
+ def text(self, **kwargs):
+ """
+ Returns the text in the file.
+ """
+ f = open(self, mode='U', **kwargs)
try:
- childList = self.listdir()
- except Exception:
- if errors == 'ignore':
- return
- elif errors == 'warn':
- warnings.warn(
- "Unable to list directory '%s': %s"
- % (self, sys.exc_info()[1]),
- TreeWalkWarning)
- return
- else:
- raise
-
- for child in childList:
- try:
- isfile = child.isfile()
- isdir = not isfile and child.isdir()
- except:
- if errors == 'ignore':
- continue
- elif errors == 'warn':
- warnings.warn(
- "Unable to access '%s': %s"
- % (self, sys.exc_info()[1]),
- TreeWalkWarning)
- continue
- else:
- raise
-
- if isfile:
- if pattern is None or child.fnmatch(pattern):
- yield child
- elif isdir:
- for f in child.walkfiles(pattern, errors):
- yield f
-
- def fnmatch(self, pattern):
- """ Return True if self.name matches the given pattern.
-
- pattern - A filename pattern with wildcards,
- for example '*.py'.
- """
- return fnmatch.fnmatch(self.name, pattern)
-
- def glob(self, pattern):
- """ Return a list of path objects that match the pattern.
-
- pattern - a path relative to this directory, with wildcards.
-
- For example, path('/users').glob('*/bin/*') returns a list
- of all the files users have in their bin directories.
- """
- cls = self.__class__
- return [cls(s) for s in glob.glob(_base(self / pattern))]
-
-
- # --- Reading or writing an entire file at once.
-
- def open(self, mode='r'):
- """ Open this file. Return a file object. """
- return file(self, mode)
+ return f.read()
+ finally:
+ f.close()
def bytes(self):
- """ Open this file, read all bytes, return them as a string. """
- f = self.open('rb')
+ """
+ Returns the bytes in the file.
+ """
+ f = open(self, mode='rb')
try:
return f.read()
finally:
f.close()
def write_bytes(self, bytes, append=False):
- """ Open this file and write the given bytes to it.
+ """
+ Writes the given `bytes` to the file.
- Default behavior is to overwrite any existing file.
- Call p.write_bytes(bytes, append=True) to append instead.
+ :param append:
+ If ``True`` given `bytes` are added at the end of the file.
"""
if append:
mode = 'ab'
else:
mode = 'wb'
- f = self.open(mode)
+ f = open(self, mode=mode)
try:
f.write(bytes)
finally:
f.close()
- def text(self, encoding=None, errors='strict'):
- r""" Open this file, read it in, return the content as a string.
-
- This uses 'U' mode in Python 2.3 and later, so '\r\n' and '\r'
- are automatically translated to '\n'.
-
- Optional arguments:
-
- encoding - The Unicode encoding (or character set) of
- the file. If present, the content of the file is
- decoded and returned as a unicode object; otherwise
- it is returned as an 8-bit str.
- errors - How to handle Unicode errors; see help(str.decode)
- for the options. Default is 'strict'.
+ def exists(self):
"""
- if encoding is None:
- # 8-bit
- f = self.open(_textmode)
- try:
- return f.read()
- finally:
- f.close()
- else:
- # Unicode
- f = codecs.open(self, 'r', encoding, errors)
- # (Note - Can't use 'U' mode here, since codecs.open
- # doesn't support 'U' mode, even in Python 2.3.)
- try:
- t = f.read()
- finally:
- f.close()
- return (t.replace(u'\r\n', u'\n')
- .replace(u'\r\x85', u'\n')
- .replace(u'\r', u'\n')
- .replace(u'\x85', u'\n')
- .replace(u'\u2028', u'\n'))
-
- def write_text(self, text, encoding=None, errors='strict', linesep=os.linesep, append=False):
- r""" Write the given text to this file.
-
- The default behavior is to overwrite any existing file;
- to append instead, use the 'append=True' keyword argument.
-
- There are two differences between path.write_text() and
- path.write_bytes(): newline handling and Unicode handling.
- See below.
-
- Parameters:
-
- - text - str/unicode - The text to be written.
-
- - encoding - str - The Unicode encoding that will be used.
- This is ignored if 'text' isn't a Unicode string.
-
- - errors - str - How to handle Unicode encoding errors.
- Default is 'strict'. See help(unicode.encode) for the
- options. This is ignored if 'text' isn't a Unicode
- string.
-
- - linesep - keyword argument - str/unicode - The sequence of
- characters to be used to mark end-of-line. The default is
- os.linesep. You can also specify None; this means to
- leave all newlines as they are in 'text'.
-
- - append - keyword argument - bool - Specifies what to do if
- the file already exists (True: append to the end of it;
- False: overwrite it.) The default is False.
-
-
- --- Newline handling.
-
- write_text() converts all standard end-of-line sequences
- ('\n', '\r', and '\r\n') to your platform's default end-of-line
- sequence (see os.linesep; on Windows, for example, the
- end-of-line marker is '\r\n').
-
- If you don't like your platform's default, you can override it
- using the 'linesep=' keyword argument. If you specifically want
- write_text() to preserve the newlines as-is, use 'linesep=None'.
-
- This applies to Unicode text the same as to 8-bit text, except
- there are three additional standard Unicode end-of-line sequences:
- u'\x85', u'\r\x85', and u'\u2028'.
-
- (This is slightly different from when you open a file for
- writing with fopen(filename, "w") in C or file(filename, 'w')
- in Python.)
-
-
- --- Unicode
-
- If 'text' isn't Unicode, then apart from newline handling, the
- bytes are written verbatim to the file. The 'encoding' and
- 'errors' arguments are not used and must be omitted.
-
- If 'text' is Unicode, it is first converted to bytes using the
- specified 'encoding' (or the default encoding if 'encoding'
- isn't specified). The 'errors' argument applies only to this
- conversion.
-
- """
- if isinstance(text, unicode):
- if linesep is not None:
- # Convert all standard end-of-line sequences to
- # ordinary newline characters.
- text = (text.replace(u'\r\n', u'\n')
- .replace(u'\r\x85', u'\n')
- .replace(u'\r', u'\n')
- .replace(u'\x85', u'\n')
- .replace(u'\u2028', u'\n'))
- text = text.replace(u'\n', linesep)
- if encoding is None:
- encoding = sys.getdefaultencoding()
- bytes = text.encode(encoding, errors)
- else:
- # It is an error to specify an encoding if 'text' is
- # an 8-bit string.
- assert encoding is None
-
- if linesep is not None:
- text = (text.replace('\r\n', '\n')
- .replace('\r', '\n'))
- bytes = text.replace('\n', linesep)
-
- self.write_bytes(bytes, append)
-
- def lines(self, encoding=None, errors='strict', retain=True):
- r""" Open this file, read all lines, return them in a list.
-
- Optional arguments:
- encoding - The Unicode encoding (or character set) of
- the file. The default is None, meaning the content
- of the file is read as 8-bit characters and returned
- as a list of (non-Unicode) str objects.
- errors - How to handle Unicode errors; see help(str.decode)
- for the options. Default is 'strict'
- retain - If true, retain newline characters; but all newline
- character combinations ('\r', '\n', '\r\n') are
- translated to '\n'. If false, newline characters are
- stripped off. Default is True.
-
- This uses 'U' mode in Python 2.3 and later.
- """
- if encoding is None and retain:
- f = self.open(_textmode)
- try:
- return f.readlines()
- finally:
- f.close()
- else:
- return self.text(encoding, errors).splitlines(retain)
-
- def write_lines(self, lines, encoding=None, errors='strict',
- linesep=os.linesep, append=False):
- r""" Write the given lines of text to this file.
-
- By default this overwrites any existing file at this path.
-
- This puts a platform-specific newline sequence on every line.
- See 'linesep' below.
-
- lines - A list of strings.
-
- encoding - A Unicode encoding to use. This applies only if
- 'lines' contains any Unicode strings.
-
- errors - How to handle errors in Unicode encoding. This
- also applies only to Unicode strings.
-
- linesep - The desired line-ending. This line-ending is
- applied to every line. If a line already has any
- standard line ending ('\r', '\n', '\r\n', u'\x85',
- u'\r\x85', u'\u2028'), that will be stripped off and
- this will be used instead. The default is os.linesep,
- which is platform-dependent ('\r\n' on Windows, '\n' on
- Unix, etc.) Specify None to write the lines as-is,
- like file.writelines().
-
- Use the keyword argument append=True to append lines to the
- file. The default is to overwrite the file. Warning:
- When you use this with Unicode data, if the encoding of the
- existing data in the file is different from the encoding
- you specify with the encoding= parameter, the result is
- mixed-encoding data, which can really confuse someone trying
- to read the file later.
+ Returns ``True`` if the path exist.
"""
- if append:
- mode = 'ab'
- else:
- mode = 'wb'
- f = self.open(mode)
- try:
- for line in lines:
- isUnicode = isinstance(line, unicode)
- if linesep is not None:
- # Strip off any existing line-end and add the
- # specified linesep string.
- if isUnicode:
- if line[-2:] in (u'\r\n', u'\x0d\x85'):
- line = line[:-2]
- elif line[-1:] in (u'\r', u'\n',
- u'\x85', u'\u2028'):
- line = line[:-1]
- else:
- if line[-2:] == '\r\n':
- line = line[:-2]
- elif line[-1:] in ('\r', '\n'):
- line = line[:-1]
- line += linesep
- if isUnicode:
- if encoding is None:
- encoding = sys.getdefaultencoding()
- line = line.encode(encoding, errors)
- f.write(line)
- finally:
- f.close()
-
- # --- Methods for querying the filesystem.
-
- exists = os.path.exists
- isdir = os.path.isdir
- isfile = os.path.isfile
- islink = os.path.islink
- ismount = os.path.ismount
-
- if hasattr(os.path, 'samefile'):
- samefile = os.path.samefile
-
- getatime = os.path.getatime
- atime = property(
- getatime, None, None,
- """ Last access time of the file. """)
-
- getmtime = os.path.getmtime
- mtime = property(
- getmtime, None, None,
- """ Last-modified time of the file. """)
-
- if hasattr(os.path, 'getctime'):
- getctime = os.path.getctime
- ctime = property(
- getctime, None, None,
- """ Creation time of the file. """)
-
- getsize = os.path.getsize
- size = property(
- getsize, None, None,
- """ Size of the file, in bytes. """)
-
- if hasattr(os, 'access'):
- def access(self, mode):
- """ Return true if current user has access to this path.
-
- mode - One of the constants os.F_OK, os.R_OK, os.W_OK, os.X_OK
- """
- return os.access(self, mode)
-
- def stat(self):
- """ Perform a stat() system call on this path. """
- return os.stat(self)
-
- def lstat(self):
- """ Like path.stat(), but do not follow symbolic links. """
- return os.lstat(self)
-
- def get_owner(self):
- r""" Return the name of the owner of this file or directory.
-
- This follows symbolic links.
-
- On Windows, this returns a name of the form ur'DOMAIN\User Name'.
- On Windows, a group can own a file or directory.
- """
- if os.name == 'nt':
- if win32security is None:
- raise Exception("path.owner requires win32all to be installed")
- desc = win32security.GetFileSecurity(
- self, win32security.OWNER_SECURITY_INFORMATION)
- sid = desc.GetSecurityDescriptorOwner()
- account, domain, typecode = win32security.LookupAccountSid(None, sid)
- return domain + u'\\' + account
- else:
- if pwd is None:
- raise NotImplementedError("path.owner is not implemented on this platform.")
- st = self.stat()
- return pwd.getpwuid(st.st_uid).pw_name
-
- owner = property(
- get_owner, None, None,
- """ Name of the owner of this file or directory. """)
-
- if hasattr(os, 'statvfs'):
- def statvfs(self):
- """ Perform a statvfs() system call on this path. """
- return os.statvfs(self)
-
- if hasattr(os, 'pathconf'):
- def pathconf(self, name):
- return os.pathconf(self, name)
-
-
- # --- Modifying operations on files and directories
-
- def utime(self, times):
- """ Set the access and modified times of this file. """
- os.utime(self, times)
-
- def chmod(self, mode):
- os.chmod(self, mode)
+ return os.path.exists(self)
- if hasattr(os, 'chown'):
- def chown(self, uid, gid):
- os.chown(self, uid, gid)
-
- def rename(self, new):
- os.rename(self, new)
-
- def renames(self, new):
- os.renames(self, new)
-
-
- # --- Create/delete operations on directories
-
- def mkdir(self, mode=0777):
- os.mkdir(self, mode)
+ def lexists(self):
+ """
+ Returns ``True`` if the path exists unless it is a broken symbolic
+ link.
+ """
+ return os.path.lexists(self)
def makedirs(self, mode=0777):
+ """
+ Recursively create directories.
+ """
os.makedirs(self, mode)
- def rmdir(self):
- os.rmdir(self)
-
- def removedirs(self):
- os.removedirs(self)
-
-
- # --- Modifying operations on files
-
- def touch(self):
- """ Set the access/modified times of this file to the current time.
- Create the file if it does not exist.
+ def joinpath(self, *args):
"""
- fd = os.open(self, os.O_WRONLY | os.O_CREAT, 0666)
- os.close(fd)
- os.utime(self, None)
-
- def remove(self):
- os.remove(self)
-
- def unlink(self):
- os.unlink(self)
-
-
- # --- Links
-
- if hasattr(os, 'link'):
- def link(self, newpath):
- """ Create a hard link at 'newpath', pointing to this file. """
- os.link(self, newpath)
-
- if hasattr(os, 'symlink'):
- def symlink(self, newlink):
- """ Create a symbolic link at 'newlink', pointing here. """
- os.symlink(self, newlink)
-
- if hasattr(os, 'readlink'):
- def readlink(self):
- """ Return the path to which this symbolic link points.
-
- The result may be an absolute or a relative path.
- """
- return self.__class__(os.readlink(self))
-
- def readlinkabs(self):
- """ Return the path to which this symbolic link points.
-
- The result is always an absolute path.
- """
- p = self.readlink()
- if p.isabs():
- return p
- else:
- return (self.parent / p).abspath()
-
-
- # --- High-level functions from shutil
-
- copyfile = shutil.copyfile
- copymode = shutil.copymode
- copystat = shutil.copystat
- copy = shutil.copy
- copy2 = shutil.copy2
- copytree = shutil.copytree
- if hasattr(shutil, 'move'):
- move = shutil.move
- rmtree = shutil.rmtree
-
-
- # --- Special stuff from os
-
- if hasattr(os, 'chroot'):
- def chroot(self):
- os.chroot(self)
+ Joins the path with the argument given and returns the result.
+ """
+ return self.__class__(os.path.join(self, *map(self.__class__, args)))
- if hasattr(os, 'startfile'):
- def startfile(self):
- os.startfile(self)
+ __div__ = __truediv__ = joinpath
+ def __repr__(self):
+ return '%s(%s)' % (self.__class__.__name__, str.__repr__(self))
diff --git a/tests/root/bom.po b/tests/root/bom.po
new file mode 100644
index 00000000..c6025eb1
--- /dev/null
+++ b/tests/root/bom.po
@@ -0,0 +1,12 @@
+#, fuzzy
+msgid ""
+msgstr ""
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "File with UTF-8 BOM"
+msgstr "Datei mit UTF-8"
+
+msgid "This file has a UTF-8 \"BOM\"."
+msgstr "This file has umlauts: äöü."
diff --git a/tests/root/conf.py b/tests/root/conf.py
index a50029e5..b97ddfcc 100644
--- a/tests/root/conf.py
+++ b/tests/root/conf.py
@@ -22,7 +22,7 @@ copyright = '2010, Georg Brandl & Team'
version = '0.6'
release = '0.6alpha1'
today_fmt = '%B %d, %Y'
-#unused_docs = []
+# unused_docs = []
exclude_patterns = ['_build', '**/excluded.*']
keep_warnings = True
pygments_style = 'sphinx'
@@ -49,6 +49,11 @@ latex_documents = [
latex_additional_files = ['svgimg.svg']
+texinfo_documents = [
+ ('contents', 'SphinxTests', 'Sphinx Tests',
+ 'Georg Brandl \\and someone else', 'Sphinx Testing', 'Miscellaneous'),
+]
+
value_from_conf_py = 84
coverage_c_path = ['special/*.h']
diff --git a/tests/root/contents.txt b/tests/root/contents.txt
index e052e04b..280953b4 100644
--- a/tests/root/contents.txt
+++ b/tests/root/contents.txt
@@ -26,6 +26,7 @@ Contents:
extensions
doctest
extensions
+ versioning/index
Python <http://python.org/>
diff --git a/tests/root/doctest.txt b/tests/root/doctest.txt
index 35cdd589..d029cd88 100644
--- a/tests/root/doctest.txt
+++ b/tests/root/doctest.txt
@@ -30,7 +30,7 @@ Special directives
.. testcode::
- print 1+1
+ print(1+1)
.. testoutput::
@@ -50,30 +50,31 @@ Special directives
.. testsetup:: *
- from math import floor
+ def squared(x):
+ return x * x
.. doctest::
- >>> floor(1.2)
- 1.0
+ >>> squared(2)
+ 4
.. testcode::
- print floor(1.2)
+ print(squared(2))
.. testoutput::
- 1.0
+ 4
- >>> floor(1.2)
- 1.0
+ >>> squared(2)
+ 4
* options for testcode/testoutput blocks
.. testcode::
:hide:
- print 'Output text.'
+ print('Output text.')
.. testoutput::
:hide:
@@ -85,36 +86,44 @@ Special directives
.. testsetup:: group1
- from math import ceil
+ def add(x, y):
+ return x + y
- ``ceil`` is now known in "group1", but not in others.
+
+ ``add`` is now known in "group1", but not in others.
.. doctest:: group1
- >>> ceil(0.8)
- 1.0
+ >>> add(1, 1)
+ 2
.. doctest:: group2
- >>> ceil(0.8)
+ >>> add(1, 1)
Traceback (most recent call last):
...
- NameError: name 'ceil' is not defined
+ NameError: name 'add' is not defined
Interleaving testcode/testoutput:
.. testcode:: group1
- print ceil(0.8)
+ print(squared(3))
.. testcode:: group2
- print floor(0.8)
+ print(squared(4))
.. testoutput:: group1
- 1.0
+ 9
.. testoutput:: group2
- 0.0
+ 16
+
+
+.. testcleanup:: *
+
+ import test_doctest
+ test_doctest.cleanup_call()
diff --git a/tests/root/literal.inc b/tests/root/literal.inc
index d5b9890c..694f15ed 100644
--- a/tests/root/literal.inc
+++ b/tests/root/literal.inc
@@ -1,7 +1,7 @@
# Literally included file using Python highlighting
# -*- coding: utf-8 -*-
-foo = u"Including Unicode characters: üöä"
+foo = "Including Unicode characters: üöä"
class Foo:
pass
diff --git a/tests/root/markup.txt b/tests/root/markup.txt
index da71cf86..fab6d78c 100644
--- a/tests/root/markup.txt
+++ b/tests/root/markup.txt
@@ -142,6 +142,8 @@ Adding \n to test unescaping.
Test :abbr:`abbr (abbreviation)` and another :abbr:`abbr (abbreviation)`.
+Testing the :index:`index` role, also available with
+:index:`explicit <pair: title; explicit>` title.
.. _with:
diff --git a/tests/root/subdir.po b/tests/root/subdir.po
new file mode 100644
index 00000000..f515f220
--- /dev/null
+++ b/tests/root/subdir.po
@@ -0,0 +1,9 @@
+#, fuzzy
+msgid ""
+msgstr ""
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Including in subdir"
+msgstr "translation"
diff --git a/tests/root/versioning/added.txt b/tests/root/versioning/added.txt
new file mode 100644
index 00000000..22a70739
--- /dev/null
+++ b/tests/root/versioning/added.txt
@@ -0,0 +1,20 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
+
+Woho another paragraph, if this test fails we really have a problem because
+this means the algorithm itself fails and not the diffing algorithm which is
+pretty much doomed anyway as it probably fails for some kind of language
+respecting certain nodes anyway but we can't work around that anyway.
diff --git a/tests/root/versioning/deleted.txt b/tests/root/versioning/deleted.txt
new file mode 100644
index 00000000..a1a9c4c9
--- /dev/null
+++ b/tests/root/versioning/deleted.txt
@@ -0,0 +1,12 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
diff --git a/tests/root/versioning/deleted_end.txt b/tests/root/versioning/deleted_end.txt
new file mode 100644
index 00000000..f30e6300
--- /dev/null
+++ b/tests/root/versioning/deleted_end.txt
@@ -0,0 +1,11 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
diff --git a/tests/root/versioning/index.txt b/tests/root/versioning/index.txt
new file mode 100644
index 00000000..9d098f75
--- /dev/null
+++ b/tests/root/versioning/index.txt
@@ -0,0 +1,13 @@
+Versioning Stuff
+================
+
+.. toctree::
+
+ original
+ added
+ insert
+ deleted
+ deleted_end
+ modified
+ insert_beginning
+ insert_similar
diff --git a/tests/root/versioning/insert.txt b/tests/root/versioning/insert.txt
new file mode 100644
index 00000000..1c157cc9
--- /dev/null
+++ b/tests/root/versioning/insert.txt
@@ -0,0 +1,18 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+So this paragraph is just something I inserted in this document to test if our
+algorithm notices that this paragraph is not just a changed version.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
diff --git a/tests/root/versioning/insert_beginning.txt b/tests/root/versioning/insert_beginning.txt
new file mode 100644
index 00000000..57102a76
--- /dev/null
+++ b/tests/root/versioning/insert_beginning.txt
@@ -0,0 +1,18 @@
+Versioning test text
+====================
+
+Apperantly inserting a paragraph at the beginning of a document caused
+problems earlier so this document should be used to test that.
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
diff --git a/tests/root/versioning/insert_similar.txt b/tests/root/versioning/insert_similar.txt
new file mode 100644
index 00000000..ee9b5305
--- /dev/null
+++ b/tests/root/versioning/insert_similar.txt
@@ -0,0 +1,17 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
diff --git a/tests/root/versioning/modified.txt b/tests/root/versioning/modified.txt
new file mode 100644
index 00000000..49cdad93
--- /dev/null
+++ b/tests/root/versioning/modified.txt
@@ -0,0 +1,17 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. Inserting something silly as a modification, btw. have
+you seen the typo below?. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones. So this is a small
+modification by adding something to this paragraph.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hoep it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
diff --git a/tests/root/versioning/original.txt b/tests/root/versioning/original.txt
new file mode 100644
index 00000000..b3fe0609
--- /dev/null
+++ b/tests/root/versioning/original.txt
@@ -0,0 +1,15 @@
+Versioning test text
+====================
+
+So the thing is I need some kind of text - not the lorem ipsum stuff, that
+doesn't work out that well - to test :mod:`sphinx.versioning`. I couldn't find
+a good text for that under public domain so I thought the easiest solution is
+to write one by myself. It's not really interesting, in fact it is *really*
+boring.
+
+Anyway I need more than one paragraph, at least three for the original
+document, I think, and another one for two different ones.
+
+So the previous paragraph was a bit short because I don't want to test this
+only on long paragraphs, I hope it was short enough to cover most stuff.
+Anyway I see this lacks ``some markup`` so I have to add a **little** bit.
diff --git a/tests/run.py b/tests/run.py
index 2e07982c..40c4fbed 100755
--- a/tests/run.py
+++ b/tests/run.py
@@ -11,7 +11,17 @@
"""
import sys
-from os import path
+from os import path, chdir, listdir
+
+if sys.version_info >= (3, 0):
+ print('Copying and converting sources to build/lib/tests...')
+ from distutils.util import copydir_run_2to3
+ testroot = path.dirname(__file__) or '.'
+ newroot = path.join(testroot, path.pardir, 'build')
+ newroot = path.join(newroot, listdir(newroot)[0], 'tests')
+ copydir_run_2to3(testroot, newroot)
+ # switch to the converted dir so nose tests the right tests
+ chdir(newroot)
# always test the sphinx package from this directory
sys.path.insert(0, path.join(path.dirname(__file__), path.pardir))
@@ -19,8 +29,8 @@ sys.path.insert(0, path.join(path.dirname(__file__), path.pardir))
try:
import nose
except ImportError:
- print "The nose package is needed to run the Sphinx test suite."
+ print("The nose package is needed to run the Sphinx test suite.")
sys.exit(1)
-print "Running Sphinx test suite..."
+print("Running Sphinx test suite...")
nose.main()
diff --git a/tests/test_application.py b/tests/test_application.py
index f68c22d7..4baabcec 100644
--- a/tests/test_application.py
+++ b/tests/test_application.py
@@ -45,9 +45,11 @@ def test_output():
app = TestApp(status=status, warning=warnings)
try:
status.truncate(0) # __init__ writes to status
+ status.seek(0)
app.info("Nothing here...")
assert status.getvalue() == "Nothing here...\n"
status.truncate(0)
+ status.seek(0)
app.info("Nothing here...", True)
assert status.getvalue() == "Nothing here..."
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py
index 0b170972..949ba9d4 100644
--- a/tests/test_autodoc.py
+++ b/tests/test_autodoc.py
@@ -30,6 +30,8 @@ def setup_module():
options = Struct(
inherited_members = False,
undoc_members = False,
+ private_members = False,
+ special_members = False,
show_inheritance = False,
noindex = False,
synopsis = '',
@@ -490,6 +492,13 @@ def test_generate():
],
'class', 'Class', member_order='bysource', all_members=True)
+ # test autodoc_docstring_signature
+ assert_result_contains(
+ '.. py:method:: DocstringSig.meth(FOO, BAR=1) -> BAZ', 'method',
+ 'test_autodoc.DocstringSig.meth')
+ assert_result_contains(
+ ' rest of docstring', 'method', 'test_autodoc.DocstringSig.meth')
+
# --- generate fodder ------------
@@ -580,3 +589,12 @@ class Outer(object):
# should be documented as an alias
factory = dict
+
+
+class DocstringSig(object):
+ def meth(self):
+ """meth(FOO, BAR=1) -> BAZ
+First line of docstring
+
+ rest of docstring
+ """
diff --git a/tests/test_autosummary.py b/tests/test_autosummary.py
index 0c0a8ff4..7783cc7b 100644
--- a/tests/test_autosummary.py
+++ b/tests/test_autosummary.py
@@ -9,8 +9,6 @@
:license: BSD, see LICENSE for details.
"""
-import string
-
from util import *
from sphinx.ext.autosummary import mangle_signature
@@ -27,7 +25,7 @@ def test_mangle_signature():
(a, b, c='foobar()', d=123) :: (a, b[, c, d])
"""
- TEST = [map(string.strip, x.split("::")) for x in TEST.split("\n")
+ TEST = [map(lambda x: x.strip(), x.split("::")) for x in TEST.split("\n")
if '::' in x]
for inp, outp in TEST:
res = mangle_signature(inp).strip().replace(u"\u00a0", " ")
diff --git a/tests/test_build_gettext.py b/tests/test_build_gettext.py
new file mode 100644
index 00000000..ab68289e
--- /dev/null
+++ b/tests/test_build_gettext.py
@@ -0,0 +1,81 @@
+# -*- coding: utf-8 -*-
+"""
+ test_build_gettext
+ ~~~~~~~~~~~~~~~~~~
+
+ Test the build process with gettext builder with the test root.
+
+ :copyright: Copyright 2010 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import gettext
+import os
+from subprocess import Popen, PIPE
+
+from util import *
+from util import SkipTest
+
+
+def teardown_module():
+ (test_root / '_build').rmtree(True)
+
+
+@with_app(buildername='gettext')
+def test_all(app):
+ # Generic build; should fail only when the builder is horribly broken.
+ app.builder.build_all()
+
+
+@with_app(buildername='gettext')
+def test_build(app):
+ # Do messages end up in the correct location?
+ app.builder.build(['extapi', 'subdir/includes'])
+ # top-level documents end up in a message catalog
+ assert (app.outdir / 'extapi.pot').isfile()
+ # directory items are grouped into sections
+ assert (app.outdir / 'subdir.pot').isfile()
+
+
+@with_app(buildername='gettext')
+def test_gettext(app):
+ app.builder.build(['markup'])
+
+ (app.outdir / 'en' / 'LC_MESSAGES').makedirs()
+ cwd = os.getcwd()
+ os.chdir(app.outdir)
+ try:
+ try:
+ p = Popen(['msginit', '--no-translator', '-i', 'markup.pot',
+ '--locale', 'en_US'],
+ stdout=PIPE, stderr=PIPE)
+ except OSError:
+ raise SkipTest # most likely msginit was not found
+ else:
+ stdout, stderr = p.communicate()
+ if p.returncode != 0:
+ print stdout
+ print stderr
+ assert False, 'msginit exited with return code %s' % \
+ p.returncode
+ assert (app.outdir / 'en_US.po').isfile(), 'msginit failed'
+ try:
+ p = Popen(['msgfmt', 'en_US.po', '-o',
+ os.path.join('en', 'LC_MESSAGES', 'test_root.mo')],
+ stdout=PIPE, stderr=PIPE)
+ except OSError:
+ raise SkipTest # most likely msgfmt was not found
+ else:
+ stdout, stderr = p.communicate()
+ if p.returncode != 0:
+ print stdout
+ print stderr
+ assert False, 'msgfmt exited with return code %s' % \
+ p.returncode
+ assert (app.outdir / 'en' / 'LC_MESSAGES' / 'test_root.mo').isfile(), \
+ 'msgfmt failed'
+ finally:
+ os.chdir(cwd)
+
+ _ = gettext.translation('test_root', app.outdir, languages=['en']).gettext
+ assert _("Testing various markup") == u"Testing various markup"
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
index 638dc4af..f89df08c 100644
--- a/tests/test_build_html.py
+++ b/tests/test_build_html.py
@@ -12,6 +12,7 @@
import os
import re
import htmlentitydefs
+import sys
from StringIO import StringIO
try:
@@ -40,7 +41,7 @@ http://www.python.org/logo.png
%(root)s/includes.txt:\\d*: \\(WARNING/2\\) Encoding 'utf-8-sig' used for \
reading included file u'.*?wrongenc.inc' seems to be wrong, try giving an \
:encoding: option\\n?
-%(root)s/includes.txt:4: WARNING: download file not readable: nonexisting.png
+%(root)s/includes.txt:4: WARNING: download file not readable: .*?nonexisting.png
%(root)s/objects.txt:\\d*: WARNING: using old C markup; please migrate to \
new-style markup \(e.g. c:function instead of cfunction\), see \
http://sphinx.pocoo.org/domains.html
@@ -53,6 +54,11 @@ HTML_WARNINGS = ENV_WARNINGS + """\
%(root)s/markup.txt:: WARNING: invalid pair index entry u'keyword; '
"""
+if sys.version_info >= (3, 0):
+ ENV_WARNINGS = remove_unicode_literals(ENV_WARNINGS)
+ HTML_WARNINGS = remove_unicode_literals(HTML_WARNINGS)
+
+
def tail_check(check):
rex = re.compile(check)
def checker(nodes):
@@ -238,7 +244,7 @@ if pygments:
(".//div[@class='inc-lines highlight-text']//pre",
r'^class Foo:\n pass\nclass Bar:\n$'),
(".//div[@class='inc-startend highlight-text']//pre",
- ur'^foo = u"Including Unicode characters: üöä"\n$'),
+ ur'^foo = "Including Unicode characters: üöä"\n$'),
(".//div[@class='inc-preappend highlight-text']//pre",
r'(?m)^START CODE$'),
(".//div[@class='inc-pyobj-dedent highlight-python']//span",
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py
index 9cb95e09..5fc6e0af 100644
--- a/tests/test_build_latex.py
+++ b/tests/test_build_latex.py
@@ -32,6 +32,9 @@ None:None: WARNING: no matching candidate for image URI u'foo.\\*'
WARNING: invalid pair index entry u''
"""
+if sys.version_info >= (3, 0):
+ LATEX_WARNINGS = remove_unicode_literals(LATEX_WARNINGS)
+
@with_app(buildername='latex', warning=latex_warnfile, cleanenv=True)
def test_latex(app):
diff --git a/tests/test_build_texinfo.py b/tests/test_build_texinfo.py
new file mode 100644
index 00000000..e93de140
--- /dev/null
+++ b/tests/test_build_texinfo.py
@@ -0,0 +1,61 @@
+# -*- coding: utf-8 -*-
+"""
+ test_build_texinfo
+ ~~~~~~~~~~~~~~~~~~
+
+ Test the build process with Texinfo builder with the test root.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import os
+import re
+import sys
+from StringIO import StringIO
+from subprocess import Popen, PIPE
+
+from util import *
+from test_build_html import ENV_WARNINGS
+
+
+def teardown_module():
+ (test_root / '_build').rmtree(True)
+
+
+texinfo_warnfile = StringIO()
+
+TEXINFO_WARNINGS = ENV_WARNINGS
+
+if sys.version_info >= (3, 0):
+ TEXINFO_WARNINGS = remove_unicode_literals(TEXINFO_WARNINGS)
+
+
+@with_app(buildername='texinfo', warning=texinfo_warnfile, cleanenv=True)
+def test_texinfo(app):
+ app.builder.build_all()
+ texinfo_warnings = texinfo_warnfile.getvalue().replace(os.sep, '/')
+ texinfo_warnings_exp = TEXINFO_WARNINGS % {'root': app.srcdir}
+ assert re.match(texinfo_warnings_exp + '$', texinfo_warnings), \
+ 'Warnings don\'t match:\n' + \
+ '--- Expected (regex):\n' + texinfo_warnings_exp + \
+ '--- Got:\n' + texinfo_warnings
+ # now, try to run makeinfo over it
+ cwd = os.getcwd()
+ os.chdir(app.outdir)
+ try:
+ try:
+ p = Popen(['makeinfo', '--no-split', 'SphinxTests.texi'],
+ stdout=PIPE, stderr=PIPE)
+ except OSError:
+ pass # most likely makeinfo was not found
+ else:
+ stdout, stderr = p.communicate()
+ retcode = p.returncode
+ if retcode != 0:
+ print stdout
+ print stderr
+ del app.cleanup_trees[:]
+ assert False, 'makeinfo exited with return code %s' % retcode
+ finally:
+ os.chdir(cwd)
diff --git a/tests/test_config.py b/tests/test_config.py
index e5638bdb..5e14f0cc 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -9,6 +9,7 @@
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
+import sys
from util import *
@@ -84,11 +85,23 @@ def test_extension_values(app):
@with_tempdir
def test_errors_warnings(dir):
# test the error for syntax errors in the config file
- write_file(dir / 'conf.py', 'project = \n')
+ write_file(dir / 'conf.py', u'project = \n', 'ascii')
raises_msg(ConfigError, 'conf.py', Config, dir, 'conf.py', {}, None)
+ # test the automatic conversion of 2.x only code in configs
+ write_file(dir / 'conf.py', u'# -*- coding: utf-8\n\n'
+ u'project = u"Jägermeister"\n', 'utf-8')
+ cfg = Config(dir, 'conf.py', {}, None)
+ cfg.init_values()
+ assert cfg.project == u'Jägermeister'
+
# test the warning for bytestrings with non-ascii content
- write_file(dir / 'conf.py', '# -*- coding: latin-1\nproject = "foo\xe4"\n')
+ # bytestrings with non-ascii content are a syntax error in python3 so we
+ # skip the test there
+ if sys.version_info >= (3, 0):
+ return
+ write_file(dir / 'conf.py', u'# -*- coding: latin-1\nproject = "fooä"\n',
+ 'latin-1')
cfg = Config(dir, 'conf.py', {}, None)
warned = [False]
def warn(msg):
diff --git a/tests/test_coverage.py b/tests/test_coverage.py
index 6bbcc5dc..4d822891 100644
--- a/tests/test_coverage.py
+++ b/tests/test_coverage.py
@@ -33,7 +33,7 @@ def test_build(app):
assert 'api.h' in c_undoc
assert ' * Py_SphinxTest' in c_undoc
- undoc_py, undoc_c = pickle.loads((app.outdir / 'undoc.pickle').text())
+ undoc_py, undoc_c = pickle.loads((app.outdir / 'undoc.pickle').bytes())
assert len(undoc_c) == 1
# the key is the full path to the header file, which isn't testable
assert undoc_c.values()[0] == [('function', 'Py_SphinxTest')]
diff --git a/tests/test_doctest.py b/tests/test_doctest.py
index 8b1df592..577fcb00 100644
--- a/tests/test_doctest.py
+++ b/tests/test_doctest.py
@@ -15,10 +15,20 @@ import StringIO
from util import *
status = StringIO.StringIO()
+cleanup_called = 0
@with_app(buildername='doctest', status=status)
def test_build(app):
+ global cleanup_called
+ cleanup_called = 0
app.builder.build_all()
if app.statuscode != 0:
print >>sys.stderr, status.getvalue()
assert False, 'failures in doctests'
+ # in doctest.txt, there are two named groups and the default group,
+ # so the cleanup function must be called three times
+ assert cleanup_called == 3, 'testcleanup did not get executed enough times'
+
+def cleanup_call():
+ global cleanup_called
+ cleanup_called += 1
diff --git a/tests/test_env.py b/tests/test_env.py
index 33822b88..e62db33b 100644
--- a/tests/test_env.py
+++ b/tests/test_env.py
@@ -8,6 +8,7 @@
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
+import sys
from util import *
@@ -54,8 +55,10 @@ def test_images():
app._warning.reset()
htmlbuilder = StandaloneHTMLBuilder(app)
htmlbuilder.post_process_images(tree)
- assert "no matching candidate for image URI u'foo.*'" in \
- app._warning.content[-1]
+ image_uri_message = "no matching candidate for image URI u'foo.*'"
+ if sys.version_info >= (3, 0):
+ image_uri_message = remove_unicode_literals(image_uri_message)
+ assert image_uri_message in app._warning.content[-1]
assert set(htmlbuilder.images.keys()) == \
set(['subdir/img.png', 'img.png', 'subdir/simg.png', 'svgimg.svg'])
assert set(htmlbuilder.images.values()) == \
@@ -64,8 +67,7 @@ def test_images():
app._warning.reset()
latexbuilder = LaTeXBuilder(app)
latexbuilder.post_process_images(tree)
- assert "no matching candidate for image URI u'foo.*'" in \
- app._warning.content[-1]
+ assert image_uri_message in app._warning.content[-1]
assert set(latexbuilder.images.keys()) == \
set(['subdir/img.png', 'subdir/simg.png', 'img.png', 'img.pdf',
'svgimg.pdf'])
diff --git a/tests/test_intersphinx.py b/tests/test_intersphinx.py
index 91e15b89..839a3e3d 100644
--- a/tests/test_intersphinx.py
+++ b/tests/test_intersphinx.py
@@ -11,7 +11,10 @@
import zlib
import posixpath
-from cStringIO import StringIO
+try:
+ from io import BytesIO
+except ImportError:
+ from cStringIO import StringIO as BytesIO
from docutils import nodes
@@ -28,23 +31,23 @@ inventory_v1 = '''\
# Version: 1.0
module mod foo.html
module.cls class foo.html
-'''
+'''.encode('utf-8')
inventory_v2 = '''\
# Sphinx inventory version 2
# Project: foo
# Version: 2.0
# The remainder of this file is compressed with zlib.
-''' + zlib.compress('''\
+'''.encode('utf-8') + zlib.compress('''\
module1 py:module 0 foo.html#module-module1 Long Module desc
module2 py:module 0 foo.html#module-$ -
module1.func py:function 1 sub/foo.html#$ -
CFunc c:function 2 cfunc.html#CFunc -
-''')
+'''.encode('utf-8'))
def test_read_inventory_v1():
- f = StringIO(inventory_v1)
+ f = BytesIO(inventory_v1)
f.readline()
invdata = read_inventory_v1(f, '/util', posixpath.join)
assert invdata['py:module']['module'] == \
@@ -54,12 +57,12 @@ def test_read_inventory_v1():
def test_read_inventory_v2():
- f = StringIO(inventory_v2)
+ f = BytesIO(inventory_v2)
f.readline()
invdata1 = read_inventory_v2(f, '/util', posixpath.join)
# try again with a small buffer size to test the chunking algorithm
- f = StringIO(inventory_v2)
+ f = BytesIO(inventory_v2)
f.readline()
invdata2 = read_inventory_v2(f, '/util', posixpath.join, bufsize=5)
diff --git a/tests/test_intl.py b/tests/test_intl.py
new file mode 100644
index 00000000..9459a1b7
--- /dev/null
+++ b/tests/test_intl.py
@@ -0,0 +1,60 @@
+# -*- coding: utf-8 -*-
+"""
+ test_intl
+ ~~~~~~~~~
+
+ Test message patching for internationalization purposes. Runs the text
+ builder in the test root.
+
+ :copyright: Copyright 2010 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from subprocess import Popen, PIPE
+
+from util import *
+from util import SkipTest
+
+
+def setup_module():
+ (test_root / 'xx' / 'LC_MESSAGES').makedirs()
+ # Compile all required catalogs into binary format (*.mo).
+ for catalog in 'bom', 'subdir':
+ try:
+ p = Popen(['msgfmt', test_root / '%s.po' % catalog, '-o',
+ test_root / 'xx' / 'LC_MESSAGES' / '%s.mo' % catalog],
+ stdout=PIPE, stderr=PIPE)
+ except OSError:
+ raise SkipTest # most likely msgfmt was not found
+ else:
+ stdout, stderr = p.communicate()
+ if p.returncode != 0:
+ print stdout
+ print stderr
+ assert False, 'msgfmt exited with return code %s' % p.returncode
+ assert (test_root / 'xx' / 'LC_MESSAGES' / ('%s.mo' % catalog)
+ ).isfile(), 'msgfmt failed'
+
+
+def teardown_module():
+ (test_root / '_build').rmtree(True)
+ (test_root / 'xx').rmtree(True)
+
+
+@with_app(buildername='text',
+ confoverrides={'language': 'xx', 'locale_dirs': ['.']})
+def test_simple(app):
+ app.builder.build(['bom'])
+ result = (app.outdir / 'bom.txt').text(encoding='utf-8')
+ expect = (u"\nDatei mit UTF-8"
+ u"\n***************\n" # underline matches new translation
+ u"\nThis file has umlauts: äöü.\n")
+ assert result == expect
+
+
+@with_app(buildername='text',
+ confoverrides={'language': 'xx', 'locale_dirs': ['.']})
+def test_subdir(app):
+ app.builder.build(['subdir/includes'])
+ result = (app.outdir / 'subdir' / 'includes.txt').text(encoding='utf-8')
+ assert result.startswith(u"\ntranslation\n***********\n\n")
diff --git a/tests/test_markup.py b/tests/test_markup.py
index 51d4e724..09f617f4 100644
--- a/tests/test_markup.py
+++ b/tests/test_markup.py
@@ -17,6 +17,7 @@ from docutils import frontend, utils, nodes
from docutils.parsers import rst
from sphinx.util import texescape
+from sphinx.util.pycompat import b
from sphinx.writers.html import HTMLWriter, SmartyPantsHTMLTranslator
from sphinx.writers.latex import LaTeXWriter, LaTeXTranslator
@@ -50,7 +51,7 @@ class ForgivingLaTeXTranslator(LaTeXTranslator, ForgivingTranslator):
def verify_re(rst, html_expected, latex_expected):
- document = utils.new_document('test data', settings)
+ document = utils.new_document(b('test data'), settings)
document['file'] = 'dummy'
parser.parse(rst, document)
for msg in document.traverse(nodes.system_message):
diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py
index 10290646..798d8d56 100644
--- a/tests/test_quickstart.py
+++ b/tests/test_quickstart.py
@@ -36,8 +36,13 @@ def mock_raw_input(answers, needanswer=False):
return ''
return raw_input
+try:
+ real_raw_input = raw_input
+except NameError:
+ real_raw_input = input
+
def teardown_module():
- qs.raw_input = __builtin__.raw_input
+ qs.term_input = real_raw_input
qs.TERM_ENCODING = getattr(sys.stdin, 'encoding', None)
coloron()
@@ -51,7 +56,7 @@ def test_do_prompt():
'Q5': 'no',
'Q6': 'foo',
}
- qs.raw_input = mock_raw_input(answers)
+ qs.term_input = mock_raw_input(answers)
try:
qs.do_prompt(d, 'k1', 'Q1')
except AssertionError:
@@ -79,13 +84,18 @@ def test_quickstart_defaults(tempdir):
'Author name': 'Georg Brandl',
'Project version': '0.1',
}
- qs.raw_input = mock_raw_input(answers)
+ qs.term_input = mock_raw_input(answers)
qs.inner_main([])
conffile = tempdir / 'conf.py'
assert conffile.isfile()
ns = {}
- execfile(conffile, ns)
+ f = open(conffile, 'U')
+ try:
+ code = compile(f.read(), conffile, 'exec')
+ finally:
+ f.close()
+ exec code in ns
assert ns['extensions'] == []
assert ns['templates_path'] == ['_templates']
assert ns['source_suffix'] == '.rst'
@@ -112,8 +122,8 @@ def test_quickstart_all_answers(tempdir):
'Root path': tempdir,
'Separate source and build': 'y',
'Name prefix for templates': '.',
- 'Project name': 'STASI\xe2\x84\xa2',
- 'Author name': 'Wolfgang Sch\xc3\xa4uble & G\'Beckstein',
+ 'Project name': u'STASI™'.encode('utf-8'),
+ 'Author name': u'Wolfgang Schäuble & G\'Beckstein'.encode('utf-8'),
'Project version': '2.0',
'Project release': '2.0.1',
'Source file suffix': '.txt',
@@ -131,14 +141,19 @@ def test_quickstart_all_answers(tempdir):
'Create Windows command file': 'no',
'Do you want to use the epub builder': 'yes',
}
- qs.raw_input = mock_raw_input(answers, needanswer=True)
+ qs.term_input = mock_raw_input(answers, needanswer=True)
qs.TERM_ENCODING = 'utf-8'
qs.inner_main([])
conffile = tempdir / 'source' / 'conf.py'
assert conffile.isfile()
ns = {}
- execfile(conffile, ns)
+ f = open(conffile, 'U')
+ try:
+ code = compile(f.read(), conffile, 'exec')
+ finally:
+ f.close()
+ exec code in ns
assert ns['extensions'] == ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
assert ns['templates_path'] == ['.templates']
assert ns['source_suffix'] == '.txt'
@@ -156,6 +171,10 @@ def test_quickstart_all_answers(tempdir):
assert ns['man_pages'] == [
('contents', 'stasi', u'STASI™ Documentation',
[u'Wolfgang Schäuble & G\'Beckstein'], 1)]
+ assert ns['texinfo_documents'] == [
+ ('contents', 'STASI', u'STASI™ Documentation',
+ u'Wolfgang Schäuble & G\'Beckstein', 'STASI',
+ 'One line description of project.', 'Miscellaneous'),]
assert (tempdir / 'build').isdir()
assert (tempdir / 'source' / '.static').isdir()
diff --git a/tests/test_search.py b/tests/test_search.py
index b2cd165c..08ba40e5 100644
--- a/tests/test_search.py
+++ b/tests/test_search.py
@@ -13,6 +13,7 @@ from docutils import frontend, utils
from docutils.parsers import rst
from sphinx.search import IndexBuilder
+from sphinx.util.pycompat import b
settings = parser = None
@@ -31,7 +32,7 @@ test that non-comments are indexed: fermion
'''
def test_wordcollector():
- doc = utils.new_document('test data', settings)
+ doc = utils.new_document(b('test data'), settings)
doc['file'] = 'dummy'
parser.parse(FILE_CONTENTS, doc)
diff --git a/tests/test_searchadapters.py b/tests/test_searchadapters.py
new file mode 100644
index 00000000..c20a74e3
--- /dev/null
+++ b/tests/test_searchadapters.py
@@ -0,0 +1,79 @@
+# -*- coding: utf-8 -*-
+"""
+ test_searchadapters
+ ~~~~~~~~~~~~~~~~~~~
+
+ Test the Web Support Package search adapters.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import os, sys
+from StringIO import StringIO
+
+from nose import SkipTest
+
+from sphinx.websupport import WebSupport
+
+from test_websupport import sqlalchemy_missing
+from util import *
+
+
+def clear_builddir():
+ (test_root / 'websupport').rmtree(True)
+
+
+def teardown_module():
+ (test_root / 'generated').rmtree(True)
+ clear_builddir()
+
+
+def search_adapter_helper(adapter):
+ clear_builddir()
+
+ settings = {'builddir': os.path.join(test_root, 'websupport'),
+ 'status': StringIO(),
+ 'warning': StringIO()}
+ settings.update({'srcdir': test_root,
+ 'search': adapter})
+ support = WebSupport(**settings)
+ support.build()
+
+ s = support.search
+
+ # Test the adapters query method. A search for "Epigraph" should return
+ # one result.
+ results = s.query(u'Epigraph')
+ assert len(results) == 1, \
+ '%s search adapter returned %s search result(s), should have been 1'\
+ % (adapter, len(results))
+
+ # Make sure documents are properly updated by the search adapter.
+ s.init_indexing(changed=['markup'])
+ s.add_document(u'markup', u'title', u'SomeLongRandomWord')
+ s.finish_indexing()
+ # Now a search for "Epigraph" should return zero results.
+ results = s.query(u'Epigraph')
+ assert len(results) == 0, \
+ '%s search adapter returned %s search result(s), should have been 0'\
+ % (adapter, len(results))
+ # A search for "SomeLongRandomWord" should return one result.
+ results = s.query(u'SomeLongRandomWord')
+ assert len(results) == 1, \
+ '%s search adapter returned %s search result(s), should have been 1'\
+ % (adapter, len(results))
+ # Make sure it works through the WebSupport API
+ html = support.get_search_results(u'SomeLongRandomWord')
+
+
+@skip_unless_importable('xapian', 'needs xapian bindings installed')
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+def test_xapian():
+ search_adapter_helper('xapian')
+
+
+@skip_unless_importable('whoosh', 'needs whoosh package installed')
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+def test_whoosh():
+ search_adapter_helper('whoosh')
diff --git a/tests/test_versioning.py b/tests/test_versioning.py
new file mode 100644
index 00000000..1a77fb6e
--- /dev/null
+++ b/tests/test_versioning.py
@@ -0,0 +1,114 @@
+# -*- coding: utf-8 -*-
+"""
+ test_versioning
+ ~~~~~~~~~~~~~~~
+
+ Test the versioning implementation.
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+import pickle
+
+from util import *
+
+from docutils.statemachine import ViewList
+from docutils.parsers.rst.directives.html import MetaBody
+
+from sphinx import addnodes
+from sphinx.versioning import add_uids, merge_doctrees, get_ratio
+
+def setup_module():
+ global app, original, original_uids
+ app = TestApp()
+ app.builder.env.app = app
+ app.connect('doctree-resolved', on_doctree_resolved)
+ app.build()
+ original = doctrees['versioning/original']
+ original_uids = [n.uid for n in add_uids(original, is_paragraph)]
+
+def teardown_module():
+ app.cleanup()
+ (test_root / '_build').rmtree(True)
+
+doctrees = {}
+
+def on_doctree_resolved(app, doctree, docname):
+ doctrees[docname] = doctree
+
+def is_paragraph(node):
+ return node.__class__.__name__ == 'paragraph'
+
+def test_get_ratio():
+ assert get_ratio('', 'a')
+ assert get_ratio('a', '')
+
+def test_add_uids():
+ assert len(original_uids) == 3
+
+def test_picklablility():
+ # we have to modify the doctree so we can pickle it
+ copy = original.copy()
+ copy.reporter = None
+ copy.transformer = None
+ copy.settings.warning_stream = None
+ copy.settings.env = None
+ copy.settings.record_dependencies = None
+ for metanode in copy.traverse(MetaBody.meta):
+ metanode.__class__ = addnodes.meta
+ loaded = pickle.loads(pickle.dumps(copy, pickle.HIGHEST_PROTOCOL))
+ assert all(getattr(n, 'uid', False) for n in loaded.traverse(is_paragraph))
+
+def test_modified():
+ modified = doctrees['versioning/modified']
+ new_nodes = list(merge_doctrees(original, modified, is_paragraph))
+ uids = [n.uid for n in modified.traverse(is_paragraph)]
+ assert not new_nodes
+ assert original_uids == uids
+
+def test_added():
+ added = doctrees['versioning/added']
+ new_nodes = list(merge_doctrees(original, added, is_paragraph))
+ uids = [n.uid for n in added.traverse(is_paragraph)]
+ assert len(new_nodes) == 1
+ assert original_uids == uids[:-1]
+
+def test_deleted():
+ deleted = doctrees['versioning/deleted']
+ new_nodes = list(merge_doctrees(original, deleted, is_paragraph))
+ uids = [n.uid for n in deleted.traverse(is_paragraph)]
+ assert not new_nodes
+ assert original_uids[::2] == uids
+
+def test_deleted_end():
+ deleted_end = doctrees['versioning/deleted_end']
+ new_nodes = list(merge_doctrees(original, deleted_end, is_paragraph))
+ uids = [n.uid for n in deleted_end.traverse(is_paragraph)]
+ assert not new_nodes
+ assert original_uids[:-1] == uids
+
+def test_insert():
+ insert = doctrees['versioning/insert']
+ new_nodes = list(merge_doctrees(original, insert, is_paragraph))
+ uids = [n.uid for n in insert.traverse(is_paragraph)]
+ assert len(new_nodes) == 1
+ assert original_uids[0] == uids[0]
+ assert original_uids[1:] == uids[2:]
+
+def test_insert_beginning():
+ insert_beginning = doctrees['versioning/insert_beginning']
+ new_nodes = list(merge_doctrees(original, insert_beginning, is_paragraph))
+ uids = [n.uid for n in insert_beginning.traverse(is_paragraph)]
+ assert len(new_nodes) == 1
+ assert len(uids) == 4
+ assert original_uids == uids[1:]
+ assert original_uids[0] != uids[0]
+
+def test_insert_similar():
+ insert_similar = doctrees['versioning/insert_similar']
+ new_nodes = list(merge_doctrees(original, insert_similar, is_paragraph))
+ uids = [n.uid for n in insert_similar.traverse(is_paragraph)]
+ assert len(new_nodes) == 1
+ assert new_nodes[0].rawsource == u'Anyway I need more'
+ assert original_uids[0] == uids[0]
+ assert original_uids[1:] == uids[2:]
diff --git a/tests/test_websupport.py b/tests/test_websupport.py
new file mode 100644
index 00000000..9cf64338
--- /dev/null
+++ b/tests/test_websupport.py
@@ -0,0 +1,279 @@
+# -*- coding: utf-8 -*-
+"""
+ test_websupport
+ ~~~~~~~~~~~~~~~
+
+ Test the Web Support Package
+
+ :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import os
+from StringIO import StringIO
+
+try:
+ from functools import wraps
+except ImportError:
+ # functools is new in 2.5
+ wraps = lambda f: (lambda w: w)
+
+from nose import SkipTest
+
+from sphinx.websupport import WebSupport
+from sphinx.websupport.errors import *
+from sphinx.websupport.storage import StorageBackend
+from sphinx.websupport.storage.differ import CombinedHtmlDiff
+try:
+ from sphinx.websupport.storage.sqlalchemystorage import Session, \
+ SQLAlchemyStorage, Comment, CommentVote
+ from sphinx.websupport.storage.sqlalchemy_db import Node
+ sqlalchemy_missing = False
+except ImportError:
+ sqlalchemy_missing = True
+
+from util import *
+
+
+default_settings = {'builddir': os.path.join(test_root, 'websupport'),
+ 'status': StringIO(),
+ 'warning': StringIO()}
+
+def teardown_module():
+ (test_root / 'generated').rmtree(True)
+ (test_root / 'websupport').rmtree(True)
+
+
+def with_support(*args, **kwargs):
+ """Make a WebSupport object and pass it the test."""
+ settings = default_settings.copy()
+ settings.update(kwargs)
+
+ def generator(func):
+ @wraps(func)
+ def new_func(*args2, **kwargs2):
+ support = WebSupport(**settings)
+ func(support, *args2, **kwargs2)
+ return new_func
+ return generator
+
+
+class NullStorage(StorageBackend):
+ pass
+
+
+@with_support(storage=NullStorage())
+def test_no_srcdir(support):
+ """Make sure the correct exception is raised if srcdir is not given."""
+ raises(RuntimeError, support.build)
+
+
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@with_support(srcdir=test_root)
+def test_build(support):
+ support.build()
+
+
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@with_support()
+def test_get_document(support):
+ raises(DocumentNotFoundError, support.get_document, 'nonexisting')
+
+ contents = support.get_document('contents')
+ assert contents['title'] and contents['body'] \
+ and contents['sidebar'] and contents['relbar']
+
+
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@with_support()
+def test_comments(support):
+ session = Session()
+ nodes = session.query(Node).all()
+ first_node = nodes[0]
+ second_node = nodes[1]
+
+ # Create a displayed comment and a non displayed comment.
+ comment = support.add_comment('First test comment',
+ node_id=first_node.id,
+ username='user_one')
+ hidden_comment = support.add_comment('Hidden comment',
+ node_id=first_node.id,
+ displayed=False)
+ # Make sure that comments can't be added to a comment where
+ # displayed == False, since it could break the algorithm that
+ # converts a nodes comments to a tree.
+ raises(CommentNotAllowedError, support.add_comment, 'Not allowed',
+ parent_id=str(hidden_comment['id']))
+ # Add a displayed and not displayed child to the displayed comment.
+ support.add_comment('Child test comment', parent_id=str(comment['id']),
+ username='user_one')
+ support.add_comment('Hidden child test comment',
+ parent_id=str(comment['id']), displayed=False)
+ # Add a comment to another node to make sure it isn't returned later.
+ support.add_comment('Second test comment',
+ node_id=second_node.id,
+ username='user_two')
+
+ # Access the comments as a moderator.
+ data = support.get_data(first_node.id, moderator=True)
+ comments = data['comments']
+ children = comments[0]['children']
+ assert len(comments) == 2
+ assert comments[1]['text'] == 'Hidden comment'
+ assert len(children) == 2
+ assert children[1]['text'] == 'Hidden child test comment'
+
+ # Access the comments without being a moderator.
+ data = support.get_data(first_node.id)
+ comments = data['comments']
+ children = comments[0]['children']
+ assert len(comments) == 1
+ assert comments[0]['text'] == 'First test comment'
+ assert len(children) == 1
+ assert children[0]['text'] == 'Child test comment'
+
+
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@with_support()
+def test_voting(support):
+ session = Session()
+ nodes = session.query(Node).all()
+ node = nodes[0]
+
+ comment = support.get_data(node.id)['comments'][0]
+
+ def check_rating(val):
+ data = support.get_data(node.id)
+ comment = data['comments'][0]
+ assert comment['rating'] == val, '%s != %s' % (comment['rating'], val)
+
+ support.process_vote(comment['id'], 'user_one', '1')
+ support.process_vote(comment['id'], 'user_two', '1')
+ support.process_vote(comment['id'], 'user_three', '1')
+ check_rating(3)
+ support.process_vote(comment['id'], 'user_one', '-1')
+ check_rating(1)
+ support.process_vote(comment['id'], 'user_one', '0')
+ check_rating(2)
+
+ # Make sure a vote with value > 1 or < -1 can't be cast.
+ raises(ValueError, support.process_vote, comment['id'], 'user_one', '2')
+ raises(ValueError, support.process_vote, comment['id'], 'user_one', '-2')
+
+ # Make sure past voting data is associated with comments when they are
+ # fetched.
+ data = support.get_data(str(node.id), username='user_two')
+ comment = data['comments'][0]
+ assert comment['vote'] == 1, '%s != 1' % comment['vote']
+
+
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@with_support()
+def test_proposals(support):
+ session = Session()
+ node = session.query(Node).first()
+
+ data = support.get_data(node.id)
+
+ source = data['source']
+ proposal = source[:5] + source[10:15] + 'asdf' + source[15:]
+
+ comment = support.add_comment('Proposal comment',
+ node_id=node.id,
+ proposal=proposal)
+
+
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@with_support()
+def test_user_delete_comments(support):
+ def get_comment():
+ session = Session()
+ node = session.query(Node).first()
+ session.close()
+ return support.get_data(node.id)['comments'][0]
+
+ comment = get_comment()
+ assert comment['username'] == 'user_one'
+ # Make sure other normal users can't delete someone elses comments.
+ raises(UserNotAuthorizedError, support.delete_comment,
+ comment['id'], username='user_two')
+ # Now delete the comment using the correct username.
+ support.delete_comment(comment['id'], username='user_one')
+ comment = get_comment()
+ assert comment['username'] == '[deleted]'
+ assert comment['text'] == '[deleted]'
+
+
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@with_support()
+def test_moderator_delete_comments(support):
+ def get_comment():
+ session = Session()
+ node = session.query(Node).first()
+ session.close()
+ return support.get_data(node.id, moderator=True)['comments'][1]
+
+ comment = get_comment()
+ support.delete_comment(comment['id'], username='user_two',
+ moderator=True)
+ comment = get_comment()
+ assert comment['username'] == '[deleted]'
+ assert comment['text'] == '[deleted]'
+
+
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@with_support()
+def test_update_username(support):
+ support.update_username('user_two', 'new_user_two')
+ session = Session()
+ comments = session.query(Comment).\
+ filter(Comment.username == 'user_two').all()
+ assert len(comments) == 0
+ votes = session.query(CommentVote).\
+ filter(CommentVote.username == 'user_two')
+ assert len(comments) == 0
+ comments = session.query(Comment).\
+ filter(Comment.username == 'new_user_two').all()
+ assert len(comments) == 1
+ votes = session.query(CommentVote).\
+ filter(CommentVote.username == 'new_user_two')
+ assert len(comments) == 1
+
+
+called = False
+def moderation_callback(comment):
+ global called
+ called = True
+
+
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@with_support(moderation_callback=moderation_callback)
+def test_moderation(support):
+ session = Session()
+ nodes = session.query(Node).all()
+ node = nodes[7]
+ session.close()
+ accepted = support.add_comment('Accepted Comment', node_id=node.id,
+ displayed=False)
+ rejected = support.add_comment('Rejected comment', node_id=node.id,
+ displayed=False)
+ # Make sure the moderation_callback is called.
+ assert called == True
+ # Make sure the user must be a moderator.
+ raises(UserNotAuthorizedError, support.accept_comment, accepted['id'])
+ raises(UserNotAuthorizedError, support.reject_comment, accepted['id'])
+ support.accept_comment(accepted['id'], moderator=True)
+ support.reject_comment(rejected['id'], moderator=True)
+ comments = support.get_data(node.id)['comments']
+ assert len(comments) == 1
+ comments = support.get_data(node.id, moderator=True)['comments']
+ assert len(comments) == 1
+
+
+def test_differ():
+ source = 'Lorem ipsum dolor sit amet,\nconsectetur adipisicing elit,\n' \
+ 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
+ prop = 'Lorem dolor sit amet,\nconsectetur nihil adipisicing elit,\n' \
+ 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
+ differ = CombinedHtmlDiff(source, prop)
+ differ.make_html()
diff --git a/tests/util.py b/tests/util.py
index b5c60712..3711de72 100644
--- a/tests/util.py
+++ b/tests/util.py
@@ -11,6 +11,8 @@ import sys
import StringIO
import tempfile
import shutil
+import re
+from codecs import open
try:
from functools import wraps
@@ -23,15 +25,15 @@ from sphinx.ext.autodoc import AutoDirective
from path import path
-from nose import tools
+from nose import tools, SkipTest
__all__ = [
- 'test_root',
- 'raises', 'raises_msg', 'Struct',
+ 'test_root', 'raises', 'raises_msg',
+ 'skip_if', 'skip_unless', 'skip_unless_importable', 'Struct',
'ListOutput', 'TestApp', 'with_app', 'gen_with_app',
'path', 'with_tempdir', 'write_file',
- 'sprint',
+ 'sprint', 'remove_unicode_literals',
]
@@ -69,6 +71,30 @@ def raises_msg(exc, msg, func, *args, **kwds):
raise AssertionError('%s did not raise %s' %
(func.__name__, _excstr(exc)))
+def skip_if(condition, msg=None):
+ """Decorator to skip test if condition is true."""
+ def deco(test):
+ @tools.make_decorator(test)
+ def skipper(*args, **kwds):
+ if condition:
+ raise SkipTest(msg or 'conditional skip')
+ return test(*args, **kwds)
+ return skipper
+ return deco
+
+def skip_unless(condition, msg=None):
+ """Decorator to skip test if condition is false."""
+ return skip_if(not condition, msg)
+
+def skip_unless_importable(module, msg=None):
+ """Decorator to skip test if module is not importable."""
+ try:
+ __import__(module)
+ except ImportError:
+ return skip_if(True, msg)
+ else:
+ return skip_if(False, msg)
+
class Struct(object):
def __init__(self, **kwds):
@@ -191,11 +217,21 @@ def with_tempdir(func):
return new_func
-def write_file(name, contents):
- f = open(str(name), 'wb')
+def write_file(name, contents, encoding=None):
+ if encoding is None:
+ mode = 'wb'
+ if isinstance(contents, unicode):
+ contents = contents.encode('ascii')
+ else:
+ mode = 'w'
+ f = open(str(name), 'wb', encoding=encoding)
f.write(contents)
f.close()
def sprint(*args):
sys.stderr.write(' '.join(map(str, args)) + '\n')
+
+_unicode_literals_re = re.compile(r'u(".*?")|u(\'.*?\')')
+def remove_unicode_literals(s):
+ return _unicode_literals_re.sub(lambda x: x.group(1) or x.group(2), s)
diff --git a/utils/check_sources.py b/utils/check_sources.py
index 80e3f099..6b030d5d 100755
--- a/utils/check_sources.py
+++ b/utils/check_sources.py
@@ -12,10 +12,16 @@
"""
import sys, os, re
-import getopt
import cStringIO
+from optparse import OptionParser
from os.path import join, splitext, abspath
+if sys.version_info >= (3, 0):
+ def b(s):
+ return s.encode('utf-8')
+else:
+ b = str
+
checkers = {}
@@ -30,26 +36,26 @@ def checker(*suffixes, **kwds):
name_mail_re = r'[\w ]+(<.*?>)?'
-copyright_re = re.compile(r'^ :copyright: Copyright 200\d(-20\d\d)? '
- r'by %s(, %s)*[,.]$' %
- (name_mail_re, name_mail_re))
-license_re = re.compile(r" :license: (.*?).\n")
-copyright_2_re = re.compile(r'^ %s(, %s)*[,.]$' %
- (name_mail_re, name_mail_re))
-coding_re = re.compile(r'coding[:=]\s*([-\w.]+)')
-not_ix_re = re.compile(r'\bnot\s+\S+?\s+i[sn]\s\S+')
-is_const_re = re.compile(r'if.*?==\s+(None|False|True)\b')
-
-misspellings = ["developement", "adress", "verificate", # ALLOW-MISSPELLING
- "informations"] # ALLOW-MISSPELLING
-
-
-@checker('.py')
-def check_syntax(fn, lines):
- try:
- compile(''.join(lines), fn, "exec")
- except SyntaxError, err:
- yield 0, "not compilable: %s" % err
+copyright_re = re.compile(b(r'^ :copyright: Copyright 200\d(-20\d\d)? '
+ r'by %s(, %s)*[,.]$' %
+ (name_mail_re, name_mail_re)))
+license_re = re.compile(b(r" :license: (.*?).\n"))
+copyright_2_re = re.compile(b(r'^ %s(, %s)*[,.]$' %
+ (name_mail_re, name_mail_re)))
+coding_re = re.compile(b(r'coding[:=]\s*([-\w.]+)'))
+not_ix_re = re.compile(b(r'\bnot\s+\S+?\s+i[sn]\s\S+'))
+is_const_re = re.compile(b(r'if.*?==\s+(None|False|True)\b'))
+
+misspellings = [b("developement"), b("adress"), # ALLOW-MISSPELLING
+ b("verificate"), b("informations")] # ALLOW-MISSPELLING
+
+if sys.version_info < (3, 0):
+ @checker('.py')
+ def check_syntax(fn, lines):
+ try:
+ compile(b('').join(lines), fn, "exec")
+ except SyntaxError, err:
+ yield 0, "not compilable: %s" % err
@checker('.py')
@@ -61,8 +67,8 @@ def check_style_and_encoding(fn, lines):
if lno < 2:
co = coding_re.search(line)
if co:
- encoding = co.group(1)
- if line.strip().startswith('#'):
+ encoding = co.group(1).decode('ascii')
+ if line.strip().startswith(b('#')):
continue
#m = not_ix_re.search(line)
#if m:
@@ -82,7 +88,7 @@ def check_style_and_encoding(fn, lines):
def check_fileheader(fn, lines):
# line number correction
c = 1
- if lines[0:1] == ['#!/usr/bin/env python\n']:
+ if lines[0:1] == [b('#!/usr/bin/env python\n')]:
lines = lines[1:]
c = 2
@@ -91,38 +97,38 @@ def check_fileheader(fn, lines):
for lno, l in enumerate(lines):
llist.append(l)
if lno == 0:
- if l == '# -*- coding: rot13 -*-\n':
+ if l == b('# -*- coding: rot13 -*-\n'):
# special-case pony package
return
- elif l != '# -*- coding: utf-8 -*-\n':
+ elif l != b('# -*- coding: utf-8 -*-\n'):
yield 1, "missing coding declaration"
elif lno == 1:
- if l != '"""\n' and l != 'r"""\n':
+ if l != b('"""\n') and l != b('r"""\n'):
yield 2, 'missing docstring begin (""")'
else:
docopen = True
elif docopen:
- if l == '"""\n':
+ if l == b('"""\n'):
# end of docstring
if lno <= 4:
yield lno+c, "missing module name in docstring"
break
- if l != "\n" and l[:4] != ' ' and docopen:
+ if l != b("\n") and l[:4] != b(' ') and docopen:
yield lno+c, "missing correct docstring indentation"
if lno == 2:
# if not in package, don't check the module name
modname = fn[:-3].replace('/', '.').replace('.__init__', '')
while modname:
- if l.lower()[4:-1] == modname:
+ if l.lower()[4:-1] == b(modname):
break
modname = '.'.join(modname.split('.')[1:])
else:
yield 3, "wrong module name in docstring heading"
modnamelen = len(l.strip())
elif lno == 3:
- if l.strip() != modnamelen * "~":
+ if l.strip() != modnamelen * b("~"):
yield 4, "wrong module name underline, should be ~~~...~"
else:
@@ -145,16 +151,16 @@ def check_fileheader(fn, lines):
@checker('.py', '.html', '.rst')
def check_whitespace_and_spelling(fn, lines):
for lno, line in enumerate(lines):
- if "\t" in line:
+ if b("\t") in line:
yield lno+1, "OMG TABS!!!1 "
- if line[:-1].rstrip(' \t') != line[:-1]:
+ if line[:-1].rstrip(b(' \t')) != line[:-1]:
yield lno+1, "trailing whitespace"
for word in misspellings:
- if word in line and 'ALLOW-MISSPELLING' not in line:
+ if word in line and b('ALLOW-MISSPELLING') not in line:
yield lno+1, '"%s" used' % word
-bad_tags = ('<u>', '<s>', '<strike>', '<center>', '<font')
+bad_tags = map(b, ['<u>', '<s>', '<strike>', '<center>', '<font'])
@checker('.html')
def check_xhtml(fn, lines):
@@ -165,34 +171,32 @@ def check_xhtml(fn, lines):
def main(argv):
- try:
- gopts, args = getopt.getopt(argv[1:], "vi:")
- except getopt.GetoptError:
- print "Usage: %s [-v] [-i ignorepath]* [path]" % argv[0]
- return 2
- opts = {}
- for opt, val in gopts:
- if opt == '-i':
- val = abspath(val)
- opts.setdefault(opt, []).append(val)
+ parser = OptionParser(usage='Usage: %prog [-v] [-i ignorepath]* [path]')
+ parser.add_option('-v', '--verbose', dest='verbose', default=False,
+ action='store_true')
+ parser.add_option('-i', '--ignore-path', dest='ignored_paths',
+ default=[], action='append')
+ options, args = parser.parse_args(argv[1:])
if len(args) == 0:
path = '.'
elif len(args) == 1:
path = args[0]
else:
- print "Usage: %s [-v] [-i ignorepath]* [path]" % argv[0]
- return 2
+ print args
+ parser.error('No more then one path supported')
- verbose = '-v' in opts
+ verbose = options.verbose
+ ignored_paths = set(abspath(p) for p in options.ignored_paths)
num = 0
out = cStringIO.StringIO()
for root, dirs, files in os.walk(path):
- if '.svn' in dirs:
- dirs.remove('.svn')
- if '-i' in opts and abspath(root) in opts['-i']:
+ for vcs_dir in ['.svn', '.hg', '.git']:
+ if vcs_dir in dirs:
+ dirs.remove(vcs_dir)
+ if abspath(root) in ignored_paths:
del dirs[:]
continue
in_check_pkg = root.startswith('./sphinx')
@@ -201,7 +205,7 @@ def main(argv):
fn = join(root, fn)
if fn[:2] == './': fn = fn[2:]
- if '-i' in opts and abspath(fn) in opts['-i']:
+ if abspath(fn) in ignored_paths:
continue
ext = splitext(fn)[1]
@@ -213,8 +217,11 @@ def main(argv):
print "Checking %s..." % fn
try:
- f = open(fn, 'r')
- lines = list(f)
+ f = open(fn, 'rb')
+ try:
+ lines = list(f)
+ finally:
+ f.close()
except (IOError, OSError), err:
print "%s: cannot open: %s" % (fn, err)
num += 1
diff --git a/utils/convert.py b/utils/convert.py
new file mode 100644
index 00000000..f025c49a
--- /dev/null
+++ b/utils/convert.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python3
+# coding: utf-8
+"""
+ Converts files with 2to3
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Creates a Python 3 version of each file.
+
+ The Python3 version of a file foo.py will be called foo3.py.
+
+ :copyright: Copyright 2010 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+import os
+import sys
+from glob import iglob
+from optparse import OptionParser
+from shutil import copy
+from distutils.util import run_2to3
+
+def main(argv):
+ parser = OptionParser(usage='%prog [path]')
+ parser.add_option('-i', '--ignorepath', dest='ignored_paths',
+ action='append', default=[])
+ options, args = parser.parse_args(argv)
+
+ ignored_paths = {os.path.abspath(p) for p in options.ignored_paths}
+
+ path = os.path.abspath(args[0]) if args else os.getcwd()
+ convertables = []
+ for filename in iglob(os.path.join(path, '*.py')):
+ if filename in ignored_paths:
+ continue
+ basename, ext = os.path.splitext(filename)
+ if basename.endswith('3'):
+ continue
+ filename3 = basename + '3' + ext
+ copy(filename, filename3)
+ convertables.append(filename3)
+ run_2to3(convertables)
+
+if __name__ == "__main__":
+ main(sys.argv[1:])
diff --git a/utils/reindent.py b/utils/reindent.py
index c499f671..59828fd8 100755
--- a/utils/reindent.py
+++ b/utils/reindent.py
@@ -1,16 +1,14 @@
#! /usr/bin/env python
# Released to the public domain, by Tim Peters, 03 October 2000.
-# -B option added by Georg Brandl, 2006.
"""reindent [-d][-r][-v] [ path ... ]
--d (--dryrun) Dry run. Analyze, but don't make any changes to files.
--r (--recurse) Recurse. Search for all .py files in subdirectories too.
--B (--no-backup) Don't write .bak backup files.
--v (--verbose) Verbose. Print informative msgs; else only names of \
-changed files.
--h (--help) Help. Print this usage information and exit.
+-d (--dryrun) Dry run. Analyze, but don't make any changes to, files.
+-r (--recurse) Recurse. Search for all .py files in subdirectories too.
+-n (--nobackup) No backup. Does not make a ".bak" file before reindenting.
+-v (--verbose) Verbose. Print informative msgs; else no output.
+-h (--help) Help. Print this usage information and exit.
Change Python (.py) files to use 4-space indents and no hard tab characters.
Also trim excess spaces and tabs from ends of lines, and remove empty lines
@@ -34,18 +32,30 @@ resulting .py file won't change it again).
The hard part of reindenting is figuring out what to do with comment
lines. So long as the input files get a clean bill of health from
tabnanny.py, reindent should do a good job.
+
+The backup file is a copy of the one that is being reindented. The ".bak"
+file is generated with shutil.copy(), but some corner cases regarding
+user/group and permissions could leave the backup file more readable that
+you'd prefer. You can always use the --nobackup option to prevent this.
"""
__version__ = "1"
import tokenize
-import os
+import os, shutil
import sys
-verbose = 0
-recurse = 0
-dryrun = 0
-no_backup = 0
+if sys.version_info >= (3, 0):
+ def tokens(readline, tokeneater):
+ for token in tokenize.tokenize(readline):
+ yield tokeneater(*token)
+else:
+ tokens = tokenize.tokenize
+
+verbose = 0
+recurse = 0
+dryrun = 0
+makebackup = True
def usage(msg=None):
if msg is not None:
@@ -61,12 +71,10 @@ def errprint(*args):
def main():
import getopt
- global verbose, recurse, dryrun, no_backup
-
+ global verbose, recurse, dryrun, makebackup
try:
- opts, args = getopt.getopt(sys.argv[1:], "drvhB",
- ["dryrun", "recurse", "verbose", "help",
- "no-backup"])
+ opts, args = getopt.getopt(sys.argv[1:], "drnvh",
+ ["dryrun", "recurse", "nobackup", "verbose", "help"])
except getopt.error, msg:
usage(msg)
return
@@ -75,10 +83,10 @@ def main():
dryrun += 1
elif o in ('-r', '--recurse'):
recurse += 1
+ elif o in ('-n', '--nobackup'):
+ makebackup = False
elif o in ('-v', '--verbose'):
verbose += 1
- elif o in ('-B', '--no-backup'):
- no_backup += 1
elif o in ('-h', '--help'):
usage()
return
@@ -98,7 +106,8 @@ def check(file):
for name in names:
fullname = os.path.join(file, name)
if ((recurse and os.path.isdir(fullname) and
- not os.path.islink(fullname))
+ not os.path.islink(fullname) and
+ not os.path.split(fullname)[1].startswith("."))
or name.lower().endswith(".py")):
check(fullname)
return
@@ -118,26 +127,35 @@ def check(file):
print "changed."
if dryrun:
print "But this is a dry run, so leaving it alone."
- else:
- print "reindented", file, \
- (dryrun and "(dry run => not really)" or "")
if not dryrun:
- if not no_backup:
- bak = file + ".bak"
- if os.path.exists(bak):
- os.remove(bak)
- os.rename(file, bak)
+ bak = file + ".bak"
+ if makebackup:
+ shutil.copyfile(file, bak)
if verbose:
- print "renamed", file, "to", bak
+ print "backed up", file, "to", bak
f = open(file, "w")
r.write(f)
f.close()
if verbose:
print "wrote new", file
+ return True
else:
if verbose:
print "unchanged."
+ return False
+
+def _rstrip(line, JUNK='\n \t'):
+ """Return line stripped of trailing spaces, tabs, newlines.
+
+ Note that line.rstrip() instead also strips sundry control characters,
+ but at least one known Emacs user expects to keep junk like that, not
+ mentioning Barry by name or anything <wink>.
+ """
+ i = len(line)
+ while i > 0 and line[i-1] in JUNK:
+ i -= 1
+ return line[:i]
class Reindenter:
@@ -151,7 +169,7 @@ class Reindenter:
# File lines, rstripped & tab-expanded. Dummy at start is so
# that we can use tokenize's 1-based line numbering easily.
# Note that a line is all-blank iff it's "\n".
- self.lines = [line.rstrip('\n \t').expandtabs() + "\n"
+ self.lines = [_rstrip(line).expandtabs() + "\n"
for line in self.raw]
self.lines.insert(0, None)
self.index = 1 # index into self.lines of next line
@@ -163,7 +181,7 @@ class Reindenter:
self.stats = []
def run(self):
- tokenize.tokenize(self.getline, self.tokeneater)
+ tokens(self.getline, self.tokeneater)
# Remove trailing empty lines.
lines = self.lines
while lines and lines[-1] == "\n":