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
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.
82
84
83
-
First, you need to find a file to work on. You can use `potodo <https://github.com/seluj78/potodo>`.
84
-
Install it (``pip install potodo`` in a venv) and then run the command
85
-
`potodo` in your cloned fork.
86
-
From the list it spits out, you can choose any file that is not
87
-
reserved. We recommend not starting with a file from ``c-api`` as it is very technical.
85
+
**We recommend not starting with a file from ``c-api`` as it is very technical.**
88
86
89
-
Once you've choosen a file, please open an issue telling you're
90
-
working on it, to block someone from working on it.
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.
91
88
92
-
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:
93
90
94
91
.. code-block:: bash
95
92
96
93
# To work, we'll need a branch, based on an up-to-date (freshly fetched)
97
-
# upstream/3.7 branch, let's say we'll work on glossary so we name
98
-
# 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
99
99
git fetch upstream
100
-
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
101
102
102
103
# You can now work on the file, typically using poedit,
103
-
poedit directory/file.po
104
+
# Of course, replace "library/sys.po" by the file you've chose earlier
105
+
poedit library/sys.po
106
+
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.
104
115
105
-
# When everything is clear (syntax errors from Sphinx, html rendering,
106
-
# semantics, typography),
116
+
# When everything powrap and pospell passes without errors,
107
117
# you can commit your work with a nice explicit message:
108
-
git commit -a -m "Working on glossary."
118
+
git commit -a -m "Working on library/sys.po."
109
119
110
-
# Then push your modifications to your github clone,
120
+
# Then push your modifications to your github fork,
111
121
# as they are ephemeral branches, let's not configure git to track them all,
112
122
# "origin HEAD" is a "special" syntax to say "Push on origin,
113
123
# on a branch with the same name as the local one",
@@ -145,6 +155,13 @@ Before commiting, you should use `grammalecte
145
155
<https://grammalecte.net/>`_ to check for your translations.
146
156
147
157
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>`.
0 commit comments