mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-08-11 13:34:59 -05:00
Close #4683: i18n: make explicit titles in toctree translatable
This commit is contained in:
@@ -465,6 +465,30 @@ def test_text_table(app):
|
||||
assert expect_msg.string in result
|
||||
|
||||
|
||||
@sphinx_intl
|
||||
@pytest.mark.sphinx('gettext')
|
||||
@pytest.mark.test_params(shared_result='test_intl_gettext')
|
||||
def test_gettext_toctree(app):
|
||||
app.build()
|
||||
# --- toctree
|
||||
expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'toctree.po')
|
||||
actual = read_po(app.outdir / 'toctree.pot')
|
||||
for expect_msg in [m for m in expect if m.id]:
|
||||
assert expect_msg.id in [m.id for m in actual if m.id]
|
||||
|
||||
|
||||
@sphinx_intl
|
||||
@pytest.mark.sphinx('text')
|
||||
@pytest.mark.test_params(shared_result='test_intl_basic')
|
||||
def test_text_toctree(app):
|
||||
app.build()
|
||||
# --- toctree
|
||||
result = (app.outdir / 'toctree.txt').text()
|
||||
expect = read_po(app.srcdir / 'xx' / 'LC_MESSAGES' / 'toctree.po')
|
||||
for expect_msg in [m for m in expect if m.id]:
|
||||
assert expect_msg.string in result
|
||||
|
||||
|
||||
@sphinx_intl
|
||||
@pytest.mark.sphinx('gettext')
|
||||
@pytest.mark.test_params(shared_result='test_intl_gettext')
|
||||
|
||||
Reference in New Issue
Block a user