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

Make codeblock in tutorial translateable #131353

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

StanFromIreland
Copy link
Contributor

@StanFromIreland StanFromIreland commented Mar 17, 2025

This is otherwise untranslatable at the moment due to a bug in Sphinx which has had no development for quite a while.

#123852
sphinx-doc/sphinx#12871

It was presumably an accident as the rest of file uses literal-blocks. This is also a fairly important block in the tutorial :-)


📚 Documentation preview 📚: https://cpython-previews--131353.org.readthedocs.build/

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels Mar 17, 2025
@@ -145,7 +145,7 @@ Python can manipulate text (represented by type :class:`str`, so-called
"strings") as well as numbers. This includes characters "``!``", words
"``rabbit``", names "``Paris``", sentences "``Got your back.``", etc.
"``Yay! :)``". They can be enclosed in single quotes (``'...'``) or double
quotes (``"..."``) with the same result [#]_.
quotes (``"..."``) with the same result [#]_.::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will appear as .:. The rules are:

  • If [::] occurs as a paragraph of its own, that paragraph is completely left out of the document.
  • If it is preceded by whitespace, the marker is removed.
  • If it is preceded by non-whitespace, the marker is replaced by a single colon.

This preserves the period:

Suggested change
quotes (``"..."``) with the same result [#]_.::
quotes (``"..."``) with the same result [#]_. ::

This replaces it with a colon:

Suggested change
quotes (``"..."``) with the same result [#]_.::
quotes (``"..."``) with the same result [#]_::

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants