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
{{ message }}
Repository navigation
Unable to translate parsed-literal block from using/mac.rst #135828
Two literal blocks from using/mac.rst's Installing using the command line section preceded by a parsed-literal directive can't be translated without having the Sphinx build triggering:
Lexing literal_block '<the whole block text in here>' as "python3" resulted in an error at token: '$'. Retrying in relaxed mode. [misc.highlighting_failure]
If I leave the translation empty or simply copy-and-paste the original string, this issue doesn't happen. Any other translation fails. For instance, translating a comment line like "download installer pkg" to "baixa o pkg do instalar" will fail.
Also, I noticed that the translated documentation has syntax highlight (colors and everthing) and a red rectangle around the $ signs, while the original documentation has no syntax highlight at all.
See screenshots taken just now of the published Brazilian Portuguese translation and the original:
But from the diff I can find no concrete reason why, except possibly not escaping \\ |version|\\ :
"# download installer pkg\n" | "# baixa o pkg instalador\n"
"curl -O \\https://www.python.org/ftp/python/\\ |version|\\ .0/${RELEASE}\n" "curl -O \\https://www.python.org/ftp/python/\\ |version|\\ .0/${RELEASE}\n"
"\n" "\n"
"# create installer choicechanges to customize the install:\n" | "# cria choicechanges instalador para personalizar a instalação:\n"
"# enable the PythonTFramework-\\ |version|\\ package\n" | "# habilita o pacote PythonTFramework-\\ |version|\n"
"# while accepting the other defaults (install all other packages)\n" | "# enquanto aceita outros padrões (instala todos os outros pacotes)\n"
I propose we remove all parsed literals, they seem to not add anything and there are only a few:
Activity
LamentXU123 commentedon Jun 23, 2025
Well I think its more like a Sphinx issue. CC @picnixz
StanFromIreland commentedon Jun 23, 2025
This seems related to this old Sphinx issue: sphinx-doc/sphinx#2167
But from the diff I can find no concrete reason why, except possibly not escaping
\\ |version|\\:"# download installer pkg\n" | "# baixa o pkg instalador\n" "curl -O \\https://www.python.org/ftp/python/\\ |version|\\ .0/${RELEASE}\n" "curl -O \\https://www.python.org/ftp/python/\\ |version|\\ .0/${RELEASE}\n" "\n" "\n" "# create installer choicechanges to customize the install:\n" | "# cria choicechanges instalador para personalizar a instalação:\n" "# enable the PythonTFramework-\\ |version|\\ package\n" | "# habilita o pacote PythonTFramework-\\ |version|\n" "# while accepting the other defaults (install all other packages)\n" | "# enquanto aceita outros padrões (instala todos os outros pacotes)\n"I propose we remove all parsed literals, they seem to not add anything and there are only a few:
ned-deily commentedon Jun 26, 2025
FWIW, the use of
parsed-literalwas recently added toDoc/using/mac.rstreplacingcode-block's. The discussion of why this was done is in #130400.Taeknology commentedon Jul 29, 2026
PR #150074 proposes a fix for this issue and has been awaiting review since May. All checks are passing. Could someone take a look when available?
gh-135828: Disable syntax highlighting in Using Python on macOS (#150074
[3.14] gh-135828: Disable syntax highlighting in Using Python on macOS (
[3.13] gh-135828: Disable syntax highlighting in Using Python on macOS (
[3.15] gh-135828: Disable syntax highlighting in Using Python on macOS (
pythongh-135828: Disable syntax highlighting in Using Python on macOS (…