Robert Lehmann avatar Robert Lehmann committed b5d1290 Merge

Comments (0)

Files changed (5)

Add a comment to this file

sphinx/directives/other.py

File contents unchanged.

tests/root/i18n/index.txt

    external_links
    refs_inconsistency
    literalblock
+   seealso
    definition_terms

tests/root/i18n/seealso.po

+# 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"
+

tests/root/i18n/seealso.txt

+: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

tests/test_intl.py

               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
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.