Add Builder.use_message_catalog flag

This commit is contained in:
Takeshi KOMIYA 2017-03-20 08:54:36 +09:00
parent b192b3271a
commit f175dc1b22
3 changed files with 4 additions and 1 deletions

View File

@ -57,6 +57,8 @@ class Builder(object):
versioning_compare = False
# allow parallel write_doc() calls
allow_parallel = False
# support translation
use_message_catalog = True
def __init__(self, app):
# type: (Sphinx) -> None

View File

@ -113,6 +113,7 @@ class I18nBuilder(Builder):
name = 'i18n'
versioning_method = 'text'
versioning_compare = None # be set by `gettext_uuid`
use_message_catalog = False
def init(self):
# type: () -> None

View File

@ -430,7 +430,7 @@ class BuildEnvironment(object):
# is set for the doc source and the mo file, it is processed again from
# the reading phase when mo is updated. In the future, we would like to
# move i18n process into the writing phase, and remove these lines.
if builder.name != 'gettext':
if builder.use_message_catalog:
# add catalog mo file dependency
for docname in self.found_docs:
catalog_files = find_catalog_files(