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

Skip to content

Commit 289b0b1

Browse files
Seluj78JulienPalard
authored andcommitted
Updated README - More info on the getting started section (#623)
1 parent 7a36c82 commit 289b0b1

File tree

1 file changed

+43
-26
lines changed

1 file changed

+43
-26
lines changed

README.rst

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -54,60 +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.
8284

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.**
8886

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.
9188

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:
9390

9491
.. code-block:: bash
9592
9693
# 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
9999
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
101102
102103
# 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.
104115
105-
# When everything is clear (syntax errors from Sphinx, html rendering,
106-
# semantics, typography),
116+
# When everything powrap and pospell passes without errors,
107117
# 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."
109119
110-
# Then push your modifications to your github clone,
120+
# Then push your modifications to your github fork,
111121
# as they are ephemeral branches, let's not configure git to track them all,
112122
# "origin HEAD" is a "special" syntax to say "Push on origin,
113123
# on a branch with the same name as the local one",
@@ -145,6 +155,13 @@ Before commiting, you should use `grammalecte
145155
<https://grammalecte.net/>`_ to check for your translations.
146156

147157

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+
148165
What to translate
149166
~~~~~~~~~~~~~~~~~
150167

0 commit comments

Comments
 (0)