Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-02-25 16:16:09 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-03 17:18:38 +0300
commit6faef281505e1e4ba89d6af2058613d1d387dd46 (patch)
tree4734fe29d42042ee9bb0fab69087c8ffeb224e73 /sphinx/highlighting.py
parent1f5b40c291fc9cc16c323ef6aa4cd417b929bf0f (diff)
Make console and warning messages translatable
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 a14efd510..372ab7c43 100644
--- a/sphinx/highlighting.py
+++ b/sphinx/highlighting.py
@@ -23,6 +23,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
@@ -132,7 +133,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:
@@ -153,8 +154,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)