mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fixed #1771: automated .mo building doesn't work properly with template translation: sphinx-build will load sphinx.mo file to initialize template-bridge before compiling sphinx.po file.
This commit is contained in:
@@ -55,10 +55,13 @@ def test_compile_all_catalogs(app, status, warning):
|
||||
@with_app(buildername='html', testroot='intl',
|
||||
confoverrides={'language': 'en', 'locale_dirs': [locale_dir]})
|
||||
def test_compile_specific_catalogs(app, status, warning):
|
||||
app.builder.compile_specific_catalogs(['admonitions'])
|
||||
|
||||
catalog_dir = locale_dir / app.config.language / 'LC_MESSAGES'
|
||||
actual = set(find_files(catalog_dir, '.mo'))
|
||||
def get_actual():
|
||||
return set(find_files(catalog_dir, '.mo'))
|
||||
|
||||
actual_on_boot = get_actual() # sphinx.mo might be included
|
||||
app.builder.compile_specific_catalogs(['admonitions'])
|
||||
actual = get_actual() - actual_on_boot
|
||||
assert actual == set(['admonitions.mo'])
|
||||
|
||||
|
||||
|
||||
@@ -77,8 +77,8 @@ def test_get_catalogs_for_xx(dir):
|
||||
assert domains == set([
|
||||
'test1',
|
||||
'test2',
|
||||
path.normpath('sub/test4'),
|
||||
path.normpath('sub/test5'),
|
||||
'sub/test4',
|
||||
'sub/test5',
|
||||
])
|
||||
|
||||
|
||||
@@ -131,8 +131,8 @@ def test_get_catalogs_for_xx_without_outdated(dir):
|
||||
assert domains == set([
|
||||
'test1',
|
||||
'test2',
|
||||
path.normpath('sub/test4'),
|
||||
path.normpath('sub/test5'),
|
||||
'sub/test4',
|
||||
'sub/test5',
|
||||
])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user