bpo-28331: fix "CPython implementation detail:" label is removed when content is translated. by methane · Pull Request #195 · python/cpython (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation8 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

methane

@methane

berkerpeksag

Choose a reason for hiding this comment

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

Sorry, I'm strongly against introducing yet another hack for a pretty small use case.

@methane

@JulienPalard We (Japanese translation team) fixed this in our fork.
I think French documentation should apply same fix too.

@methane

I keep this PR open, until another "NO" from core dev.

vstinner

@methane

@berkerpeksagThis pull request changes two thing: 1. Fix "CPython implementation detail:" label disappears when it's body is translated. This must be fixed, otherwise people think it's Python's guarantee. (Imagine that "CPython implementation detail: This is the address of the object in memory." becomes "This is the address of the object in memory.") And this change make the implementation same to version(added|changed) directive in Sphinx. So I think it's proper implementation rather than hack. I strongly want to fix this in upstream. 2. Make "CPython implementation detail:" label translatable. Untranslatable label is minor problem compared to (1), and this change uses hack (dummy.html to expose label text to pot file via {% trans %} tag). If you still strong -1 about adding hack, I'll remove dummy.html. Downstream translation project can add dummy.html by themselves, without touching python source. But I feel "add this in downstream project" is also hack.

@berkerpeksag

I think matching the implementation of the imp-detail directive with the other custom directives is a good idea -- I don't have an objection to that part of the PR. However, I'm still -1 on adding a dummy HTML.

Customizing the tools of an upstream project is a very common practice in open source world. Downstream projects are doing a lot of different things with Python and this doesn't mean that all these hacks should go into upstream (we've rejected most of them in the past)

@vstinner

@methane

I saw most replies on the ML thread is positive.
And I checked this fix works on Sphinx 1.3.3 (docs.python.org uses this version) without any warnings too.

Now I think this change is safe enough to merge, and small enough to maintain.
Feel free to revert it if it cause any regression.

@methane

Since translation will be focus on latest stable release, I removed "needs backport to (2.7|3.5)" labels.
I'll backport this to 3.6 later, if no problem happened at 3.7-dev document.

methane added a commit to methane/cpython that referenced this pull request

Mar 22, 2017

@methane

akruis pushed a commit to akruis/cpython that referenced this pull request

Dec 31, 2018

…r coroutines (python#195)

Silently ignore attempts to close a running generator, coroutine or asynchronous generator. This avoids spurious error messages, if such an object is deallocated as part of a paused, restorable tasklet.

akruis pushed a commit to akruis/cpython that referenced this pull request

Jan 1, 2019

Stackless can now pickle coroutine_wrapper objects.

akruis pushed a commit to akruis/cpython that referenced this pull request

Jan 20, 2019

…r coroutines (python#195)

Silently ignore attempts to close a running generator, coroutine or asynchronous generator. This avoids spurious error messages, if such an object is deallocated as part of a paused, restorable tasklet. (cherry picked from commit 905d0ef)

pablogsal pushed a commit to pablogsal/cpython that referenced this pull request

Nov 29, 2022

@lysnikolaou

jaraco pushed a commit that referenced this pull request

Dec 2, 2022

@pyup-bot @Mariatta

Labels

docs

Documentation in the Doc dir

type-bug

An unexpected behavior, bug, or error