Issue 28331: "CPython implementation detail:" removed when content translated (original) (raw)

Created on 2016-10-01 13:29 by methane, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
impl-detail.patch methane,2016-10-01 13:29 review
impl-detail2.patch methane,2016-10-05 07:50 review
Pull Requests
URL Status Linked Edit
PR 195 merged methane,2017-02-20 11:20
PR 769 merged methane,2017-03-22 11:58
Messages (8)
msg277817 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-01 13:29
"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.
msg278106 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-10-05 06:43
Does Sphinx use a dummy HTML file like you did in the patch?
msg278107 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-05 06:50
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
msg278108 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-10-05 07:01
I couldn't find any dummy HTML in the Sphinx codebase. Wouldn't something like work without a dummy HTML? from sphinx.locale import versionlabels, l_ versionlabels['cpythonimpldetail'] = l_('CPython implementation detail') Then use it in ImplementationDetail.run() method like https://github.com/sphinx-doc/sphinx/blob/master/sphinx/directives/other.py#L204
msg278111 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2016-10-05 07:14
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 gettext` doesn't extract messages from Python code. That's why I used dummy html template. Another way is adding custom make target, which runs `sphinx-build -b gettext` and custom command to generate another pot from pyspecific extension.
msg278272 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-10-07 21:47
I abbreviated title to make most of it visible in listings.
msg290098 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2017-03-24 16:34
New changeset 906118d8c68160ed4a3d15cec803d1ee57836517 by INADA Naoki in branch '3.6': bpo-28331: fix impl-detail label is removed when content is translated. (GH-769) https://github.com/python/cpython/commit/906118d8c68160ed4a3d15cec803d1ee57836517
msg290266 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2017-03-24 22:41
New changeset c351ce6a2c923c5016e48ecbf7b1e4833031d154 by INADA Naoki in branch 'master': bpo-28331: fix impl-detail label is removed when content is translated. (GH-195) https://github.com/python/cpython/commit/c351ce6a2c923c5016e48ecbf7b1e4833031d154
History
Date User Action Args
2022-04-11 14:58:37 admin set github: 72518
2017-03-24 22:41:36 methane set messages: +
2017-03-24 16:34:10 methane set messages: +
2017-03-22 12:10:05 methane set status: open -> closedstage: patch review -> resolvedresolution: fixedversions: - Python 2.7, Python 3.5
2017-03-22 11:58:04 methane set pull_requests: + <pull%5Frequest676>
2017-02-20 11:20:06 methane set pull_requests: + <pull%5Frequest162>
2016-12-12 03:03:28 methane link issue26546 dependencies
2016-12-08 10:45:30 methane set nosy: + JulienPalard, Julien.Palard
2016-10-07 21:47:44 terry.reedy set nosy: + terry.reedymessages: + title: "CPython implementation detail:" is removed when contents is translated -> "CPython implementation detail:" removed when content translated
2016-10-05 07:50:38 methane set files: + impl-detail2.patch
2016-10-05 07:14:34 methane set messages: +
2016-10-05 07:01:26 berker.peksag set messages: +
2016-10-05 06:50:42 methane set messages: +
2016-10-05 06:43:11 berker.peksag set nosy: + berker.peksagmessages: +
2016-10-01 17:21:28 ned.deily set nosy: + georg.brandl
2016-10-01 13:29:12 methane create