|
| 1 | +This is the French Translation of the Python Documentation |
| 2 | +========================================================== |
| 3 | + |
| 4 | +We currently only translate stable documentation versions. That's why |
| 5 | +the master branch is empty. See the 3.6 branch for real content. |
| 6 | + |
| 7 | + |
| 8 | +Documentation Contribution Agreement |
| 9 | +------------------------------------ |
| 10 | + |
| 11 | +NOTE REGARDING THE LICENSE FOR TRANSLATIONS: Python's documentation is |
| 12 | +maintained using a global network of volunteers. By posting this |
| 13 | +project on Transifex, Github, and other public places, and inviting |
| 14 | +you to participate, we are proposing an agreement that you will |
| 15 | +provide your improvements to Python's documentation or the translation |
| 16 | +of Python's documentation for the PSF's use under the CC0 license |
| 17 | +(available at |
| 18 | +https://creativecommons.org/publicdomain/zero/1.0/legalcode). In |
| 19 | +return, you may publicly claim credit for the portion of the |
| 20 | +translation you contributed and if your translation is accepted by the |
| 21 | +PSF, you may (but are not required to) submit a patch including an |
| 22 | +appropriate annotation in the Misc/ACKS or TRANSLATORS file. Although |
| 23 | +nothing in this Documentation Contribution Agreement obligates the PSF |
| 24 | +to incorporate your textual contribution, your participation in the |
| 25 | +Python community is welcomed and appreciated. |
| 26 | + |
| 27 | +You signify acceptance of this agreement by submitting your work to |
| 28 | +the PSF for inclusion in the documentation. |
| 29 | + |
| 30 | + |
| 31 | +Contributing to the Translation |
| 32 | +------------------------------- |
| 33 | + |
| 34 | +How to Contribute |
| 35 | +~~~~~~~~~~~~~~~~~ |
| 36 | + |
| 37 | +You can either contribute on `transifex/python-doc/public |
| 38 | +<https://www.transifex.com/python-doc/public/>`_, or by simply openning an |
| 39 | +issue on this repository, or by editing the ``po`` files. |
| 40 | + |
| 41 | +To modify those files you first have to fork this project and follow |
| 42 | +github instructions to clone it. |
| 43 | + |
| 44 | +Next, to edit the files, you can use an editor of your choice, there's many: |
| 45 | + |
| 46 | +- Highly recommended: `poedit <http://www.poedit.net/>`_ |
| 47 | +- gted |
| 48 | +- gtranslator |
| 49 | +- lokalize |
| 50 | +- betterpoeditor |
| 51 | +- vim or emacs with an appropriate mode |
| 52 | +- Vé on Android |
| 53 | +- Probably many others |
| 54 | + |
| 55 | +Finally, once your contribution is done, do a ``pull request`` so we |
| 56 | +can review and merge it. |
| 57 | + |
| 58 | + |
| 59 | +What to translate |
| 60 | +~~~~~~~~~~~~~~~~~ |
| 61 | + |
| 62 | +You can start with easy tasks like reviewing fuzzy entries to help |
| 63 | +keeping the documentation up to date. You can also proofread already |
| 64 | +translated entries, and finally translate untranslated ones. |
| 65 | + |
| 66 | +- Do not translate content of ``:ref:...`` and ``:term:...`` |
| 67 | +- Put english words, if you have to use them, in *italics* (surrounded |
| 68 | + by stars). |
| 69 | +- ``::`` at the end of some paragraphs have to be translated to `` : |
| 70 | + ::`` in French to place the space before the column. |
| 71 | + |
| 72 | +You can find files with a few translations missing:: |
| 73 | + |
| 74 | + for file in library/*; do echo $(msgattrib --untranslated $file | grep ^msgid | sed 1d | wc -l ) $file; done | grep -v ^0 | sort -gr | tail |
| 75 | + |
| 76 | +Or replace the ``tail`` by a ``head`` to get files with a lot of work. |
| 77 | + |
| 78 | + |
| 79 | +Where to get help |
| 80 | +~~~~~~~~~~~~~~~~~ |
| 81 | + |
| 82 | +The coordinator for this translation is `mdk <https://mdk.fr/>`_. |
| 83 | + |
| 84 | +Feel free to ask your questions on ``#python-fr`` on `freenode |
| 85 | +<https://webchat.freenode.net/>`_. |
| 86 | + |
| 87 | + |
| 88 | +Translation Progression |
| 89 | +----------------------- |
| 90 | + |
| 91 | +============ ===== ===== ===== |
| 92 | + .. 2.7 3.5 3.6 |
| 93 | +============ ===== ===== ===== |
| 94 | + about.po 100% 100% 100% |
| 95 | + bugs.po 100% 100% 100% |
| 96 | + c-api 9% 12% 11% |
| 97 | + contents.po 100% 100% 100% |
| 98 | +copyright.po 100% 100% 100% |
| 99 | +distributing 100% 100% 100% |
| 100 | + distutils 32% 33% 33% |
| 101 | + extending 21% 24% 24% |
| 102 | + faq 29% 33% 32% |
| 103 | + glossary.po 85% 100% 100% |
| 104 | + howto 7% 6% 6% |
| 105 | + install 45% 46% 43% |
| 106 | + installing 100% 100% 66% |
| 107 | + library 16% 20% 19% |
| 108 | + license.po 100% 100% 100% |
| 109 | + reference 5% 5% 5% |
| 110 | + sphinx.po 100% 100% 100% |
| 111 | + tutorial 100% 100% 100% |
| 112 | + using 31% 21% 19% |
| 113 | + whatsnew 6% 41% 7% |
| 114 | + ~total~ 19% 25% 19% |
| 115 | +============ ===== ===== ===== |
| 116 | + |
| 117 | + |
| 118 | +Priorities |
| 119 | +---------- |
| 120 | + |
| 121 | +The ``tutorial/`` directory has a high priority as translations aim |
| 122 | +for newcomers, then here are files most read in the original version: |
| 123 | + |
| 124 | +- library/functions.po |
| 125 | +- library/stdtypes.po |
| 126 | +- library/string.po |
| 127 | +- library/re.po |
| 128 | +- library/datetime.po |
| 129 | +- library/csv.po |
| 130 | +- library/os.po |
| 131 | +- library/random.po |
| 132 | +- library/json.po |
| 133 | +- library/subprocess.po |
| 134 | + |
| 135 | + |
| 136 | +Translation Resources |
| 137 | +--------------------- |
| 138 | + |
| 139 | +- `Le Grand Dictionnaire Terminologique <http://gdt.oqlf.gouv.qc.ca/>`_ |
| 140 | +- IRC channel `#python-fr <irc.lc/freenode/python-fr>`_ on freenode. |
| 141 | +- The `liste traductions <http://lists.afpy.org/mailman/listinfo/traductions>`_. |
| 142 | +- The `doc-sig mailing list |
| 143 | + <https://mail.python.org/mailman/listinfo/doc-sig>`_. |
| 144 | +- `Glossaire traduc.org <http://glossaire.traduc.org>`_ |
| 145 | +- `Glossaires et Dictionnaires of traduc.org |
| 146 | + <https://traduc.org/Glossaires_et_dictionnaires>`_ |
| 147 | +- `glossary.po <https://docs.python.org/fr/3/glossary.html>`_, as it's |
| 148 | + already translated. |
| 149 | +- `deepl.com/translator <https://www.deepl.com>`_ |
| 150 | + |
| 151 | + |
| 152 | +Glossary |
| 153 | +-------- |
| 154 | + |
| 155 | +For consistency in our translations, here are some propositions and |
| 156 | +reminders for frequent terms you'll have to translate, don't hesitate |
| 157 | +to open an issue if you disagree. |
| 158 | + |
| 159 | +========================== =========================================== |
| 160 | +Term Proposed Translation |
| 161 | +========================== =========================================== |
| 162 | +-like -compatible |
| 163 | +abstract data type type abstrait |
| 164 | +argument argument (Don't mix with parameter) |
| 165 | +backslash antislash, *backslash* |
| 166 | +bound lier |
| 167 | +bug bogue, *bug* |
| 168 | +built-in primitive, native |
| 169 | +debugging débogage |
| 170 | +double quote guillemet |
| 171 | +call stack pile d'appels |
| 172 | +e.g. e.g. (pour *exempli gratia*) |
| 173 | +garbage collector ramasse-miettes |
| 174 | +identifier identifiant |
| 175 | +immutable immuable |
| 176 | +interpreter interpréteur |
| 177 | +library bibliothèque |
| 178 | +list compréhension liste en compréhension |
| 179 | +little-endian, big-endian `petit-boutiste, gros-boutiste |
| 180 | + <https://fr.wikipedia.org/wiki/Endianness>`_ |
| 181 | +mutable variable |
| 182 | +namespace *namespace*, espace de noms |
| 183 | +parameter paramètre |
| 184 | +prompt invite |
| 185 | +raise lever |
| 186 | +regular expression expression rationnelle, expression régulière |
| 187 | +return renvoie, donne (On évite |
| 188 | + "retourne" qui pourrait porter à confusion. |
| 189 | +simple quote guillemet simple, apostrophe (apostrophe |
| 190 | + is to glue, guillemet is to surround) |
| 191 | +socket *socket* |
| 192 | +statement instruction |
| 193 | +underscore tiret bas, *underscore* |
| 194 | +========================== =========================================== |
| 195 | + |
| 196 | + |
| 197 | +Project History |
| 198 | +--------------- |
| 199 | + |
| 200 | +This project was started `around 2012 |
| 201 | +<https://github.com/AFPy/python_doc_fr/commit/b77bdff59036b6b5a4804d5f519ce3ea341e027c>`_ |
| 202 | +by `afpy <https://www.afpy.org/>`_ members, in 2017 this project |
| 203 | +became the official french Python documentation translation thanks to |
| 204 | +`PEP 545 <https://www.python.org/dev/peps/pep-0545/>`_. |
| 205 | + |
| 206 | + |
| 207 | +Simplify git diffs |
| 208 | +------------------ |
| 209 | + |
| 210 | +Git diffs are often crowded with useless line number changes, like: |
| 211 | + |
| 212 | + -#: ../Doc/library/signal.rst:406 |
| 213 | + +#: ../Doc/library/signal.rst:408 |
| 214 | + |
| 215 | +To tell git they are not usefull information, you can do the following |
| 216 | +after ensuring ``~/.local/bin/`` is in your ``PATH``. |
| 217 | + |
| 218 | + cat <<EOF > ~/.local/bin/podiff |
| 219 | + #!/bin/sh |
| 220 | + grep -v '^#:' "\$1" |
| 221 | + EOF |
| 222 | + |
| 223 | + chmod a+x ~/.local/bin/podiff |
| 224 | + |
| 225 | + git config diff.podiff.textconv podiff |
| 226 | + |
| 227 | + |
| 228 | +Maintenance |
| 229 | +----------- |
| 230 | + |
| 231 | +All those snippets are to run from the root of a ``python-docs-fr`` |
| 232 | +clone, and some expect to find an up-to-date CPython clone near to it, |
| 233 | +like:: |
| 234 | + |
| 235 | + ~/ |
| 236 | + ├── python-docs-fr/ |
| 237 | + └── cpython/ |
| 238 | + |
| 239 | +To clone CPython you may use:: |
| 240 | + |
| 241 | + git clone --depth 1 --no-single-branch https://github.com/python/cpython.git |
| 242 | + |
| 243 | +This avoids to download the whole history (not usefull to build |
| 244 | +documentation) but still fetches all branches. |
| 245 | + |
| 246 | + |
| 247 | +Merge pot files from CPython |
| 248 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 249 | + |
| 250 | +.. code-block:: bash |
| 251 | +
|
| 252 | + VERSION="$(git describe --contains --all HEAD)" |
| 253 | + (cd ../cpython; git checkout $VERSION && git pull --ff-only && sphinx-build -Q -b gettext -D gettext_compact=0 Doc pot/) |
| 254 | + find ../cpython/pot/ -name '*.pot' | |
| 255 | + while read -r POT |
| 256 | + do |
| 257 | + PO="./$(echo "$POT" | sed "s#../cpython/pot/##; s#\.pot\$#.po#")" |
| 258 | + mkdir -p "$(dirname "$PO")" |
| 259 | + if [ -f "$PO" ] |
| 260 | + then |
| 261 | + msgmerge --backup=off --force-po -U "$PO" "$POT" |
| 262 | + else |
| 263 | + msgcat -o "$PO" "$POT" |
| 264 | + fi |
| 265 | + done |
| 266 | +
|
| 267 | +
|
| 268 | +Find fuzzy strings |
| 269 | +~~~~~~~~~~~~~~~~~~ |
| 270 | + |
| 271 | +.. code-block:: bash |
| 272 | +
|
| 273 | + find -name '*.po' | xargs -L1 msgattrib --only-fuzzy --no-obsolete |
| 274 | +
|
| 275 | +
|
| 276 | +Run a test build locally |
| 277 | +~~~~~~~~~~~~~~~~~~~~~~~~ |
| 278 | + |
| 279 | +.. code-block:: bash |
| 280 | +
|
| 281 | + mkdir -p /tmp/$USER/locales/fr |
| 282 | + ln -nfs $(readlink -f .) /tmp/$USER/locales/fr/LC_MESSAGES |
| 283 | + make -C ../cpython/Doc SPHINXOPTS="-D locale_dirs=/tmp/$USER/locales/ -D language=fr -D gettext_compact=0" autobuild-dev-html |
| 284 | +
|
| 285 | +
|
| 286 | +Synchronize translation with Transifex |
| 287 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 288 | + |
| 289 | +You'll need the ``transifex-client``, ``pomerge``, and ``poindent`` |
| 290 | +from Pypi, and you'll need to configure ``tx`` via ``tx init``, and then: |
| 291 | + |
| 292 | +.. code-block:: bash |
| 293 | +
|
| 294 | + tx pull |
| 295 | + pomerge --from .tx/*.po .tx/**/*.po --to *.po **/*.po |
| 296 | + poindent --modified |
| 297 | +
|
| 298 | +Now you should review and commit the pull, then push: |
| 299 | + |
| 300 | +.. code-block:: bash |
| 301 | +
|
| 302 | + pomerge --from *.po **/*.po --to .tx/*.po .tx/**/*.po |
| 303 | + tx push -t |
0 commit comments