classification
Title: Move licences to literal blocks
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: brett.cannon, docs@python, ezio.melotti, georg.brandl, mdk, ned.deily, python-dev, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2016-01-13 23:16 by mdk, last changed 2016-01-21 08:21 by vstinner. This issue is now closed.

Files
File name Uploaded Description Edit
literal-licence.patch mdk, 2016-01-13 23:16 Patch to move licence text to literal blocks (as we won't translate them). review
literal-licence.patch mdk, 2016-01-17 16:35 review
Messages (10)
msg258180 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2016-01-13 23:16
In the context of translating the documentation:

I'd like to move the licence texts in https://docs.python.org/3.5/license.html to literal blocks, so they won't pollute the po files with legal (untranslatable) stuff, and it's visually more appealing (as far as it's possible for a licence text).

Here is what it gives graphically when applying the patch (it's the translation, don't mind the french text): http://www.afpy.org/doc/python/3.5/license.html

I also took the liberty to drop a dangling "ACCEPT", while reformating centered "titles" to real titles and building paragraphs from licence text, hope it wasn't legal stuff / part of the licence (a line before the licence mention an "accept" button ...).
msg258182 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2016-01-13 23:28
Sounds like a reasonable request to me.
Given the content of document, special care should be taken in reviewing the patch and making sure that nothing has gone missing.
msg258188 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-01-14 08:48
Does the |release| substitution work in literal blocks?
msg258192 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2016-01-14 09:36
@Serhiy Well spotted, it does not work (as we can see here http://www.afpy.org/doc/python/3.5/license.html).

Anyone having a better background than me in ReStructuredText have an idea ?

About the review of the patch, as a human review may be fastidious, here a script to check that I did NOT modified the content of the licences themselves (still need to trust the command, but it's faster to review than the whole licence text itself):

    diff -w <(grep '^-' literal-licence.patch | cut -b2-) <(grep '^+' literal-licence.patch | cut -b2- | sed 's/\(^ *\)[0-8]\./\1#./g')
msg258193 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2016-01-14 09:45
Since the text does need no highlighting, a parsed-literal block should work.
msg258474 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2016-01-17 16:35
@georg.brandl is right, a parsed-literal block should work: Does not appear in pot files, and |release| replaced: nice.

I attached a new patch.
msg258484 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2016-01-17 21:38
And uploaded the result: http://www.afpy.org/doc/python/3.5/license.html
msg258738 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-01-21 07:58
New changeset a04d9589e2c4 by Victor Stinner in branch '3.5':
Issue #26106: doc: Move text of licenses to parsed literal block
https://hg.python.org/cpython/rev/a04d9589e2c4
msg258740 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-01-21 08:04
New changeset f2a0a4a45292 by Victor Stinner in branch '2.7':
Issue #26106: doc: Move text of licenses to parsed literal block
https://hg.python.org/cpython/rev/f2a0a4a45292
msg258742 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-01-21 08:08
Thanks for your effort of translation the doc.

FYI the doc can be read at http://www.afpy.org/doc/python/ and the project (source) is at https://github.com/AFPY/python_doc_fr/
History
Date User Action Args
2016-01-21 08:21:29vstinnersetstatus: open -> closed
resolution: fixed
2016-01-21 08:08:58vstinnersetnosy: + vstinner
messages: + msg258742
2016-01-21 08:05:00python-devsetmessages: + msg258740
2016-01-21 07:58:55python-devsetnosy: + python-dev
messages: + msg258738
2016-01-17 21:38:21mdksetmessages: + msg258484
2016-01-17 16:35:45mdksetfiles: + literal-licence.patch

messages: + msg258474
2016-01-14 09:45:02georg.brandlsetmessages: + msg258193
2016-01-14 09:36:41mdksetmessages: + msg258192
2016-01-14 08:48:15serhiy.storchakasetnosy: + ned.deily, serhiy.storchaka, georg.brandl, brett.cannon
messages: + msg258188
2016-01-13 23:28:27ezio.melottisetnosy: + ezio.melotti
messages: + msg258182

type: enhancement
stage: patch review
2016-01-13 23:16:27mdkcreate