executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx

Home Page:https://myst-parser.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Message "inconsistent footnote references in translated message...."

BravoBaldo opened this issue · comments

What version of myst-parser are you using?

2.0.0

What version dependencies are you using?

Docutils 0.19, Python 3.11.1, on win32
sphinx-7.2.6

What operating system are you using?

Windows

Describe the Bug

In translated documents footnotes does not reprouced and this error appears:
WARNING: inconsistent footnote references in translated message. original: ['[^anothernote]'], translated: []

Sample.md

Expected Behavior

footnotes must be displayed in translated documents too!

To Reproduce

Steps:

Setup a fresh document

mkdir test_02 & cd test_02
sphinx-quickstart --sep -p TestBug -a BravoBaldo -r "0" -l "en" --extensions "myst_parser"
echo locale_dirs = ['locale/']            >> source\conf.py
Create and include a simple file called "Sample.md" with some footnotes (see attached Sample.md).

make singlehtml
Result: all ok.

Internationalization:

cls & make clean & make gettext
sphinx-intl update -p build/gettext -l en -l it

make clean & sphinx-build -b singlehtml -D language=it ./source build/singlehtml/it

Result: Still ok.

Translate "source\locale\it\LC_MESSAGES\Sample.po" (is enough a little change)

Note: this means to fill a "msgstr" with a translation of matching "msgid" for example:
msgid "Here's a simple footnote,[^1] and here's a longer one.[^bignote]"
msgstr "XXXHere's a simple footnote,[^1] and here's a longer one.[^bignote]"
(simply add "XXX")
(Strangely, if the text is the same the bug does not occur!!)

make clean & sphinx-build -b singlehtml -D language=it ./source build/singlehtml/it

This error appears for each note:
WARNING: inconsistent footnote references in translated message. original: ['[^anothernote]'], translated: []
and the footnote(s) are not displayed

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

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! 🎉