summaryrefslogtreecommitdiff
path: root/sphinx/directives/code.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-04 02:20:54 +0900
committerGitHub <noreply@github.com>2018-03-04 02:20:54 +0900
commitf89c7f31e80fbdeb4cbf8e7c91cb14657e60a97b (patch)
tree4734fe29d42042ee9bb0fab69087c8ffeb224e73 /sphinx/directives/code.py
parent1f5b40c291fc9cc16c323ef6aa4cd417b929bf0f (diff)
parent6faef281505e1e4ba89d6af2058613d1d387dd46 (diff)
downloadsphinx-git-f89c7f31e80fbdeb4cbf8e7c91cb14657e60a97b.tar.gz
Merge pull request #4705 from tk0miya/i18n
Make console and warning messages translatable
Diffstat (limited to 'sphinx/directives/code.py')
-rw-r--r--sphinx/directives/code.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py
index 51abc252b..17e77327d 100644
--- a/sphinx/directives/code.py
+++ b/sphinx/directives/code.py
@@ -126,7 +126,7 @@ class CodeBlock(Directive):
nlines = len(self.content)
hl_lines = parselinenos(linespec, nlines)
if any(i >= nlines for i in hl_lines):
- logger.warning('line number spec is out of range(1-%d): %r' %
+ logger.warning(__('line number spec is out of range(1-%d): %r') %
(nlines, self.options['emphasize-lines']),
location=location)
@@ -268,7 +268,7 @@ class LiteralIncludeReader(object):
if linespec:
linelist = parselinenos(linespec, len(lines))
if any(i >= len(lines) for i in linelist):
- logger.warning('line number spec is out of range(1-%d): %r' %
+ logger.warning(__('line number spec is out of range(1-%d): %r') %
(len(lines), linespec), location=location)
if 'lineno-match' in self.options:
@@ -440,7 +440,7 @@ class LiteralInclude(Directive):
if 'emphasize-lines' in self.options:
hl_lines = parselinenos(self.options['emphasize-lines'], lines)
if any(i >= lines for i in hl_lines):
- logger.warning('line number spec is out of range(1-%d): %r' %
+ logger.warning(__('line number spec is out of range(1-%d): %r') %
(lines, self.options['emphasize-lines']),
location=location)
extra_args['hl_lines'] = [x + 1 for x in hl_lines if x < lines]