diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-14 19:50:31 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-14 19:52:26 +0900 |
| commit | 6682f89871b8df9bb4d85cab5b8f35c9396c9afb (patch) | |
| tree | 06a7444d3d8fbbb16ef12b5d02c405fda7cb2c2d /sphinx/application.py | |
| parent | 5c0d0438c4b1f4e2277fd5d79fcd06e80bb65f20 (diff) | |
| download | sphinx-git-6682f89871b8df9bb4d85cab5b8f35c9396c9afb.tar.gz | |
Fix #7282: i18n: messages using ngettext() does not translated
Diffstat (limited to 'sphinx/application.py')
| -rw-r--r-- | sphinx/application.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sphinx/application.py b/sphinx/application.py index 74aa2d630..c29152075 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -350,13 +350,15 @@ class Sphinx: else __('finished with problems')) if self._warncount: if self.warningiserror: - msg = __('build %s, %s warning (with warnings treated as errors).', - 'build %s, %s warnings (with warnings treated as errors).', - self._warncount) + if self._warncount == 1: + msg = __('build %s, %s warning (with warnings treated as errors).') + else: + msg = __('build %s, %s warnings (with warnings treated as errors).') else: - msg = __('build %s, %s warning.', - 'build %s, %s warnings.', - self._warncount) + if self._warncount == 1: + msg = __('build %s, %s warning.') + else: + msg = __('build %s, %s warnings.') logger.info(bold(msg % (status, self._warncount))) else: |
