Merge with birkenfeld/sphinx.

This commit is contained in:
Roland Meister
2011-05-23 21:22:33 +02:00
40 changed files with 1832 additions and 708 deletions

17
CHANGES
View File

@@ -96,11 +96,28 @@ Features added
- #221: Added Swedish locale.
- #526: Added Iranian locale.
- #694: Added Latvian locale.
Release 1.0.8 (in development)
==============================
* #657: viewcode now works correctly with source files that have
non-ASCII encoding.
* #669: Respect the ``noindex`` flag option in py:module directives.
* #675: Fix IndexErrors when including nonexisting lines with
:rst:dir:`literalinclude`.
* #676: Respect custom function/method parameter separator strings.
* #682: Fix JS incompatibility with jQuery >= 1.5.
* #693: Fix double encoding done when writing HTMLHelp .hhk files.
* #647: Do not apply SmartyPants in parsed-literal blocks.
Release 1.0.7 (Jan 15, 2011)
============================

View File

@@ -379,6 +379,7 @@ documentation on :ref:`intl` for details.
* ``it`` -- Italian
* ``ja`` -- Japanese
* ``lt`` -- Lithuanian
* ``lv`` -- Latvian
* ``nl`` -- Dutch
* ``pl`` -- Polish
* ``pt_BR`` -- Brazilian Portuguese
@@ -1187,9 +1188,10 @@ These options influence Texinfo output.
* *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'``.
*startdoc*. Inserted as Texinfo markup, so special characters like @ and
{} will need to be escaped to be inserted literally.
* *author*: Author for the Texinfo document. Inserted as Texinfo markup.
Use ``@*`` to separate multiple authors, as in: ``'John@*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.
@@ -1203,13 +1205,32 @@ These options influence 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_domain_indices
If true, generate domain-specific indices in addition to the general index.
For e.g. the Python domain, this is the global module index. Default is
``True``.
This value can be a bool or a list of index names that should be generated,
like for :confval:`html_domain_indices`.
.. versionadded:: 1.1
.. confval:: texinfo_show_urls
Control how to display URL addresses.
* ``'footnote'`` -- display URLs in footnotes (default)
* ``'no'`` -- do not display URLs
* ``'inline'`` -- display URLs inline in parentheses
.. versionadded:: 1.1
.. confval:: texinfo_elements
@@ -1227,12 +1248,23 @@ These options influence Texinfo output.
default ``4``. Specify ``0`` for no indentation.
``'preamble'``
Text inserted as is near the beginning of the file.
Texinfo markup inserted near the beginning of the file.
``'copying'``
Texinfo markup inserted within the ``@copying`` block and displayed
after the title. The default value consists of a simple title page
identifying the project.
* Keys that are set by other options and therefore should not be overridden
are:
``'author'``
``'body'``
``'date'``
``'direntry'``
``'filename'``
``'project'``
``'release'``
``'title'``
``'direntry'``

View File

@@ -191,13 +191,17 @@ MathJax_ is then loaded and transforms the LaTeX markup to readable math live in
the browser.
Because MathJax (and the necessary fonts) is very large, it is not included in
Sphinx. You must install it yourself, and give Sphinx its path in this config
value:
Sphinx.
.. confval:: mathjax_path
The path to the JavaScript file to include in the HTML files in order to load
JSMath. There is no default.
JSMath.
The default is the ``http://`` URL that loads the JS files from the `MathJax
CDN <http://www.mathjax.org/docs/1.1/start.html>`_. If you want MathJax to
be available offline, you have to donwload it and set this value to a
different path.
The path can be absolute or relative; if it is relative, it is relative to
the ``_static`` directory of the built docs.
@@ -207,11 +211,7 @@ value:
documentation set on one server, it is advisable to install MathJax in a
shared location.
You can also give a full ``http://`` URL. Kevin Dunn maintains a MathJax
installation on a public server, which he offers for use by development and
production servers::
mathjax_path = 'http://mathjax.connectmv.com/MathJax.js'
You can also give a full ``http://`` URL different from the CDN URL.
:mod:`sphinx.ext.jsmath` -- Render math via JavaScript

View File

@@ -42,6 +42,13 @@ How do I...
Using Sphinx with...
--------------------
Read the Docs
http://readthedocs.org is a documentation hosting service based around Sphinx.
They will host sphinx documentation, along with supporting a number of other
features including version support, PDF generation, and more. The `Getting
Started <http://read-the-docs.readthedocs.org/en/latest/getting_started.html>`_
guide is a good place to start.
Epydoc
There's a third-party extension providing an `api role`_ which refers to
Epydoc's API docs for a given identifier.
@@ -215,7 +222,7 @@ Info files, try adding the following Emacs Lisp code to your start-up file,
(widen) (goto-char (point-min))
(when (re-search-forward
"^Generated by \\(Sphinx\\|Docutils\\)"
(save-excursion (search-forward "^_" nil t)) t)
(save-excursion (search-forward "\x1f" nil t)) t)
(set (make-local-variable 'Info-hide-note-references)
'hide)))))
@@ -227,9 +234,8 @@ 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 ``:``.
- Colons (``:``) cannot be properly escaped in menu entries and xrefs.
They will be replaced with semicolons (``;``).
- In the HTML and Tex output, the word ``see`` is automatically inserted before
all xrefs.

View File

@@ -47,6 +47,10 @@ latex
man
Generates manual pages.
texinfo
Generates Texinfo output that can be processed by :program:`makeinfo` to
generate an Info document.
text
Generates a plain-text version of the documentation.

View File

@@ -198,7 +198,11 @@ Overriding works like this::
Add additional script files here, like this::
{% set script_files = script_files + [pathto("_static/myscript.js", 1)] %}
{% set script_files = script_files + ["_static/myscript.js"] %}
.. data:: css_files
Similar to :data:`script_files`, for CSS files.
Helper Functions

View File

@@ -7,7 +7,10 @@
ReST files appropriately to create code documentation with Sphinx. It also
creates a modules index (named modules.<suffix>).
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
This is derived from the "sphinx-autopackage" script, which is:
Copyright 2008 Société des arts technologiques (SAT), http://www.sat.qc.ca/.
:copyright: 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
@@ -134,9 +137,12 @@ def recurse_tree(rootpath, excludes, opts):
Look for every file in the directory tree and create the corresponding
ReST files.
"""
# use absolute path for root, as relative paths like '../../foo' cause
# 'if "/." in root ...' to filter out *all* modules otherwise
rootpath = os.path.abspath(rootpath)
# check if the base directory is a package and get is name
if INITPY in os.listdir(rootpath):
package_name = path.abspath(rootpath).split(path.sep)[-1]
package_name = rootpath.split(path.sep)[-1]
else:
package_name = None

View File

@@ -67,7 +67,12 @@ class I18nBuilder(Builder):
catalog = self.catalogs[docname.split(SEP, 1)[0]]
for node, msg in extract_messages(doctree):
catalog.setdefault(node.uid, msg)
if not msg in catalog:
catalog[msg] = []
if node.source and node.line:
position = {"source": node.source,
"line": node.line}
catalog[msg].append(position)
class MessageCatalogBuilder(I18nBuilder):
@@ -93,11 +98,14 @@ class MessageCatalogBuilder(I18nBuilder):
pofile = open(pofn, 'w', encoding='utf-8')
try:
pofile.write(POHEADER % data)
for uid, message in messages.iteritems():
for message, positions 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)
for position in positions:
source = path.relpath(position["source"], self.outdir)
line = position["line"]
pofile.write(u'#: %s:%d\n' % (source, line))
pofile.write(u'msgid "%s"\nmsgstr ""\n\n' % message)
finally:
pofile.close()

View File

@@ -132,6 +132,7 @@ chm_locales = {
'fr': (0x40c, 'iso8859_1'),
'it': (0x410, 'iso8859_1'),
'ja': (0x411, 'cp932'),
'lv': (0x426, 'cp1257'),
'nl': (0x413, 'iso8859_1'),
'pl': (0x415, 'iso8859_2'),
'pt_BR': (0x416, 'iso8859_1'),
@@ -258,8 +259,7 @@ 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')
.decode(self.encoding))
f.write(item)
title = cgi.escape(title)
f.write('<LI> <OBJECT type="text/sitemap">\n')
write_param('Keyword', title)

View File

@@ -86,8 +86,8 @@ class TexinfoBuilder(Builder):
"""
name = 'texinfo'
format = 'texinfo'
supported_image_types = ['application/pdf', 'image/png',
'image/gif', 'image/jpeg']
supported_image_types = ['image/png', 'image/jpeg',
'image/gif',]
def init(self):
self.docnames = []
@@ -143,18 +143,6 @@ class TexinfoBuilder(Builder):
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")))
self.post_process_images(doctree)
docwriter = TexinfoWriter(self)
settings = OptionParser(

View File

@@ -172,6 +172,7 @@ class Config(object):
texinfo_appendices = ([], None),
texinfo_elements = ({}, None),
texinfo_domain_indices = (True, None),
texinfo_show_urls = ('footnote', None),
# linkcheck options
linkcheck_ignore = ([], None),

View File

@@ -138,7 +138,13 @@ class LiteralInclude(Directive):
linelist = parselinenos(linespec, len(lines))
except ValueError, err:
return [document.reporter.warning(str(err), line=self.lineno)]
lines = [lines[i] for i in linelist]
# just ignore nonexisting lines
nlines = len(lines)
lines = [lines[i] for i in linelist if i < nlines]
if not lines:
return [document.reporter.warning(
'Line spec %r: no lines pulled from include file %r' %
(linespec, filename), line=self.lineno)]
startafter = self.options.get('start-after')
endbefore = self.options.get('end-before')

View File

@@ -347,6 +347,10 @@ class Include(BaseInclude):
def run(self):
env = self.state.document.settings.env
if self.arguments[0].startswith('<') and \
self.arguments[0].endswith('>'):
# docutils "standard" includes, do not do path processing
return BaseInclude.run(self)
rel_filename, filename = env.relfn2path(self.arguments[0])
self.arguments[0] = filename
return BaseInclude.run(self)

View File

@@ -712,6 +712,13 @@ class DefinitionParser(object):
self.fail('expected comma between arguments')
self.skip_ws()
if self.skip_string('...'):
args.append(ArgumentDefExpr(None, '...', None))
if self.skip_string(')'):
break
else:
self.fail('expected closing parenthesis after ellipses')
argtype = self._parse_type()
argname = default = None
self.skip_ws()

View File

@@ -418,18 +418,19 @@ class PyModule(Directive):
modname = self.arguments[0].strip()
noindex = 'noindex' in self.options
env.temp_data['py:module'] = modname
env.domaindata['py']['modules'][modname] = \
(env.docname, self.options.get('synopsis', ''),
self.options.get('platform', ''), 'deprecated' in self.options)
# make a duplicate entry in 'objects' to facilitate searching for the
# module in PythonDomain.find_obj()
env.domaindata['py']['objects'][modname] = (env.docname, 'module')
targetnode = nodes.target('', '', ids=['module-' + modname], ismod=True)
self.state.document.note_explicit_target(targetnode)
ret = [targetnode]
# the platform and synopsis aren't printed; in fact, they are only used
# in the modindex currently
ret = []
if not noindex:
env.domaindata['py']['modules'][modname] = \
(env.docname, self.options.get('synopsis', ''),
self.options.get('platform', ''), 'deprecated' in self.options)
# make a duplicate entry in 'objects' to facilitate searching for the
# module in PythonDomain.find_obj()
env.domaindata['py']['objects'][modname] = (env.docname, 'module')
targetnode = nodes.target('', '', ids=['module-' + modname], ismod=True)
self.state.document.note_explicit_target(targetnode)
# the platform and synopsis aren't printed; in fact, they are only used
# in the modindex currently
ret.append(targetnode)
indextext = _('%s (module)') % modname
inode = addnodes.index(entries=[('single', indextext,
'module-' + modname, '')])

View File

@@ -555,28 +555,33 @@ class Documenter(object):
# if isattr is True, the member is documented as an attribute
isattr = False
doc = self.get_attr(member, '__doc__', None)
# if the member __doc__ is the same as self's __doc__, it's just
# inherited and therefore not the member's doc
cls = self.get_attr(member, '__class__', None)
if cls:
cls_doc = self.get_attr(cls, '__doc__', None)
if cls_doc == doc:
doc = None
has_doc = bool(doc)
keep = False
if want_all and membername.startswith('__') and \
membername.endswith('__') and len(membername) > 4:
# special __methods__
skip = not self.options.special_members
if self.options.special_members and membername != '__doc__':
keep = has_doc or self.options.undoc_members
elif want_all and membername.startswith('_'):
# ignore members whose name starts with _ by default
skip = not self.options.private_members
keep = self.options.private_members and \
(has_doc or self.options.undoc_members)
elif (namespace, membername) in attr_docs:
# keep documented attributes
skip = False
keep = True
isattr = True
else:
# ignore undocumented members if :undoc-members: is not given
doc = self.get_attr(member, '__doc__', None)
# if the member __doc__ is the same as self's __doc__, it's just
# inherited and therefore not the member's doc
cls = self.get_attr(member, '__class__', None)
if cls:
cls_doc = self.get_attr(cls, '__doc__', None)
if cls_doc == doc:
doc = None
skip = not self.options.undoc_members and not doc
keep = has_doc or self.options.undoc_members
# give the user a chance to decide whether this member
# should be skipped
@@ -584,13 +589,12 @@ class Documenter(object):
# let extensions preprocess docstrings
skip_user = self.env.app.emit_firstresult(
'autodoc-skip-member', self.objtype, membername, member,
skip, self.options)
not keep, self.options)
if skip_user is not None:
skip = skip_user
if skip:
continue
keep = not skip_user
ret.append((membername, member, isattr))
if keep:
ret.append((membername, member, isattr))
return ret
@@ -1348,3 +1352,13 @@ def setup(app):
app.add_event('autodoc-process-docstring')
app.add_event('autodoc-process-signature')
app.add_event('autodoc-skip-member')
class testcls:
"""test doc string"""
def __getattr__(self, x):
return x
def __setattr__(self, x, y):
"""Attr setter."""

View File

@@ -228,7 +228,7 @@ class CoverageBuilder(Builder):
op.write('\n')
if undoc['classes']:
op.write('Classes:\n')
for name, methods in undoc['classes'].iteritems():
for name, methods in sorted(undoc['classes'].iteritems()):
if not methods:
op.write(' * %s\n' % name)
else:

View File

@@ -299,10 +299,30 @@ def render_dot_latex(self, node, code, options, prefix='graphviz'):
def latex_visit_graphviz(self, node):
render_dot_latex(self, node, node['code'], node['options'])
def render_dot_texinfo(self, node, code, options, prefix='graphviz'):
try:
fname, outfn = render_dot(self, code, options, 'png', prefix)
except GraphvizError, exc:
self.builder.warn('dot code %r: ' % code + str(exc))
raise nodes.SkipNode
if fname is not None:
self.body.append('\n\n@float\n')
if node.get('caption'):
self.body.append('@caption{%s}\n' % self.escape_arg(caption))
self.body.append('@image{%s,,,[graphviz],png}\n'
'@end float\n\n' % fname[:-4])
raise nodes.SkipNode
def texinfo_visit_graphviz(self, node):
render_dot_texinfo(self, node, node['code'], node['options'])
def setup(app):
app.add_node(graphviz,
html=(html_visit_graphviz, None),
latex=(latex_visit_graphviz, None))
latex=(latex_visit_graphviz, None),
texinfo=(texinfo_visit_graphviz, None))
app.add_directive('graphviz', Graphviz)
app.add_directive('graph', GraphvizSimple)
app.add_directive('digraph', GraphvizSimple)

View File

@@ -47,7 +47,8 @@ except ImportError:
from docutils import nodes
from docutils.parsers.rst import directives
from sphinx.ext.graphviz import render_dot_html, render_dot_latex
from sphinx.ext.graphviz import render_dot_html, render_dot_latex, \
render_dot_texinfo
from sphinx.util.compat import Directive
@@ -354,6 +355,21 @@ def latex_visit_inheritance_diagram(self, node):
raise nodes.SkipNode
def texinfo_visit_inheritance_diagram(self, node):
"""
Output the graph for Texinfo. This will insert a PNG.
"""
graph = node['graph']
graph_hash = get_graph_hash(node)
name = 'inheritance%s' % graph_hash
dotcode = graph.generate_dot(name, env=self.builder.env,
graph_attrs={'size': '"6.0,6.0"'})
render_dot_texinfo(self, node, dotcode, [], 'inheritance')
raise nodes.SkipNode
def skip(self, node):
raise nodes.SkipNode
@@ -366,7 +382,7 @@ def setup(app):
html=(html_visit_inheritance_diagram, None),
text=(skip, None),
man=(skip, None),
texinfo=(skip, None))
texinfo=(texinfo_visit_inheritance_diagram, None))
app.add_directive('inheritance-diagram', InheritanceDiagram)
app.add_config_value('inheritance_graph_attrs', {}, False),
app.add_config_value('inheritance_node_attrs', {}, False),

View File

@@ -12,7 +12,6 @@
from docutils import nodes, utils
from docutils.parsers.rst import directives
from sphinx.writers import texinfo
from sphinx.util.compat import Directive
@@ -127,16 +126,20 @@ def man_visit_eqref(self, node):
def texinfo_visit_math(self, node):
self.body.append('@math{' + texinfo.escape_arg(node['latex']) + '}')
self.body.append('@math{' + self.escape_arg(node['latex']) + '}')
raise nodes.SkipNode
def texinfo_visit_displaymath(self, node):
self.visit_paragraph(node)
if node.get('label'):
self.add_anchor(node['label'], node)
self.body.append('\n\n@example\n%s\n@end example\n\n' %
self.escape_arg(node['latex']))
def texinfo_depart_displaymath(self, node):
self.depart_paragraph(node)
pass
def texinfo_visit_eqref(self, node):
self.body.append(node['target'])
self.add_xref(node['docname'] + ':' + node['target'],
node['target'], node)
raise nodes.SkipNode

View File

@@ -60,8 +60,9 @@ def builder_inited(app):
def setup(app):
mathbase_setup(app, (html_visit_math, None), (html_visit_displaymath, None))
app.add_config_value('mathjax_path', '', False)
app.add_config_value('mathjax_path',
'http://cdn.mathjax.org/mathjax/latest/MathJax.js?'
'config=TeX-AMS-MML_HTMLorMML', False)
app.add_config_value('mathjax_inline', [r'\(', r'\)'], 'html')
app.add_config_value('mathjax_display', [r'\[', r'\]'], 'html')
app.connect('builder-inited', builder_inited)

View File

@@ -2,20 +2,19 @@
# Copyright (C) 2008 ORGANIZATION
# This file is distributed under the same license as the Sphinx project.
# Yasushi Masuda <whosaysni@gmail.com>, 2008.
# Kouhei Sutou <kou@clear-code.com, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: Sphinx 0.5\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"Project-Id-Version: Sphinx 1.1pre\n"
"POT-Creation-Date: 2008-09-11 23:58+0200\n"
"PO-Revision-Date: 2011-01-22 14:41+0100\n"
"Last-Translator: Yasushi MASUDA <whosaysni@gmail.com>\n"
"Language-Team: ja <LL@li.org>\n"
"PO-Revision-Date: 2011-05-15 21:25+0900\n"
"Last-Translator: Kouhei Sutou <kou@clear-code.com>\n"
"Language-Team: Japanese\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.5\n"
#: sphinx/environment.py:120 sphinx/writers/latex.py:189
#: sphinx/writers/manpage.py:67
@@ -26,12 +25,12 @@ msgstr "%Y 年 %m 月 %d 日"
#: sphinx/environment.py:1624
#, python-format
msgid "see %s"
msgstr ""
msgstr "%sを参照"
#: sphinx/environment.py:1627
#, python-format
msgid "see also %s"
msgstr ""
msgstr "%sも参照"
#: sphinx/roles.py:175
#, python-format
@@ -91,9 +90,8 @@ msgid "Module author: "
msgstr "モジュールの作者: "
#: sphinx/directives/other.py:140
#, fuzzy
msgid "Code author: "
msgstr "モジュールの作者: "
msgstr "コードの作者: "
#: sphinx/directives/other.py:142
msgid "Author: "
@@ -164,12 +162,11 @@ msgid "type"
msgstr "のデータ型"
#: sphinx/domains/c.py:208
#, fuzzy
msgid "variable"
msgstr "変数"
#: sphinx/domains/cpp.py:897
#, fuzzy, python-format
#, python-format
msgid "%s (C++ class)"
msgstr "%s (C++ のクラス)"
@@ -204,9 +201,9 @@ msgid "%s() (%s method)"
msgstr "%s() (%s のメソッド)"
#: sphinx/domains/javascript.py:109
#, fuzzy, python-format
#, python-format
msgid "%s() (class)"
msgstr "%s() (クラス)"
msgstr "%s() (クラス)"
#: sphinx/domains/javascript.py:111
#, python-format
@@ -219,9 +216,8 @@ msgid "%s (%s attribute)"
msgstr "%s (%s の属性)"
#: sphinx/domains/javascript.py:122
#, fuzzy
msgid "Arguments"
msgstr "パラメタ"
msgstr "引数"
#: sphinx/domains/javascript.py:125
msgid "Throws"
@@ -236,7 +232,6 @@ msgid "attribute"
msgstr "の属性"
#: sphinx/domains/python.py:100
#, fuzzy
msgid "Variables"
msgstr "変数"
@@ -286,14 +281,14 @@ msgid "%s() (%s static method)"
msgstr "%s() (%s の静的メソッド)"
#: sphinx/domains/python.py:341
#, fuzzy, python-format
#, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s のメソッド)"
msgstr "%s() (%s.%s のクラスメソッド)"
#: sphinx/domains/python.py:344
#, fuzzy, python-format
#, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s のメソッド)"
msgstr "%s() (%s のクラスメソッド)"
#: sphinx/domains/python.py:354
#, python-format
@@ -306,9 +301,8 @@ msgid "%s (module)"
msgstr "%s (モジュール)"
#: sphinx/domains/python.py:490
#, fuzzy
msgid "Python Module Index"
msgstr "モジュール索引"
msgstr "Pythonモジュール索引"
#: sphinx/domains/python.py:491
msgid "modules"
@@ -328,7 +322,7 @@ msgstr "メソッド"
#: sphinx/domains/python.py:563
msgid "class method"
msgstr ""
msgstr "クラスメソッド"
#: sphinx/domains/python.py:564
msgid "static method"
@@ -350,7 +344,7 @@ msgstr "%s (ディレクティブ)"
#: sphinx/domains/rst.py:57
#, python-format
msgid "%s (role)"
msgstr ""
msgstr "%s (ロール)"
#: sphinx/domains/rst.py:106
msgid "directive"
@@ -358,7 +352,7 @@ msgstr "ディレクティブ"
#: sphinx/domains/rst.py:107
msgid "role"
msgstr ""
msgstr "ロール"
#: sphinx/domains/std.py:70 sphinx/domains/std.py:86
#, python-format
@@ -430,7 +424,6 @@ msgid "[docs]"
msgstr "[ドキュメント]"
#: sphinx/ext/viewcode.py:131
#, fuzzy
msgid "Module code"
msgstr "モジュールコード"

View File

@@ -0,0 +1 @@
Documentation.addTranslations({"locale": "lv", "plural_expr": "(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2)", "messages": {"Search Results": "Atlases rezult\u0101ti", "Preparing search...": "Sagatavojam atlasi...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "J\u016bsu atlases rindai neatbilst neviens dokuments. L\u016bdzu, p\u0101rbaudiet, vai visi v\u0101rdi ir uzrakst\u012bti pareizi, un vai ir izv\u0113l\u0113tas pareiz\u0101s kategorijas.", "Search finished, found %s page(s) matching the search query.": "Atlase pabeigta, atrastas lapas: %s", ", in ": ", iek\u0161 ", "Expand sidebar": "Izplest s\u0101njoslu", "Permalink to this headline": "Past\u0101v\u012bga nor\u0101de \u0161o virsrakstu", "Searching": "Mekl\u0113jam", "Collapse sidebar": "Sav\u0113rst s\u0101njoslu", "Permalink to this definition": "Past\u0101v\u012bga nor\u0101de uz \u0161o defin\u012bciju", "Hide Search Matches": "Pasl\u0113pt atlases v\u0101rdus"}});

Binary file not shown.

View File

@@ -0,0 +1,770 @@
# Latvian translations for Sphinx.
# This file is distributed under the same license as the Sphinx project.
#
msgid ""
msgstr ""
"Project-Id-Version: Sphinx 1.0.7\n"
"POT-Creation-Date: 2010-05-24 23:53+0200\n"
"PO-Revision-Date: 2011-05-10 16:40+0200\n"
"Last-Translator: alexander smishlajev <alex@gorka.lv>\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"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: sphinx/environment.py:106 sphinx/writers/latex.py:184
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
msgstr "%d.%m.%Y"
#: sphinx/roles.py:174
#, python-format
msgid "Python Enhancement Proposals!PEP %s"
msgstr ""
#: sphinx/builders/changes.py:72
msgid "Builtins"
msgstr "Iebūvētie"
#: sphinx/builders/changes.py:74
msgid "Module level"
msgstr "Moduļu līmenis"
#: sphinx/builders/html.py:266
#, python-format
msgid "%b %d, %Y"
msgstr "%d.%m.%Y"
#: sphinx/builders/html.py:285 sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Vispārējs indekss"
#: sphinx/builders/html.py:285
msgid "index"
msgstr "indekss"
#: sphinx/builders/html.py:345
msgid "next"
msgstr "nākošais"
#: sphinx/builders/html.py:354
msgid "previous"
msgstr "iepriekšējs"
#: sphinx/builders/latex.py:151
msgid " (in "
msgstr " (iekš "
#: sphinx/directives/other.py:127
msgid "Section author: "
msgstr "Sekcijas autors: "
#: sphinx/directives/other.py:129
msgid "Module author: "
msgstr "Moduļa autors: "
#: sphinx/directives/other.py:131
msgid "Code author: "
msgstr "Koda autors: "
#: sphinx/directives/other.py:133
msgid "Author: "
msgstr "Autors: "
#: sphinx/directives/other.py:238
msgid "See also"
msgstr "Skat.arī"
#: sphinx/domains/__init__.py:253
#, python-format
msgid "%s %s"
msgstr "%s %s"
#: sphinx/domains/c.py:51 sphinx/domains/python.py:49
msgid "Parameters"
msgstr "Parametri"
#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:137
#: sphinx/domains/python.py:59
msgid "Returns"
msgstr "Atgriež"
#: sphinx/domains/c.py:56 sphinx/domains/python.py:61
msgid "Return type"
msgstr "Atgriežamais tips"
#: sphinx/domains/c.py:133
#, python-format
msgid "%s (C function)"
msgstr "%s (C funkcija)"
#: sphinx/domains/c.py:135
#, python-format
msgid "%s (C member)"
msgstr "%s (C loceklis)"
#: sphinx/domains/c.py:137
#, python-format
msgid "%s (C macro)"
msgstr "%s (C makross)"
#: sphinx/domains/c.py:139
#, python-format
msgid "%s (C type)"
msgstr "%s (C tips)"
#: sphinx/domains/c.py:141
#, python-format
msgid "%s (C variable)"
msgstr "%s (C mainīgais)"
#: sphinx/domains/c.py:171 sphinx/domains/cpp.py:1031
#: sphinx/domains/javascript.py:166 sphinx/domains/python.py:497
msgid "function"
msgstr "funkcija"
#: sphinx/domains/c.py:172 sphinx/domains/cpp.py:1032
msgid "member"
msgstr "loceklis"
#: sphinx/domains/c.py:173
msgid "macro"
msgstr "makross"
#: sphinx/domains/c.py:174 sphinx/domains/cpp.py:1033
msgid "type"
msgstr "tips"
#: sphinx/domains/c.py:175
msgid "variable"
msgstr "mainīgais"
#: sphinx/domains/cpp.py:876
#, python-format
msgid "%s (C++ class)"
msgstr "%s (C++ klase)"
#: sphinx/domains/cpp.py:891
#, python-format
msgid "%s (C++ type)"
msgstr "%s (C++ tips)"
#: sphinx/domains/cpp.py:910
#, python-format
msgid "%s (C++ member)"
msgstr "%s (C++ loceklis)"
#: sphinx/domains/cpp.py:962
#, python-format
msgid "%s (C++ function)"
msgstr "%s (C++ funkcija)"
#: sphinx/domains/cpp.py:1030 sphinx/domains/python.py:499
msgid "class"
msgstr "klase"
#: sphinx/domains/javascript.py:117 sphinx/domains/python.py:221
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (iebūvēta funkcija)"
#: sphinx/domains/javascript.py:118 sphinx/domains/python.py:285
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s metods)"
#: sphinx/domains/javascript.py:120
#, python-format
msgid "%s (global variable or constant)"
msgstr "%s (globālais mainīgais vai konstanta)"
#: sphinx/domains/javascript.py:122 sphinx/domains/python.py:323
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s atributs)"
#: sphinx/domains/javascript.py:131
msgid "Arguments"
msgstr "Argumenti"
#: sphinx/domains/javascript.py:134
msgid "Throws"
msgstr "Izmet"
#: sphinx/domains/javascript.py:167 sphinx/domains/python.py:498
msgid "data"
msgstr "dati"
#: sphinx/domains/javascript.py:168 sphinx/domains/python.py:504
msgid "attribute"
msgstr "atributs"
#: sphinx/domains/python.py:53
msgid "Variables"
msgstr "Mainīgie"
#: sphinx/domains/python.py:56
msgid "Raises"
msgstr "Ceļ"
#: sphinx/domains/python.py:222 sphinx/domains/python.py:279
#: sphinx/domains/python.py:291 sphinx/domains/python.py:304
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (moduļī %s)"
#: sphinx/domains/python.py:225
#, python-format
msgid "%s (built-in variable)"
msgstr "%s (iebūvētais mainīgais)"
#: sphinx/domains/python.py:226 sphinx/domains/python.py:317
#, python-format
msgid "%s (in module %s)"
msgstr "%s (moduļī %s)"
#: sphinx/domains/python.py:242
#, python-format
msgid "%s (built-in class)"
msgstr "%s (iebūvēta klase)"
#: sphinx/domains/python.py:243
#, python-format
msgid "%s (class in %s)"
msgstr "%s (klase iekš %s)"
#: sphinx/domains/python.py:283
#, python-format
msgid "%s() (%s.%s method)"
msgstr "%s() (%s.%s metods)"
#: sphinx/domains/python.py:295
#, python-format
msgid "%s() (%s.%s static method)"
msgstr "%s() (%s.%s statiskais metods)"
#: sphinx/domains/python.py:298
#, python-format
msgid "%s() (%s static method)"
msgstr "%s() (%s statiskais metods)"
#: sphinx/domains/python.py:308
#, python-format
msgid "%s() (%s.%s class method)"
msgstr "%s() (%s.%s klases metods)"
#: sphinx/domains/python.py:311
#, python-format
msgid "%s() (%s class method)"
msgstr "%s() (%s klases metods)"
#: sphinx/domains/python.py:321
#, python-format
msgid "%s (%s.%s attribute)"
msgstr "%s (%s.%s atributs)"
#: sphinx/domains/python.py:366
msgid "Platforms: "
msgstr "Platformas: "
#: sphinx/domains/python.py:372
#, python-format
msgid "%s (module)"
msgstr "%s (modulis)"
#: sphinx/domains/python.py:429
msgid "Python Module Index"
msgstr ""
#: sphinx/domains/python.py:430
msgid "modules"
msgstr "moduļi"
#: sphinx/domains/python.py:475
msgid "Deprecated"
msgstr "Nav ieteicams"
#: sphinx/domains/python.py:500 sphinx/locale/__init__.py:162
msgid "exception"
msgstr "izņēmums"
#: sphinx/domains/python.py:501
msgid "method"
msgstr "metods"
#: sphinx/domains/python.py:502
msgid "class method"
msgstr "klases metods"
#: sphinx/domains/python.py:503
msgid "static method"
msgstr "statiskais metods"
#: sphinx/domains/python.py:505 sphinx/locale/__init__.py:158
msgid "module"
msgstr "modulis"
#: sphinx/domains/rst.py:53
#, python-format
msgid "%s (directive)"
msgstr "%s (direktīva)"
#: sphinx/domains/rst.py:55
#, python-format
msgid "%s (role)"
msgstr "%s (role)"
#: sphinx/domains/rst.py:103
msgid "directive"
msgstr "direktīva"
#: sphinx/domains/rst.py:104
msgid "role"
msgstr "role"
#: sphinx/domains/std.py:68 sphinx/domains/std.py:84
#, python-format
msgid "environment variable; %s"
msgstr "apkārtnes mainīgais; %s"
#: sphinx/domains/std.py:160
#, python-format
msgid "%scommand line option; %s"
msgstr "%skomandrindas opcija; %s"
#: sphinx/domains/std.py:328
msgid "glossary term"
msgstr "glosārija termins"
#: sphinx/domains/std.py:329
msgid "grammar token"
msgstr "gramatiskais marķieris"
#: sphinx/domains/std.py:330
msgid "reference label"
msgstr "atsauces virsraksts"
#: sphinx/domains/std.py:331
msgid "environment variable"
msgstr "apkārtnes mainīgais"
#: sphinx/domains/std.py:332
msgid "program option"
msgstr "programmas opcija"
#: 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
msgid "Index"
msgstr "Indekss"
#: sphinx/domains/std.py:361
msgid "Module Index"
msgstr "Moduļu indekss"
#: sphinx/domains/std.py:362 sphinx/themes/basic/defindex.html:25
msgid "Search Page"
msgstr "Atlases lapa"
#: sphinx/ext/autodoc.py:917
#, python-format
msgid " Bases: %s"
msgstr " Bāzes: %s"
#: sphinx/ext/autodoc.py:950
#, python-format
msgid "alias of :class:`%s`"
msgstr "aizstājvārds klasei :class:`%s`"
#: sphinx/ext/todo.py:41
msgid "Todo"
msgstr "Jāizdara"
#: sphinx/ext/todo.py:109
#, python-format
msgid "(The <<original entry>> is located in %s, line %d.)"
msgstr "(<<original entry>> atrodas iekš %s, rinda %d.)"
#: sphinx/ext/todo.py:117
msgid "original entry"
msgstr "sākotnējs ieraksts"
#: sphinx/ext/viewcode.py:66
msgid "[source]"
msgstr "[kods]"
#: sphinx/ext/viewcode.py:109
msgid "[docs]"
msgstr "[dokumenti]"
#: sphinx/ext/viewcode.py:123
msgid "Module code"
msgstr "Moduļa teksts"
#: sphinx/ext/viewcode.py:129
#, python-format
msgid "<h1>Source code for %s</h1>"
msgstr "<h1>%s izejas teksts</h1>"
#: sphinx/ext/viewcode.py:156
msgid "Overview: module code"
msgstr "Apskats: moduļa teksts"
#: sphinx/ext/viewcode.py:157
msgid "<h1>All modules for which code is available</h1>"
msgstr "<h1>Visi moduļi, kuriem ir izejas teksti</h1>"
#: sphinx/locale/__init__.py:139
msgid "Attention"
msgstr "Uzmanību"
#: sphinx/locale/__init__.py:140
msgid "Caution"
msgstr "Uzmanies"
#: sphinx/locale/__init__.py:141
msgid "Danger"
msgstr "Bīstami"
#: sphinx/locale/__init__.py:142
msgid "Error"
msgstr "Kļūda"
#: sphinx/locale/__init__.py:143
msgid "Hint"
msgstr "Mājiens"
#: sphinx/locale/__init__.py:144
msgid "Important"
msgstr "Svarīgi"
#: sphinx/locale/__init__.py:145
msgid "Note"
msgstr "Piezīme"
#: sphinx/locale/__init__.py:146
msgid "See Also"
msgstr "Skat.arī"
#: sphinx/locale/__init__.py:147
msgid "Tip"
msgstr "Padoms"
#: sphinx/locale/__init__.py:148
msgid "Warning"
msgstr "Brīdinājums"
#: sphinx/locale/__init__.py:152
#, python-format
msgid "New in version %s"
msgstr "Jauns versijā %s"
#: sphinx/locale/__init__.py:153
#, python-format
msgid "Changed in version %s"
msgstr "Mainīts versijā %s"
#: sphinx/locale/__init__.py:154
#, python-format
msgid "Deprecated since version %s"
msgstr "Neieteicams no versijas %s"
#: sphinx/locale/__init__.py:159
msgid "keyword"
msgstr "atslēgas vārds"
#: sphinx/locale/__init__.py:160
msgid "operator"
msgstr "operators"
#: sphinx/locale/__init__.py:161
msgid "object"
msgstr "objekts"
#: sphinx/locale/__init__.py:163
msgid "statement"
msgstr "priekšraksts"
#: sphinx/locale/__init__.py:164
msgid "built-in function"
msgstr "iebūvēta funkcija"
#: sphinx/themes/agogo/layout.html:45 sphinx/themes/basic/globaltoc.html:10
#: sphinx/themes/basic/localtoc.html:11
msgid "Table Of Contents"
msgstr "Saturs"
#: sphinx/themes/agogo/layout.html:49 sphinx/themes/basic/layout.html:128
#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:14
msgid "Search"
msgstr "Meklēt"
#: sphinx/themes/agogo/layout.html:52 sphinx/themes/basic/searchbox.html:15
msgid "Go"
msgstr "Izpildīt"
#: sphinx/themes/agogo/layout.html:57 sphinx/themes/basic/searchbox.html:20
msgid "Enter search terms or a module, class or function name."
msgstr "Ievadiet meklējamus terminus vai moduļa, klases vai funkcijas vārdu."
#: sphinx/themes/agogo/layout.html:78 sphinx/themes/basic/sourcelink.html:14
msgid "Show Source"
msgstr "Rādīt izejas tekstu"
#: sphinx/themes/basic/defindex.html:11
msgid "Overview"
msgstr "Apskats"
#: sphinx/themes/basic/defindex.html:20
msgid "Indices and tables:"
msgstr "Indeksi un tabulas:"
#: sphinx/themes/basic/defindex.html:23
msgid "Complete Table of Contents"
msgstr "Pilns saturs"
#: sphinx/themes/basic/defindex.html:24
msgid "lists all sections and subsections"
msgstr "rāda visas sekcijas un apakšsekcijas"
#: sphinx/themes/basic/defindex.html:26
msgid "search this documentation"
msgstr "meklēt šajā dokumentācijā"
#: sphinx/themes/basic/defindex.html:28
msgid "Global Module Index"
msgstr "Vispārējs moduļu indekss"
#: sphinx/themes/basic/defindex.html:29
msgid "quick access to all modules"
msgstr "ātra piekļuve visiem moduliem"
#: sphinx/themes/basic/defindex.html:31
msgid "all functions, classes, terms"
msgstr "visas funkcijas, klases un termini"
#: sphinx/themes/basic/genindex-single.html:14
#, python-format
msgid "Index &ndash; %(key)s"
msgstr "Indekss &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 "Pilns indekss vienā lappusē"
#: sphinx/themes/basic/genindex-split.html:16
msgid "Index pages by letter"
msgstr "Lappušu indekss pēc burtiem"
#: sphinx/themes/basic/genindex-split.html:25
msgid "can be huge"
msgstr "var būt milzīgs"
#: sphinx/themes/basic/layout.html:23
msgid "Navigation"
msgstr "Navigācija"
#: sphinx/themes/basic/layout.html:113
#, python-format
msgid "Search within %(docstitle)s"
msgstr "Meklēt iekš %(docstitle)s"
#: sphinx/themes/basic/layout.html:122
msgid "About these documents"
msgstr "Par šiem dokumentiem"
#: 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 "Pēdējas izmaiņas %(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 ""
"Sagatavots izmantojot <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 meklēšana"
#: sphinx/themes/basic/relations.html:11
msgid "Previous topic"
msgstr "iepriekšēja tēma"
#: sphinx/themes/basic/relations.html:13
msgid "previous chapter"
msgstr "iepriekšēja sadaļa"
#: sphinx/themes/basic/relations.html:16
msgid "Next topic"
msgstr "nākoša tēma"
#: sphinx/themes/basic/relations.html:18
msgid "next chapter"
msgstr "nākoša sadaļa"
#: sphinx/themes/basic/search.html:18
msgid ""
"Please activate JavaScript to enable the search\n"
" functionality."
msgstr ""
"Lai iespējotu meklēšanu, lūdzu aktivizēt JavaScript."
#: sphinx/themes/basic/search.html:23
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 ""
"Šeit Jūs varat meklēt šajos dokumentos. Norādiet meklējamus vārdus\n"
" ievada lauka un uzklikšķiniet pogu \"meklēt\". Lūdzu ievērojiet,\n"
" ka meklēšanas programma atradīs tikai tos dokumentus, kuros ir\n"
" visi ievadītie vārdi. Dokumenti, kuros ir tikai daļa no ievadītiem\n"
" vārdiem, netiks atlasīti."
#: sphinx/themes/basic/search.html:30
msgid "search"
msgstr "meklēt"
#: sphinx/themes/basic/search.html:34
#: sphinx/themes/basic/static/searchtools.js:489
msgid "Search Results"
msgstr "Atlases rezultāti"
#: sphinx/themes/basic/search.html:36
msgid "Your search did not match any results."
msgstr "Nav rezultātu, atbilstošu Jūsu atlasei."
#: sphinx/themes/basic/searchbox.html:12
msgid "Quick search"
msgstr "Ātra meklēšana"
#: sphinx/themes/basic/sourcelink.html:11
msgid "This Page"
msgstr "Šī lappuse"
#: 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 "Izmaiņas versijā %(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 "Automātiski sagatavots izmaiņu saraksts versijai %(version)s"
#: sphinx/themes/basic/changes/versionchanges.html:18
msgid "Library changes"
msgstr "Bibliotēkas izmaiņas"
#: sphinx/themes/basic/changes/versionchanges.html:23
msgid "C API changes"
msgstr "Izmaiņas iekš C API"
#: sphinx/themes/basic/changes/versionchanges.html:25
msgid "Other changes"
msgstr "Citas izmaiņas"
#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:482
#: sphinx/writers/html.py:487
msgid "Permalink to this headline"
msgstr "Pastāvīga norāde šo virsrakstu"
#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:87
msgid "Permalink to this definition"
msgstr "Pastāvīga norāde uz šo definīciju"
#: sphinx/themes/basic/static/doctools.js:189
msgid "Hide Search Matches"
msgstr "Paslēpt atlases vārdus"
#: sphinx/themes/basic/static/searchtools.js:285
msgid "Searching"
msgstr "Meklējam"
#: sphinx/themes/basic/static/searchtools.js:290
msgid "Preparing search..."
msgstr "Sagatavojam atlasi..."
#: sphinx/themes/basic/static/searchtools.js:364
msgid ", in "
msgstr ", iekš "
#: 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 "Jūsu atlases rindai neatbilst neviens dokuments. Lūdzu, pārbaudiet, vai visi vārdi ir uzrakstīti pareizi, un vai ir izvēlētas pareizās kategorijas."
#: sphinx/themes/basic/static/searchtools.js:493
#, python-format
msgid "Search finished, found %s page(s) matching the search query."
msgstr "Atlase pabeigta, atrastas lapas: %s"
#: sphinx/themes/default/static/sidebar.js:66
msgid "Expand sidebar"
msgstr "Izplest sānjoslu"
#: sphinx/themes/default/static/sidebar.js:79
#: sphinx/themes/default/static/sidebar.js:106
msgid "Collapse sidebar"
msgstr "Savērst sānjoslu"
#: sphinx/themes/haiku/layout.html:26
msgid "Contents"
msgstr "Saturs"
#: sphinx/writers/latex.py:171
msgid "Release"
msgstr "Izlaidums"
#: sphinx/writers/latex.py:572 sphinx/writers/manpage.py:178
msgid "Footnotes"
msgstr "Vēres"
#: sphinx/writers/latex.py:641
msgid "continued from previous page"
msgstr "turpinājums no iepriekšējās lappuses"
#: sphinx/writers/latex.py:646
msgid "Continued on next page"
msgstr "Turpnājums nākošā lappusē"
#: sphinx/writers/text.py:422
msgid "[image]"
msgstr "[attēls]"

View File

@@ -1,23 +1,23 @@
# Turkish translations for Sphinx.
# Copyright (C) 2009 ORGANIZATION
# Translations template for Sphinx.
# Copyright (C) 2011 ORGANIZATION
# This file is distributed under the same license as the Sphinx project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: Sphinx 0.6.2+/6b02a19ccf31\n"
"Project-Id-Version: Sphinx 1.1pre/339c7a794c1a\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2009-08-06 22:48+0200\n"
"PO-Revision-Date: 2011-01-22 14:41+0100\n"
"POT-Creation-Date: 2011-01-22 14:40+0100\n"
"PO-Revision-Date: 2011-04-04 00:42+0200\n"
"Last-Translator: Firat Ozgul <ozgulfirat@gmail.com>\n"
"Language-Team: Turkish <kistihza@yahoo.com>\n"
"Plural-Forms: nplurals=1; plural=0\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.5\n"
#: sphinx/environment.py:120 sphinx/writers/latex.py:189
#: sphinx/environment.py:120
#: sphinx/writers/latex.py:189
#: sphinx/writers/manpage.py:67
#, python-format
msgid "%B %d, %Y"
@@ -26,12 +26,12 @@ msgstr "%d %B %Y"
#: sphinx/environment.py:1624
#, python-format
msgid "see %s"
msgstr ""
msgstr "bkz. %s"
#: sphinx/environment.py:1627
#, python-format
msgid "see also %s"
msgstr ""
msgstr "ayrıca bkz. %s"
#: sphinx/roles.py:175
#, python-format
@@ -51,7 +51,8 @@ msgstr "Modül düzeyi"
msgid "%b %d, %Y"
msgstr "%d %b %Y"
#: sphinx/builders/html.py:293 sphinx/themes/basic/defindex.html:30
#: sphinx/builders/html.py:293
#: sphinx/themes/basic/defindex.html:30
msgid "General Index"
msgstr "Genel Dizin"
@@ -67,17 +68,22 @@ msgstr "sonraki"
msgid "previous"
msgstr "önceki"
#: sphinx/builders/latex.py:141 sphinx/builders/texinfo.py:208
#: sphinx/builders/latex.py:141
#: sphinx/builders/texinfo.py:208
msgid " (in "
msgstr " (şunun içinde: "
#: sphinx/builders/texinfo.py:151 sphinx/builders/texinfo.py:152
#: sphinx/builders/texinfo.py:153 sphinx/domains/std.py:427
#: sphinx/builders/texinfo.py:151
#: sphinx/builders/texinfo.py:152
#: sphinx/builders/texinfo.py:153
#: sphinx/domains/std.py:427
#: sphinx/themes/basic/genindex-single.html:32
#: sphinx/themes/basic/genindex-split.html:11
#: sphinx/themes/basic/genindex-split.html:14
#: sphinx/themes/basic/genindex.html:32 sphinx/themes/basic/genindex.html:35
#: sphinx/themes/basic/genindex.html:68 sphinx/themes/basic/layout.html:134
#: sphinx/themes/basic/genindex.html:32
#: sphinx/themes/basic/genindex.html:35
#: sphinx/themes/basic/genindex.html:68
#: sphinx/themes/basic/layout.html:134
#: sphinx/writers/latex.py:178
msgid "Index"
msgstr "Dizin"
@@ -107,16 +113,19 @@ msgstr "Ayrıca bkz."
msgid "%s %s"
msgstr "%s %s"
#: sphinx/domains/c.py:51 sphinx/domains/python.py:95
#: sphinx/domains/c.py:51
#: sphinx/domains/python.py:95
msgid "Parameters"
msgstr "Parametreler"
#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:128
#: sphinx/domains/c.py:54
#: sphinx/domains/javascript.py:128
#: sphinx/domains/python.py:107
msgid "Returns"
msgstr "Şunu döndürür:"
msgstr "Dönüş değeri:"
#: sphinx/domains/c.py:56 sphinx/domains/python.py:109
#: sphinx/domains/c.py:56
#: sphinx/domains/python.py:109
msgid "Return type"
msgstr "Dönüş tipi"
@@ -145,12 +154,15 @@ msgstr "%s (C tipi)"
msgid "%s (C variable)"
msgstr "%s (C değişkeni)"
#: sphinx/domains/c.py:204 sphinx/domains/cpp.py:1053
#: sphinx/domains/javascript.py:162 sphinx/domains/python.py:558
#: sphinx/domains/c.py:204
#: sphinx/domains/cpp.py:1053
#: sphinx/domains/javascript.py:162
#: sphinx/domains/python.py:558
msgid "function"
msgstr "fonksiyonu"
#: sphinx/domains/c.py:205 sphinx/domains/cpp.py:1054
#: sphinx/domains/c.py:205
#: sphinx/domains/cpp.py:1054
msgid "member"
msgstr "öğesi"
@@ -158,7 +170,8 @@ msgstr "öğesi"
msgid "macro"
msgstr "makrosu"
#: sphinx/domains/c.py:207 sphinx/domains/cpp.py:1055
#: sphinx/domains/c.py:207
#: sphinx/domains/cpp.py:1055
msgid "type"
msgstr "tipi"
@@ -186,17 +199,20 @@ msgstr "%s (C++ öğesi)"
msgid "%s (C++ function)"
msgstr "%s (C++ fonksiyonu)"
#: sphinx/domains/cpp.py:1052 sphinx/domains/javascript.py:163
#: sphinx/domains/cpp.py:1052
#: sphinx/domains/javascript.py:163
#: sphinx/domains/python.py:560
msgid "class"
msgstr "sınıfı"
#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:254
#: sphinx/domains/javascript.py:106
#: sphinx/domains/python.py:254
#, python-format
msgid "%s() (built-in function)"
msgstr "%s() (gömülü fonksiyon)"
#: sphinx/domains/javascript.py:107 sphinx/domains/python.py:318
#: sphinx/domains/javascript.py:107
#: sphinx/domains/python.py:318
#, python-format
msgid "%s() (%s method)"
msgstr "%s() (%s metodu)"
@@ -211,7 +227,8 @@ msgstr "%s() (sınıfı)"
msgid "%s (global variable or constant)"
msgstr "%s (global değişken veya sabit)"
#: sphinx/domains/javascript.py:113 sphinx/domains/python.py:356
#: sphinx/domains/javascript.py:113
#: sphinx/domains/python.py:356
#, python-format
msgid "%s (%s attribute)"
msgstr "%s (%s niteliği)"
@@ -224,11 +241,13 @@ msgstr "Argümanlar"
msgid "Throws"
msgstr "Şunu verir: "
#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:559
#: sphinx/domains/javascript.py:164
#: sphinx/domains/python.py:559
msgid "data"
msgstr "verisi"
#: sphinx/domains/javascript.py:165 sphinx/domains/python.py:565
#: sphinx/domains/javascript.py:165
#: sphinx/domains/python.py:565
msgid "attribute"
msgstr "niteliği"
@@ -240,8 +259,10 @@ msgstr "Değişkenler"
msgid "Raises"
msgstr "Şunu üretir:"
#: sphinx/domains/python.py:255 sphinx/domains/python.py:312
#: sphinx/domains/python.py:324 sphinx/domains/python.py:337
#: sphinx/domains/python.py:255
#: sphinx/domains/python.py:312
#: sphinx/domains/python.py:324
#: sphinx/domains/python.py:337
#, python-format
msgid "%s() (in module %s)"
msgstr "%s() (%s modülü içinde)"
@@ -251,7 +272,8 @@ msgstr "%s() (%s modülü içinde)"
msgid "%s (built-in variable)"
msgstr "%s (gömülü değişken)"
#: sphinx/domains/python.py:259 sphinx/domains/python.py:350
#: sphinx/domains/python.py:259
#: sphinx/domains/python.py:350
#, python-format
msgid "%s (in module %s)"
msgstr "%s (%s modülü içinde)"
@@ -313,7 +335,8 @@ msgstr "modüller"
msgid "Deprecated"
msgstr "Önerilmiyor"
#: sphinx/domains/python.py:561 sphinx/locale/__init__.py:179
#: sphinx/domains/python.py:561
#: sphinx/locale/__init__.py:179
msgid "exception"
msgstr "istisnası"
@@ -329,7 +352,8 @@ msgstr "sınıf metodu"
msgid "static method"
msgstr "statik metodu"
#: sphinx/domains/python.py:566 sphinx/locale/__init__.py:175
#: sphinx/domains/python.py:566
#: sphinx/locale/__init__.py:175
msgid "module"
msgstr "modülü"
@@ -355,7 +379,8 @@ msgstr "yönergesi"
msgid "role"
msgstr "rolü"
#: sphinx/domains/std.py:70 sphinx/domains/std.py:86
#: sphinx/domains/std.py:70
#: sphinx/domains/std.py:86
#, python-format
msgid "environment variable; %s"
msgstr "çevre değişkeni; %s"
@@ -389,7 +414,8 @@ msgstr "program seçeneği"
msgid "Module Index"
msgstr "Modül Dizini"
#: sphinx/domains/std.py:429 sphinx/themes/basic/defindex.html:25
#: sphinx/domains/std.py:429
#: sphinx/themes/basic/defindex.html:25
msgid "Search Page"
msgstr "Arama Sayfası"
@@ -498,7 +524,7 @@ msgstr "%s sürümünden beri önerilmiyor"
#: sphinx/locale/__init__.py:176
msgid "keyword"
msgstr "anahtar kelime"
msgstr "anahtar sözcük"
#: sphinx/locale/__init__.py:177
msgid "operator"
@@ -516,25 +542,31 @@ msgstr "deyim"
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:137
#: sphinx/themes/basic/search.html:11 sphinx/themes/basic/search.html:20
#: sphinx/themes/agogo/layout.html:49
#: sphinx/themes/basic/layout.html:137
#: 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"
@@ -624,12 +656,8 @@ msgstr "Son güncelleme: %(last_updated)s."
#: sphinx/themes/basic/layout.html:198
#, 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
@@ -720,12 +748,14 @@ 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:505
#: sphinx/themes/basic/static/doctools.js:154
#: sphinx/writers/html.py:505
#: sphinx/writers/html.py:511
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:92
#: sphinx/themes/basic/static/doctools.js:160
#: sphinx/writers/html.py:92
msgid "Permalink to this definition"
msgstr "Bu tanımın kalıcı bağlantısı"
@@ -750,7 +780,8 @@ msgstr "İçindekiler"
msgid "Release"
msgstr "Sürüm"
#: sphinx/writers/latex.py:590 sphinx/writers/manpage.py:182
#: sphinx/writers/latex.py:590
#: sphinx/writers/manpage.py:182
msgid "Footnotes"
msgstr "Dipnotları"
@@ -766,28 +797,3 @@ msgstr "Devamı sonraki sayfada"
msgid "[image]"
msgstr "[resim]"
#~ msgid "Platforms: "
#~ msgstr "Platformlar:"
#~ msgid "Searching"
#~ msgstr "Arıyor"
#~ msgid "Preparing search..."
#~ msgstr "Aramaya hazırlanıyor..."
#~ msgid ", in "
#~ msgstr ", şunun içinde: "
#~ 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."
#~ msgid "Search finished, found %s page(s) matching the search query."
#~ msgstr "Arama sonuçlandı, aramayla eşleşen %s sayfa bulundu."

View File

@@ -17,7 +17,7 @@ from cStringIO import StringIO
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 import get_module_source, detect_encoding
from sphinx.util.pycompat import next
from sphinx.util.docstrings import prepare_docstring, prepare_commentdoc
@@ -38,10 +38,6 @@ for k, v in token.tok_name.iteritems():
number2name = pygrammar.number2symbol.copy()
number2name.update(token.tok_name)
# a regex to recognize coding cookies
_coding_re = re.compile(r'coding[:=]\s*([-\w.]+)')
_eq = nodes.Leaf(token.EQUAL, '=')
@@ -217,11 +213,10 @@ class ModuleAnalyzer(object):
self.srcname = srcname
# file-like object yielding source lines
self.source = source
# will be changed when found by parse()
self.encoding = sys.getdefaultencoding()
# cache the source code as well
pos = self.source.tell()
self.encoding = detect_encoding(self.source.readline)
self.code = self.source.read()
self.source.seek(pos)
@@ -251,13 +246,6 @@ class ModuleAnalyzer(object):
self.parsetree = pydriver.parse_tokens(self.tokens)
except parse.ParseError, err:
raise PycodeError('parsing failed', err)
# find the source code encoding, if present
comments = self.parsetree.get_prefix()
for line in comments.splitlines()[:2]:
match = _coding_re.search(line)
if match is not None:
self.encoding = match.group(1)
break
def find_attr_docs(self, scope=''):
"""Find class and module-level attributes and their documentation."""

View File

@@ -258,6 +258,7 @@ man_pages = [
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
@@ -269,7 +270,13 @@ texinfo_documents = [
]
# Documents to append as an appendix to all manuals.
texinfo_appendices = []
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
'''
EPUB_CONFIG = '''

View File

@@ -127,8 +127,12 @@ var Search = {
var excluded = [];
var hlterms = [];
var tmp = query.split(/\s+/);
var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;
var objectterms = [];
for (var i = 0; i < tmp.length; i++) {
if (tmp[i] != "") {
objectterms.push(tmp[i].toLowerCase());
}
if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\d+$/) ||
tmp[i] == "") {
// skip this "word"
@@ -159,9 +163,6 @@ var Search = {
var filenames = this._index.filenames;
var titles = this._index.titles;
var terms = this._index.terms;
var objects = this._index.objects;
var objtypes = this._index.objtypes;
var objnames = this._index.objnames;
var fileMap = {};
var files = null;
// different result priorities
@@ -172,40 +173,19 @@ var Search = {
$('#search-progress').empty();
// lookup as object
if (object != null) {
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) {
match = objects[prefix][name];
descr = objnames[match[1]] + _(', in ') + titles[match[0]];
// XXX the generated anchors are not generally correct
// XXX there may be custom prefixes
result = [filenames[match[0]], fullname, '#'+fullname, descr];
switch (match[2]) {
case 1: objectResults.push(result); break;
case 0: importantResults.push(result); break;
case 2: unimportantResults.push(result); break;
}
}
}
}
for (var i = 0; i < objectterms.length; i++) {
var others = Array.concat(objectterms.slice(0,i),
objectterms.slice(i+1, objectterms.length))
var results = this.performObjectSearch(objectterms[i], others);
// Assume first word is most likely to be the object,
// other words more likely to be in description.
// Therefore put matches for earlier words first.
// (Results are eventually used in reverse order).
objectResults = results[0].concat(objectResults);
importantResults = results[1].concat(importantResults);
unimportantResults = results[2].concat(unimportantResults);
}
// sort results descending
objectResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
importantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
unimportantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
// perform the search on the required terms
for (var i = 0; i < searchterms.length; i++) {
var word = searchterms[i];
@@ -304,7 +284,7 @@ var Search = {
listItem.slideDown(5, function() {
displayNextItem();
});
});
}, "text");
} else {
// no source available, just display title
Search.output.append(listItem);
@@ -325,6 +305,67 @@ var Search = {
}
}
displayNextItem();
},
performObjectSearch : function(object, otherterms) {
var filenames = this._index.filenames;
var objects = this._index.objects;
var objnames = this._index.objnames;
var titles = this._index.titles;
var importantResults = [];
var objectResults = [];
var unimportantResults = [];
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) {
var match = objects[prefix][name];
var objname = objnames[match[1]];
var title = titles[match[0]];
// If more than one term searched for, we require other words to be
// found in the name/title/description
if (otherterms.length > 0) {
var haystack = (prefix + ' ' + name + ' ' + objname + ' ' + title).toLowerCase();
var allfound = true;
for (var i = 0; i < otherterms.length; i++) {
if (haystack.indexOf(otherterms[i]) == -1) {
allfound = false;
break;
}
}
if (!allfound) {
continue;
}
}
var descr = objname + _(', in ') + title;
// XXX the generated anchors are not generally correct
// XXX there may be custom prefixes
result = [filenames[match[0]], fullname, '#'+fullname, descr];
switch (match[2]) {
case 1: objectResults.push(result); break;
case 0: importantResults.push(result); break;
case 2: unimportantResults.push(result); break;
}
}
}
}
// sort results descending
objectResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
importantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
unimportantResults.sort(function(a, b) {
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
});
return [importantResults, objectResults, unimportantResults]
}
}

View File

@@ -18,7 +18,7 @@ import tempfile
import posixpath
import traceback
from os import path
from codecs import open
from codecs import open, BOM_UTF8
from collections import deque
import docutils
@@ -216,6 +216,59 @@ def get_module_source(modname):
return 'file', filename
# a regex to recognize coding cookies
_coding_re = re.compile(r'coding[:=]\s*([-\w.]+)')
def detect_encoding(readline):
"""Like tokenize.detect_encoding() from Py3k, but a bit simplified."""
def read_or_stop():
try:
return readline()
except StopIteration:
return None
def get_normal_name(orig_enc):
"""Imitates get_normal_name in tokenizer.c."""
# Only care about the first 12 characters.
enc = orig_enc[:12].lower().replace('_', '-')
if enc == 'utf-8' or enc.startswith('utf-8-'):
return 'utf-8'
if enc in ('latin-1', 'iso-8859-1', 'iso-latin-1') or \
enc.startswith(('latin-1-', 'iso-8859-1-', 'iso-latin-1-')):
return 'iso-8859-1'
return orig_enc
def find_cookie(line):
try:
line_string = line.decode('ascii')
except UnicodeDecodeError:
return None
matches = _coding_re.findall(line_string)
if not matches:
return None
return get_normal_name(matches[0])
default = sys.getdefaultencoding()
first = read_or_stop()
if first and first.startswith(BOM_UTF8):
first = first[3:]
default = 'utf-8-sig'
if not first:
return default
encoding = find_cookie(first)
if encoding:
return encoding
second = read_or_stop()
if not second:
return default
encoding = find_cookie(second)
if encoding:
return encoding
return default
# Low-level utility functions and classes.
class Tee(object):

View File

@@ -116,12 +116,13 @@ class HTMLTranslator(BaseTranslator):
def visit_desc_parameterlist(self, node):
self.body.append('<big>(</big>')
self.first_param = 1
self.param_separator = node.child_text_separator
def depart_desc_parameterlist(self, node):
self.body.append('<big>)</big>')
def visit_desc_parameter(self, node):
if not self.first_param:
self.body.append(', ')
self.body.append(self.param_separator)
else:
self.first_param = 0
if not node.hasattr('noemph'):
@@ -566,8 +567,15 @@ class SmartyPantsHTMLTranslator(HTMLTranslator):
self.no_smarty += 1
try:
HTMLTranslator.visit_literal_block(self, node)
finally:
except nodes.SkipNode:
# HTMLTranslator raises SkipNode for simple literal blocks,
# but not for parsed literal blocks
self.no_smarty -= 1
raise
def depart_literal_block(self, node):
HTMLTranslator.depart_literal_block(self, node)
self.no_smarty -= 1
def visit_literal_emphasis(self, node):
self.no_smarty += 1

File diff suppressed because it is too large Load Diff

View File

@@ -29,8 +29,20 @@ 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...")
try:
import docutils
except ImportError:
print('Sphinx requires the docutils package to be installed.')
sys.exit(1)
try:
import jinja2
except ImportError:
print('Sphinx requires the jinja2 package to be installed.')
sys.exit(1)
print('Running Sphinx test suite...')
nose.main()

View File

@@ -11,8 +11,8 @@
import os
import re
import htmlentitydefs
import sys
import htmlentitydefs
from StringIO import StringIO
try:

View File

@@ -29,6 +29,7 @@ texinfo_warnfile = StringIO()
TEXINFO_WARNINGS = ENV_WARNINGS + """\
None:None: WARNING: no matching candidate for image URI u'foo.\\*'
None:None: WARNING: no matching candidate for image URI u'svgimg.\\*'
"""
if sys.version_info >= (3, 0):

View File

@@ -37,6 +37,9 @@ def test_type_definitions():
x = 'explicit module::myclass::foo::foo()'
assert unicode(parse('function', x)) == x
x = 'int printf(const char* fmt, ...)'
assert unicode(parse('function', x)) == x
x = 'std::vector<std::pair<std::string, long long>> module::blah'
assert unicode(parse('type_object', x)) == x

View File

@@ -25,6 +25,11 @@ def setup_module():
test_root / 'xx' / 'LC_MESSAGES' / '%s.mo' % catalog],
stdout=PIPE, stderr=PIPE)
except OSError:
# The test will fail the second time it's run if we don't
# tear down here. Not sure if there's a more idiomatic way
# of ensuring that teardown gets run in the event of an
# exception from the setup function.
teardown_module()
raise SkipTest # most likely msgfmt was not found
else:
stdout, stderr = p.communicate()

View File

@@ -193,8 +193,8 @@ def with_app(*args, **kwargs):
def gen_with_app(*args, **kwargs):
"""
Make a TestApp with args and kwargs, pass it to the test and clean up
properly.
Decorate a test generator to pass a TestApp as the first argument to the
test generator when it's executed.
"""
def generator(func):
@wraps(func)
@@ -224,7 +224,7 @@ def write_file(name, contents, encoding=None):
contents = contents.encode('ascii')
else:
mode = 'w'
f = open(str(name), 'wb', encoding=encoding)
f = open(str(name), mode, encoding=encoding)
f.write(contents)
f.close()