Commits

Georg Brandl committed ded2a23

Code style nits.

  • Participants
  • Parent commits b803c74

Comments (0)

Files changed (4)

sphinx/builders/intl.py

 from datetime import datetime
 from os import path
 
-from docutils import nodes
-
 from sphinx.builders import Builder
 from sphinx.util.nodes import extract_messages
 from sphinx.util.osutil import SEP

sphinx/environment.py

             refnode += nodes.Text('[' + cittext + ']')
             citnode.parent.replace(citnode, refnode)
 
+
 class Locale(Transform):
     """
     Replace translatable nodes with their translated doctree.
         parser = RSTParser()
 
         for node, msg in extract_messages(self.document):
-            ctx = node.parent
+            # XXX ctx not used
+            #ctx = node.parent
             patch = new_document(source, settings)
             msgstr = catalog.ugettext(msg)
-            #XXX add marker to untranslated parts
+            # XXX add marker to untranslated parts
             if not msgstr or msgstr == msg: # as-of-yet untranslated
                 continue
             parser.parse(msgstr, patch)
             node.children = patch.children
 
 
-
 class SphinxStandaloneReader(standalone.Reader):
     """
     Add our own transforms.
             if node['level'] < filterlevel:
                 node.parent.remove(node)
 
-
     def process_dependencies(self, docname, doctree):
         """
         Process docutils-generated dependency info.

sphinx/locale/__init__.py

 def init(locale_dirs, language, catalog='sphinx'):
     """
     Look for message catalogs in `locale_dirs` and *ensure* that there is at
-    least a NullTranslations catalog set in `translators`. If called multiple
-    times or several ``.mo`` files are found their contents are merged
-    together (thus making `init` reentrable).
+    least a NullTranslations catalog set in `translators`.  If called multiple
+    times or if several ``.mo`` files are found, their contents are merged
+    together (thus making ``init`` reentrable).
     """
     global translators
     translator = translators.get(catalog)

sphinx/util/nodes.py

         if isinstance(node, (nodes.Invisible, nodes.Inline)):
             continue
         # <field_name>orphan</field_name>
+        # XXX ignore all metadata (== docinfo)
         if isinstance(node, nodes.field_name) and node.children[0] == 'orphan':
             continue
         msg = node.rawsource.replace('\n', ' ').strip()