-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude substitution definitions from the
gettext
builder (#9846)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
- Loading branch information
1 parent
6f5a99a
commit c52d55e
Showing
13 changed files
with
222 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
exclude_patterns = ['_build'] | ||
|
||
rst_prolog = """\ | ||
.. |subst_prolog_1| replace:: prologue substitute text | ||
.. |subst_prolog_2| image:: /img.png | ||
""" | ||
|
||
rst_epilog = """\ | ||
.. |subst_epilog_1| replace:: epilogue substitute text | ||
.. |subst_epilog_2| image:: /i18n.png | ||
""" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CONTENTS | ||
======== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:numbered: | ||
:caption: Table of Contents | ||
|
||
prolog_epilog_substitution | ||
prolog_epilog_substitution_excluded |
12 changes: 12 additions & 0 deletions
12
tests/roots/test-intl_substitution_definitions/prolog_epilog_substitution.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
:tocdepth: 2 | ||
|
||
i18n with prologue and epilogue substitutions | ||
============================================= | ||
|
||
This is content that contains |subst_prolog_1|. | ||
|
||
Substituted image |subst_prolog_2| here. | ||
|
||
This is content that contains |subst_epilog_1|. | ||
|
||
Substituted image |subst_epilog_2| here. |
6 changes: 6 additions & 0 deletions
6
...oots/test-intl_substitution_definitions/prolog_epilog_substitution_excluded.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
:tocdepth: 2 | ||
|
||
i18n without prologue and epilogue substitutions | ||
================================================ | ||
|
||
This is content that does not include prologue and epilogue substitutions. |
38 changes: 38 additions & 0 deletions
38
tests/roots/test-intl_substitution_definitions/xx/LC_MESSAGES/prolog_epilog_substitution.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: sphinx tests\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2021-07-21 12:00+0800\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 prologue and epilogue substitutions" | ||
msgstr "I18N WITH PROLOGUE AND EPILOGUE SUBSTITUTIONS" | ||
|
||
msgid "This is content that contains |subst_prolog_1|." | ||
msgstr "THIS IS CONTENT THAT CONTAINS |subst_prolog_1|." | ||
|
||
msgid "Substituted image |subst_prolog_2| here." | ||
msgstr "SUBSTITUTED IMAGE |subst_prolog_2| HERE." | ||
|
||
msgid "This is content that contains |subst_epilog_1|." | ||
msgstr "THIS IS CONTENT THAT CONTAINS |subst_epilog_1|." | ||
|
||
msgid "Substituted image |subst_epilog_2| here." | ||
msgstr "SUBSTITUTED IMAGE |subst_epilog_2| HERE." | ||
|
||
msgid "subst_prolog_2" | ||
msgstr "SUBST_PROLOG_2 TRANSLATED" | ||
|
||
msgid ".. image:: /img.png" | ||
msgstr ".. image:: /i18n.png" | ||
|
||
msgid "subst_epilog_2" | ||
msgstr "SUBST_EPILOG_2 TRANSLATED" | ||
|
||
msgid ".. image:: /i18n.png" | ||
msgstr ".. image:: /img.png" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters