Commits

Takayuki Shimizukawa committed 6c70ca2

Divide test_intl target source files for speed-up.

Comments (0)

Files changed (40)

tests/root/contents.txt

    extensions
    versioning/index
    footnote
-   i18n/index
 
    Python <http://python.org/>
 

tests/root/i18n/definition_terms.po

-# 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-01 05:00\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 definition terms"
-msgstr "I18N WITH DEFINITION TERMS"
-
-msgid "Some term"
-msgstr "SOME TERM"
-
-msgid "The corresponding definition"
-msgstr "THE CORRESPONDING DEFINITION"
-
-msgid "Some other term"
-msgstr "SOME OTHER TERM"
-
-msgid "The corresponding definition #2"
-msgstr "THE CORRESPONDING DEFINITION #2"

tests/root/i18n/definition_terms.txt

-:tocdepth: 2
-
-i18n with definition terms
-==========================
-
-Some term
-   The corresponding definition
-
-Some other term
-   The corresponding definition #2
-

tests/root/i18n/external_links.po

-# 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: 2012-11-22 08:28\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 external links"
-msgstr "EXTERNAL LINKS"
-
-msgid "External link to Python_."
-msgstr "EXTERNAL LINK TO Python_."
-
-msgid "Internal link to `i18n with external links`_."
-msgstr "`EXTERNAL LINKS`_ IS INTERNAL LINK."
-
-msgid "Inline link by `Sphinx <http://sphinx-doc.org>`_."
-msgstr "INLINE LINK BY `SPHINX <http://sphinx-doc.org>`_."
-
-msgid "Unnamed link__."
-msgstr "UNNAMED LINK__."

tests/root/i18n/external_links.txt

-:tocdepth: 2
-
-i18n with external links
-========================
-.. #1044 external-links-dont-work-in-localized-html
-
-* External link to Python_.
-* Internal link to `i18n with external links`_.
-* Inline link by `Sphinx <http://sphinx-doc.org>`_.
-* Unnamed link__.
-
-.. _Python: http://python.org
-.. __: http://google.com

tests/root/i18n/figure_caption.po

-# 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-04 7:00\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 figure caption"
-msgstr "I18N WITH FIGURE CAPTION"
-
-msgid "My caption of the figure"
-msgstr "MY CAPTION OF THE FIGURE"
-
-msgid "My description paragraph1 of the figure."
-msgstr "MY DESCRIPTION PARAGRAPH1 OF THE FIGURE."
-
-msgid "My description paragraph2 of the figure."
-msgstr "MY DESCRIPTION PARAGRAPH2 OF THE FIGURE."

tests/root/i18n/figure_caption.txt

-:tocdepth: 2
-
-i18n with figure caption
-========================
-
-.. figure:: i18n.png
-
-   My caption of the figure
-
-   My description paragraph1 of the figure.
-
-   My description paragraph2 of the figure.

tests/root/i18n/footnote.po

-# 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: 2012-11-22 08:28\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 Footnote"
-msgstr "I18N WITH FOOTNOTE"
-
-msgid "[100]_ Contents [#]_ for `i18n with Footnote`_ [ref]_"
-msgstr "`I18N WITH FOOTNOTE`_ INCLUDE THIS CONTENTS [ref]_ [#]_ [100]_"
-
-msgid "This is a auto numbered footnote."
-msgstr "THIS IS A AUTO NUMBERED FOOTNOTE."
-
-msgid "This is a named footnote."
-msgstr "THIS IS A NAMED FOOTNOTE."
-
-msgid "This is a numbered footnote."
-msgstr "THIS IS A NUMBERED FOOTNOTE."
-

tests/root/i18n/footnote.txt

-:tocdepth: 2
-
-i18n with Footnote
-==================
-.. #955 cant-build-html-with-footnotes-when-using
-
-[100]_ Contents [#]_ for `i18n with Footnote`_ [ref]_
-
-.. [#] This is a auto numbered footnote.
-.. [ref] This is a named footnote.
-.. [100] This is a numbered footnote.
Add a comment to this file

tests/root/i18n/i18n.png

Removed
Old image

tests/root/i18n/index.txt

-.. toctree::
-   :maxdepth: 2
-   :numbered:
-
-   footnote
-   external_links
-   refs_inconsistency
-   literalblock
-   definition_terms
-   figure_caption
-   index_entries

tests/root/i18n/index_entries.po

-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2013, foo
-# This file is distributed under the same license as the foo package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: foo foo\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-01-05 18: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 index entries"
-msgstr ""
-
-msgid "index target section"
-msgstr ""
-
-msgid "this is :index:`Newsletter` target paragraph."
-msgstr "THIS IS :index:`NEWSLETTER` TARGET PARAGRAPH."
-
-msgid "various index entries"
-msgstr ""
-
-msgid "That's all."
-msgstr ""
-
-msgid "Mailing List"
-msgstr "MAILING LIST"
-
-msgid "Newsletter"
-msgstr "NEWSLETTER"
-
-msgid "Recipients List"
-msgstr "RECIPIENTS LIST"
-
-msgid "First"
-msgstr "FIRST"
-
-msgid "Second"
-msgstr "SECOND"
-
-msgid "Third"
-msgstr "THIRD"
-
-msgid "Entry"
-msgstr "ENTRY"
-
-msgid "See"
-msgstr "SEE"
-
-msgid "Module"
-msgstr "MODULE"
-
-msgid "Keyword"
-msgstr "KEYWORD"
-
-msgid "Operator"
-msgstr "OPERATOR"
-
-msgid "Object"
-msgstr "OBJECT"
-
-msgid "Exception"
-msgstr "EXCEPTION"
-
-msgid "Statement"
-msgstr "STATEMENT"
-
-msgid "Builtin"
-msgstr "BUILTIN"

tests/root/i18n/index_entries.txt

-:tocdepth: 2
-
-i18n with index entries
-=======================
-
-.. index::
-   single: Mailing List
-   pair: Newsletter; Recipients List
-
-index target section
---------------------
-
-this is :index:`Newsletter` target paragraph.
-
-
-various index entries
----------------------
-
-.. index::
-   triple: First; Second; Third
-   see: Entry; Mailing List
-   seealso: See; Newsletter
-   module: Module
-   keyword: Keyword
-   operator: Operator
-   object: Object
-   exception: Exception
-   statement: Statement
-   builtin: Builtin
-
-That's all.

tests/root/i18n/literalblock.po

-# 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: 2012-11-22 08:28\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 literal block"
-msgstr "I18N WITH LITERAL BLOCK"
-
-msgid "Correct literal block::"
-msgstr "CORRECT LITERAL BLOCK::"
-
-msgid "Missing literal block::"
-msgstr "MISSING LITERAL BLOCK::"
-
-msgid "That's all."
-msgstr "THAT'S ALL."
-

tests/root/i18n/literalblock.txt

-:tocdepth: 2
-
-i18n with literal block
-=========================
-
-Correct literal block::
-
-   this is
-   literal block
-
-Missing literal block::
-
-That's all.

tests/root/i18n/refs_inconsistency.po

-# 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: 2012-12-05 08:28\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 refs inconsistency"
-msgstr "I18N WITH REFS INCONSISTENCY"
-
-msgid "[100]_ for [#]_ footnote [ref2]_."
-msgstr "FOR FOOTNOTE [ref2]_."
-
-msgid "for reference_."
-msgstr "reference_ FOR reference_."
-
-msgid "normal text."
-msgstr "ORPHAN REFERENCE: `I18N WITH REFS INCONSISTENCY`_."
-
-msgid "This is a auto numbered footnote."
-msgstr "THIS IS A AUTO NUMBERED FOOTNOTE."
-
-msgid "This is a named footnote."
-msgstr "THIS IS A NAMED FOOTNOTE."
-
-msgid "This is a numbered footnote."
-msgstr "THIS IS A NUMBERED FOOTNOTE."
-

tests/root/i18n/refs_inconsistency.txt

-:tocdepth: 2
-
-i18n with refs inconsistency
-=============================
-
-* [100]_ for [#]_ footnote [ref2]_.
-* for reference_.
-* normal text.
-
-.. [#] This is a auto numbered footnote.
-.. [ref2] This is a named footnote.
-.. [100] This is a numbered footnote.
-.. _reference: http://www.example.com

tests/roots/test-intl/bom.po

+#, fuzzy
+msgid ""
+msgstr ""
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "File with UTF-8 BOM"
+msgstr "Datei mit UTF-8"
+
+msgid "This file has a UTF-8 \"BOM\"."
+msgstr "This file has umlauts: äöü."

tests/roots/test-intl/bom.txt

+File with UTF-8 BOM
+===================
+
+This file has a UTF-8 "BOM".
+

tests/roots/test-intl/conf.py

+# -*- coding: utf-8 -*-
+
+import sys, os
+
+project = 'Sphinx intl <Tests>'
+source_suffix = '.txt'
+keep_warnings = True

tests/roots/test-intl/contents.txt

+.. toctree::
+   :maxdepth: 2
+   :numbered:
+
+   subdir/contents
+   bom
+   footnote
+   external_links
+   refs_inconsistency
+   literalblock
+   definition_terms
+   figure_caption
+   index_entries

tests/roots/test-intl/definition_terms.po

+# 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-01 05:00\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 definition terms"
+msgstr "I18N WITH DEFINITION TERMS"
+
+msgid "Some term"
+msgstr "SOME TERM"
+
+msgid "The corresponding definition"
+msgstr "THE CORRESPONDING DEFINITION"
+
+msgid "Some other term"
+msgstr "SOME OTHER TERM"
+
+msgid "The corresponding definition #2"
+msgstr "THE CORRESPONDING DEFINITION #2"

tests/roots/test-intl/definition_terms.txt

+:tocdepth: 2
+
+i18n with definition terms
+==========================
+
+Some term
+   The corresponding definition
+
+Some other term
+   The corresponding definition #2
+

tests/roots/test-intl/external_links.po

+# 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: 2012-11-22 08:28\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 external links"
+msgstr "EXTERNAL LINKS"
+
+msgid "External link to Python_."
+msgstr "EXTERNAL LINK TO Python_."
+
+msgid "Internal link to `i18n with external links`_."
+msgstr "`EXTERNAL LINKS`_ IS INTERNAL LINK."
+
+msgid "Inline link by `Sphinx <http://sphinx-doc.org>`_."
+msgstr "INLINE LINK BY `SPHINX <http://sphinx-doc.org>`_."
+
+msgid "Unnamed link__."
+msgstr "UNNAMED LINK__."

tests/roots/test-intl/external_links.txt

+:tocdepth: 2
+
+i18n with external links
+========================
+.. #1044 external-links-dont-work-in-localized-html
+
+* External link to Python_.
+* Internal link to `i18n with external links`_.
+* Inline link by `Sphinx <http://sphinx-doc.org>`_.
+* Unnamed link__.
+
+.. _Python: http://python.org
+.. __: http://google.com

tests/roots/test-intl/figure_caption.po

+# 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-04 7:00\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 figure caption"
+msgstr "I18N WITH FIGURE CAPTION"
+
+msgid "My caption of the figure"
+msgstr "MY CAPTION OF THE FIGURE"
+
+msgid "My description paragraph1 of the figure."
+msgstr "MY DESCRIPTION PARAGRAPH1 OF THE FIGURE."
+
+msgid "My description paragraph2 of the figure."
+msgstr "MY DESCRIPTION PARAGRAPH2 OF THE FIGURE."

tests/roots/test-intl/figure_caption.txt

+:tocdepth: 2
+
+i18n with figure caption
+========================
+
+.. figure:: i18n.png
+
+   My caption of the figure
+
+   My description paragraph1 of the figure.
+
+   My description paragraph2 of the figure.

tests/roots/test-intl/footnote.po

+# 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: 2012-11-22 08:28\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 Footnote"
+msgstr "I18N WITH FOOTNOTE"
+
+msgid "[100]_ Contents [#]_ for `i18n with Footnote`_ [ref]_"
+msgstr "`I18N WITH FOOTNOTE`_ INCLUDE THIS CONTENTS [ref]_ [#]_ [100]_"
+
+msgid "This is a auto numbered footnote."
+msgstr "THIS IS A AUTO NUMBERED FOOTNOTE."
+
+msgid "This is a named footnote."
+msgstr "THIS IS A NAMED FOOTNOTE."
+
+msgid "This is a numbered footnote."
+msgstr "THIS IS A NUMBERED FOOTNOTE."
+

tests/roots/test-intl/footnote.txt

+:tocdepth: 2
+
+i18n with Footnote
+==================
+.. #955 cant-build-html-with-footnotes-when-using
+
+[100]_ Contents [#]_ for `i18n with Footnote`_ [ref]_
+
+.. [#] This is a auto numbered footnote.
+.. [ref] This is a named footnote.
+.. [100] This is a numbered footnote.
Add a comment to this file

tests/roots/test-intl/i18n.png

Added
New image

tests/roots/test-intl/index_entries.po

+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2013, foo
+# This file is distributed under the same license as the foo package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: foo foo\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-01-05 18: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 index entries"
+msgstr ""
+
+msgid "index target section"
+msgstr ""
+
+msgid "this is :index:`Newsletter` target paragraph."
+msgstr "THIS IS :index:`NEWSLETTER` TARGET PARAGRAPH."
+
+msgid "various index entries"
+msgstr ""
+
+msgid "That's all."
+msgstr ""
+
+msgid "Mailing List"
+msgstr "MAILING LIST"
+
+msgid "Newsletter"
+msgstr "NEWSLETTER"
+
+msgid "Recipients List"
+msgstr "RECIPIENTS LIST"
+
+msgid "First"
+msgstr "FIRST"
+
+msgid "Second"
+msgstr "SECOND"
+
+msgid "Third"
+msgstr "THIRD"
+
+msgid "Entry"
+msgstr "ENTRY"
+
+msgid "See"
+msgstr "SEE"
+
+msgid "Module"
+msgstr "MODULE"
+
+msgid "Keyword"
+msgstr "KEYWORD"
+
+msgid "Operator"
+msgstr "OPERATOR"
+
+msgid "Object"
+msgstr "OBJECT"
+
+msgid "Exception"
+msgstr "EXCEPTION"
+
+msgid "Statement"
+msgstr "STATEMENT"
+
+msgid "Builtin"
+msgstr "BUILTIN"

tests/roots/test-intl/index_entries.txt

+:tocdepth: 2
+
+i18n with index entries
+=======================
+
+.. index::
+   single: Mailing List
+   pair: Newsletter; Recipients List
+
+index target section
+--------------------
+
+this is :index:`Newsletter` target paragraph.
+
+
+various index entries
+---------------------
+
+.. index::
+   triple: First; Second; Third
+   see: Entry; Mailing List
+   seealso: See; Newsletter
+   module: Module
+   keyword: Keyword
+   operator: Operator
+   object: Object
+   exception: Exception
+   statement: Statement
+   builtin: Builtin
+
+That's all.

tests/roots/test-intl/literalblock.po

+# 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: 2012-11-22 08:28\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 literal block"
+msgstr "I18N WITH LITERAL BLOCK"
+
+msgid "Correct literal block::"
+msgstr "CORRECT LITERAL BLOCK::"
+
+msgid "Missing literal block::"
+msgstr "MISSING LITERAL BLOCK::"
+
+msgid "That's all."
+msgstr "THAT'S ALL."
+

tests/roots/test-intl/literalblock.txt

+:tocdepth: 2
+
+i18n with literal block
+=========================
+
+Correct literal block::
+
+   this is
+   literal block
+
+Missing literal block::
+
+That's all.

tests/roots/test-intl/refs_inconsistency.po

+# 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: 2012-12-05 08:28\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 refs inconsistency"
+msgstr "I18N WITH REFS INCONSISTENCY"
+
+msgid "[100]_ for [#]_ footnote [ref2]_."
+msgstr "FOR FOOTNOTE [ref2]_."
+
+msgid "for reference_."
+msgstr "reference_ FOR reference_."
+
+msgid "normal text."
+msgstr "ORPHAN REFERENCE: `I18N WITH REFS INCONSISTENCY`_."
+
+msgid "This is a auto numbered footnote."
+msgstr "THIS IS A AUTO NUMBERED FOOTNOTE."
+
+msgid "This is a named footnote."
+msgstr "THIS IS A NAMED FOOTNOTE."
+
+msgid "This is a numbered footnote."
+msgstr "THIS IS A NUMBERED FOOTNOTE."
+

tests/roots/test-intl/refs_inconsistency.txt

+:tocdepth: 2
+
+i18n with refs inconsistency
+=============================
+
+* [100]_ for [#]_ footnote [ref2]_.
+* for reference_.
+* normal text.
+
+.. [#] This is a auto numbered footnote.
+.. [ref2] This is a named footnote.
+.. [100] This is a numbered footnote.
+.. _reference: http://www.example.com

tests/roots/test-intl/subdir/contents.txt

+subdir contents
+===============

tests/test_build_gettext.py

 
 def teardown_module():
     (test_root / '_build').rmtree(True)
+    (test_roots / 'test-intl' / '_build').rmtree(True),
 
 
 @with_app(buildername='gettext')
 
 
 @with_app(buildername='gettext',
+          srcdir=(test_roots / 'test-intl'),
+          doctreedir=(test_roots / 'test-intl' / '_build' / 'doctree'),
           confoverrides={'gettext_compact': False})
 def test_gettext_index_entries(app):
     # regression test for #976
-    app.builder.build(['i18n/index_entries'])
+    app.builder.build(['index_entries'])
 
     _msgid_getter = re.compile(r'msgid "(.*)"').search
     def msgid_getter(msgid):
             return m.groups()[0]
         return None
 
-    pot = (app.outdir / 'i18n' / 'index_entries.pot').text(encoding='utf-8')
+    pot = (app.outdir / 'index_entries.pot').text(encoding='utf-8')
     msgids = filter(None, map(msgid_getter, pot.splitlines()))
 
     expected_msgids = [

tests/test_build_html.py

 %(root)s/autodoc_fodder.py:docstring of autodoc_fodder\\.MarkupError:2: \
 WARNING: Explicit markup ends without a blank line; unexpected \
 unindent\\.\\n?
-%(root)s/i18n/literalblock.txt:13: WARNING: Literal block expected; none found.
 %(root)s/images.txt:9: WARNING: image file not readable: foo.png
 %(root)s/images.txt:23: WARNING: nonlocal image URI found: \
 http://www.python.org/logo.png

tests/test_intl.py

 
 
 warnfile = StringIO()
+root = test_roots / 'test-intl'
+doctreedir = root / '_build' / 'doctree'
+
+
+def with_intl_app(*args, **kw):
+    default_kw = {
+        'srcdir': root,
+        'doctreedir': doctreedir,
+        'confoverrides': {
+            'language': 'xx', 'locale_dirs': ['.'],
+            'gettext_compact': False,
+        },
+    }
+    default_kw.update(kw)
+    return with_app(*args, **default_kw)
 
 
 def setup_module():
     # Delete remnants left over after failed build
-    (test_root / 'xx').rmtree(True)
-    (test_root / 'xx' / 'LC_MESSAGES').makedirs()
+    (root / 'xx').rmtree(True)
+    (root / 'xx' / 'LC_MESSAGES').makedirs()
     # Compile all required catalogs into binary format (*.mo).
-    for dirpath, dirs, files in os.walk(test_root):
+    for dirpath, dirs, files in os.walk(root):
         dirpath = path(dirpath)
         for f in [f for f in files if f.endswith('.po')]:
             po = dirpath / f
-            mo = test_root / 'xx' / 'LC_MESSAGES' / (
-                    relpath(po[:-3], test_root) + '.mo')
+            mo = root / 'xx' / 'LC_MESSAGES' / (
+                    relpath(po[:-3], root) + '.mo')
             if not mo.parent.exists():
                 mo.parent.makedirs()
             try:
 
 
 def teardown_module():
-    (test_root / '_build').rmtree(True)
-    (test_root / 'xx').rmtree(True)
+    (root / '_build').rmtree(True)
+    (root / 'xx').rmtree(True)
 
 
-@with_app(buildername='text',
-          confoverrides={'language': 'xx', 'locale_dirs': ['.']})
+@with_intl_app(buildername='text')
 def test_simple(app):
     app.builder.build(['bom'])
     result = (app.outdir / 'bom.txt').text(encoding='utf-8')
     assert result == expect
 
 
-@with_app(buildername='text',
-          confoverrides={'language': 'xx', 'locale_dirs': ['.']})
+@with_intl_app(buildername='text')
 def test_subdir(app):
-    app.builder.build(['subdir/includes'])
-    result = (app.outdir / 'subdir' / 'includes.txt').text(encoding='utf-8')
-    assert result.startswith(u"\ntranslation\n***********\n\n")
+    app.builder.build(['subdir/contents'])
+    result = (app.outdir / 'subdir' / 'contents.txt').text(encoding='utf-8')
+    assert result.startswith(u"\nsubdir contents\n***************\n")
 
 
-@with_app(buildername='html', cleanenv=True,
-          confoverrides={'language': 'xx', 'locale_dirs': ['.'],
-                         'gettext_compact': False})
+@with_intl_app(buildername='html', cleanenv=True)
 def test_i18n_footnote_break_refid(app):
     """test for #955 cant-build-html-with-footnotes-when-using"""
-    app.builder.build(['i18n/footnote'])
-    result = (app.outdir / 'i18n' / 'footnote.html').text(encoding='utf-8')
+    app.builder.build(['footnote'])
+    result = (app.outdir / 'footnote.html').text(encoding='utf-8')
     # expect no error by build
 
 
-@with_app(buildername='text', cleanenv=True,
-          confoverrides={'language': 'xx', 'locale_dirs': ['.'],
-                         'gettext_compact': False})
+@with_intl_app(buildername='text', cleanenv=True)
 def test_i18n_footnote_regression(app):
     """regression test for fix #955"""
-    app.builder.build(['i18n/footnote'])
-    result = (app.outdir / 'i18n' / 'footnote.txt').text(encoding='utf-8')
+    app.builder.build(['footnote'])
+    result = (app.outdir / 'footnote.txt').text(encoding='utf-8')
     expect = (u"\nI18N WITH FOOTNOTE"
               u"\n******************\n"  # underline matches new translation
               u"\nI18N WITH FOOTNOTE INCLUDE THIS CONTENTS [ref] [1] [100]\n"
     assert result == expect
 
 
-@with_app(buildername='html', cleanenv=True,
-          confoverrides={'language': 'xx', 'locale_dirs': ['.'],
-                         'gettext_compact': False})
+@with_intl_app(buildername='html', cleanenv=True)
 def test_i18n_footnote_backlink(app):
     """i18n test for #1058"""
-    app.builder.build(['i18n/footnote'])
-    result = (app.outdir / 'i18n' / 'footnote.html').text(encoding='utf-8')
+    app.builder.build(['footnote'])
+    result = (app.outdir / 'footnote.html').text(encoding='utf-8')
     expects = [
         '<a class="footnote-reference" href="#id5" id="id1">[100]</a>',
         '<a class="footnote-reference" href="#id4" id="id2">[1]</a>',
         assert len(matches) == 1
 
 
-@with_app(buildername='text', warning=warnfile, cleanenv=True,
-          confoverrides={'language': 'xx', 'locale_dirs': ['.'],
-                         'gettext_compact': False})
+@with_intl_app(buildername='text', warning=warnfile, cleanenv=True)
 def test_i18n_warn_for_number_of_references_inconsistency(app):
     app.builddir.rmtree(True)
-    app.builder.build(['i18n/refs_inconsistency'])
-    result = (app.outdir / 'i18n' / 'refs_inconsistency.txt').text(encoding='utf-8')
+    app.builder.build(['refs_inconsistency'])
+    result = (app.outdir / 'refs_inconsistency.txt').text(encoding='utf-8')
     expect = (u"\nI18N WITH REFS INCONSISTENCY"
               u"\n****************************\n"
               u"\n* FOR FOOTNOTE [ref2].\n"
     assert result == expect
 
     warnings = warnfile.getvalue().replace(os.sep, '/')
-    warning_fmt = u'.*/i18n/refs_inconsistency.txt:\\d+: ' \
+    warning_fmt = u'.*/refs_inconsistency.txt:\\d+: ' \
           u'WARNING: inconsistent %s in translated message\n'
     expected_warning_expr = (
         warning_fmt % 'footnote references' +
     assert re.search(expected_warning_expr, warnings)
 
 
-@with_app(buildername='html', cleanenv=True,
-          confoverrides={'language': 'xx', 'locale_dirs': ['.'],
-                         'gettext_compact': False})
+@with_intl_app(buildername='html', cleanenv=True)
 def test_i18n_link_to_undefined_reference(app):
-    app.builder.build(['i18n/refs_inconsistency'])
-    result = (app.outdir / 'i18n' / 'refs_inconsistency.html').text(encoding='utf-8')
+    app.builder.build(['refs_inconsistency'])
+    result = (app.outdir / 'refs_inconsistency.html').text(encoding='utf-8')
 
     expected_expr = """<a class="reference external" href="http://www.example.com">reference</a>"""
     assert len(re.findall(expected_expr, result)) == 2
     assert len(re.findall(expected_expr, result)) == 1
 
 
-@with_app(buildername='html', cleanenv=True,
-          confoverrides={'language': 'xx', 'locale_dirs': ['.'],
-                         'gettext_compact': False})
+@with_intl_app(buildername='html', cleanenv=True)
 def test_i18n_keep_external_links(app):
     """regression test for #1044"""
-    app.builder.build(['i18n/external_links'])
-    result = (app.outdir / 'i18n' / 'external_links.html').text(encoding='utf-8')
+    app.builder.build(['external_links'])
+    result = (app.outdir / 'external_links.html').text(encoding='utf-8')
 
     # external link check
     expect_line = u"""<li>EXTERNAL LINK TO <a class="reference external" href="http://python.org">Python</a>.</li>"""
     assert expect_line == matched_line
 
 
-@with_app(buildername='text', warning=warnfile, cleanenv=True,
-          confoverrides={'language': 'xx', 'locale_dirs': ['.'],
-                         'gettext_compact': False})
+@with_intl_app(buildername='text', warning=warnfile, cleanenv=True)
 def test_i18n_literalblock_warning(app):
     app.builddir.rmtree(True)  #for warnings acceleration
-    app.builder.build(['i18n/literalblock'])
-    result = (app.outdir / 'i18n' / 'literalblock.txt').text(encoding='utf-8')
+    app.builder.build(['literalblock'])
+    result = (app.outdir / 'literalblock.txt').text(encoding='utf-8')
     expect = (u"\nI18N WITH LITERAL BLOCK"
               u"\n***********************\n"
               u"\nCORRECT LITERAL BLOCK:\n"
     assert result.startswith(expect)
 
     warnings = warnfile.getvalue().replace(os.sep, '/')
-    expected_warning_expr = u'.*/i18n/literalblock.txt:\\d+: ' \
+    expected_warning_expr = u'.*/literalblock.txt:\\d+: ' \
             u'WARNING: Literal block expected; none found.'
     assert re.search(expected_warning_expr, warnings)
 
 
-@with_app(buildername='text',
-          confoverrides={'language': 'xx', 'locale_dirs': ['.'],
-                         'gettext_compact': False})
+@with_intl_app(buildername='text')
 def test_i18n_definition_terms(app):
     # regression test for #975
-    app.builder.build(['i18n/definition_terms'])
-    result = (app.outdir / 'i18n' / 'definition_terms.txt').text(encoding='utf-8')
+    app.builder.build(['definition_terms'])
+    result = (app.outdir / 'definition_terms.txt').text(encoding='utf-8')
     expect = (u"\nI18N WITH DEFINITION TERMS"
               u"\n**************************\n"
               u"\nSOME TERM"
     assert result == expect
 
 
-@with_app(buildername='text',
-          confoverrides={'language': 'xx', 'locale_dirs': ['.'],
-                         'gettext_compact': False})
+@with_intl_app(buildername='text')
 def test_i18n_figure_caption(app):
     # regression test for #940
-    app.builder.build(['i18n/figure_caption'])
-    result = (app.outdir / 'i18n' / 'figure_caption.txt').text(encoding='utf-8')
+    app.builder.build(['figure_caption'])
+    result = (app.outdir / 'figure_caption.txt').text(encoding='utf-8')
     expect = (u"\nI18N WITH FIGURE CAPTION"
               u"\n************************\n"
               u"\n   [image]MY CAPTION OF THE FIGURE\n"
     assert result == expect
 
 
-@with_app(buildername='html',
-          confoverrides={'language': 'xx', 'locale_dirs': ['.'],
-                         'gettext_compact': False})
+@with_intl_app(buildername='html')
 def test_i18n_index_entries(app):
     # regression test for #976
-    app.builder.build(['i18n/index_entries'])
+    app.builder.build(['index_entries'])
     result = (app.outdir / 'genindex.html').text(encoding='utf-8')
 
     def wrap(tag, keyword):
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.