summaryrefslogtreecommitdiff
path: root/sphinx/util/nodes.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/nodes.py')
-rw-r--r--sphinx/util/nodes.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py
index f439c515e..bdda1369b 100644
--- a/sphinx/util/nodes.py
+++ b/sphinx/util/nodes.py
@@ -16,7 +16,7 @@ from docutils import nodes
from six import text_type
from sphinx import addnodes
-from sphinx.locale import pairindextypes
+from sphinx.locale import __
from sphinx.util import logging
if False:
@@ -240,6 +240,8 @@ indextypes = [
def process_index_entry(entry, targetid):
# type: (unicode, unicode) -> List[Tuple[unicode, unicode, unicode, unicode, unicode]]
+ from sphinx.domains.python import pairindextypes
+
indexentries = [] # type: List[Tuple[unicode, unicode, unicode, unicode, unicode]]
entry = entry.strip()
oentry = entry
@@ -295,7 +297,7 @@ def inline_all_toctrees(builder, docnameset, docname, tree, colorfunc, traversed
colorfunc, traversed)
docnameset.add(includefile)
except Exception:
- logger.warning('toctree contains ref to nonexisting file %r',
+ logger.warning(__('toctree contains ref to nonexisting file %r'),
includefile, location=docname)
else:
sof = addnodes.start_of_file(docname=includefile)
@@ -368,7 +370,7 @@ def process_only_nodes(document, tags):
try:
ret = tags.eval_condition(node['expr'])
except Exception as err:
- logger.warning('exception while evaluating only directive expression: %s', err,
+ logger.warning(__('exception while evaluating only directive expression: %s'), err,
location=node)
node.replace_self(node.children or nodes.comment())
else: