mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add i18n capabilities for custom templates.
For example: The Sphinx reference documentation in doc directory provides sphinx.pot file from ``doc/_templates/*.html`` by ``make gettext``.
This commit is contained in:
@@ -137,3 +137,15 @@ def test_gettext_index_entries(app):
|
||||
|
||||
# unexpected msgid existent
|
||||
assert msgids == []
|
||||
|
||||
|
||||
@with_app(buildername='gettext',
|
||||
srcdir=(test_roots / 'test-intl'),
|
||||
doctreedir=(test_roots / 'test-intl' / '_build' / 'doctree'))
|
||||
def test_gettext_template(app):
|
||||
app.builder.build_all()
|
||||
assert (app.outdir / 'sphinx.pot').isfile()
|
||||
|
||||
result = (app.outdir / 'sphinx.pot').text(encoding='utf-8')
|
||||
assert "Welcome" in result
|
||||
assert "Sphinx %(version)s" in result
|
||||
|
Reference in New Issue
Block a user