diff options
| author | Takayuki Shimizukawa <shimizukawa+bitbucket@gmail.com> | 2013-02-24 19:05:15 +0900 |
|---|---|---|
| committer | Takayuki Shimizukawa <shimizukawa+bitbucket@gmail.com> | 2013-02-24 19:05:15 +0900 |
| commit | bb8ea3c7527dd8ff8537d30f14842c761b879505 (patch) | |
| tree | 93ba7e33ace73a47ee3f8bf12f91a4433657002e /sphinx | |
| parent | 3cc4eb2169b3c54e64a68d3825d1c89e604330b8 (diff) | |
| parent | 7f39b25e85dfed5c50383acf9fdf8bec9aed8393 (diff) | |
| download | sphinx-bb8ea3c7527dd8ff8537d30f14842c761b879505.tar.gz | |
Merged in knzm/sphinx-fix-docfields-fork (pull request #96)
make docfield translatable
Diffstat (limited to 'sphinx')
22 files changed, 1884 insertions, 164 deletions
diff --git a/sphinx/builders/epub.py b/sphinx/builders/epub.py index fbde5697..6803753b 100644 --- a/sphinx/builders/epub.py +++ b/sphinx/builders/epub.py @@ -281,8 +281,11 @@ class EpubBuilder(StandaloneHTMLBuilder): newids.append(self.fix_fragment('', id)) node.attributes['ids'] = newids - def add_visible_links(self, tree): - """Append visible link targets after external links.""" + def add_visible_links(self, tree, show_urls='inline'): + """Append visible link targets after external links""" + if show_urls == 'no': + return + for node in tree.traverse(nodes.reference): uri = node.get('refuri', '') if (uri.startswith('http:') or uri.startswith('https:') or @@ -290,9 +293,10 @@ class EpubBuilder(StandaloneHTMLBuilder): uri = _link_target_template % {'uri': uri} if uri: idx = node.parent.index(node) + 1 - link = nodes.inline(uri, uri) - link['classes'].append(_css_link_target_class) - node.parent.insert(idx, link) + if show_urls == 'inline': + link = nodes.inline(uri, uri) + link['classes'].append(_css_link_target_class) + node.parent.insert(idx, link) def write_doc(self, docname, doctree): """Write one document file. @@ -301,7 +305,7 @@ class EpubBuilder(StandaloneHTMLBuilder): and to add visible external links. """ self.fix_ids(doctree) - self.add_visible_links(doctree) + self.add_visible_links(doctree, self.config.epub_show_urls) return StandaloneHTMLBuilder.write_doc(self, docname, doctree) def fix_genindex(self, tree): diff --git a/sphinx/config.py b/sphinx/config.py index 45105f26..2e548986 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -16,8 +16,8 @@ from os import path from sphinx.errors import ConfigError from sphinx.locale import l_ -from sphinx.util.osutil import make_filename, fs_encoding -from sphinx.util.pycompat import bytes, b, convert_with_2to3 +from sphinx.util.osutil import make_filename +from sphinx.util.pycompat import bytes, b, execfile_ nonascii_re = re.compile(b(r'[\x80-\xff]')) @@ -142,6 +142,7 @@ class Config(object): epub_tocdup = (True, 'env'), epub_fix_images = (False, 'env'), epub_max_image_width = (0, 'env'), + epub_show_urls = ('inline', 'html'), # LaTeX options latex_documents = (lambda self: [(self.master_doc, @@ -191,6 +192,7 @@ class Config(object): texinfo_elements = ({}, None), texinfo_domain_indices = (True, None), texinfo_show_urls = ('footnote', None), + texinfo_no_detailmenu = (False, None), # linkcheck options linkcheck_ignore = ([], None), @@ -218,27 +220,8 @@ class Config(object): # we promise to have the config dir as current dir while the # config file is executed os.chdir(dirname) - # get config source -- 'b' is a no-op under 2.x, while 'U' is - # ignored under 3.x (but 3.x compile() accepts \r\n newlines) - f = open(filename, 'rbU') try: - source = f.read() - finally: - f.close() - try: - # compile to a code object, handle syntax errors - config_file_enc = config_file.encode(fs_encoding) - try: - code = compile(source, config_file_enc, '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_enc, 'exec') - else: - raise - exec code in config + execfile_(filename, config) except SyntaxError, err: raise ConfigError(CONFIG_SYNTAX_ERROR % err) finally: diff --git a/sphinx/locale/eu/LC_MESSAGES/sphinx.js b/sphinx/locale/eu/LC_MESSAGES/sphinx.js new file mode 100644 index 00000000..2407a0e6 --- /dev/null +++ b/sphinx/locale/eu/LC_MESSAGES/sphinx.js @@ -0,0 +1 @@ +Documentation.addTranslations({"locale": "eu", "plural_expr": "(n != 1)", "messages": {"Hide Search Matches": "Bilaketa bat-etortzeak ezkutatu", "Permalink to this definition": "Definizio honetarako esteka iraunkorra", "Expand sidebar": "Alboko barra luzatu", "Permalink to this headline": "Goiburu honetarako esteka iraunkorra", "Collapse sidebar": "Alboko barra tolestu"}});
\ No newline at end of file diff --git a/sphinx/locale/eu/LC_MESSAGES/sphinx.mo b/sphinx/locale/eu/LC_MESSAGES/sphinx.mo Binary files differnew file mode 100644 index 00000000..9088838f --- /dev/null +++ b/sphinx/locale/eu/LC_MESSAGES/sphinx.mo diff --git a/sphinx/locale/eu/LC_MESSAGES/sphinx.po b/sphinx/locale/eu/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000..0ade62c4 --- /dev/null +++ b/sphinx/locale/eu/LC_MESSAGES/sphinx.po @@ -0,0 +1,769 @@ +# Translations template for Sphinx. +# Copyright (C) 2011 ORGANIZATION +# This file is distributed under the same license as the Sphinx project. +# Ales Zabala Alava <shagi@gisa-elkartea.org>, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: Sphinx 1.1pre/9523af9ba9aa+\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2011-09-21 10:06+0200\n" +"PO-Revision-Date: 2013-02-07 11:51+0100\n" +"Last-Translator: Ales Zabala Alava (Shagi) <shagi@gisa-elkartea.org>\n" +"Language-Team: Basque\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 0.9.6\n" +"Language: eu\n" + +#: sphinx/config.py:81 +#, python-format +msgid "%s %s documentation" +msgstr "%s %s dokumentazioa" + +#: sphinx/environment.py:119 sphinx/writers/latex.py:190 +#: sphinx/writers/manpage.py:67 sphinx/writers/texinfo.py:203 +#, python-format +msgid "%B %d, %Y" +msgstr "%Y %B %d" + +#: sphinx/environment.py:1625 +#, python-format +msgid "see %s" +msgstr "%s ikusi" + +#: sphinx/environment.py:1628 +#, python-format +msgid "see also %s" +msgstr "ikusi %s baita ere" + +#: sphinx/roles.py:175 +#, python-format +msgid "Python Enhancement Proposals; PEP %s" +msgstr "Python Hobekuntza Proposamena; PEP %s" + +#: sphinx/builders/changes.py:73 +msgid "Builtins" +msgstr "" + +#: sphinx/builders/changes.py:75 +msgid "Module level" +msgstr "Modulu maila" + +#: sphinx/builders/html.py:274 +#, python-format +msgid "%b %d, %Y" +msgstr "%Y %b %d" + +#: sphinx/builders/html.py:293 sphinx/themes/basic/defindex.html:30 +msgid "General Index" +msgstr "Indize orokorra" + +#: sphinx/builders/html.py:293 +msgid "index" +msgstr "indizea" + +#: sphinx/builders/html.py:353 +msgid "next" +msgstr "hurrengoa" + +#: sphinx/builders/html.py:362 +msgid "previous" +msgstr "aurrekoa" + +#: sphinx/builders/latex.py:141 sphinx/builders/texinfo.py:196 +msgid " (in " +msgstr " (hemen: " + +#: sphinx/directives/other.py:136 +msgid "Section author: " +msgstr "Atalaren egilea: " + +#: sphinx/directives/other.py:138 +msgid "Module author: " +msgstr "Moduluaren egilea: " + +#: sphinx/directives/other.py:140 +msgid "Code author: " +msgstr "Kodearen egilea: " + +#: sphinx/directives/other.py:142 +msgid "Author: " +msgstr "Egilea:" + +#: sphinx/directives/other.py:215 +msgid "See also" +msgstr "Ikusi baita ere" + +#: sphinx/domains/__init__.py:244 +#, python-format +msgid "%s %s" +msgstr "%s %s" + +#: sphinx/domains/c.py:51 sphinx/domains/python.py:95 +msgid "Parameters" +msgstr "Parametroak" + +#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:128 +#: sphinx/domains/python.py:107 +msgid "Returns" +msgstr "Itzultzen du" + +#: sphinx/domains/c.py:56 sphinx/domains/python.py:109 +msgid "Return type" +msgstr "Itzulketa mota" + +#: sphinx/domains/c.py:141 +#, python-format +msgid "%s (C function)" +msgstr "%s (C funtzioa)" + +#: sphinx/domains/c.py:143 +#, python-format +msgid "%s (C member)" +msgstr "%s (C partaidea)" + +#: sphinx/domains/c.py:145 +#, python-format +msgid "%s (C macro)" +msgstr "%s (C makroa)" + +#: sphinx/domains/c.py:147 +#, python-format +msgid "%s (C type)" +msgstr "%s (C mota)" + +#: sphinx/domains/c.py:149 +#, python-format +msgid "%s (C variable)" +msgstr "%s (C aldagaia)" + +#: sphinx/domains/c.py:204 sphinx/domains/cpp.py:1060 +#: sphinx/domains/javascript.py:162 sphinx/domains/python.py:559 +msgid "function" +msgstr "funtzioa" + +#: sphinx/domains/c.py:205 sphinx/domains/cpp.py:1061 +msgid "member" +msgstr "partaidea" + +#: sphinx/domains/c.py:206 +msgid "macro" +msgstr "makroa" + +#: sphinx/domains/c.py:207 sphinx/domains/cpp.py:1062 +msgid "type" +msgstr "mota" + +#: sphinx/domains/c.py:208 +msgid "variable" +msgstr "aldagaia" + +#: sphinx/domains/cpp.py:904 +#, python-format +msgid "%s (C++ class)" +msgstr "%s (C++ klasea)" + +#: sphinx/domains/cpp.py:919 +#, python-format +msgid "%s (C++ type)" +msgstr "%s (C++ mota)" + +#: sphinx/domains/cpp.py:938 +#, python-format +msgid "%s (C++ member)" +msgstr "%s (C++ partaidea)" + +#: sphinx/domains/cpp.py:990 +#, python-format +msgid "%s (C++ function)" +msgstr "%s (C++ funtzioa)" + +#: sphinx/domains/cpp.py:1059 sphinx/domains/javascript.py:163 +#: sphinx/domains/python.py:561 +msgid "class" +msgstr "klasea" + +#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:254 +#, python-format +msgid "%s() (built-in function)" +msgstr "" + +#: sphinx/domains/javascript.py:107 sphinx/domains/python.py:318 +#, python-format +msgid "%s() (%s method)" +msgstr "%s() (%s metodoa)" + +#: sphinx/domains/javascript.py:109 +#, python-format +msgid "%s() (class)" +msgstr "%s() (klasea)" + +#: sphinx/domains/javascript.py:111 +#, python-format +msgid "%s (global variable or constant)" +msgstr "%s (aldagai globala edo konstantea)" + +#: sphinx/domains/javascript.py:113 sphinx/domains/python.py:356 +#, python-format +msgid "%s (%s attribute)" +msgstr "%s (%s atributua)" + +#: sphinx/domains/javascript.py:122 +msgid "Arguments" +msgstr "Argumentuak" + +#: sphinx/domains/javascript.py:125 +msgid "Throws" +msgstr "Jaurtitzen du" + +#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:560 +msgid "data" +msgstr "datuak" + +#: sphinx/domains/javascript.py:165 sphinx/domains/python.py:566 +msgid "attribute" +msgstr "atributua" + +#: sphinx/domains/python.py:100 +msgid "Variables" +msgstr "Aldagaiak" + +#: sphinx/domains/python.py:104 +msgid "Raises" +msgstr "Goratzen du" + +#: 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 moduluan)" + +#: sphinx/domains/python.py:258 +#, python-format +msgid "%s (built-in variable)" +msgstr "" + +#: sphinx/domains/python.py:259 sphinx/domains/python.py:350 +#, python-format +msgid "%s (in module %s)" +msgstr "%s (%s moduluan)" + +#: sphinx/domains/python.py:275 +#, python-format +msgid "%s (built-in class)" +msgstr "" + +#: sphinx/domains/python.py:276 +#, python-format +msgid "%s (class in %s)" +msgstr "%s (klasea %s-(e)n)" + +#: sphinx/domains/python.py:316 +#, python-format +msgid "%s() (%s.%s method)" +msgstr "%s() (%s.%s metodoa)" + +#: sphinx/domains/python.py:328 +#, python-format +msgid "%s() (%s.%s static method)" +msgstr "%s() (%s.%s metodo estatikoa)" + +#: sphinx/domains/python.py:331 +#, python-format +msgid "%s() (%s static method)" +msgstr "%s() (%s metodo estatikoa)" + +#: sphinx/domains/python.py:341 +#, python-format +msgid "%s() (%s.%s class method)" +msgstr "%s() (%s.%s klaseko metodoa)" + +#: sphinx/domains/python.py:344 +#, python-format +msgid "%s() (%s class method)" +msgstr "%s() (%s klaseko metodoa)" + +#: sphinx/domains/python.py:354 +#, python-format +msgid "%s (%s.%s attribute)" +msgstr "%s (%s.%s atributua)" + +#: sphinx/domains/python.py:434 +#, python-format +msgid "%s (module)" +msgstr "%s (modulua)" + +#: sphinx/domains/python.py:491 +msgid "Python Module Index" +msgstr "Python moduluen indizea" + +#: sphinx/domains/python.py:492 +msgid "modules" +msgstr "moduluak" + +#: sphinx/domains/python.py:537 +msgid "Deprecated" +msgstr "Zaharkitua" + +#: sphinx/domains/python.py:562 sphinx/locale/__init__.py:179 +msgid "exception" +msgstr "salbuespena" + +#: sphinx/domains/python.py:563 +msgid "method" +msgstr "metodoa" + +#: sphinx/domains/python.py:564 +msgid "class method" +msgstr "klaseko metodoa" + +#: sphinx/domains/python.py:565 +msgid "static method" +msgstr "metodo estatikoa" + +#: sphinx/domains/python.py:567 sphinx/locale/__init__.py:175 +msgid "module" +msgstr "modulua" + +#: sphinx/domains/python.py:695 +msgid " (deprecated)" +msgstr " (zaharkitua)" + +#: sphinx/domains/rst.py:55 +#, python-format +msgid "%s (directive)" +msgstr "" + +#: sphinx/domains/rst.py:57 +#, python-format +msgid "%s (role)" +msgstr "%s (rola)" + +#: sphinx/domains/rst.py:106 +msgid "directive" +msgstr "" + +#: sphinx/domains/rst.py:107 +msgid "role" +msgstr "rola" + +#: sphinx/domains/std.py:70 sphinx/domains/std.py:86 +#, python-format +msgid "environment variable; %s" +msgstr "inguruneko aldagaia; %s" + +#: sphinx/domains/std.py:162 +#, python-format +msgid "%scommand line option; %s" +msgstr "%skomando lerroko aukera; %s" + +#: sphinx/domains/std.py:393 +msgid "glossary term" +msgstr "glosarioko terminoa" + +#: sphinx/domains/std.py:394 +msgid "grammar token" +msgstr "gramatikako token-a" + +#: sphinx/domains/std.py:395 +msgid "reference label" +msgstr "erreferentzia etiketa" + +#: sphinx/domains/std.py:396 +msgid "environment variable" +msgstr "inguruneko aldagaia" + +#: sphinx/domains/std.py:397 +msgid "program option" +msgstr "programako aukera" + +#: 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/writers/latex.py:179 sphinx/writers/texinfo.py:456 +msgid "Index" +msgstr "Indizea" + +#: sphinx/domains/std.py:428 +msgid "Module Index" +msgstr "Moduluen indizea" + +#: sphinx/domains/std.py:429 sphinx/themes/basic/defindex.html:25 +msgid "Search Page" +msgstr "Bilaketa orria" + +#: sphinx/ext/autodoc.py:1002 +#, python-format +msgid " Bases: %s" +msgstr "" + +#: sphinx/ext/autodoc.py:1038 +#, python-format +msgid "alias of :class:`%s`" +msgstr "" + +#: sphinx/ext/todo.py:41 +msgid "Todo" +msgstr "Egitekoa" + +#: sphinx/ext/todo.py:109 +#, python-format +msgid "(The <<original entry>> is located in %s, line %d.)" +msgstr "" + +#: sphinx/ext/todo.py:117 +msgid "original entry" +msgstr "jatorrizko sarrera" + +#: sphinx/ext/viewcode.py:70 +msgid "[source]" +msgstr "[iturburua]" + +#: sphinx/ext/viewcode.py:117 +msgid "[docs]" +msgstr "[dokumentazioa]" + +#: sphinx/ext/viewcode.py:131 +msgid "Module code" +msgstr "Moduluko kodea" + +#: sphinx/ext/viewcode.py:137 +#, python-format +msgid "<h1>Source code for %s</h1>" +msgstr "<h1>%s(r)en iturburu kodea</h1>" + +#: sphinx/ext/viewcode.py:164 +msgid "Overview: module code" +msgstr "Gainbegirada: moduluko kodea" + +#: sphinx/ext/viewcode.py:165 +msgid "<h1>All modules for which code is available</h1>" +msgstr "<h1>Kodea eskuragarri duten modulu guztiak</h1>" + +#: sphinx/locale/__init__.py:155 +msgid "Attention" +msgstr "Adi" + +#: sphinx/locale/__init__.py:156 +msgid "Caution" +msgstr "Kontuz" + +#: sphinx/locale/__init__.py:157 +msgid "Danger" +msgstr "Arriskua" + +#: sphinx/locale/__init__.py:158 +msgid "Error" +msgstr "Errorea" + +#: sphinx/locale/__init__.py:159 +msgid "Hint" +msgstr "Argibidea" + +#: sphinx/locale/__init__.py:160 +msgid "Important" +msgstr "Garrantzitsua" + +#: sphinx/locale/__init__.py:161 +msgid "Note" +msgstr "Nota" + +#: sphinx/locale/__init__.py:162 +msgid "See Also" +msgstr "Ikusi baita ere" + +#: sphinx/locale/__init__.py:163 +msgid "Tip" +msgstr "Iradokizuna" + +#: sphinx/locale/__init__.py:164 +msgid "Warning" +msgstr "Kontuz" + +#: sphinx/locale/__init__.py:168 +#, python-format +msgid "New in version %s" +msgstr "Berria %s bertsioan" + +#: sphinx/locale/__init__.py:169 +#, python-format +msgid "Changed in version %s" +msgstr "%s bertsioan aldatuta" + +#: sphinx/locale/__init__.py:170 +#, python-format +msgid "Deprecated since version %s" +msgstr "%s bertsiotik aurrera zaharkituta" + +#: sphinx/locale/__init__.py:176 +msgid "keyword" +msgstr "gako-hitza" + +#: sphinx/locale/__init__.py:177 +msgid "operator" +msgstr "eragiketa" + +#: sphinx/locale/__init__.py:178 +msgid "object" +msgstr "objetua" + +#: sphinx/locale/__init__.py:180 +msgid "statement" +msgstr "sententzia" + +#: sphinx/locale/__init__.py:181 +msgid "built-in function" +msgstr "" + +#: sphinx/themes/agogo/layout.html:45 sphinx/themes/basic/globaltoc.html:10 +#: sphinx/themes/basic/localtoc.html:11 +msgid "Table Of Contents" +msgstr "Eduki taula" + +#: 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 "Bilatu" + +#: sphinx/themes/agogo/layout.html:52 sphinx/themes/basic/searchbox.html:15 +msgid "Go" +msgstr "Joan" + +#: sphinx/themes/agogo/layout.html:57 sphinx/themes/basic/searchbox.html:20 +msgid "Enter search terms or a module, class or function name." +msgstr "Sartu bilaketa terminoa edo modulu, klase edo funtzioaren izena." + +#: sphinx/themes/agogo/layout.html:78 sphinx/themes/basic/sourcelink.html:14 +msgid "Show Source" +msgstr "Iturburua ikusi" + +#: sphinx/themes/basic/defindex.html:11 +msgid "Overview" +msgstr "Gainbegirada" + +#: sphinx/themes/basic/defindex.html:20 +msgid "Indices and tables:" +msgstr "Indizeak eta taulak:" + +#: sphinx/themes/basic/defindex.html:23 +msgid "Complete Table of Contents" +msgstr "Eduki taula osoa" + +#: sphinx/themes/basic/defindex.html:24 +msgid "lists all sections and subsections" +msgstr "atal eta azpiatal guztiak zerrendatu" + +#: sphinx/themes/basic/defindex.html:26 +msgid "search this documentation" +msgstr "dokumentazio honetan bilatu" + +#: sphinx/themes/basic/defindex.html:28 +msgid "Global Module Index" +msgstr "Modulu indize globala" + +#: sphinx/themes/basic/defindex.html:29 +msgid "quick access to all modules" +msgstr "modulu guztietara atzipen azkarra" + +#: sphinx/themes/basic/defindex.html:31 +msgid "all functions, classes, terms" +msgstr "funtzio, klase, termino guztiak" + +#: sphinx/themes/basic/genindex-single.html:35 +#, python-format +msgid "Index – %(key)s" +msgstr "Indizea – %(key)s" + +#: sphinx/themes/basic/genindex-single.html:63 +#: sphinx/themes/basic/genindex-split.html:24 +#: sphinx/themes/basic/genindex-split.html:38 +#: sphinx/themes/basic/genindex.html:74 +msgid "Full index on one page" +msgstr "Indize guztia orri batean" + +#: sphinx/themes/basic/genindex-split.html:16 +msgid "Index pages by letter" +msgstr "Indize orriak hizkika" + +#: sphinx/themes/basic/genindex-split.html:25 +msgid "can be huge" +msgstr "handia izan daiteke" + +#: sphinx/themes/basic/layout.html:29 +msgid "Navigation" +msgstr "Nabigazioa" + +#: sphinx/themes/basic/layout.html:122 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "Bilatu %(docstitle)s(e)n" + +#: sphinx/themes/basic/layout.html:131 +msgid "About these documents" +msgstr "Dokumentu hauen inguruan" + +#: sphinx/themes/basic/layout.html:140 +msgid "Copyright" +msgstr "Copyright" + +#: sphinx/themes/basic/layout.html:189 +#, python-format +msgid "© <a href=\"%(path)s\">Copyright</a> %(copyright)s." +msgstr "© <a href=\"%(path)s\">Copyright</a> %(copyright)s." + +#: sphinx/themes/basic/layout.html:191 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "© Copyright %(copyright)s." + +#: sphinx/themes/basic/layout.html:195 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Azken aldaketa: %(last_updated)s." + +#: sphinx/themes/basic/layout.html:198 +#, python-format +msgid "" +"Created using <a href=\"http://sphinx-doc.org/\">Sphinx</a> " +"%(sphinx_version)s." +msgstr "" +"<a href=\"http://sphinx-doc.org/\">Sphinx</a> %(sphinx_version)s erabiliz " +"sortutakoa." + +#: sphinx/themes/basic/opensearch.xml:4 +#, python-format +msgid "Search %(docstitle)s" +msgstr "%(docstitle)s bilatu" + +#: sphinx/themes/basic/relations.html:11 +msgid "Previous topic" +msgstr "Aurreko gaia" + +#: sphinx/themes/basic/relations.html:13 +msgid "previous chapter" +msgstr "aurreko kapitulua" + +#: sphinx/themes/basic/relations.html:16 +msgid "Next topic" +msgstr "Hurrengo gaia" + +#: sphinx/themes/basic/relations.html:18 +msgid "next chapter" +msgstr "hurrengo kapitulua" + +#: sphinx/themes/basic/search.html:24 +msgid "" +"Please activate JavaScript to enable the search\n" +" functionality." +msgstr "Mesedez, gaitu JavaScript-a bilaketa erabili ahal izateko." + +#: 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 "" +"Honekin dokumentu hauetan bilatu dezakezu. Sartu zure bilaketa hitzak\n" +"ondoko kutxan eta \"bilatu\" sakatu. Kontutan eduki bilaketa funtzioak\n" +"hitz guztiak bilatuko dituela. Hitz gutxiago dituzten orriak ez dira \n" +"emaitzen zerrendan agertuko." + +#: sphinx/themes/basic/search.html:36 +msgid "search" +msgstr "bilatu" + +#: sphinx/themes/basic/search.html:40 +msgid "Search Results" +msgstr "Bilaketa emaitzak" + +#: sphinx/themes/basic/search.html:42 +msgid "Your search did not match any results." +msgstr "Zure bilaketak ez du emaitzarik eman." + +#: sphinx/themes/basic/searchbox.html:12 +msgid "Quick search" +msgstr "Bilaketa azkarra" + +#: sphinx/themes/basic/sourcelink.html:11 +msgid "This Page" +msgstr "Orri hau" + +#: sphinx/themes/basic/changes/frameset.html:5 +#: sphinx/themes/basic/changes/versionchanges.html:12 +#, python-format +msgid "Changes in Version %(version)s — %(docstitle)s" +msgstr "%(version)s bertsioko aldaketak — %(docstitle)s" + +#: sphinx/themes/basic/changes/rstsource.html:5 +#, python-format +msgid "%(filename)s — %(docstitle)s" +msgstr "%(filename)s — %(docstitle)s" + +#: sphinx/themes/basic/changes/versionchanges.html:17 +#, python-format +msgid "Automatically generated list of changes in version %(version)s" +msgstr "Automatikoki sortutako %(version)s bertsioaren aldaketen zerrenda" + +#: sphinx/themes/basic/changes/versionchanges.html:18 +msgid "Library changes" +msgstr "Liburutegi aldaketak" + +#: sphinx/themes/basic/changes/versionchanges.html:23 +msgid "C API changes" +msgstr "C API aldaketak" + +#: sphinx/themes/basic/changes/versionchanges.html:25 +msgid "Other changes" +msgstr "Beste aldaketak" + +#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:504 +#: sphinx/writers/html.py:510 +msgid "Permalink to this headline" +msgstr "Goiburu honetarako esteka iraunkorra" + +#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:92 +msgid "Permalink to this definition" +msgstr "Definizio honetarako esteka iraunkorra" + +#: sphinx/themes/basic/static/doctools.js:189 +msgid "Hide Search Matches" +msgstr "Bilaketa bat-etortzeak ezkutatu" + +#: sphinx/themes/default/static/sidebar.js:69 +msgid "Expand sidebar" +msgstr "Alboko barra luzatu" + +#: sphinx/themes/default/static/sidebar.js:82 +#: sphinx/themes/default/static/sidebar.js:110 +msgid "Collapse sidebar" +msgstr "Alboko barra tolestu" + +#: sphinx/themes/haiku/layout.html:26 +msgid "Contents" +msgstr "Edukiak" + +#: sphinx/writers/latex.py:177 +msgid "Release" +msgstr "Argitalpena" + +#: sphinx/writers/latex.py:594 sphinx/writers/manpage.py:182 +#: sphinx/writers/texinfo.py:589 +msgid "Footnotes" +msgstr "Oin-oharrak" + +#: sphinx/writers/latex.py:676 +msgid "continued from previous page" +msgstr "aurreko orritik jarraitzen du" + +#: sphinx/writers/latex.py:681 +msgid "Continued on next page" +msgstr "Hurrengo orrian jarraitzen du" + +#: sphinx/writers/text.py:437 +msgid "[image]" +msgstr "[irudia]" diff --git a/sphinx/locale/he/LC_MESSAGES/sphinx.js b/sphinx/locale/he/LC_MESSAGES/sphinx.js new file mode 100644 index 00000000..fc46bc67 --- /dev/null +++ b/sphinx/locale/he/LC_MESSAGES/sphinx.js @@ -0,0 +1 @@ +Documentation.addTranslations({"locale": "he", "plural_expr": "(n != 1)", "messages": {"Hide Search Matches": "\u05d4\u05e1\u05ea\u05e8 \u05ea\u05d5\u05e6\u05d0\u05d5\u05ea \u05d7\u05d9\u05e4\u05d5\u05e9", "Permalink to this definition": "\u05e7\u05d9\u05e9\u05d5\u05e8 \u05e7\u05d1\u05d5\u05e2 \u05dc\u05d4\u05d2\u05d3\u05e8\u05d4 \u05d6\u05d5", "Expand sidebar": "\u05d4\u05e8\u05d7\u05d1 \u05e1\u05e8\u05d2\u05dc \u05e6\u05d3", "Permalink to this headline": "\u05e7\u05d9\u05e9\u05d5\u05e8 \u05e7\u05d1\u05d5\u05e2 \u05dc\u05db\u05d5\u05ea\u05e8\u05ea \u05d6\u05d5", "Collapse sidebar": "\u05db\u05d5\u05d5\u05e5 \u05e1\u05e8\u05d2\u05dc \u05e6\u05d3"}});
\ No newline at end of file diff --git a/sphinx/locale/he/LC_MESSAGES/sphinx.mo b/sphinx/locale/he/LC_MESSAGES/sphinx.mo Binary files differnew file mode 100644 index 00000000..d092cae7 --- /dev/null +++ b/sphinx/locale/he/LC_MESSAGES/sphinx.mo diff --git a/sphinx/locale/he/LC_MESSAGES/sphinx.po b/sphinx/locale/he/LC_MESSAGES/sphinx.po new file mode 100644 index 00000000..205db8bd --- /dev/null +++ b/sphinx/locale/he/LC_MESSAGES/sphinx.po @@ -0,0 +1,767 @@ +# Translations template for Sphinx. +# Copyright (C) 2011 ORGANIZATION +# This file is distributed under the same license as the Sphinx project. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: Sphinx 1.1pre/9523af9ba9aa+\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2011-09-21 10:06+0200\n" +"PO-Revision-Date: 2013-02-18 17:56+0200\n" +"Last-Translator: alonisser <alon@noal.org.il>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 0.9.6\n" +"X-Generator: Poedit 1.5.5\n" +"Language: hebrew\n" + +#: sphinx/config.py:81 +#, python-format +msgid "%s %s documentation" +msgstr "תיעוד %s %s" + +#: sphinx/environment.py:119 sphinx/writers/latex.py:190 +#: sphinx/writers/manpage.py:67 sphinx/writers/texinfo.py:203 +#, python-format +msgid "%B %d, %Y" +msgstr "" + +#: sphinx/environment.py:1625 +#, python-format +msgid "see %s" +msgstr "ראה %s" + +#: sphinx/environment.py:1628 +#, python-format +msgid "see also %s" +msgstr "ראה גם %s" + +#: sphinx/roles.py:175 +#, python-format +msgid "Python Enhancement Proposals; PEP %s" +msgstr "" + +#: sphinx/builders/changes.py:73 +msgid "Builtins" +msgstr "" + +#: sphinx/builders/changes.py:75 +msgid "Module level" +msgstr "רמת המודול" + +#: sphinx/builders/html.py:274 +#, python-format +msgid "%b %d, %Y" +msgstr "" + +#: sphinx/builders/html.py:293 sphinx/themes/basic/defindex.html:30 +msgid "General Index" +msgstr "" + +#: sphinx/builders/html.py:293 +msgid "index" +msgstr "אינדקס" + +#: sphinx/builders/html.py:353 +msgid "next" +msgstr "הבא" + +#: sphinx/builders/html.py:362 +msgid "previous" +msgstr "הקודם" + +#: sphinx/builders/latex.py:141 sphinx/builders/texinfo.py:196 +msgid " (in " +msgstr "(בתוך" + +#: sphinx/directives/other.py:136 +msgid "Section author: " +msgstr "מחבר הקטע:" + +#: sphinx/directives/other.py:138 +msgid "Module author: " +msgstr "מחבר המודול:" + +#: sphinx/directives/other.py:140 +msgid "Code author: " +msgstr "מחבר הקוד:" + +#: sphinx/directives/other.py:142 +msgid "Author: " +msgstr "מחבר:" + +#: sphinx/directives/other.py:215 +msgid "See also" +msgstr "ראה גם" + +#: sphinx/domains/__init__.py:244 +#, python-format +msgid "%s %s" +msgstr "" + +#: sphinx/domains/c.py:51 sphinx/domains/python.py:95 +msgid "Parameters" +msgstr "פרמטרים" + +#: sphinx/domains/c.py:54 sphinx/domains/javascript.py:128 +#: sphinx/domains/python.py:107 +msgid "Returns" +msgstr "" + +#: sphinx/domains/c.py:56 sphinx/domains/python.py:109 +msgid "Return type" +msgstr "" + +#: sphinx/domains/c.py:141 +#, python-format +msgid "%s (C function)" +msgstr "" + +#: sphinx/domains/c.py:143 +#, python-format +msgid "%s (C member)" +msgstr "" + +#: sphinx/domains/c.py:145 +#, python-format +msgid "%s (C macro)" +msgstr "" + +#: sphinx/domains/c.py:147 +#, python-format +msgid "%s (C type)" +msgstr "" + +#: sphinx/domains/c.py:149 +#, python-format +msgid "%s (C variable)" +msgstr "" + +#: sphinx/domains/c.py:204 sphinx/domains/cpp.py:1060 +#: sphinx/domains/javascript.py:162 sphinx/domains/python.py:559 +msgid "function" +msgstr "פונקציה" + +#: sphinx/domains/c.py:205 sphinx/domains/cpp.py:1061 +msgid "member" +msgstr "" + +#: sphinx/domains/c.py:206 +msgid "macro" +msgstr "מאקרו" + +#: sphinx/domains/c.py:207 sphinx/domains/cpp.py:1062 +msgid "type" +msgstr "" + +#: sphinx/domains/c.py:208 +msgid "variable" +msgstr "משתנה" + +#: sphinx/domains/cpp.py:904 +#, python-format +msgid "%s (C++ class)" +msgstr "%s (מחלקת C++)" + +#: sphinx/domains/cpp.py:919 +#, python-format +msgid "%s (C++ type)" +msgstr "" + +#: sphinx/domains/cpp.py:938 +#, python-format +msgid "%s (C++ member)" +msgstr "" + +#: sphinx/domains/cpp.py:990 +#, python-format +msgid "%s (C++ function)" +msgstr "%s (פונקציית C++)" + +#: sphinx/domains/cpp.py:1059 sphinx/domains/javascript.py:163 +#: sphinx/domains/python.py:561 +msgid "class" +msgstr "מחלקה" + +#: sphinx/domains/javascript.py:106 sphinx/domains/python.py:254 +#, python-format +msgid "%s() (built-in function)" +msgstr "" + +#: sphinx/domains/javascript.py:107 sphinx/domains/python.py:318 +#, python-format +msgid "%s() (%s method)" +msgstr "" + +#: sphinx/domains/javascript.py:109 +#, python-format +msgid "%s() (class)" +msgstr "" + +#: sphinx/domains/javascript.py:111 +#, python-format +msgid "%s (global variable or constant)" +msgstr "" + +#: sphinx/domains/javascript.py:113 sphinx/domains/python.py:356 +#, python-format +msgid "%s (%s attribute)" +msgstr "" + +#: sphinx/domains/javascript.py:122 +msgid "Arguments" +msgstr "" + +#: sphinx/domains/javascript.py:125 +msgid "Throws" +msgstr "" + +#: sphinx/domains/javascript.py:164 sphinx/domains/python.py:560 +msgid "data" +msgstr "" + +#: sphinx/domains/javascript.py:165 sphinx/domains/python.py:566 +msgid "attribute" +msgstr "" + +#: sphinx/domains/python.py:100 +msgid "Variables" +msgstr "משתנים" + +#: sphinx/domains/python.py:104 +msgid "Raises" +msgstr "" + +#: 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 "" + +#: sphinx/domains/python.py:258 +#, python-format +msgid "%s (built-in variable)" +msgstr "" + +#: sphinx/domains/python.py:259 sphinx/domains/python.py:350 +#, python-format +msgid "%s (in module %s)" +msgstr "" + +#: sphinx/domains/python.py:275 +#, python-format +msgid "%s (built-in class)" +msgstr "" + +#: sphinx/domains/python.py:276 +#, python-format +msgid "%s (class in %s)" +msgstr "" + +#: sphinx/domains/python.py:316 +#, python-format +msgid "%s() (%s.%s method)" +msgstr "" + +#: sphinx/domains/python.py:328 +#, python-format +msgid "%s() (%s.%s static method)" +msgstr "" + +#: sphinx/domains/python.py:331 +#, python-format +msgid "%s() (%s static method)" +msgstr "" + +#: sphinx/domains/python.py:341 +#, python-format +msgid "%s() (%s.%s class method)" +msgstr "" + +#: sphinx/domains/python.py:344 +#, python-format +msgid "%s() (%s class method)" +msgstr "" + +#: sphinx/domains/python.py:354 +#, python-format +msgid "%s (%s.%s attribute)" +msgstr "" + +#: sphinx/domains/python.py:434 +#, python-format +msgid "%s (module)" +msgstr "" + +#: sphinx/domains/python.py:491 +msgid "Python Module Index" +msgstr "" + +#: sphinx/domains/python.py:492 +msgid "modules" +msgstr "" + +#: sphinx/domains/python.py:537 +msgid "Deprecated" +msgstr "" + +#: sphinx/domains/python.py:562 sphinx/locale/__init__.py:179 +msgid "exception" +msgstr "" + +#: sphinx/domains/python.py:563 +msgid "method" +msgstr "" + +#: sphinx/domains/python.py:564 +msgid "class method" +msgstr "" + +#: sphinx/domains/python.py:565 +msgid "static method" +msgstr "" + +#: sphinx/domains/python.py:567 sphinx/locale/__init__.py:175 +msgid "module" +msgstr "מודול" + +#: sphinx/domains/python.py:695 +msgid " (deprecated)" +msgstr "" + +#: 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:70 sphinx/domains/std.py:86 +#, python-format +msgid "environment variable; %s" +msgstr "משתנה סביבה; %s" + +#: sphinx/domains/std.py:162 +#, python-format +msgid "%scommand line option; %s" +msgstr "%sאופציית שורת הפקודה ; %s" + +#: sphinx/domains/std.py:393 +msgid "glossary term" +msgstr "" + +#: sphinx/domains/std.py:394 +msgid "grammar token" +msgstr "" + +#: sphinx/domains/std.py:395 +msgid "reference label" +msgstr "" + +#: sphinx/domains/std.py:396 +msgid "environment variable" +msgstr "משתנה סביבה" + +#: sphinx/domains/std.py:397 +msgid "program option" +msgstr "" + +#: 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/writers/latex.py:179 sphinx/writers/texinfo.py:456 +msgid "Index" +msgstr "אינדקס" + +#: sphinx/domains/std.py:428 +msgid "Module Index" +msgstr "מודול אינדקס" + +#: sphinx/domains/std.py:429 sphinx/themes/basic/defindex.html:25 +msgid "Search Page" +msgstr "דף חיפוש" + +#: sphinx/ext/autodoc.py:1002 +#, python-format +msgid " Bases: %s" +msgstr "" + +#: sphinx/ext/autodoc.py:1038 +#, python-format +msgid "alias of :class:`%s`" +msgstr "" + +#: sphinx/ext/todo.py:41 +msgid "Todo" +msgstr "לעשות" + +#: sphinx/ext/todo.py:109 +#, 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 +msgid "Module code" +msgstr "" + +#: sphinx/ext/viewcode.py:137 +#, python-format +msgid "<h1>Source code for %s</h1>" +msgstr "<h1>הראה קוד מקור ל %s</h1>" + +#: sphinx/ext/viewcode.py:164 +msgid "Overview: module code" +msgstr "" + +#: sphinx/ext/viewcode.py:165 +msgid "<h1>All modules for which code is available</h1>" +msgstr "<h1>כל המודולים שיש להם קוד זמין</h1>" + +#: sphinx/locale/__init__.py:155 +msgid "Attention" +msgstr "תשומת לב" + +#: sphinx/locale/__init__.py:156 +msgid "Caution" +msgstr "זהירות" + +#: sphinx/locale/__init__.py:157 +msgid "Danger" +msgstr "סכנה" + +#: sphinx/locale/__init__.py:158 +msgid "Error" +msgstr "שגיאה" + +#: sphinx/locale/__init__.py:159 +msgid "Hint" +msgstr "רמז" + +#: sphinx/locale/__init__.py:160 +msgid "Important" +msgstr "חשוב" + +#: sphinx/locale/__init__.py:161 +msgid "Note" +msgstr "הערה" + +#: sphinx/locale/__init__.py:162 +msgid "See Also" +msgstr "ראו גם" + +#: sphinx/locale/__init__.py:163 +msgid "Tip" +msgstr "טיפ" + +#: sphinx/locale/__init__.py:164 +msgid "Warning" +msgstr "אזהרה" + +#: sphinx/locale/__init__.py:168 +#, python-format +msgid "New in version %s" +msgstr "חדש בגרסה %s" + +#: sphinx/locale/__init__.py:169 +#, python-format +msgid "Changed in version %s" +msgstr "השתנה בגרסה %s" + +#: sphinx/locale/__init__.py:170 +#, python-format +msgid "Deprecated since version %s" +msgstr " לא מומלץ לשימוש מגרסה %s" + +#: sphinx/locale/__init__.py:176 +msgid "keyword" +msgstr "מילת מפתח" + +#: sphinx/locale/__init__.py:177 +msgid "operator" +msgstr "" + +#: sphinx/locale/__init__.py:178 +msgid "object" +msgstr "" + +#: sphinx/locale/__init__.py:180 +msgid "statement" +msgstr "" + +#: sphinx/locale/__init__.py:181 +msgid "built-in function" +msgstr "" + +#: 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:137 +#: 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:20 +msgid "Indices and tables:" +msgstr "" + +#: sphinx/themes/basic/defindex.html:23 +msgid "Complete Table of Contents" +msgstr "תוכן עניינים מלא" + +#: sphinx/themes/basic/defindex.html:24 +msgid "lists all sections and subsections" +msgstr "" + +#: sphinx/themes/basic/defindex.html:26 +msgid "search this documentation" +msgstr "חפש בתיעוד זה" + +#: 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:31 +msgid "all functions, classes, terms" +msgstr "כל הפונקציות, המחלקות, המושגים" + +#: sphinx/themes/basic/genindex-single.html:35 +#, python-format +msgid "Index – %(key)s" +msgstr "" + +#: sphinx/themes/basic/genindex-single.html:63 +#: sphinx/themes/basic/genindex-split.html:24 +#: sphinx/themes/basic/genindex-split.html:38 +#: sphinx/themes/basic/genindex.html:74 +msgid "Full index on one page" +msgstr "אינדקס מלא בעמוד אחד" + +#: sphinx/themes/basic/genindex-split.html:16 +msgid "Index pages by letter" +msgstr "עמודי אינדקס לפי אותיות" + +#: sphinx/themes/basic/genindex-split.html:25 +msgid "can be huge" +msgstr "עשוי להיות עצום" + +#: sphinx/themes/basic/layout.html:29 +msgid "Navigation" +msgstr "ניווט" + +#: sphinx/themes/basic/layout.html:122 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "חפש בתוך %(docstitle)s" + +#: sphinx/themes/basic/layout.html:131 +msgid "About these documents" +msgstr "על מסמכים אלו" + +#: sphinx/themes/basic/layout.html:140 +msgid "Copyright" +msgstr "זכויות שמורות" + +#: sphinx/themes/basic/layout.html:189 +#, python-format +msgid "© <a href=\"%(path)s\">Copyright</a> %(copyright)s." +msgstr "© <a href=\"%(path)s\">זכויות שמורות</a> %(copyright)s." + +#: sphinx/themes/basic/layout.html:191 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "© זכויות שמורות %(copyright)s." + +#: sphinx/themes/basic/layout.html:195 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "עודכן לאחרונה ב %(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." + +#: sphinx/themes/basic/opensearch.xml:4 +#, python-format +msgid "Search %(docstitle)s" +msgstr "חפש %(docstitle)s" + +#: 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." +msgstr "" +"אנא הפעל ג'אואסקריפט ע\"מ לאפשר את\n" +" החיפוש." + +#: 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 "" + +#: sphinx/themes/basic/search.html:36 +msgid "search" +msgstr "חיפוש" + +#: sphinx/themes/basic/search.html:40 +msgid "Search Results" +msgstr "תוצאות החיפוש" + +#: 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 +msgid "Changes in Version %(version)s — %(docstitle)s" +msgstr "שינויים בגרסה %(version)s — %(docstitle)s" + +#: sphinx/themes/basic/changes/rstsource.html:5 +#, python-format +msgid "%(filename)s — %(docstitle)s" +msgstr "" + +#: sphinx/themes/basic/changes/versionchanges.html:17 +#, python-format +msgid "Automatically generated list of changes in version %(version)s" +msgstr "יצר אוטומטית רשימה של שינויים בגרסה %(version)s" + +#: sphinx/themes/basic/changes/versionchanges.html:18 +msgid "Library changes" +msgstr "" + +#: sphinx/themes/basic/changes/versionchanges.html:23 +msgid "C API changes" +msgstr "" + +#: sphinx/themes/basic/changes/versionchanges.html:25 +msgid "Other changes" +msgstr "שינויים אחרים" + +#: sphinx/themes/basic/static/doctools.js:154 sphinx/writers/html.py:504 +#: sphinx/writers/html.py:510 +msgid "Permalink to this headline" +msgstr "קישור קבוע לכותרת זו" + +#: sphinx/themes/basic/static/doctools.js:160 sphinx/writers/html.py:92 +msgid "Permalink to this definition" +msgstr "קישור קבוע להגדרה זו" + +#: sphinx/themes/basic/static/doctools.js:189 +msgid "Hide Search Matches" +msgstr "הסתר תוצאות חיפוש" + +#: sphinx/themes/default/static/sidebar.js:69 +msgid "Expand sidebar" +msgstr "הרחב סרגל צד" + +#: sphinx/themes/default/static/sidebar.js:82 +#: sphinx/themes/default/static/sidebar.js:110 +msgid "Collapse sidebar" +msgstr "כווץ סרגל צד" + +#: sphinx/themes/haiku/layout.html:26 +msgid "Contents" +msgstr "תוכן" + +#: sphinx/writers/latex.py:177 +msgid "Release" +msgstr "מהדורה" + +#: sphinx/writers/latex.py:594 sphinx/writers/manpage.py:182 +#: sphinx/writers/texinfo.py:589 +msgid "Footnotes" +msgstr "הערות שוליים" + +#: sphinx/writers/latex.py:676 +msgid "continued from previous page" +msgstr "המשך מעמוד קודם" + +#: sphinx/writers/latex.py:681 +msgid "Continued on next page" +msgstr "המשך בעמוד הבא" + +#: sphinx/writers/text.py:437 +msgid "[image]" +msgstr "[תמונה]" diff --git a/sphinx/locale/hu/LC_MESSAGES/sphinx.mo b/sphinx/locale/hu/LC_MESSAGES/sphinx.mo Binary files differindex 6f79306c..8e3614a3 100644 --- a/sphinx/locale/hu/LC_MESSAGES/sphinx.mo +++ b/sphinx/locale/hu/LC_MESSAGES/sphinx.mo diff --git a/sphinx/locale/pl/LC_MESSAGES/sphinx.mo b/sphinx/locale/pl/LC_MESSAGES/sphinx.mo Binary files differindex 505c59e1..c6c8a0b0 100644 --- a/sphinx/locale/pl/LC_MESSAGES/sphinx.mo +++ b/sphinx/locale/pl/LC_MESSAGES/sphinx.mo diff --git a/sphinx/locale/ru/LC_MESSAGES/sphinx.mo b/sphinx/locale/ru/LC_MESSAGES/sphinx.mo Binary files differindex 04fcf36f..5a0cabce 100644 --- a/sphinx/locale/ru/LC_MESSAGES/sphinx.mo +++ b/sphinx/locale/ru/LC_MESSAGES/sphinx.mo diff --git a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.js b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.js index a59a8b24..8bd588e2 100644 --- a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.js +++ b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.js @@ -1 +1 @@ -Documentation.addTranslations({"locale": "zh_CN", "plural_expr": "0", "messages": {"Hide Search Matches": "\u9690\u85cf\u641c\u7d22\u7ed3\u679c", "Permalink to this definition": "\u6c38\u4e45\u94fe\u63a5\u81f3\u76ee\u6807", "Expand sidebar": "", "Permalink to this headline": "\u6c38\u4e45\u94fe\u63a5\u81f3\u6807\u9898", "Collapse sidebar": ""}});
\ No newline at end of file +Documentation.addTranslations({"locale": "zh_CN", "plural_expr": "0", "messages": {"Hide Search Matches": "\u9690\u85cf\u641c\u7d22\u7ed3\u679c", "Permalink to this definition": "\u6c38\u4e45\u94fe\u63a5\u81f3\u76ee\u6807", "Expand sidebar": "\u5c55\u5f00\u8fb9\u680f", "Permalink to this headline": "\u6c38\u4e45\u94fe\u63a5\u81f3\u6807\u9898", "Collapse sidebar": "\u6298\u53e0\u8fb9\u680f"}});
\ No newline at end of file diff --git a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo Binary files differindex eb5b0763..bc151b71 100644 --- a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo +++ b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo diff --git a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po index 079bab5e..46be6a6a 100644 --- a/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po +++ b/sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po @@ -9,19 +9,20 @@ msgstr "" "Project-Id-Version: Sphinx 0.6\n" "Report-Msgid-Bugs-To: zhutao.iscas@gmail.com\n" "POT-Creation-Date: 2011-09-21 10:06+0200\n" -"PO-Revision-Date: 2011-09-21 10:15+0200\n" -"Last-Translator: Tower Joo<zhutao.iscas@gmail.com>\n" +"PO-Revision-Date: 2013-02-21 18:31+0800\n" +"Last-Translator: yinian1992 <yinian1992@gmail.com>\n" "Language-Team: cn <LL@li.org>\n" -"Plural-Forms: nplurals=1; plural=0\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.6\n" +"X-Generator: Poedit 1.5.5\n" #: sphinx/config.py:81 #, python-format msgid "%s %s documentation" -msgstr "" +msgstr "%s %s 文档" #: sphinx/environment.py:119 sphinx/writers/latex.py:190 #: sphinx/writers/manpage.py:67 sphinx/writers/texinfo.py:203 @@ -32,7 +33,7 @@ msgstr "%Y 年 %m 月 %d 日" #: sphinx/environment.py:1625 #, python-format msgid "see %s" -msgstr "" +msgstr "见 %s" #: sphinx/environment.py:1628 #, python-format @@ -79,16 +80,15 @@ msgstr "" #: sphinx/directives/other.py:136 msgid "Section author: " -msgstr "Section 作者:" +msgstr "节作者:" #: sphinx/directives/other.py:138 msgid "Module author: " msgstr "模块作者:" #: sphinx/directives/other.py:140 -#, fuzzy msgid "Code author: " -msgstr "模块作者:" +msgstr "代码作者:" #: sphinx/directives/other.py:142 msgid "Author: " @@ -101,7 +101,7 @@ msgstr "也可以参考" #: sphinx/domains/__init__.py:244 #, python-format msgid "%s %s" -msgstr "" +msgstr "%s %s" #: sphinx/domains/c.py:51 sphinx/domains/python.py:95 msgid "Parameters" @@ -152,21 +152,20 @@ msgstr "成员" #: sphinx/domains/c.py:206 msgid "macro" -msgstr "" +msgstr "宏" #: sphinx/domains/c.py:207 sphinx/domains/cpp.py:1062 msgid "type" -msgstr "" +msgstr "类型" #: sphinx/domains/c.py:208 -#, fuzzy msgid "variable" msgstr "变量" #: sphinx/domains/cpp.py:904 -#, fuzzy, python-format +#, python-format msgid "%s (C++ class)" -msgstr "%s (C++ 內置类)" +msgstr "%s (C++ 类)" #: sphinx/domains/cpp.py:919 #, python-format @@ -186,7 +185,7 @@ msgstr "%s (C++ 函数)" #: sphinx/domains/cpp.py:1059 sphinx/domains/javascript.py:163 #: sphinx/domains/python.py:561 msgid "class" -msgstr "" +msgstr "类" #: sphinx/domains/javascript.py:106 sphinx/domains/python.py:254 #, python-format @@ -199,9 +198,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 @@ -214,24 +213,22 @@ msgid "%s (%s attribute)" msgstr "%s (%s 属性)" #: sphinx/domains/javascript.py:122 -#, fuzzy msgid "Arguments" msgstr "参数" #: sphinx/domains/javascript.py:125 msgid "Throws" -msgstr "" +msgstr "抛出" #: sphinx/domains/javascript.py:164 sphinx/domains/python.py:560 msgid "data" -msgstr "" +msgstr "全局量" #: sphinx/domains/javascript.py:165 sphinx/domains/python.py:566 msgid "attribute" msgstr "属性" #: sphinx/domains/python.py:100 -#, fuzzy msgid "Variables" msgstr "变量" @@ -263,7 +260,7 @@ msgstr "%s (內置类)" #: sphinx/domains/python.py:276 #, python-format msgid "%s (class in %s)" -msgstr "" +msgstr "%s (%s 中的类)" #: sphinx/domains/python.py:316 #, python-format @@ -281,14 +278,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 @@ -301,9 +298,8 @@ msgid "%s (module)" msgstr "%s (模块)" #: sphinx/domains/python.py:491 -#, fuzzy msgid "Python Module Index" -msgstr "模块索引" +msgstr "Python 模块索引" #: sphinx/domains/python.py:492 msgid "modules" @@ -319,11 +315,11 @@ msgstr "例外" #: sphinx/domains/python.py:563 msgid "method" -msgstr "" +msgstr "方法" #: sphinx/domains/python.py:564 msgid "class method" -msgstr "" +msgstr "类方法" #: sphinx/domains/python.py:565 msgid "static method" @@ -334,7 +330,6 @@ msgid "module" msgstr "模块" #: sphinx/domains/python.py:695 -#, fuzzy msgid " (deprecated)" msgstr " (已移除)" @@ -406,12 +401,12 @@ msgstr "搜索页面" #: sphinx/ext/autodoc.py:1002 #, python-format msgid " Bases: %s" -msgstr "" +msgstr " 基类:%s" #: sphinx/ext/autodoc.py:1038 #, python-format msgid "alias of :class:`%s`" -msgstr "" +msgstr ":class:`%s` 的别名" #: sphinx/ext/todo.py:41 msgid "Todo" @@ -420,37 +415,36 @@ 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:70 msgid "[source]" -msgstr "" +msgstr "[源代码]" #: sphinx/ext/viewcode.py:117 msgid "[docs]" -msgstr "" +msgstr "[文档]" #: sphinx/ext/viewcode.py:131 -#, fuzzy msgid "Module code" -msgstr "模块" +msgstr "模块代码" #: sphinx/ext/viewcode.py:137 #, python-format msgid "<h1>Source code for %s</h1>" -msgstr "" +msgstr "<h1>%s 源代码</h1>" #: sphinx/ext/viewcode.py:164 msgid "Overview: module code" -msgstr "" +msgstr "概览:模块代码" #: sphinx/ext/viewcode.py:165 msgid "<h1>All modules for which code is available</h1>" -msgstr "" +msgstr "<h1>所有代码可用的模块</h1>" #: sphinx/locale/__init__.py:155 msgid "Attention" @@ -636,9 +630,10 @@ msgstr "最后更新日期是 %(last_updated)s." #: sphinx/themes/basic/layout.html:198 #, python-format msgid "" -"Created using <a href=\"http://sphinx-doc.org/\">Sphinx</a> " +"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> " "%(sphinx_version)s." -msgstr "使用 <a href=\"http://sphinx-doc.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 @@ -665,7 +660,7 @@ msgstr "下一章" msgid "" "Please activate JavaScript to enable the search\n" " functionality." -msgstr "" +msgstr "请激活 JavaScript 开启搜索功能" #: sphinx/themes/basic/search.html:29 msgid "" @@ -673,7 +668,9 @@ msgid "" " words into the box below and click \"search\". Note that the search\n" " function will automatically search for all of the words. Pages\n" " containing fewer words won't appear in the result list." -msgstr "在这儿,你可以对这些文档进行搜索。向搜索框中输入你所要搜索的关键字并点击\"搜索\"。注意:搜索引擎会自动搜索所有的关键字。将不会搜索到部分关键字的页面." +msgstr "" +"在这儿,你可以对这些文档进行搜索。向搜索框中输入你所要搜索的关键字并点击\"搜" +"索\"。注意:搜索引擎会自动搜索所有的关键字。将不会搜索到部分关键字的页面." #: sphinx/themes/basic/search.html:36 msgid "search" @@ -704,7 +701,7 @@ msgstr "更改发生在版本 %(version)s — %(docstitle)s" #: sphinx/themes/basic/changes/rstsource.html:5 #, python-format msgid "%(filename)s — %(docstitle)s" -msgstr "" +msgstr "%(filename)s — %(docstitle)s" #: sphinx/themes/basic/changes/versionchanges.html:17 #, python-format @@ -738,16 +735,16 @@ msgstr "隐藏搜索结果" #: sphinx/themes/default/static/sidebar.js:69 msgid "Expand sidebar" -msgstr "" +msgstr "展开边栏" #: sphinx/themes/default/static/sidebar.js:82 #: sphinx/themes/default/static/sidebar.js:110 msgid "Collapse sidebar" -msgstr "" +msgstr "折叠边栏" #: sphinx/themes/haiku/layout.html:26 msgid "Contents" -msgstr "" +msgstr "目录" #: sphinx/writers/latex.py:177 msgid "Release" @@ -756,18 +753,16 @@ msgstr "发布" #: sphinx/writers/latex.py:594 sphinx/writers/manpage.py:182 #: sphinx/writers/texinfo.py:589 msgid "Footnotes" -msgstr "" +msgstr "脚注" #: sphinx/writers/latex.py:676 msgid "continued from previous page" -msgstr "" +msgstr "续上页" #: sphinx/writers/latex.py:681 -#, fuzzy msgid "Continued on next page" -msgstr "一页的全部索引" +msgstr "下页继续" #: sphinx/writers/text.py:437 msgid "[image]" msgstr "[图片]" - diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index 8ac943a2..2184ba61 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -11,7 +11,6 @@ import sys, os, time, re from os import path -from codecs import open TERM_ENCODING = getattr(sys.stdin, 'encoding', None) @@ -20,6 +19,7 @@ from sphinx.util.osutil import make_filename from sphinx.util.console import purple, bold, red, turquoise, \ nocolor, color_terminal from sphinx.util import texescape +from sphinx.util.pycompat import open # function to get input from terminal -- overridden by the test suite try: @@ -33,11 +33,11 @@ PROMPT_PREFIX = '> ' 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' + QUICKSTART_CONF = u'#!/usr/bin/env python3\n' else: - QUICKSTART_CONF = '' + QUICKSTART_CONF = u'' -QUICKSTART_CONF += '''\ +QUICKSTART_CONF += u'''\ # -*- coding: utf-8 -*- # # %(project)s documentation build configuration file, created by @@ -126,6 +126,9 @@ pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + # -- Options for HTML output --------------------------------------------------- @@ -280,9 +283,12 @@ texinfo_documents = [ # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False ''' -EPUB_CONFIG = ''' +EPUB_CONFIG = u''' # -- Options for Epub output --------------------------------------------------- @@ -334,15 +340,18 @@ epub_copyright = u'%(copyright_str)s' # Scale large images. #epub_max_image_width = 0 + +# If 'no', URL addresses will not be shown. +#epub_show_urls = 'inline' ''' -INTERSPHINX_CONFIG = ''' +INTERSPHINX_CONFIG = u''' # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'http://docs.python.org/': None} ''' -MASTER_FILE = '''\ +MASTER_FILE = u'''\ .. %(project)s documentation master file, created by sphinx-quickstart on %(now)s. You can adapt this file completely to your liking, but it should at least @@ -367,7 +376,7 @@ Indices and tables ''' -MAKEFILE = '''\ +MAKEFILE = u'''\ # Makefile for Sphinx documentation # @@ -561,7 +570,7 @@ pseudoxml: \t@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." ''' -BATCHFILE = '''\ +BATCHFILE = u'''\ @ECHO OFF REM Command file for Sphinx documentation @@ -1093,10 +1102,10 @@ def generate(d, overwrite=True, silent=False): mkdir_p(path.join(srcdir, d['dot'] + 'templates')) mkdir_p(path.join(srcdir, d['dot'] + 'static')) - def write_file(fpath, mode, content): + def write_file(fpath, content, newline=None): if overwrite or not path.isfile(fpath): print 'Creating file %s.' % fpath - f = open(fpath, mode, encoding='utf-8') + f = open(fpath, 'wt', encoding='utf-8', newline=newline) try: f.write(content) finally: @@ -1110,21 +1119,21 @@ def generate(d, overwrite=True, silent=False): if d.get('ext_intersphinx'): conf_text += INTERSPHINX_CONFIG - write_file(path.join(srcdir, 'conf.py'), 'w', conf_text) + write_file(path.join(srcdir, 'conf.py'), conf_text) masterfile = path.join(srcdir, d['master'] + d['suffix']) - write_file(masterfile, 'w', MASTER_FILE % d) + write_file(masterfile, MASTER_FILE % d) 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 - write_file(path.join(d['path'], 'Makefile'), 'wb', MAKEFILE % d) + write_file(path.join(d['path'], 'Makefile'), MAKEFILE % d, u'\n') if d['batchfile']: d['rsrcdir'] = d['sep'] and 'source' or '.' d['rbuilddir'] = d['sep'] and 'build' or d['dot'] + 'build' - write_file(path.join(d['path'], 'make.bat'), 'w', BATCHFILE % d) + write_file(path.join(d['path'], 'make.bat'), BATCHFILE % d, u'\r\n') if silent: return diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py index 764c9208..5f64495b 100644 --- a/sphinx/search/__init__.py +++ b/sphinx/search/__init__.py @@ -170,6 +170,8 @@ class IndexBuilder(object): self._mapping = {} # stemmed words in titles -> set(filenames) self._title_mapping = {} + # word -> stemmed word + self._stem_cache = {} # objtype -> index self._objtypes = {} # objtype index -> (domain, type, objname (localized)) @@ -189,7 +191,8 @@ class IndexBuilder(object): format = self.formats[format] frozen = format.load(stream) # if an old index is present, we treat it as not existing. - if not isinstance(frozen, dict): + if not isinstance(frozen, dict) or \ + frozen.get('envversion') != self.env.version: raise ValueError('old format') index2fn = frozen['filenames'] self._titles = dict(zip(index2fn, frozen['titles'])) @@ -273,7 +276,7 @@ class IndexBuilder(object): objnames = self._objnames return dict(filenames=filenames, titles=titles, terms=terms, objects=objects, objtypes=objtypes, objnames=objnames, - titleterms=title_terms) + titleterms=title_terms, envversion=self.env.version) def prune(self, filenames): """Remove data for all filenames not in the list.""" @@ -294,7 +297,13 @@ class IndexBuilder(object): visitor = WordCollector(doctree, self.lang) doctree.walk(visitor) - stem = self.lang.stem + # memoize self.lang.stem + def stem(word): + try: + return self._stem_cache[word] + except KeyError: + self._stem_cache[word] = self.lang.stem(word) + return self._stem_cache[word] _filter = self.lang.word_filter for word in itertools.chain(visitor.found_title_words, diff --git a/sphinx/themes/epub/static/epub.css b/sphinx/themes/epub/static/epub.css index 9ce90fae..b46c0873 100644 --- a/sphinx/themes/epub/static/epub.css +++ b/sphinx/themes/epub/static/epub.css @@ -22,6 +22,7 @@ a:link, a:visited { img { border: 0; + max-width: 100%; } /* -- relbar ---------------------------------------------------------------- */ diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py index b373c504..3d252c91 100644 --- a/sphinx/util/pycompat.py +++ b/sphinx/util/pycompat.py @@ -64,6 +64,35 @@ else: return s.encode('ascii', 'backslashreplace') +def execfile_(filepath, _globals): + from sphinx.util.osutil import fs_encoding + # get config source -- 'b' is a no-op under 2.x, while 'U' is + # ignored under 3.x (but 3.x compile() accepts \r\n newlines) + f = open(filepath, 'rbU') + try: + source = f.read() + finally: + f.close() + + # py25,py26,py31 accept only LF eol instead of CRLF + if sys.version_info[:2] in ((2, 5), (2, 6), (3, 1)): + source = source.replace(b('\r\n'), b('\n')) + + # compile to a code object, handle syntax errors + filepath_enc = filepath.encode(fs_encoding) + try: + code = compile(source, filepath_enc, '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(filepath) + code = compile(source, filepath_enc, 'exec') + else: + raise + exec code in _globals + + try: from html import escape as htmlescape except ImportError: @@ -86,6 +115,9 @@ if sys.version_info >= (2, 6): relpath = os.path.relpath del os + import io + open = io.open + else: # Python < 2.6 from itertools import izip, repeat, chain @@ -138,6 +170,19 @@ else: return join(*rel_list) del curdir + from types import MethodType + def open(filename, mode='r', *args, **kw): + newline = kw.pop('newline', None) + mode = mode.replace('t', '') + f = codecs.open(filename, mode, *args, **kw) + if newline is not None: + f._write = f.write + def write(self, text): + text = text.replace(u'\r\n', u'\n').replace(u'\n', newline) + self._write(text) + f.write = MethodType(write, f) + return f + # ------------------------------------------------------------------------------ # Missing builtins and codecs in Python < 2.5 diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index fc5da416..ef2197c6 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -34,6 +34,7 @@ HEADER = r'''%% Generated by Sphinx. \documentclass[%(papersize)s,%(pointsize)s%(classoptions)s]{%(wrapperclass)s} %(inputenc)s %(utf8extra)s +%(cmappkg)s %(fontenc)s %(babel)s %(fontpkg)s @@ -106,6 +107,12 @@ class ExtBabel(Babel): return '\\shorthandoff{"}' return '' + def uses_cyrillic(self): + shortlang = self.language.split('_')[0] + return shortlang in ('bg','bulgarian', 'kk','kazakh', + 'mn','mongolian', 'ru','russian', + 'uk','ukrainian') + # in latest trunk, the attribute is called Babel.language_codes and already # includes Slovene if hasattr(Babel, '_ISO639_TO_BABEL'): @@ -138,6 +145,7 @@ class LaTeXTranslator(nodes.NodeVisitor): 'extraclassoptions': '', 'inputenc': '\\usepackage[utf8]{inputenc}', 'utf8extra': '\\DeclareUnicodeCharacter{00A0}{\\nobreakspace}', + 'cmappkg': '\\usepackage{cmap}', 'fontenc': '\\usepackage[T1]{fontenc}', 'babel': '\\usepackage{babel}', 'fontpkg': '\\usepackage{times}', @@ -156,6 +164,7 @@ class LaTeXTranslator(nodes.NodeVisitor): 'tableofcontents': '\\tableofcontents', 'footer': '', 'printindex': '\\printindex', + 'transition': '\n\n\\bigskip\\hrule{}\\bigskip\n\n', } def __init__(self, document, builder): @@ -205,6 +214,10 @@ class LaTeXTranslator(nodes.NodeVisitor): self.elements['shorthandoff'] = babel.get_shorthandoff() self.elements['fncychap'] = '\\usepackage[Sonny]{fncychap}' + # Times fonts don't work with Cyrillic languages + if babel.uses_cyrillic(): + self.elements['fontpkg'] = '' + # pTeX (Japanese TeX) for support if builder.config.language == 'ja': # use dvipdfmx as default class option in Japanese @@ -445,7 +458,7 @@ class LaTeXTranslator(nodes.NodeVisitor): self.body.append('}\n') def visit_transition(self, node): - self.body.append('\n\n\\bigskip\\hrule{}\\bigskip\n\n') + self.body.append(self.elements['transition']) def depart_transition(self, node): pass diff --git a/sphinx/writers/manpage.py b/sphinx/writers/manpage.py index cca2d074..6e405d5a 100644 --- a/sphinx/writers/manpage.py +++ b/sphinx/writers/manpage.py @@ -194,7 +194,7 @@ class ManualPageTranslator(BaseTranslator): pass def visit_seealso(self, node): - self.visit_admonition(node) + self.visit_admonition(node, 'seealso') def depart_seealso(self, node): self.depart_admonition(node) diff --git a/sphinx/writers/texinfo.py b/sphinx/writers/texinfo.py index a8306c11..aa7ed685 100644 --- a/sphinx/writers/texinfo.py +++ b/sphinx/writers/texinfo.py @@ -17,7 +17,7 @@ from os import path from docutils import nodes, writers from sphinx import addnodes, __version__ -from sphinx.locale import versionlabels, _ +from sphinx.locale import admonitionlabels, versionlabels, _ from sphinx.util import ustrftime from sphinx.writers.latex import collected_footnote @@ -44,8 +44,10 @@ TEMPLATE = """\ @defindex ge @paragraphindent %(paragraphindent)s @exampleindent %(exampleindent)s -@afourlatex +@finalout %(direntry)s +@definfoenclose strong,`,' +@definfoenclose emph,`,' @c %%**end of header @copying @@ -86,6 +88,16 @@ def find_subsections(section): return result +def smart_capwords(s, sep=None): + """Like string.capwords() but does not capitalize words that already + contain a capital letter.""" + words = s.split(sep) + for i, word in enumerate(words): + if all(x.islower() for x in word): + words[i] = word.capitalize() + return (sep or ' ').join(words) + + class TexinfoWriter(writers.Writer): """Texinfo writer for generating Texinfo documents.""" supported = ('texinfo', 'texi') @@ -128,7 +140,7 @@ class TexinfoTranslator(nodes.NodeVisitor): 'direntry': '', 'exampleindent': 4, 'filename': '', - 'paragraphindent': 2, + 'paragraphindent': 0, 'preamble': '', 'project': '', 'release': '', @@ -161,6 +173,7 @@ class TexinfoTranslator(nodes.NodeVisitor): self.seen_title = False self.next_section_ids = set() self.escape_newlines = 0 + self.escape_hyphens = 0 self.curfilestack = [] self.footnotestack = [] self.in_footnote = 0 @@ -180,7 +193,8 @@ class TexinfoTranslator(nodes.NodeVisitor): r = self.referenced_ids.pop() if r not in self.written_ids: self.body.append('@anchor{%s}@w{%s}\n' % (r, ' ' * 30)) - self.fragment = ''.join(self.body).strip() + '\n' + self.ensure_eol() + self.fragment = ''.join(self.body) self.elements['body'] = self.fragment self.output = TEMPLATE % self.elements @@ -324,8 +338,6 @@ class TexinfoTranslator(nodes.NodeVisitor): # prevent `` and '' quote conversion s = s.replace('``', "`@w{`}") s = s.replace("''", "'@w{'}") - # prevent "--" from being converted to an "em dash" - # s = s.replace('-', '@w{-}') return s def escape_arg(self, s): @@ -391,7 +403,9 @@ class TexinfoTranslator(nodes.NodeVisitor): return self.body.append('\n@menu\n') self.add_menu_entries(entries) - if not self.node_menus[entries[0]]: + if (node_name != 'Top' or + not self.node_menus[entries[0]] or + self.builder.config.texinfo_no_detailmenu): self.body.append('\n@end menu\n') return @@ -404,14 +418,12 @@ class TexinfoTranslator(nodes.NodeVisitor): for subentry in entries: _add_detailed_menu(subentry) - if node_name == 'Top': - self.body.append('\n@detailmenu\n' - ' --- The Detailed Node Listing ---\n') + self.body.append('\n@detailmenu\n' + ' --- The Detailed Node Listing ---\n') for entry in entries: _add_detailed_menu(entry) - if node_name == 'Top': - self.body.append('\n@end detailmenu') - self.body.append('\n@end menu\n\n') + self.body.append('\n@end detailmenu\n' + '@end menu\n') def tex_image_length(self, width_str): match = re.match('(\d*\.?\d*)\s*(\S*)', width_str) @@ -457,7 +469,11 @@ class TexinfoTranslator(nodes.NodeVisitor): continue self.indices.append((indexcls.localname, generate(content, collapsed))) - self.indices.append((_('Index'), '\n@printindex ge\n')) + # only add the main Index if it's not empty + for docname in self.builder.docnames: + if self.builder.env.indexentries[docname]: + self.indices.append((_('Index'), '\n@printindex ge\n')) + break # this is copied from the latex writer # TODO: move this to sphinx.util @@ -505,7 +521,7 @@ class TexinfoTranslator(nodes.NodeVisitor): def add_xref(self, id, name, node): name = self.escape_menu(name) sid = self.get_short_id(id) - self.body.append('@pxref{%s,,%s}' % (sid, name)) + self.body.append('@ref{%s,,%s}' % (sid, name)) self.referenced_ids.add(sid) self.referenced_ids.add(self.escape_id(id)) @@ -524,6 +540,9 @@ class TexinfoTranslator(nodes.NodeVisitor): s = self.escape(node.astext()) if self.escape_newlines: s = s.replace('\n', ' ') + if self.escape_hyphens: + # prevent "--" and "---" conversion + s = s.replace('-', '@w{-}') self.body.append(s) def depart_Text(self, node): pass @@ -677,9 +696,9 @@ class TexinfoTranslator(nodes.NodeVisitor): id = self.escape_id(id) name = self.escape_menu(name) if name == id: - self.body.append('@pxref{%s,,,%s}' % (id, uri)) + self.body.append('@ref{%s,,,%s}' % (id, uri)) else: - self.body.append('@pxref{%s,,%s,%s}' % (id, name, uri)) + self.body.append('@ref{%s,,%s,%s}' % (id, name, uri)) else: uri = self.escape_arg(uri) name = self.escape_arg(name) @@ -707,8 +726,6 @@ class TexinfoTranslator(nodes.NodeVisitor): ## Blocks def visit_paragraph(self, node): - if 'continued' in node or isinstance(node.parent, nodes.compound): - self.body.append('\n@noindent') self.body.append('\n') def depart_paragraph(self, node): self.body.append('\n') @@ -722,8 +739,8 @@ class TexinfoTranslator(nodes.NodeVisitor): def visit_literal_block(self, node): self.body.append('\n@example\n') def depart_literal_block(self, node): - self.body.append('\n@end example\n\n' - '@noindent\n') + self.ensure_eol() + self.body.append('@end example\n') visit_doctest_block = visit_literal_block depart_doctest_block = depart_literal_block @@ -848,10 +865,11 @@ class TexinfoTranslator(nodes.NodeVisitor): pass def visit_option(self, node): + self.escape_hyphens += 1 self.body.append('\n%s ' % self.at_item_x) self.at_item_x = '@itemx' def depart_option(self, node): - pass + self.escape_hyphens -= 1 def visit_option_string(self, node): pass @@ -962,20 +980,18 @@ class TexinfoTranslator(nodes.NodeVisitor): ## Field Lists def visit_field_list(self, node): - self.body.append('\n\n@itemize @w\n') + pass def depart_field_list(self, node): - self.ensure_eol() - self.body.append('@end itemize\n') + pass def visit_field(self, node): - if not isinstance(node.parent, nodes.field_list): - self.visit_field_list(node) + self.body.append('\n') def depart_field(self, node): - if not isinstance(node.parent, nodes.field_list): - self.depart_field_list(node) + self.body.append('\n') def visit_field_name(self, node): - self.body.append('\n@item ') + self.ensure_eol() + self.body.append('@*') def depart_field_name(self, node): self.body.append(': ') @@ -989,35 +1005,34 @@ class TexinfoTranslator(nodes.NodeVisitor): def visit_admonition(self, node, name=''): if not name: name = self.escape(node[0].astext()) - self.body.append('\n@cartouche\n' - '@quotation %s ' % name) + self.body.append(u'\n@cartouche\n@quotation %s ' % name) def depart_admonition(self, node): self.ensure_eol() self.body.append('@end quotation\n' '@end cartouche\n') - def _make_visit_admonition(typ): + def _make_visit_admonition(name): def visit(self, node): - self.visit_admonition(node, self.escape(_(typ))) + self.visit_admonition(node, admonitionlabels[name]) return visit - visit_attention = _make_visit_admonition('Attention') + visit_attention = _make_visit_admonition('attention') depart_attention = depart_admonition - visit_caution = _make_visit_admonition('Caution') + visit_caution = _make_visit_admonition('caution') depart_caution = depart_admonition - visit_danger = _make_visit_admonition('Danger') + visit_danger = _make_visit_admonition('danger') depart_danger = depart_admonition - visit_error = _make_visit_admonition('Error') + visit_error = _make_visit_admonition('error') depart_error = depart_admonition - visit_important = _make_visit_admonition('Important') + visit_hint = _make_visit_admonition('hint') + depart_hint = depart_admonition + visit_important = _make_visit_admonition('important') depart_important = depart_admonition - visit_note = _make_visit_admonition('Note') + visit_note = _make_visit_admonition('note') depart_note = depart_admonition - visit_tip = _make_visit_admonition('Tip') + visit_tip = _make_visit_admonition('tip') depart_tip = depart_admonition - visit_hint = _make_visit_admonition('Hint') - depart_hint = depart_admonition - visit_warning = _make_visit_admonition('Warning') + visit_warning = _make_visit_admonition('warning') depart_warning = depart_admonition ## Misc @@ -1055,7 +1070,7 @@ class TexinfoTranslator(nodes.NodeVisitor): pass def visit_transition(self, node): - self.body.append('\n\n@exdent @w{ %s}\n\n' % ('* ' * 30)) + self.body.append('\n\n%s\n\n' % ('_' * 66)) def depart_transition(self, node): pass @@ -1136,14 +1151,10 @@ class TexinfoTranslator(nodes.NodeVisitor): raise nodes.SkipNode def visit_system_message(self, node): - self.body.append('\n@w{----------- System Message: %s/%s -----------} ' - '(%s, line %s)\n' % ( - node.get('type', '?'), - node.get('level', '?'), - self.escape(node.get('source', '?')), - node.get('line', '?'))) - def depart_system_message(self, node): - pass + self.body.append('\n@verbatim\n' + '<SYSTEM MESSAGE: %s>\n' + '@end verbatim\n' % node.astext()) + raise nodes.SkipNode def visit_comment(self, node): self.body.append('\n') @@ -1152,9 +1163,9 @@ class TexinfoTranslator(nodes.NodeVisitor): raise nodes.SkipNode def visit_problematic(self, node): - self.body.append('>') + self.body.append('>>') def depart_problematic(self, node): - self.body.append('<') + self.body.append('<<') def unimplemented_visit(self, node): self.builder.warn("unimplemented node type: %r" % node, @@ -1238,9 +1249,10 @@ class TexinfoTranslator(nodes.NodeVisitor): raise nodes.SkipNode def visit_seealso(self, node): - self.visit_topic(node) + self.body.append(u'\n\n@subsubheading %s\n\n' % + admonitionlabels['seealso']) def depart_seealso(self, node): - self.depart_topic(node) + self.body.append('\n') def visit_meta(self, node): raise nodes.SkipNode @@ -1265,12 +1277,15 @@ class TexinfoTranslator(nodes.NodeVisitor): ## Desc def visit_desc(self, node): + self.desc = node self.at_deffnx = '@deffn' def depart_desc(self, node): + self.desc = None self.ensure_eol() self.body.append('@end deffn\n') def visit_desc_signature(self, node): + self.escape_hyphens += 1 objtype = node.parent['objtype'] if objtype != 'describe': for id in node.get('ids'): @@ -1283,11 +1298,15 @@ class TexinfoTranslator(nodes.NodeVisitor): primary == domain.name) except KeyError: name = objtype - category = self.escape_arg(string.capwords(name)) + # by convention, the deffn category should be capitalized like a title + category = self.escape_arg(smart_capwords(name)) self.body.append('\n%s {%s} ' % (self.at_deffnx, category)) self.at_deffnx = '@deffnx' + self.desc_type_name = name def depart_desc_signature(self, node): self.body.append("\n") + self.escape_hyphens -= 1 + self.desc_type_name = None def visit_desc_name(self, node): pass @@ -1332,7 +1351,18 @@ class TexinfoTranslator(nodes.NodeVisitor): self.body.append(']') def visit_desc_annotation(self, node): - raise nodes.SkipNode + # Try to avoid duplicating info already displayed by the deffn category. + # e.g. + # @deffn {Class} Foo + # -- instead of -- + # @deffn {Class} class Foo + txt = node.astext().strip() + if txt == self.desc['desctype'] or \ + txt == self.desc['objtype'] or \ + txt in self.desc_type_name.split(): + raise nodes.SkipNode + def depart_desc_annotation(self, node): + pass def visit_desc_content(self, node): pass diff --git a/sphinx/writers/text.py b/sphinx/writers/text.py index f42d637a..9df97407 100644 --- a/sphinx/writers/text.py +++ b/sphinx/writers/text.py @@ -11,6 +11,7 @@ import os import re import textwrap +from itertools import groupby from docutils import nodes, writers from docutils.utils import column_width @@ -28,6 +29,98 @@ class TextWrapper(textwrap.TextWrapper): r'[^\s\w]*\w+[a-zA-Z]-(?=\w+[a-zA-Z])|' # hyphenated words r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash + def _wrap_chunks(self, chunks): + """_wrap_chunks(chunks : [string]) -> [string] + + Original _wrap_chunks use len() to calculate width. + This method respect to wide/fullwidth characters for width adjustment. + """ + drop_whitespace = getattr(self, 'drop_whitespace', True) #py25 compat + lines = [] + if self.width <= 0: + raise ValueError("invalid width %r (must be > 0)" % self.width) + + chunks.reverse() + + while chunks: + cur_line = [] + cur_len = 0 + + if lines: + indent = self.subsequent_indent + else: + indent = self.initial_indent + + width = self.width - column_width(indent) + + if drop_whitespace and chunks[-1].strip() == '' and lines: + del chunks[-1] + + while chunks: + l = column_width(chunks[-1]) + + if cur_len + l <= width: + cur_line.append(chunks.pop()) + cur_len += l + + else: + break + + if chunks and column_width(chunks[-1]) > width: + self._handle_long_word(chunks, cur_line, cur_len, width) + + if drop_whitespace and cur_line and cur_line[-1].strip() == '': + del cur_line[-1] + + if cur_line: + lines.append(indent + ''.join(cur_line)) + + return lines + + def _break_word(self, word, space_left): + """_break_word(word : string, space_left : int) -> (string, string) + + Break line by unicode width instead of len(word). + """ + total = 0 + for i,c in enumerate(word): + total += column_width(c) + if total > space_left: + return word[:i-1], word[i-1:] + return word, '' + + def _split(self, text): + """_split(text : string) -> [string] + + Override original method that only split by 'wordsep_re'. + This '_split' split wide-characters into chunk by one character. + """ + split = lambda t: textwrap.TextWrapper._split(self, t) + chunks = [] + for chunk in split(text): + for w, g in groupby(chunk, column_width): + if w == 1: + chunks.extend(split(''.join(g))) + else: + chunks.extend(list(g)) + return chunks + + def _handle_long_word(self, reversed_chunks, cur_line, cur_len, width): + """_handle_long_word(chunks : [string], + cur_line : [string], + cur_len : int, width : int) + + Override original method for using self._break_word() instead of slice. + """ + space_left = max(width - cur_len, 1) + if self.break_long_words: + l, r = self._break_word(reversed_chunks[-1], space_left) + cur_line.append(l) + reversed_chunks[-1] = r + + elif not cur_line: + cur_line.append(reversed_chunks.pop()) + MAXWIDTH = 70 STDINDENT = 3 @@ -457,7 +550,7 @@ class TextTranslator(nodes.NodeVisitor): self.list_counter.pop() def visit_enumerated_list(self, node): - self.list_counter.append(0) + self.list_counter.append(node.get('start', 1) - 1) def depart_enumerated_list(self, node): self.list_counter.pop() |
