Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BravoBaldo opened this issue Mar 7, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@BravoBaldo
Copy link

BravoBaldo commented Mar 7, 2024

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

@BravoBaldo BravoBaldo added the bug Something isn't working label Mar 7, 2024
Copy link

welcome bot commented Mar 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant