You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
python -m virtualenv .venv
. .venv/bin/activate
pip install sphinx==7.1.2
sphinx-quickstart --sep -p test -a test -v test -r test -l en
echo'1. Hello world=============='> source/index.rst
mkdir -p source/locales/fr/LC_MESSAGES
echo'#: ../../source/index.rst:1msgid "1. Hello world"msgstr "1. Bonjour monde"'> source/locales/fr/LC_MESSAGES/index.po
make html O='-Dlanguage=fr -v'
sed -n '32,36p' build/html/index.html
Which outputs:
<sectionid="hello-world"><h1>1. Bonjour monde<aclass="headerlink" href="#hello-world" title="Lien permanent vers cette rubrique">¶</a></h1></section>
Expected Behavior
The headings should be translated.
To Reproduce
Here is a diff for the tests that shows this issue:
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
The text was updated successfully, but these errors were encountered:
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:
And here is pytest's output with this patch applied:
The text was updated successfully, but these errors were encountered: