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

Skip to content

Commit b75938c

Browse files
authored
Merge branch '3.7' into library-subprocess
2 parents c5719ef + 289b0b1 commit b75938c

Some content is hidden

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

76 files changed

+5615
-4536
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ before_install:
55
- sudo apt-get update
66
- sudo apt-get install -y hunspell hunspell-fr-comprehensive
77
install:
8-
- pip install pospell
8+
- pip install pospell "powrap>=0.3.0"
99
- pospell --version
10+
- powrap --version
1011
script:
12+
- powrap --check --quiet **/*.po
1113
- pospell -p dict -l fr_FR **/*.po
12-
- make CPYTHON_CLONE=/tmp/cpython/ COMMIT=902196d867
14+
- make CPYTHON_CLONE=/tmp/cpython/ COMMIT=ef10f886ae

README.rst

Lines changed: 57 additions & 20 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: 38%**
7+
**Translated: 39%**
88

99
Documentation Contribution Agreement
1010
------------------------------------
@@ -54,51 +54,70 @@ Prerequisites:
5454
if you don't already have one).
5555

5656

57-
Let's start:
57+
Getting Started:
5858

5959
You'll need to fork the `python-docs-fr
60-
<https://github.com/python/python-docs-fr>`_ clicking its ``Fork``
60+
<https://github.com/python/python-docs-fr>`_ source repository by clicking its ``Fork``
6161
button. This creates a copy of the whole project on your github
6262
account: a place where you have the rights to do modifications.
6363

6464
Step by step:
6565

6666
.. code-block:: bash
6767
68-
# Git clone your github fork using ssh (replace JulienPalard):
69-
git clone [email protected]:JulienPalard/python-docs-fr.git
68+
# Clone your github fork with `git` using ssh or https:
69+
git clone [email protected]:YOUR_GITHUB_USERNAME/python-docs-fr.git
70+
git clone https://github.com:YOUR_GITHUB_USERNAME/python-docs-fr.git
7071
71-
# Go to the cloned directory:
72+
# Go into the cloned directory:
7273
cd python-docs-fr/
7374
7475
# Add the upstream (the public repository) using HTTPS (won't ask for password):
76+
# This is so git knows what/where the upstream is.
7577
git remote add upstream https://github.com/python/python-docs-fr.git
7678
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>`.
79+
Next, you need to find a file to work on.
80+
You can use `potodo <https://github.com/seluj78/potodo>`, a tool made to find ``po`` to do.
81+
Install it using pip (``pip install potodo``) in a ``python3.7`` environement.
82+
Then run the command ``potodo`` in your cloned fork.
83+
From the list returned by the command, you can choose any file that is not reserved.
84+
85+
**We recommend not starting with a file from ``c-api`` as it is very technical.**
86+
87+
Once you've choosen a file to work one, please open an `issue on github <https://github.com/python/python-docs-fr>` in the format of `I'm working on FOLDER/FILE.po`. This is done to update ``potodo`` as it checks the github API for reserved ``.po`` files in issues and pull requests.
8288

83-
Now you're ready to start a work session, each time you'll start a new task, start here:
89+
Now you're ready to start a work session. Each time you'll start a new file, start here:
8490

8591
.. code-block:: bash
8692
8793
# To work, we'll need a branch, based on an up-to-date (freshly fetched)
88-
# upstream/3.7 branch, let's say we'll work on glossary so we name
89-
# the branch "glossary":
94+
# upstream/3.7 branch. We will name our branch "library-sys" but you shall name yours
95+
# whatever you want. Usually you'll name a branch based on the file you're working on.
96+
# For example, If you're working on "library/venv.po" you can name your branch "library-venv"
97+
98+
# Update your local version to the latest
9099
git fetch upstream
91-
git checkout -b glossary upstream/3.7
100+
# Create a new branch named "library-sys" based on "upstream/3.7"
101+
git checkout -b library-sys upstream/3.7
92102
93103
# You can now work on the file, typically using poedit,
94-
poedit directory/file.po
104+
# Of course, replace "library/sys.po" by the file you've chose earlier
105+
poedit library/sys.po
95106
96-
# When everything is clear (syntax errors from Sphinx, html rendering,
97-
# semantics, typography),
107+
# When you are done translating, you can run pospell (pip install pospell).
108+
# This tool was made to check if you don't have any french mistakes.
109+
# You can run the following command: pospell -p dict -l fr_FR **/*.po to check all files
110+
# or replace **/*.po by your specific file (recommended).
111+
112+
# You can then run powrap (pip install powrap) which will rewrap
113+
# You modified file to the correct line length of `80`.
114+
# Run this command: `powrap **/*.po` or replace `**/*.po` with your modified file.
115+
116+
# When everything powrap and pospell passes without errors,
98117
# you can commit your work with a nice explicit message:
99-
git commit -a -m "Working on glossary."
118+
git commit -a -m "Working on library/sys.po."
100119
101-
# Then push your modifications to your github clone,
120+
# Then push your modifications to your github fork,
102121
# as they are ephemeral branches, let's not configure git to track them all,
103122
# "origin HEAD" is a "special" syntax to say "Push on origin,
104123
# on a branch with the same name as the local one",
@@ -136,6 +155,13 @@ Before commiting, you should use `grammalecte
136155
<https://grammalecte.net/>`_ to check for your translations.
137156

138157

158+
All the translations must be made on the latest release.
159+
We never translate on an oldest version. For example, if the latest python release
160+
is Python 3.7, we don't want to translate directly on the python 3.5 release.
161+
If needed translations would be backported on the oldest versions by the
162+
`documentation team <https://www.python.org/dev/peps/pep-8015/#documentation-team>`.
163+
164+
139165
What to translate
140166
~~~~~~~~~~~~~~~~~
141167

@@ -352,6 +378,17 @@ from Pypi.
352378
353379
You'll need to configure ``tx`` via ``tx init`` if not already done.
354380
381+
First propagate known translations locally:
382+
383+
.. code-block:: bash
384+
385+
pomerge --from-files **/*.po --to-files **/*.po
386+
powrap --modified
387+
git commit -m "Propagating known translations."
388+
389+
390+
Then pull from transifex:
391+
355392
.. code-block:: bash
356393
357394
pomerge --from-files **/*.po

TRANSLATORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Mickaël Bergem
99
Vincent Poulailleau
1010
Jules Lasne
1111
Mathieu Dupuy
12+
Vivien Lambert

bugs.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ msgid ""
55
msgstr ""
66
"Project-Id-Version: Python 3.6\n"
77
"Report-Msgid-Bugs-To: \n"
8-
"POT-Creation-Date: 2018-06-28 15:29+0200\n"
8+
"POT-Creation-Date: 2019-03-11 12:59+0100\n"
99
"PO-Revision-Date: 2018-07-31 19:26+0200\n"
1010
"Last-Translator: \n"
1111
"Language-Team: FRENCH <[email protected]>\n"
@@ -47,7 +47,7 @@ msgstr "Bogues de documentation"
4747
msgid ""
4848
"If you find a bug in this documentation or would like to propose an "
4949
"improvement, please submit a bug report on the :ref:`tracker <using-the-"
50-
"tracker>`. If you have a suggestion how to fix it, include that as well."
50+
"tracker>`. If you have a suggestion on how to fix it, include that as well."
5151
msgstr ""
5252
"Si vous trouvez un bogue dans cette documentation ou si vous désirez "
5353
"proposer une amélioration, si cela concerne aussi la documentation en "

c-api/contextvars.po

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

6363
#: ../Doc/c-api/contextvars.rst:58
6464
msgid "Type-check macros:"
65-
msgstr ""
65+
msgstr "Macros pour vérifier les types :"
6666

6767
#: ../Doc/c-api/contextvars.rst:62
6868
msgid ""

c-api/datetime.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ msgid ""
55
msgstr ""
66
"Project-Id-Version: Python 3.6\n"
77
"Report-Msgid-Bugs-To: \n"
8-
"POT-Creation-Date: 2018-06-28 15:29+0200\n"
8+
"POT-Creation-Date: 2019-03-11 12:59+0100\n"
99
"PO-Revision-Date: 2019-01-11 20:51+0100\n"
10+
"Last-Translator: Louis Portay <[email protected]>\n"
1011
"Language-Team: FRENCH <[email protected]>\n"
1112
"Language: fr\n"
1213
"MIME-Version: 1.0\n"
1314
"Content-Type: text/plain; charset=UTF-8\n"
1415
"Content-Transfer-Encoding: 8bit\n"
15-
"Last-Translator: Louis Portay <[email protected]>\n"
1616
"X-Generator: Poedit 2.2\n"
1717
"X-Poedit-Bookmarks: -1,-1,-1,-1,-1,-1,-1,3,-1,-1\n"
1818

0 commit comments

Comments
 (0)