mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Fix could not translate the content of meta directive (ref: #1734)
This commit is contained in:
@@ -18,3 +18,9 @@ msgstr ""
|
||||
|
||||
msgid "Table of Contents"
|
||||
msgstr "TABLE OF CONTENTS"
|
||||
|
||||
msgid "testdata for i18n"
|
||||
msgstr "TESTDATA FOR I18N"
|
||||
|
||||
msgid "i18n, sphinx, markup"
|
||||
msgstr "I18N, SPHINX, MARKUP"
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
CONTENTS
|
||||
========
|
||||
|
||||
.. meta::
|
||||
:description: testdata for i18n
|
||||
:keywords: i18n, sphinx, markup
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:numbered:
|
||||
|
||||
@@ -360,6 +360,14 @@ def test_gettext_builder(app, status, warning):
|
||||
def test_html_builder(app, status, warning):
|
||||
app.builder.build_all()
|
||||
|
||||
# --- test for meta
|
||||
|
||||
result = (app.outdir / 'contents.html').text(encoding='utf-8')
|
||||
expected_expr = '<meta content="TESTDATA FOR I18N" name="description" />'
|
||||
yield assert_in, expected_expr, result
|
||||
expected_expr = '<meta content="I18N, SPHINX, MARKUP" name="keywords" />'
|
||||
yield assert_in, expected_expr, result
|
||||
|
||||
# --- test for #955 cant-build-html-with-footnotes-when-using
|
||||
|
||||
# expect no error by build
|
||||
|
||||
Reference in New Issue
Block a user