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
"CPython implementation detail:" removed when content translated #72518
"CPython implementation detail:" label is removed when contents of impl-detail directive is translated.
This is very bad for people reading translated documents.
Attached patch fixes this, with enabling translating the label, like versionchanged directive.
changed the title [-]"CPython implementation detail:" is removed when contents is translated[/-][+]"CPython implementation detail:" removed when content translated[/+]on Oct 7, 2016
Activity
methane commentedon Oct 1, 2016
"CPython implementation detail:" label is removed when contents of impl-detail directive is translated.
This is very bad for people reading translated documents.
Attached patch fixes this, with enabling translating the label, like versionchanged directive.
berkerpeksag commentedon Oct 5, 2016
Does Sphinx use a dummy HTML file like you did in the patch?
methane commentedon Oct 5, 2016
Yes. Actually speaking, this patch is almost copy from VersionChanged directive.
See here:
https://github.com/sphinx-doc/sphinx/blob/master/sphinx/directives/other.py#L216-L221
berkerpeksag commentedon Oct 5, 2016
I couldn't find any dummy HTML in the Sphinx codebase.
Wouldn't something like work without a dummy HTML?
Then use it in ImplementationDetail.run() method like https://github.com/sphinx-doc/sphinx/blob/master/sphinx/directives/other.py#L204
methane commentedon Oct 5, 2016
Ah, I misunderstood your comment is about Sphinx's internal DOM.
Sphinx has own pot and po files.
In case of custom extension,
sphinx-build -b gettextdoesn't extractmessages from Python code. That's why I used dummy html template.
Another way is adding custom make target, which runs
sphinx-build -b gettextand custom command to generate another pot from pyspecific extension.
terryjreedy commentedon Oct 7, 2016
I abbreviated title to make most of it visible in listings.
[-]"CPython implementation detail:" is removed when contents is translated[/-][+]"CPython implementation detail:" removed when content translated[/+]methane commentedon Mar 24, 2017
New changeset 906118d by INADA Naoki in branch '3.6':
bpo-28331: fix impl-detail label is removed when content is translated. (GH-769)
906118d
methane commentedon Mar 24, 2017
New changeset c351ce6 by INADA Naoki in branch 'master':
bpo-28331: fix impl-detail label is removed when content is translated. (GH-195)
c351ce6