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
Recently, I attempted to generate the conf.py file for a Jupyter Book project using jupyter-book, and then used sphinx-build with the gettext builder to create .pot files. Initially, I thought there were no errors. However, when I executed the msgcat command to process the generated .pot files, some of them showed errors like the following:
(/home/hwhsu1231/Repo/testing/jupyter-book/.venv) hwhsu1231@vb-kubuntu:~/Repo/testing/jupyter-book/docs$ msgcat --lang=zh_TW --width=79 --output-file=locale/zh_TW/advanced/index.po locale/pot/advanced/index.pot
locale/pot/advanced/index.pot:20: duplicate message definition...
locale/pot/advanced/index.pot:8: ...this is the location of the first definition
msgcat: found 1 fatal error
After opening locale/pot/advanced/index.pot file, we can see that there are indeed two entries with the same location, #: ../../advanced/index.md:1:
Click to expand the output
(/home/hwhsu1231/Repo/testing/jupyter-book/.venv) hwhsu1231@vb-kubuntu:~/Repo/testing/jupyter-book/docs$ cat locale/pot/advanced/index.pot
# SOME DESCRIPTIVE TITLE.# Copyright (C) 2023# This file is distributed under the same license as the Project name not set package.# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.##, fuzzy
msgid ""
msgstr """Project-Id-Version: Project name not set \n""Report-Msgid-Bugs-To: \n""POT-Creation-Date: 2024-12-06 11:00+0800\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <[email protected]>\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#: ../../advanced/index.md:1
msgid ""
msgstr ""#: ../../advanced/index.md:1
msgid "Advanced Jupyter Book Usage"
msgstr ""#: ../../advanced/index.md:3
msgid "These sections cover a few ways to customize and configure Jupyter Book that require extra knowledge about the Sphinx ecosystem, more challenging workflows, etc."
msgstr ""
I believe this should be a bug because, so far, I have tested many Sphinx-based documents, and their .pot files generated using the 'gettext' builder have never had this issue.
However, I am not sure which tool this bug belongs to: Sphinx? MyST-Parser? Jupyter-Book? Gettext?
Therefore, I decided to report this issue to the Sphinx team first, hoping they can check whether it is a bug in Sphinx.
The text was updated successfully, but these errors were encountered:
Describe the bug
Recently, I attempted to generate the
conf.py
file for a Jupyter Book project usingjupyter-book
, and then usedsphinx-build
with the gettext builder to create.pot
files. Initially, I thought there were no errors. However, when I executed themsgcat
command to process the generated.pot
files, some of them showed errors like the following:(/home/hwhsu1231/Repo/testing/jupyter-book/.venv) hwhsu1231@vb-kubuntu:~/Repo/testing/jupyter-book/docs$ msgcat --lang=zh_TW --width=79 --output-file=locale/zh_TW/advanced/index.po locale/pot/advanced/index.pot locale/pot/advanced/index.pot:20: duplicate message definition... locale/pot/advanced/index.pot:8: ...this is the location of the first definition msgcat: found 1 fatal error
After opening
locale/pot/advanced/index.pot
file, we can see that there are indeed two entries with the same location,#: ../../advanced/index.md:1
:Click to expand the output
How to Reproduce
Run the following commands in order:
log-jupyter-book-sphinx-build-msgcat.txt
Environment Information
Sphinx extensions
No response
Additional context
I believe this should be a bug because, so far, I have tested many Sphinx-based documents, and their
.pot
files generated using the 'gettext' builder have never had this issue.However, I am not sure which tool this bug belongs to: Sphinx? MyST-Parser? Jupyter-Book? Gettext?
Therefore, I decided to report this issue to the Sphinx team first, hoping they can check whether it is a bug in Sphinx.
The text was updated successfully, but these errors were encountered: