Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c5d7df

Browse files
authored
Merge pull request #1 from python/3.7
test
2 parents f2bbcd3 + 1dafe17 commit 2c5d7df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+12386
-6727
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ install:
77
- pip install pospell
88
- pospell --version
99
script:
10-
- pospell -p dict -l fr **/*.po
11-
- make CPYTHON_CLONE=/tmp/cpython/ BRANCH=3.7
10+
- pospell -p dict -l fr_FR **/*.po
11+
- make CPYTHON_CLONE=/tmp/cpython/ COMMIT=d4ed8809dd

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,23 @@ VENV := ~/.venvs/python-docs-i18n/
2020
PYTHON := $(shell which python3)
2121
MODE := autobuild-dev-html
2222
BRANCH = 3.7
23-
JOBS = 4
23+
COMMIT =
24+
JOBS = auto
2425

2526

2627
.PHONY: all
2728
all: $(SPHINX_CONF) $(VENV)/bin/activate
2829
ifneq "$(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD)" "$(BRANCH)"
29-
$(warning "Your ../cpython checkout is on the wrong branch, got $(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD) expected $(BRANCH)")
30+
$(warning "Your ../cpython checkout may be on the wrong branch, got $(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD) expected $(BRANCH)")
3031
endif
3132
mkdir -p $(CPYTHON_CLONE)/locales/$(LANGUAGE)/
3233
ln -nfs $(shell $(PYTHON) -c 'import os; print(os.path.realpath("."))') $(CPYTHON_CLONE)/locales/$(LANGUAGE)/LC_MESSAGES
3334
$(MAKE) -C $(CPYTHON_CLONE)/Doc/ VENVDIR=$(VENV) PYTHON=$(PYTHON) SPHINXOPTS='-qaEW -j$(JOBS) -D locale_dirs=../locales -D language=$(LANGUAGE) -D gettext_compact=0 -D latex_engine=xelatex -D latex_elements.inputenc= -D latex_elements.fontenc=' $(MODE)
3435

3536

3637
$(SPHINX_CONF):
37-
git clone --depth 1 --no-single-branch --branch $(BRANCH) https://github.com/python/cpython.git $(CPYTHON_CLONE)
38+
git clone --depth 1 --branch $(BRANCH) https://github.com/python/cpython.git $(CPYTHON_CLONE)
39+
[ -n "$(COMMIT)" ] && (i=1; while ! $$(git -C $(CPYTHON_CLONE) checkout $(COMMIT)); do i=$$((i * 2)); git -C $(CPYTHON_CLONE) fetch --depth $$i; done) || true
3840

3941

4042
.PHONY: upgrade_venv

README.rst

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ French Translation of the Python Documentation
44
.. image:: https://travis-ci.org/python/python-docs-fr.svg?branch=3.7
55
:target: https://travis-ci.org/python/python-docs-fr
66

7-
**Translated: 31%**
7+
**Translated: 33%**
88

99
Documentation Contribution Agreement
1010
------------------------------------
@@ -74,6 +74,11 @@ Step by step:
7474
# Add the upstream (the public repository) using HTTPS (won't ask for password):
7575
git remote add upstream https://github.com/python/python-docs-fr.git
7676
77+
All the translations must be made on the latest release.
78+
We never translate on an oldest version, by example, the latest python release
79+
is python 3.7, we don't want to translate directly on the python 3.5 release.
80+
If needed translations would be backported on the oldest versions by the
81+
`documentation team <https://www.python.org/dev/peps/pep-8015/#documentation-team>`.
7782

7883
Now you're ready to start a work session, each time you'll start a new task, start here:
7984

@@ -88,22 +93,6 @@ Now you're ready to start a work session, each time you'll start a new task, sta
8893
# You can now work on the file, typically using poedit,
8994
poedit directory/file.po
9095
91-
# After writing your changes to disk, check for correctness:
92-
make
93-
94-
# Sphinx will tell you if there is any syntax error in the files
95-
# you modified. Note that in the French Translation, we try to keep Sphinx
96-
# warnings to zero.
97-
98-
# you may want to check if there are semantic errors.
99-
# Open the translated file in your browser to check how it renders.
100-
# Don't forget to verify the typography. The French conventions are not
101-
# the English ones, especially for punctuation.
102-
# Also, Grammalecte, a browser plugin avaliable in your browser store,
103-
# is your friend even if, because of the technical words that appear
104-
# everywhere in the documentation, it points out many false positive.
105-
exo-open ../cpython/Doc/build/html/directory/file.html
106-
10796
# When everything is clear (syntax errors from Sphinx, html rendering,
10897
# semantics, typography),
10998
# you can commit your work with a nice explicit message:
@@ -116,7 +105,8 @@ Now you're ready to start a work session, each time you'll start a new task, sta
116105
# it's nice as it's exactly what we want:
117106
git push origin HEAD
118107
119-
# Now you can open the pull request on github, just go to
108+
# The previous command will print you a link to open a PR on github.
109+
# If you missed it, just go to
120110
# https://github.com/python/python-docs-fr/ and a nice "Compare & pull request"
121111
# button should appear after a few seconds telling you can ask for a pull request.
122112
@@ -143,7 +133,7 @@ You may also have noted you never ever commit on a version branch
143133
you'll avoid problems.
144134

145135
Before commiting, you should use `grammalecte
146-
<https://www.dicollecte.org/>`_ to check for your translations.
136+
<https://grammalecte.net/>`_ to check for your translations.
147137

148138

149139
What to translate
@@ -166,6 +156,31 @@ translate untranslated ones (find them using ``make todo``)..
166156
title.
167157

168158

159+
The case of "::"
160+
~~~~~~~~~~~~~~~~
161+
162+
From the reStructuredText point of view, ``::`` glued at the end of a
163+
word means "output ``:`` and introduce a code block", but a ``::``
164+
after a space means "Just introduce a code block".
165+
166+
So in english rst, we see either ``blah blah::`` or ``blah blah. ::``.
167+
168+
In french, we're putting a no-break space before our columns, like:
169+
``Et voilà :``.
170+
171+
Using no-break space in rst is natural, you'll simply write ``Et
172+
voilà ::``, as the ``::`` is not precedded by a normal space it
173+
will output the column and introduce the code block, you're done.
174+
175+
If you don't know how to type a no-break space there's a trick,
176+
translate column column by space, column, space, column column. the
177+
"space column" will render your space and your column as french needs,
178+
and the trailing "space column column" will output nothing and
179+
introduce the code block. No it does not magically inserts a no-break
180+
space, so it's still not really valid french. Yes, better learn how to
181+
type no-break space.
182+
183+
169184
Where to get help
170185
~~~~~~~~~~~~~~~~~
171186

@@ -239,6 +254,7 @@ simple quote guillemet simple, apostrophe (apostrophe
239254
is to glue, guillemet is to surround)
240255
socket *socket*
241256
statement instruction
257+
subprocess sous-processus
242258
thread fil d'exécution
243259
underscore tiret bas, *underscore*
244260
expression expression
@@ -285,7 +301,7 @@ Maintenance
285301
286302
All those snippets are to run from the root of a ``python-docs-fr``
287303
clone, and some expect to find an up-to-date CPython clone near to it,
288-
like::
304+
like:
289305
290306
.. code-block:: bash
291307
@@ -330,7 +346,7 @@ Run a test build locally
330346
Synchronize translation with Transifex
331347
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
332348
333-
You'll need the ``transifex-client`` and ``poindent``
349+
You'll need the ``transifex-client`` and ``powrap``
334350
from Pypi.
335351
336352
You'll need to configure ``tx`` via ``tx init`` if not already done.
@@ -343,6 +359,6 @@ You'll need to configure ``tx`` via ``tx init`` if not already done.
343359
pomerge --from-files **/*.po
344360
git checkout -- .
345361
pomerge --to-files **/*.po
346-
poindent --modified
362+
powrap --modified
347363
git commit -m "tx pull"
348364
tx push -t -f

c-api/arg.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ msgstr ""
779779

780780
#: ../Doc/c-api/arg.rst:391
781781
msgid "``$``"
782-
msgstr ""
782+
msgstr "``$``"
783783

784784
#: ../Doc/c-api/arg.rst:385
785785
msgid ""

c-api/bytes.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ msgstr ""
121121

122122
#: ../Doc/c-api/bytes.rst:78
123123
msgid "unsigned int"
124-
msgstr "unsigned int"
124+
msgstr "``unsigned int``"
125125

126126
#: ../Doc/c-api/bytes.rst:78
127127
msgid "Equivalent to ``printf(\"%u\")``. [1]_"
@@ -145,7 +145,7 @@ msgstr ""
145145

146146
#: ../Doc/c-api/bytes.rst:84
147147
msgid "unsigned long"
148-
msgstr "unsigned long"
148+
msgstr "``unsigned long``"
149149

150150
#: ../Doc/c-api/bytes.rst:84
151151
msgid "Equivalent to ``printf(\"%lu\")``. [1]_"

c-api/contextvars.po

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ msgid ""
55
msgstr ""
66
"Project-Id-Version: Python 3.7\n"
77
"Report-Msgid-Bugs-To: \n"
8-
"POT-Creation-Date: 2018-06-28 15:29+0200\n"
8+
"POT-Creation-Date: 2018-10-12 18:59+0200\n"
99
"PO-Revision-Date: 2018-08-03 23:47+0200\n"
1010
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1111
"Language-Team: FRENCH <[email protected]>\n"
@@ -18,148 +18,159 @@ msgstr ""
1818
msgid "Context Variables Objects"
1919
msgstr ""
2020

21-
#: ../Doc/c-api/contextvars.rst:10
21+
#: ../Doc/c-api/contextvars.rst:13
22+
msgid ""
23+
"In Python 3.7.1 the signatures of all context variables C APIs were "
24+
"**changed** to use :c:type:`PyObject` pointers instead of :c:type:"
25+
"`PyContext`, :c:type:`PyContextVar`, and :c:type:`PyContextToken`, e.g.::"
26+
msgstr ""
27+
28+
#: ../Doc/c-api/contextvars.rst:24
29+
msgid "See :issue:`34762` for more details."
30+
msgstr ""
31+
32+
#: ../Doc/c-api/contextvars.rst:29
2233
msgid ""
2334
"This section details the public C API for the :mod:`contextvars` module."
2435
msgstr ""
2536

26-
#: ../Doc/c-api/contextvars.rst:14
37+
#: ../Doc/c-api/contextvars.rst:33
2738
msgid ""
2839
"The C structure used to represent a :class:`contextvars.Context` object."
2940
msgstr ""
3041

31-
#: ../Doc/c-api/contextvars.rst:19
42+
#: ../Doc/c-api/contextvars.rst:38
3243
msgid ""
3344
"The C structure used to represent a :class:`contextvars.ContextVar` object."
3445
msgstr ""
3546

36-
#: ../Doc/c-api/contextvars.rst:24
47+
#: ../Doc/c-api/contextvars.rst:43
3748
msgid "The C structure used to represent a :class:`contextvars.Token` object."
3849
msgstr ""
3950

40-
#: ../Doc/c-api/contextvars.rst:28
51+
#: ../Doc/c-api/contextvars.rst:47
4152
msgid "The type object representing the *context* type."
4253
msgstr ""
4354

44-
#: ../Doc/c-api/contextvars.rst:32
55+
#: ../Doc/c-api/contextvars.rst:51
4556
msgid "The type object representing the *context variable* type."
4657
msgstr ""
4758

48-
#: ../Doc/c-api/contextvars.rst:36
59+
#: ../Doc/c-api/contextvars.rst:55
4960
msgid "The type object representing the *context variable token* type."
5061
msgstr ""
5162

52-
#: ../Doc/c-api/contextvars.rst:39
63+
#: ../Doc/c-api/contextvars.rst:58
5364
msgid "Type-check macros:"
5465
msgstr ""
5566

56-
#: ../Doc/c-api/contextvars.rst:43
67+
#: ../Doc/c-api/contextvars.rst:62
5768
msgid ""
5869
"Return true if *o* is of type :c:data:`PyContext_Type`. *o* must not be "
5970
"*NULL*. This function always succeeds."
6071
msgstr ""
6172

62-
#: ../Doc/c-api/contextvars.rst:48
73+
#: ../Doc/c-api/contextvars.rst:67
6374
msgid ""
6475
"Return true if *o* is of type :c:data:`PyContextVar_Type`. *o* must not be "
6576
"*NULL*. This function always succeeds."
6677
msgstr ""
6778

68-
#: ../Doc/c-api/contextvars.rst:53
79+
#: ../Doc/c-api/contextvars.rst:72
6980
msgid ""
7081
"Return true if *o* is of type :c:data:`PyContextToken_Type`. *o* must not be "
7182
"*NULL*. This function always succeeds."
7283
msgstr ""
7384

74-
#: ../Doc/c-api/contextvars.rst:57
85+
#: ../Doc/c-api/contextvars.rst:76
7586
msgid "Context object management functions:"
7687
msgstr ""
7788

78-
#: ../Doc/c-api/contextvars.rst:61
89+
#: ../Doc/c-api/contextvars.rst:80
7990
msgid ""
8091
"Create a new empty context object. Returns ``NULL`` if an error has "
8192
"occurred."
8293
msgstr ""
8394

84-
#: ../Doc/c-api/contextvars.rst:66
95+
#: ../Doc/c-api/contextvars.rst:85
8596
msgid ""
8697
"Create a shallow copy of the passed *ctx* context object. Returns ``NULL`` "
8798
"if an error has occurred."
8899
msgstr ""
89100

90-
#: ../Doc/c-api/contextvars.rst:71
101+
#: ../Doc/c-api/contextvars.rst:90
91102
msgid ""
92103
"Create a shallow copy of the current thread context. Returns ``NULL`` if an "
93104
"error has occurred."
94105
msgstr ""
95106

96-
#: ../Doc/c-api/contextvars.rst:76
107+
#: ../Doc/c-api/contextvars.rst:95
97108
msgid ""
98109
"Set *ctx* as the current context for the current thread. Returns ``0`` on "
99110
"success, and ``-1`` on error."
100111
msgstr ""
101112

102-
#: ../Doc/c-api/contextvars.rst:81
113+
#: ../Doc/c-api/contextvars.rst:100
103114
msgid ""
104115
"Deactivate the *ctx* context and restore the previous context as the current "
105116
"context for the current thread. Returns ``0`` on success, and ``-1`` on "
106117
"error."
107118
msgstr ""
108119

109-
#: ../Doc/c-api/contextvars.rst:87
120+
#: ../Doc/c-api/contextvars.rst:106
110121
msgid ""
111122
"Clear the context variable free list. Return the total number of freed "
112123
"items. This function always succeeds."
113124
msgstr ""
114125

115-
#: ../Doc/c-api/contextvars.rst:91
126+
#: ../Doc/c-api/contextvars.rst:110
116127
msgid "Context variable functions:"
117128
msgstr ""
118129

119-
#: ../Doc/c-api/contextvars.rst:95
130+
#: ../Doc/c-api/contextvars.rst:114
120131
msgid ""
121132
"Create a new ``ContextVar`` object. The *name* parameter is used for "
122133
"introspection and debug purposes. The *def* parameter may optionally "
123134
"specify the default value for the context variable. If an error has "
124135
"occurred, this function returns ``NULL``."
125136
msgstr ""
126137

127-
#: ../Doc/c-api/contextvars.rst:102
138+
#: ../Doc/c-api/contextvars.rst:121
128139
msgid ""
129140
"Get the value of a context variable. Returns ``-1`` if an error has "
130141
"occurred during lookup, and ``0`` if no error occurred, whether or not a "
131142
"value was found."
132143
msgstr ""
133144

134-
#: ../Doc/c-api/contextvars.rst:106
145+
#: ../Doc/c-api/contextvars.rst:125
135146
msgid ""
136147
"If the context variable was found, *value* will be a pointer to it. If the "
137148
"context variable was *not* found, *value* will point to:"
138149
msgstr ""
139150

140-
#: ../Doc/c-api/contextvars.rst:109
151+
#: ../Doc/c-api/contextvars.rst:128
141152
msgid "*default_value*, if not ``NULL``;"
142153
msgstr ""
143154

144-
#: ../Doc/c-api/contextvars.rst:110
155+
#: ../Doc/c-api/contextvars.rst:129
145156
msgid "the default value of *var*, if not ``NULL``;"
146157
msgstr ""
147158

148-
#: ../Doc/c-api/contextvars.rst:111
159+
#: ../Doc/c-api/contextvars.rst:130
149160
msgid "``NULL``"
150161
msgstr "``NULL``"
151162

152-
#: ../Doc/c-api/contextvars.rst:113
163+
#: ../Doc/c-api/contextvars.rst:132
153164
msgid "If the value was found, the function will create a new reference to it."
154165
msgstr ""
155166

156-
#: ../Doc/c-api/contextvars.rst:117
167+
#: ../Doc/c-api/contextvars.rst:136
157168
msgid ""
158169
"Set the value of *var* to *value* in the current context. Returns a pointer "
159-
"to a :c:type:`PyContextToken` object, or ``NULL`` if an error has occurred."
170+
"to a :c:type:`PyObject` object, or ``NULL`` if an error has occurred."
160171
msgstr ""
161172

162-
#: ../Doc/c-api/contextvars.rst:123
173+
#: ../Doc/c-api/contextvars.rst:142
163174
msgid ""
164175
"Reset the state of the *var* context variable to that it was in before :c:"
165176
"func:`PyContextVar_Set` that returned the *token* was called. This function "

0 commit comments

Comments
 (0)