Fix could not translate the content of meta directive (ref: #1734)

This commit is contained in:
Takeshi KOMIYA
2016-09-01 23:35:23 +09:00
parent e1e5ae4b65
commit 15518bad12
7 changed files with 46 additions and 1 deletions
+6
View File
@@ -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"
+4
View File
@@ -1,6 +1,10 @@
CONTENTS
========
.. meta::
:description: testdata for i18n
:keywords: i18n, sphinx, markup
.. toctree::
:maxdepth: 2
:numbered:
+8
View File
@@ -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