Open n-peugnet opened 7 months ago
And here is pytest's output with this patch applied:
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-nicolas/pytest-44/test_gettext_html0/test_sphinx_builds/test_gettext_html.xml
E /tmp/pytest-of-nicolas/pytest-44/test_gettext_html0/test_sphinx_builds/test_gettext_html.obtained.xml
E HTML DIFF: /tmp/pytest-of-nicolas/pytest-44/test_gettext_html0/test_sphinx_builds/test_gettext_html.obtained.diff.html
E ---
E +++
E @@ -91,6 +91,6 @@
E <image alt="Poisson amusant 2" candidates="{'*': 'fun-fish.png'}" uri="fun-fish.png">
E <figure>
E <image alt="Poisson amusant 3" candidates="{'*': 'fun-fish.png'}" uri="fun-fish.png">
E - <section ids="numbered-title" names="1.\ numbered\ title 1.\ titre\ numéroté">
E + <section ids="numbered-title" names="1.\ numbered\ title">
E <title>
E - 1. titre numéroté
E + 1. numbered title
tests/test_sphinx/conftest.py:135: AssertionError
After a debugging session, it seems to be again, somewhat related to https://github.com/sphinx-doc/sphinx/issues/8852
What version of
myst-parser
are you using?v2.0.0-18-g330e96a
What version dependencies are you using?
What operating system are you using?
Linux
Describe the Bug
When a heading is manually numbered: starts with a number followed by a dot then a space, it is not translated in the Sphinx output. While the following works as expected in rST:
Which outputs:
Expected Behavior
The headings should be translated.
To Reproduce
Here is a diff for the tests that shows this issue:
+ +## 1. numbered title diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext.pot b/tests/test_sphinx/test_sphinx_builds/test_gettext.pot index 933b8b6..4d8b7d2 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext.pot +++ b/tests/test_sphinx/test_sphinx_builds/test_gettext.pot @@ -79,3 +79,7 @@ msgstr ""
: ../../index.md:61
msgid "Fun Fish 3" msgstr "" + +#: ../../index.md:65 +msgid "1. numbered title" +msgstr "" diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.pot b/tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.pot index 11c51d4..7cb2f53 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.pot +++ b/tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.pot @@ -127,3 +127,7 @@ msgstr ""
: ../../index.md:61
msgid "Fun Fish 3" msgstr "" + +#: ../../index.md:65 +msgid "1. numbered title" +msgstr "" diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.html b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.html index 469e188..0db99d0 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.html +++ b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.html @@ -156,6 +156,14 @@