-
Notifications
You must be signed in to change notification settings - Fork 220
Description
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: []
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