diff options
| author | Robert Lehmann <mail@robertlehmann.de> | 2013-01-06 11:44:58 +0100 |
|---|---|---|
| committer | Robert Lehmann <mail@robertlehmann.de> | 2013-01-06 11:44:58 +0100 |
| commit | eb90d762c4d6ffbea51bd2cf12427acfe0440e2d (patch) | |
| tree | 3e1f9f18145969264ca943fbf53916c5f27d0ccc | |
| parent | 6a14c6e44bc39839597e595871f106ca368038f5 (diff) | |
| parent | c9169f31e84cbcf1f40c37ce7e9b2378ac23ef3b (diff) | |
| download | sphinx-eb90d762c4d6ffbea51bd2cf12427acfe0440e2d.tar.gz | |
merge knzm/sphinx-fix-seealso-fork
| -rw-r--r-- | tests/root/i18n/index.txt | 1 | ||||
| -rw-r--r-- | tests/root/i18n/seealso.po | 33 | ||||
| -rw-r--r-- | tests/root/i18n/seealso.txt | 15 | ||||
| -rw-r--r-- | tests/test_intl.py | 16 |
4 files changed, 65 insertions, 0 deletions
diff --git a/tests/root/i18n/index.txt b/tests/root/i18n/index.txt index f8c9d406..e66557e8 100644 --- a/tests/root/i18n/index.txt +++ b/tests/root/i18n/index.txt @@ -6,4 +6,5 @@ external_links refs_inconsistency literalblock + seealso definition_terms diff --git a/tests/root/i18n/seealso.po b/tests/root/i18n/seealso.po new file mode 100644 index 00000000..d3b27e51 --- /dev/null +++ b/tests/root/i18n/seealso.po @@ -0,0 +1,33 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2010, Georg Brandl & Team +# This file is distributed under the same license as the Sphinx <Tests> package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Sphinx <Tests> 0.6\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-12-16 06:06\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 seealso" +msgstr "I18N WITH SEEALSO" + +msgid "short text 1" +msgstr "SHORT TEXT 1" + +msgid "long text 1" +msgstr "LONG TEXT 1" + +msgid "short text 2" +msgstr "SHORT TEXT 2" + +msgid "long text 2" +msgstr "LONG TEXT 2" + diff --git a/tests/root/i18n/seealso.txt b/tests/root/i18n/seealso.txt new file mode 100644 index 00000000..ed885997 --- /dev/null +++ b/tests/root/i18n/seealso.txt @@ -0,0 +1,15 @@ +:tocdepth: 2 + +i18n with seealso +============================ +.. #960 directive-seelaso-ignored-in-the-gettext + +.. seealso:: short text 1 + +.. seealso:: + + long text 1 + +.. seealso:: short text 2 + + long text 2 diff --git a/tests/test_intl.py b/tests/test_intl.py index 545d9c55..1ebeff15 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -243,3 +243,19 @@ def test_i18n_definition_terms(app): u"\n THE CORRESPONDING DEFINITION #2\n") assert result == expect + + +@with_app(buildername='text', cleanenv=True, + confoverrides={'language': 'xx', 'locale_dirs': ['.'], + 'gettext_compact': False}) +def test_seealso(app): + app.builder.build(['i18n/seealso']) + result = (app.outdir / 'i18n' / 'seealso.txt').text(encoding='utf-8') + expect = (u"\nI18N WITH SEEALSO" + u"\n*****************\n" + u"\nSee also: SHORT TEXT 1\n" + u"\nSee also: LONG TEXT 1\n" + u"\nSee also: SHORT TEXT 2\n" + u"\n LONG TEXT 2\n") + assert result == expect + |
