Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
191b3a6
first traduction proposal
paquereeete Sep 22, 2017
7d35df8
first commit
cyplp Sep 21, 2017
8fda837
commit intermédiaire
cyplp Sep 22, 2017
0ebb46e
translate until 20.6.2.7. Objets Attr
cyplp Sep 22, 2017
675aa74
convinece commit
cyplp Sep 23, 2017
f70f87d
job done
cyplp Sep 24, 2017
5535b67
suppression warning
cyplp Sep 24, 2017
559e5b9
indent
cyplp Sep 24, 2017
b728c37
Translate functools
SebCorbin Sep 23, 2017
f62c472
Implement requested changes
SebCorbin Sep 24, 2017
79fc451
Work on small files.
JulienPalard Sep 24, 2017
b1c0730
Work on some small files.
JulienPalard Sep 24, 2017
d3a9d13
FIX: sphinx warnings.
JulienPalard Sep 24, 2017
ae2678f
Review getpass before merge.
JulienPalard Sep 30, 2017
b772713
Merge branch 'paquereeete-getpass' into 3.6
JulienPalard Sep 30, 2017
eab456c
Avoid duplicate README files, it's just hard to maintain.
JulienPalard Sep 30, 2017
73ca3f6
FIX: Column at ends of paragraphs.
JulienPalard Oct 1, 2017
374435a
Translate the first half of the gettext module
Linkid Sep 23, 2017
142fb67
Translate the second part of the gettext module
Linkid Oct 4, 2017
c7e5fb8
first commit
cyplp Sep 21, 2017
a59ed78
commit intermédiaire
cyplp Sep 22, 2017
7acea49
translate until 20.6.2.7. Objets Attr
cyplp Sep 22, 2017
6675fb2
convinece commit
cyplp Sep 23, 2017
78f1e20
job done
cyplp Sep 24, 2017
e3b32b9
suppression warning
cyplp Sep 24, 2017
945499f
indent
cyplp Sep 24, 2017
915ee15
Merge branch 'xml.dom' of github.com:cyplp/python-docs-fr into xml.dom
cyplp Oct 7, 2017
1dac0e1
prise en compte des remarques de mdk
cyplp Oct 7, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
288 changes: 7 additions & 281 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
This is the French Translation of the Python Documentation
==========================================================
French Translation of the Python Documentation
==============================================

See the `README.rst file on master
<https://github.com/python/python-docs-fr/blob/master/README.rst>`_
for more informations.


Documentation Contribution Agreement
------------------------------------
Expand All @@ -22,282 +27,3 @@ Python community is welcomed and appreciated.

You signify acceptance of this agreement by submitting your work to
the PSF for inclusion in the documentation.


Contributing to the Translation
-------------------------------

To clone, as we're working on the ``3.6`` branch, you can use ``git
clone --branch 3.6``.


How to Contribute
~~~~~~~~~~~~~~~~~

You can either contribute on `transifex/python-doc/public
<https://www.transifex.com/python-doc/public/>`_, or by simply openning an
issue on this repository, or by editing the ``po`` files.

To modify those files you first have to fork this project and follow
github instructions to clone it.

Next, to edit the files, you can use an editor of your choice, there's many:

- Highly recommended: `poedit <http://www.poedit.net/>`_
- gted
- gtranslator
- lokalize
- betterpoeditor
- vim or emacs with an appropriate mode
- Vé on Android
- Probably many others

Finally, once your contribution is done, do a ``pull request`` so we
can review and merge it.


What to translate
~~~~~~~~~~~~~~~~~

You can start with easy tasks like reviewing fuzzy entries to help
keeping the documentation up to date. You can also proofread already
translated entries, and finally translate untranslated ones.

- Do not translate content of ``:ref:...`` and ``:term:...``
- Put english words, if you have to use them, in *italics* (surrounded
by stars).
- ``::`` at the end of some paragraphs have to be translated to `` :
::`` in French to place the space before the column.

You can find files with a few translations missing::

for file in library/*; do echo $(msgattrib --untranslated $file | grep ^msgid | sed 1d | wc -l ) $file; done | grep -v ^0 | sort -gr | tail

Or replace the ``tail`` by a ``head`` to get files with a lot of work.


Where to get help
~~~~~~~~~~~~~~~~~

The coordinator for this translation is `mdk <https://mdk.fr/>`_.

Feel free to ask your questions on ``#python-fr`` on `freenode
<https://webchat.freenode.net/>`_.


Translation Progression
-----------------------

============ ===== ===== =====
.. 2.7 3.5 3.6
============ ===== ===== =====
about.po 100% 100% 100%
bugs.po 100% 100% 100%
c-api 9% 12% 11%
contents.po 100% 100% 100%
copyright.po 100% 100% 100%
distributing 100% 100% 100%
distutils 32% 33% 33%
extending 21% 24% 24%
faq 29% 33% 32%
glossary.po 85% 100% 100%
howto 7% 6% 6%
install 45% 46% 43%
installing 100% 100% 66%
library 16% 20% 19%
license.po 100% 100% 100%
reference 5% 5% 5%
sphinx.po 100% 100% 100%
tutorial 100% 100% 100%
using 31% 21% 19%
whatsnew 6% 41% 7%
~total~ 19% 25% 19%
============ ===== ===== =====


Priorities
----------

The ``tutorial/`` directory has a high priority as translations aim
for newcomers, then here are files most read in the original version:

- library/functions.po
- library/stdtypes.po
- library/string.po
- library/re.po
- library/datetime.po
- library/csv.po
- library/os.po
- library/random.po
- library/json.po
- library/subprocess.po


Translation Resources
---------------------

- `Le Grand Dictionnaire Terminologique <http://gdt.oqlf.gouv.qc.ca/>`_
- IRC channel `#python-fr <irc.lc/freenode/python-fr>`_ on freenode.
- The `liste traductions <http://lists.afpy.org/mailman/listinfo/traductions>`_.
- The `doc-sig mailing list
<https://mail.python.org/mailman/listinfo/doc-sig>`_.
- `Glossaire traduc.org <http://glossaire.traduc.org>`_
- `Glossaires et Dictionnaires of traduc.org
<https://traduc.org/Glossaires_et_dictionnaires>`_
- `glossary.po <https://docs.python.org/fr/3/glossary.html>`_, as it's
already translated.
- `deepl.com/translator <https://www.deepl.com>`_


Glossary
--------

For consistency in our translations, here are some propositions and
reminders for frequent terms you'll have to translate, don't hesitate
to open an issue if you disagree.

========================== ===========================================
Term Proposed Translation
========================== ===========================================
-like -compatible
abstract data type type abstrait
argument argument (Don't mix with parameter)
backslash antislash, *backslash*
bound lier
bug bogue, *bug*
built-in primitive, native
debugging débogage
double quote guillemet
call stack pile d'appels
e.g. e.g. (pour *exempli gratia*)
garbage collector ramasse-miettes
identifier identifiant
immutable immuable
interpreter interpréteur
library bibliothèque
list compréhension liste en compréhension
little-endian, big-endian `petit-boutiste, gros-boutiste
<https://fr.wikipedia.org/wiki/Endianness>`_
mutable variable
namespace *namespace*, espace de noms
parameter paramètre
prompt invite
raise lever
regular expression expression rationnelle, expression régulière
return renvoie, donne (On évite
"retourne" qui pourrait porter à confusion.
simple quote guillemet simple, apostrophe (apostrophe
is to glue, guillemet is to surround)
socket *socket*
statement instruction
underscore tiret bas, *underscore*
========================== ===========================================


Project History
---------------

This project was started `around 2012
<https://github.com/AFPy/python_doc_fr/commit/b77bdff59036b6b5a4804d5f519ce3ea341e027c>`_
by `afpy <https://www.afpy.org/>`_ members, in 2017 this project
became the official french Python documentation translation thanks to
`PEP 545 <https://www.python.org/dev/peps/pep-0545/>`_.


Simplify git diffs
------------------

Git diffs are often crowded with useless line number changes, like:

-#: ../Doc/library/signal.rst:406
+#: ../Doc/library/signal.rst:408

To tell git they are not usefull information, you can do the following
after ensuring ``~/.local/bin/`` is in your ``PATH``.

cat <<EOF > ~/.local/bin/podiff
#!/bin/sh
grep -v '^#:' "\$1"
EOF

chmod a+x ~/.local/bin/podiff

git config diff.podiff.textconv podiff


Maintenance
-----------

All those snippets are to run from the root of a ``python-docs-fr``
clone, and some expect to find an up-to-date CPython clone near to it,
like::

~/
├── python-docs-fr/
└── cpython/

To clone CPython you may use::

git clone --depth 1 --no-single-branch https://github.com/python/cpython.git

This avoids to download the whole history (not usefull to build
documentation) but still fetches all branches.


Merge pot files from CPython
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash

VERSION="$(git describe --contains --all HEAD)"
(cd ../cpython; git checkout $VERSION && git pull --ff-only && sphinx-build -Q -b gettext -D gettext_compact=0 Doc pot/)
find ../cpython/pot/ -name '*.pot' |
while read -r POT
do
PO="./$(echo "$POT" | sed "s#../cpython/pot/##; s#\.pot\$#.po#")"
mkdir -p "$(dirname "$PO")"
if [ -f "$PO" ]
then
msgmerge --backup=off --force-po -U "$PO" "$POT"
else
msgcat -o "$PO" "$POT"
fi
done


Find fuzzy strings
~~~~~~~~~~~~~~~~~~

.. code-block:: bash

find -name '*.po' | xargs -L1 msgattrib --only-fuzzy --no-obsolete


Run a test build locally
~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash

mkdir -p /tmp/$USER/locales/fr
ln -nfs $(readlink -f .) /tmp/$USER/locales/fr/LC_MESSAGES
make -C ../cpython/Doc SPHINXOPTS="-D locale_dirs=/tmp/$USER/locales/ -D language=fr -D gettext_compact=0" autobuild-dev-html


Synchronize translation with Transifex
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You'll need the ``transifex-client``, ``pomerge``, and ``poindent``
from Pypi, and you'll need to configure ``tx`` via ``tx init``, and then:

.. code-block:: bash

tx pull
pomerge --from .tx/*.po .tx/**/*.po --to *.po **/*.po
poindent --modified

Now you should review and commit the pull, then push:

.. code-block:: bash

pomerge --from *.po **/*.po --to .tx/*.po .tx/**/*.po
tx push -t
8 changes: 4 additions & 4 deletions bugs.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-10 00:49+0200\n"
"PO-Revision-Date: 2017-09-22 11:02+0200\n"
"PO-Revision-Date: 2017-09-24 23:03+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: fr\n"
Expand Down Expand Up @@ -57,9 +57,9 @@ msgstr ""
"proposer une amélioration, si cela concerne aussi la documentation en "
"anglais, ouvrez un rapport sur le :ref:`tracker <using-the-tracker>` "
"décrivant en anglais le bogue et où vous l'avez trouvé. Si le problème ne "
"touche que la traduction en français, ouvrez un ticket sur `github <https://"
"github.com/python/python-docs-fr/issues>`_, ou venez nous en toucher un mot "
"sur `irc://freenode/#python-fr<https://webchat.freenode.net/>`_ Si vous avez "
"touche que la traduction en français, ouvrez un ticket sur https://github."
"com/python/python-docs-fr/issues, ou venez nous en toucher un mot sur le "
"canal #python-fr sur freenode (https://webchat.freenode.net/). Si vous avez "
"une suggestion de correction, merci de l'inclure également."

#: ../Doc/bugs.rst:22
Expand Down
6 changes: 5 additions & 1 deletion library/_dummy_thread.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-02 22:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2017-09-24 21:34+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: fr\n"
Expand All @@ -21,6 +21,7 @@ msgstr ""
msgid ""
":mod:`_dummy_thread` --- Drop-in replacement for the :mod:`_thread` module"
msgstr ""
":mod:`_dummy_thread` --- Module de substitution pour le module :mod:`_thread`"

#: ../Doc/library/_dummy_thread.rst:7
msgid "**Source code:** :source:`Lib/_dummy_thread.py`"
Expand All @@ -32,6 +33,9 @@ msgid ""
"is meant to be imported when the :mod:`_thread` module is not provided on a "
"platform."
msgstr ""
"Ce module fournit un réplicat de l'interface du module :mod:`_thread`. Son "
"but est d'être importé lorsque le module :mod:`_thread` n'est pas fournit "
"par la plateforme."

#: ../Doc/library/_dummy_thread.rst:15
msgid "Suggested usage is::"
Expand Down
7 changes: 6 additions & 1 deletion library/allos.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-02 22:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2017-09-24 20:06+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: fr\n"
Expand All @@ -29,3 +29,8 @@ msgid ""
"interfaces, but they are available on most other systems as well. Here's an "
"overview:"
msgstr ""
"Les modules documentés dans ce chapitre fournissent des interfaces vers des "
"fonctionalités communes à la grande majorité des systèmes d'explotation, "
"telles que les fichiers et l'horloge. Bien que ces interfaces soient "
"classiquement calquées sur les interfaces Unix ou C, elles sont aussi "
"disponnibles sur la pluspart des autres sytèmes. En voici un aperçu."
6 changes: 5 additions & 1 deletion library/archiving.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-02 22:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2017-09-24 20:09+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: fr\n"
Expand All @@ -28,3 +28,7 @@ msgid ""
"format archives. See also :ref:`archiving-operations` provided by the :mod:"
"`shutil` module."
msgstr ""
"Les modules documentés dans ce chapitre implémentent les algorithmes de "
"compression zlib, gzip, bzip2 et lzma, ainsi que la création d'archives ZIP "
"et tar. Voir aussi :ref:`archiving-operations` fourni par le module :mod:"
"`shutil`"
6 changes: 3 additions & 3 deletions library/argparse.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-21 09:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2017-09-24 23:19+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: fr\n"
Expand Down Expand Up @@ -40,8 +40,8 @@ msgid ""
"`argparse tutorial <argparse-tutorial>`."
msgstr ""
"Cette page est la référence de l'API. Pour une introduction plus en douceur "
"à l'analyse des arguments de la ligne de commande, regardez :ref:`argparse "
"tutorial`."
"à l'analyse des arguments de la ligne de commande, regardez :ref:`le "
"tutoriel argparse <argparse-tutorial>`."

#: ../Doc/library/argparse.rst:22
msgid ""
Expand Down
Loading