diff options
| author | shimizukawa <shimizukawa@gmail.com> | 2013-01-30 00:13:58 +0900 |
|---|---|---|
| committer | shimizukawa <shimizukawa@gmail.com> | 2013-01-30 00:13:58 +0900 |
| commit | 04e38ec4c4d97499afc7c734dbd8cffdab771ce1 (patch) | |
| tree | ee606ca141006ddb2be23f6c3194ee33e89770ad /tests | |
| parent | 2725068ad0ae80a0d2ee37ad5e81901266f595db (diff) | |
| download | sphinx-04e38ec4c4d97499afc7c734dbd8cffdab771ce1.tar.gz | |
Fix gettext does not extract glossary terms. Closes #1090
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/roots/test-intl/glossary_terms.po | 32 | ||||
| -rw-r--r-- | tests/roots/test-intl/glossary_terms.txt | 13 | ||||
| -rw-r--r-- | tests/test_intl.py | 15 |
3 files changed, 60 insertions, 0 deletions
diff --git a/tests/roots/test-intl/glossary_terms.po b/tests/roots/test-intl/glossary_terms.po new file mode 100644 index 00000000..b918c95b --- /dev/null +++ b/tests/roots/test-intl/glossary_terms.po @@ -0,0 +1,32 @@ +# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2012, foof
+# This file is distributed under the same license as the foo package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: sphinx 1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-01-29 14:10\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "i18n with glossary terms"
+msgstr "I18N WITH GLOSSARY TERMS"
+
+msgid "Some term"
+msgstr "SOME TERM"
+
+msgid "The corresponding glossary"
+msgstr "THE CORRESPONDING GLOSSARY"
+
+msgid "Some other term"
+msgstr "SOME OTHER TERM"
+
+msgid "The corresponding glossary #2"
+msgstr "THE CORRESPONDING GLOSSARY #2"
diff --git a/tests/roots/test-intl/glossary_terms.txt b/tests/roots/test-intl/glossary_terms.txt new file mode 100644 index 00000000..295e9e12 --- /dev/null +++ b/tests/roots/test-intl/glossary_terms.txt @@ -0,0 +1,13 @@ +:tocdepth: 2 + +i18n with glossary terms +======================== + +.. glossary:: + + Some term + The corresponding glossary + + Some other term + The corresponding glossary #2 + diff --git a/tests/test_intl.py b/tests/test_intl.py index b5cd1c96..bf73824d 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -253,6 +253,21 @@ def test_i18n_definition_terms(app): @with_intl_app(buildername='text') +def test_i18n_glossary_terms(app): + # regression test for #1090 + app.builder.build(['glossary_terms']) + result = (app.outdir / 'glossary_terms.txt').text(encoding='utf-8') + expect = (u"\nI18N WITH GLOSSARY TERMS" + u"\n************************\n" + u"\nSOME TERM" + u"\n THE CORRESPONDING GLOSSARY\n" + u"\nSOME OTHER TERM" + u"\n THE CORRESPONDING GLOSSARY #2\n") + + assert result == expect + + +@with_intl_app(buildername='text') def test_seealso(app): app.builder.build(['seealso']) result = (app.outdir / 'seealso.txt').text(encoding='utf-8') |
