summaryrefslogtreecommitdiff
path: root/tests/roots
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2014-03-23 23:01:15 +0900
committershimizukawa <shimizukawa@gmail.com>2014-03-23 23:01:15 +0900
commitd9d7fb8957db080ef4da9c278c18801cac4bbf29 (patch)
tree34b49fa5094eddf694584e7c9c0ab5a32d11bf1d /tests/roots
parent27f359a1a3e20f00229644a7a76553d1887ae1bd (diff)
downloadsphinx-d9d7fb8957db080ef4da9c278c18801cac4bbf29.tar.gz
Fix i18n: missing python domain's cross-references with currentmodule directive or currentclass directive. refs #1363
* node attributes 'py:module', 'py:class' is provided from environment (e.x. currentmodule directive is provided on previous line, not on node) * Because translation nodes are parsed in independently, 'provided attributes by environment' are not exist. * For a pending_xref nodes, all attributes of a translated xref node should be same as original xref node in current test cases. * For the above reasons, I overwrite all attributes from origonal node to new translated xref node.
Diffstat (limited to 'tests/roots')
-rw-r--r--tests/roots/test-intl/refs_python_domain.po25
-rw-r--r--tests/roots/test-intl/refs_python_domain.txt15
2 files changed, 40 insertions, 0 deletions
diff --git a/tests/roots/test-intl/refs_python_domain.po b/tests/roots/test-intl/refs_python_domain.po
new file mode 100644
index 00000000..bed87c4c
--- /dev/null
+++ b/tests/roots/test-intl/refs_python_domain.po
@@ -0,0 +1,25 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: issue1363 1363\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-03-16 19:34+0900\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"
+
+#: ..\..\index.rst:4
+msgid "i18n with python domain refs"
+msgstr "I18N WITH PYTHON DOMAIN REFS"
+
+#: ..\..\index.rst:8
+msgid "See this decorator: :func:`sensitive_variables`."
+msgstr "SEE THIS DECORATOR: :func:`sensitive_variables`."
+
+#: ..\..\index.rst:12
+msgid "Some description"
+msgstr "SOME DESCRIPTION"
+
diff --git a/tests/roots/test-intl/refs_python_domain.txt b/tests/roots/test-intl/refs_python_domain.txt
new file mode 100644
index 00000000..20a8bc50
--- /dev/null
+++ b/tests/roots/test-intl/refs_python_domain.txt
@@ -0,0 +1,15 @@
+:tocdepth: 2
+
+i18n with python domain refs
+=============================
+
+.. currentmodule:: sensitive
+
+See this decorator: :func:`sensitive_variables`.
+
+.. function:: sensitive_variables(*variables)
+
+ Some description
+
+.. currentmodule:: reporting
+