diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-03-04 02:20:54 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-04 02:20:54 +0900 |
commit | f89c7f31e80fbdeb4cbf8e7c91cb14657e60a97b (patch) | |
tree | 4734fe29d42042ee9bb0fab69087c8ffeb224e73 /sphinx/directives/code.py | |
parent | 1f5b40c291fc9cc16c323ef6aa4cd417b929bf0f (diff) | |
parent | 6faef281505e1e4ba89d6af2058613d1d387dd46 (diff) | |
download | sphinx-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.py | 6 |
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] |