mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add test refs #1265 (comment-6264794) to validate translated label link shifting.
This commit is contained in:
@@ -56,3 +56,11 @@ msgstr "X LABEL BRIDGED TARGET SECTION"
|
||||
msgid "`bridge label`_ is not translatable but linked to translated section title."
|
||||
msgstr "X `bridge label`_ IS NOT TRANSLATABLE BUT LINKED TO TRANSLATED SECTION TITLE."
|
||||
|
||||
msgid ""
|
||||
"`bridge label2`_ point to ``section and label`` and `bridge label`_ point to "
|
||||
"``label bridged target section``. The second appeared `bridge label2`_ point "
|
||||
"to correct target."
|
||||
msgstr ""
|
||||
"X `bridge label`_ POINT TO ``LABEL BRIDGED TARGET SECTION`` AND "
|
||||
"`bridge label2`_ POINT TO ``SECTION AND LABEL``. THE SECOND APPEARED "
|
||||
"`bridge label2`_ POINT TO CORRECT TARGET."
|
||||
|
||||
@@ -54,6 +54,7 @@ duplicated sub section
|
||||
|
||||
|
||||
.. _bridge label: `label bridged target section`_
|
||||
.. _bridge label2: `section and label`_
|
||||
|
||||
label bridged target section
|
||||
=============================
|
||||
@@ -62,3 +63,5 @@ label bridged target section
|
||||
|
||||
`bridge label`_ is not translatable but linked to translated section title.
|
||||
|
||||
`bridge label2`_ point to ``section and label`` and `bridge label`_ point to ``label bridged target section``. The second appeared `bridge label2`_ point to correct target.
|
||||
|
||||
|
||||
@@ -462,6 +462,15 @@ def test_i18n_label_target(app):
|
||||
'IS NOT TRANSLATABLE BUT LINKED TO TRANSLATED ' +
|
||||
'SECTION TITLE.'],
|
||||
refs=['label-bridged-target-section'])
|
||||
assert_elem(
|
||||
para3[1],
|
||||
texts=['X', 'bridge label', 'POINT TO',
|
||||
'LABEL BRIDGED TARGET SECTION', 'AND', 'bridge label2',
|
||||
'POINT TO', 'SECTION AND LABEL', '. THE SECOND APPEARED',
|
||||
'bridge label2', 'POINT TO CORRECT TARGET.'],
|
||||
refs=['label-bridged-target-section',
|
||||
'section-and-label',
|
||||
'section-and-label'])
|
||||
|
||||
|
||||
@with_intl_app(buildername='text', warning=warnfile)
|
||||
|
||||
Reference in New Issue
Block a user