executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
751 stars 197 forks source link

Footnotes not rendering as expected in localized version #801

Closed thorge closed 2 months ago

thorge commented 1 year ago

What version of myst-parser are you using?

2.0.0

What version dependencies are you using?

sphinx-build (7.2.6) sphinx-rtd-theme sphinx-design sphinxcontrib-mermaid sphinxcontrib-svg2pdfconverter sphinx-intl

What operating system are you using?

Linux

Describe the Bug

I have a Sphinx documentation using myst and sphinx-intl. In the default English version of the documentation, footnotes are formatted correctly, and I'm getting properly rendered footnotes in the resulting HTML when I build the documentation.

However, I've also created a localized German version of the documentation, and while the translation seems to work fine overall, I'm encountering an issue with footnotes. In the German version, the footnotes are not being converted to the correct HTML format. Instead of seeing the formatted footnotes as in the English version, it appears that the German version is simply printing the Markdown string, like [^1], without converting it to the expected HTML footnote markup. The footnote section works fine, but the inline link is not formatted and linked correctly.

/docs/source/test.md:1: WARNING: inconsistent footnote references in translated message. original: ['[^1]'], translated: []                                                                                                                   

test

The .po files look fine, e.g.:

#: ../test.md:1
msgid ""
"Test[^1]"
msgstr ""
"Test[^1]"

Expected Behavior

I expect that when I build the German version of the documentation, the footnotes should be processed and rendered in the same way as they are in the original English version. Other markdown features also work without interfering with the locales.

To Reproduce

No response

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

j123b567 commented 5 months ago

Probably duplicate of #445

chrisjsewell commented 5 months ago

Probably duplicate of #445

Doesn't matter, it's fixed in #931 anyway 😉