mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add Builder.use_message_catalog flag
This commit is contained in:
parent
b192b3271a
commit
f175dc1b22
@ -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
|
||||
|
@ -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
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user