summaryrefslogtreecommitdiff
path: root/sphinx/ext/mathbase.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/ext/mathbase.py')
-rw-r--r--sphinx/ext/mathbase.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/ext/mathbase.py b/sphinx/ext/mathbase.py
index 3cc734537..939247638 100644
--- a/sphinx/ext/mathbase.py
+++ b/sphinx/ext/mathbase.py
@@ -24,6 +24,7 @@ if False:
# For type annotation
from typing import Any, Callable, Dict, Iterable, List, Tuple # NOQA
from docutils.parsers.rst.states import Inliner # NOQA
+ from docutils.writers.html4css1 import Writer # NOQA
from sphinx.application import Sphinx # NOQA
from sphinx.builders import Builder # NOQA
from sphinx.environment import BuildEnvironment # NOQA
@@ -97,7 +98,7 @@ class MathDomain(Domain):
eqref_format = env.config.math_eqref_format or "({number})"
title = nodes.Text(eqref_format.format(number=number))
except KeyError as exc:
- logger.warning('Invalid math_eqref_format: %r', exc,
+ logger.warning(__('Invalid math_eqref_format: %r'), exc,
location=node)
title = nodes.Text("(%d)" % number)
title = nodes.Text("(%d)" % number)
@@ -136,6 +137,7 @@ class MathDomain(Domain):
def get_node_equation_number(writer, node):
+ # type: (Writer, nodes.Node) -> unicode
if writer.builder.config.math_numfig and writer.builder.config.numfig:
figtype = 'displaymath'
if writer.builder.name == 'singlehtml':
@@ -307,7 +309,7 @@ def latex_visit_eqref(self, node):
ref = '\\ref{%s}' % label
self.body.append(eqref_format.format(number=ref))
except KeyError as exc:
- logger.warning('Invalid math_eqref_format: %r', exc,
+ logger.warning(__('Invalid math_eqref_format: %r'), exc,
location=node)
self.body.append('\\eqref{%s}' % label)
else: