summaryrefslogtreecommitdiff
path: root/sphinx/highlighting.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/highlighting.py')
-rw-r--r--sphinx/highlighting.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py
index ac1d1118e..7d5956570 100644
--- a/sphinx/highlighting.py
+++ b/sphinx/highlighting.py
@@ -21,6 +21,7 @@ from pygments.util import ClassNotFound
from six import text_type
from sphinx.ext import doctest
+from sphinx.locale import __
from sphinx.pygments_styles import SphinxStyle, NoneStyle
from sphinx.util import logging
from sphinx.util.pycompat import htmlescape
@@ -131,7 +132,7 @@ class PygmentsBridge(object):
try:
lexer = lexers[lang] = get_lexer_by_name(lang, **(opts or {}))
except ClassNotFound:
- logger.warning('Pygments lexer name %r is not known', lang,
+ logger.warning(__('Pygments lexer name %r is not known'), lang,
location=location)
lexer = lexers['none']
else:
@@ -152,8 +153,8 @@ class PygmentsBridge(object):
if lang == 'default':
pass # automatic highlighting failed.
else:
- logger.warning('Could not lex literal_block as "%s". '
- 'Highlighting skipped.', lang,
+ logger.warning(__('Could not lex literal_block as "%s". '
+ 'Highlighting skipped.'), lang,
type='misc', subtype='highlighting_failure',
location=location)
hlsource = highlight(source, lexers['none'], formatter)