Repository files navigation

French Translation of the Python Documentation

Translated: 29%

Documentation Contribution Agreement

NOTE REGARDING THE LICENSE FOR TRANSLATIONS: Python's documentation is maintained using a global network of volunteers. By posting this project on Transifex, Github, and other public places, and inviting you to participate, we are proposing an agreement that you will provide your improvements to Python's documentation or the translation of Python's documentation for the PSF's use under the CC0 license (available at https://creativecommons.org/publicdomain/zero/1.0/legalcode). In return, you may publicly claim credit for the portion of the translation you contributed and if your translation is accepted by the PSF, you may (but are not required to) submit a patch including an appropriate annotation in the Misc/ACKS or TRANSLATORS file. Although nothing in this Documentation Contribution Agreement obligates the PSF to incorporate your textual contribution, your participation in the 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

How to Contribute

You can contribute using:

Contributing using Github

Prerequisites:

Let's start:

You'll need to fork the python-docs-fr clicking its Fork button. This creates a copy of the whole project on your github account: a place where you have the rights to do modifications.

Step by step:

# Git clone your github fork using ssh (replace JulienPalard):
git clone git@github.com:JulienPalard/python-docs-fr.git
# Go to the cloned directory:cd python-docs-fr/
# Add the upstream (the public repository) using HTTPS (won't ask for password):
git remote add upstream https://github.com/python/python-docs-fr.git

Now you're ready to start a work session, each time you'll start a new task, start here:

# To work, we'll need a branch, based on an up-to-date (freshly fetched)# upstream/3.7 branch, let's say we'll work on glossary so we name# the branch "glossary":
git fetch upstream
git checkout -b glossary upstream/3.7
# You can now work on the file, typically using poedit,
poedit directory/file.po
# After writing your changes to disk, check for correctness:
make
# Sphinx will tell you if there is any syntax error in the files# you modified. Note that in the French Translation, we try to keep Sphinx# warnings to zero.# you may want to check if there are semantic errors.# Open the translated file in your browser to check how it renders.# Don't forget to verify the typography. The French conventions are not# the English ones, especially for punctuation.# Also, Grammalecte, a browser plugin avaliable in your browser store,# is your friend even if, because of the technical words that appear# everywhere in the documentation, it points out many false positive.
exo-open ../cpython/Doc/build/html/directory/file.html
# When everything is clear (syntax errors from Sphinx, html rendering,# semantics, typography),# you can commit your work with a nice explicit message:
git commit -a -m "Working on glossary."# Then push your modifications to your github clone,# as they are ephemeral branches, let's not configure git to track them all,# "origin HEAD" is a "special" syntax to say "Push on origin,# on a branch with the same name as the local one",# it's nice as it's exactly what we want:
git push origin HEAD
# Now you can open the pull request on github, just go to# https://github.com/python/python-docs-fr/ and a nice "Compare & pull request"# button should appear after a few seconds telling you can ask for a pull request.# Now someone is reviewing your modifications, and you'll want to fix their# findings, get back to your branch# (in case you started something else on another branch):
git checkout glossary
# Fix the issues, then commit again:
git commit -a -m "glossary: small fixes."
git push origin HEAD

You may have noted that this looks like a triangle, with a missing segment:

  • You're fetching from upstream (public common repo on github)
  • You're pushing to origin (your clone on github)

So yes it's the work of someone to add the last segment, from your origin to the public upstream, to "close the loop", that's the role of the people who merges pull requests after proofreading them.

You may also have noted you never ever commit on a version branch (3.6, 3.7, ...), only pull from them, consider them read-only you'll avoid problems.

Before commiting, you should use grammalecte to check for your translations.

What to translate

You can start with easy tasks like reviewing fuzzy entries to help keeping the documentation up to date (find them using make fuzzy).

You can also proofread already translated entries, and finally translate untranslated ones (find them using make todo)..

  • 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.
  • If you translate a link title, please translate the link too (typically if it's Wikipedia and the article has a translation). If no translation of the target exists, do not translate the title.

Where to get help

The coordinator for this translation is mdk.

Feel free to ask your questions on the #python-fr channel on freenode (does not require registration) or the AFPy traductions mailing list.

Translation Resources

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.

TermProposed Translation
-like-compatible
abstract data typetype abstrait
argumentargument (Don't mix with parameter)
backslashantislash, backslash
boundlier
bugbogue, bug
built-innative
call stackpile d'appels
debuggingdébogage
double quoteguillemet
e.g.e.g. (pour exempli gratia)
garbage collectorramasse-miettes
identifieridentifiant
immutableimmuable
interpreterinterpréteur
librarybibliothèque
list comprehensionliste en compréhension (liste en intension est valide, mais nous ne l'utilisons pas)
little-endian, big-endianpetit-boutiste, gros-boutiste
mutablemuable
namespacenamespace, espace de noms
parameterparamètre
promptinvite
raiselever
regular expressionexpression rationnelle, expression régulière
returnrenvoie, donne (on évite "retourne" qui pourrait porter à confusion).
simple quoteguillemet simple, apostrophe (apostrophe is to glue, guillemet is to surround)
socketsocket
statementinstruction
threadfil d'exécution
underscoretiret bas, underscore

Project History

This project was started around 2012 by afpy members, in 2017 this project became the official french Python documentation translation thanks to PEP 545.

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/shgrep -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:

.. code-block:: bash
~/ ├── 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

make merge

Find fuzzy strings

make fuzzy

Run a test build locally

make

Synchronize translation with Transifex

You'll need the transifex-client and poindent from Pypi.

You'll need to configure tx via tx init if not already done.

You should work on a separate transifex branch.

tx pull
poindent --modified
git commit -m "tx pull"
git checkout 3.6
git merge transifex -Xours
tx push -t

About

French translation of the Python documentation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

French Translation of the Python Documentation

Translated: 29%

Documentation Contribution Agreement

NOTE REGARDING THE LICENSE FOR TRANSLATIONS: Python's documentation is maintained using a global network of volunteers. By posting this project on Transifex, Github, and other public places, and inviting you to participate, we are proposing an agreement that you will provide your improvements to Python's documentation or the translation of Python's documentation for the PSF's use under the CC0 license (available at https://creativecommons.org/publicdomain/zero/1.0/legalcode). In return, you may publicly claim credit for the portion of the translation you contributed and if your translation is accepted by the PSF, you may (but are not required to) submit a patch including an appropriate annotation in the Misc/ACKS or TRANSLATORS file. Although nothing in this Documentation Contribution Agreement obligates the PSF to incorporate your textual contribution, your participation in the 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

How to Contribute

You can contribute using:

Contributing using Github

Prerequisites:

Let's start:

You'll need to fork the python-docs-fr clicking its Fork button. This creates a copy of the whole project on your github account: a place where you have the rights to do modifications.

Step by step:

# Git clone your github fork using ssh (replace JulienPalard):
git clone git@github.com:JulienPalard/python-docs-fr.git
# Go to the cloned directory:cd python-docs-fr/
# Add the upstream (the public repository) using HTTPS (won't ask for password):
git remote add upstream https://github.com/python/python-docs-fr.git

Now you're ready to start a work session, each time you'll start a new task, start here:

# To work, we'll need a branch, based on an up-to-date (freshly fetched)# upstream/3.7 branch, let's say we'll work on glossary so we name# the branch "glossary":
git fetch upstream
git checkout -b glossary upstream/3.7
# You can now work on the file, typically using poedit,
poedit directory/file.po
# After writing your changes to disk, check for correctness:
make
# Sphinx will tell you if there is any syntax error in the files# you modified. Note that in the French Translation, we try to keep Sphinx# warnings to zero.# you may want to check if there are semantic errors.# Open the translated file in your browser to check how it renders.# Don't forget to verify the typography. The French conventions are not# the English ones, especially for punctuation.# Also, Grammalecte, a browser plugin avaliable in your browser store,# is your friend even if, because of the technical words that appear# everywhere in the documentation, it points out many false positive.
exo-open ../cpython/Doc/build/html/directory/file.html
# When everything is clear (syntax errors from Sphinx, html rendering,# semantics, typography),# you can commit your work with a nice explicit message:
git commit -a -m "Working on glossary."# Then push your modifications to your github clone,# as they are ephemeral branches, let's not configure git to track them all,# "origin HEAD" is a "special" syntax to say "Push on origin,# on a branch with the same name as the local one",# it's nice as it's exactly what we want:
git push origin HEAD
# Now you can open the pull request on github, just go to# https://github.com/python/python-docs-fr/ and a nice "Compare & pull request"# button should appear after a few seconds telling you can ask for a pull request.# Now someone is reviewing your modifications, and you'll want to fix their# findings, get back to your branch# (in case you started something else on another branch):
git checkout glossary
# Fix the issues, then commit again:
git commit -a -m "glossary: small fixes."
git push origin HEAD

You may have noted that this looks like a triangle, with a missing segment:

  • You're fetching from upstream (public common repo on github)
  • You're pushing to origin (your clone on github)

So yes it's the work of someone to add the last segment, from your origin to the public upstream, to "close the loop", that's the role of the people who merges pull requests after proofreading them.

You may also have noted you never ever commit on a version branch (3.6, 3.7, ...), only pull from them, consider them read-only you'll avoid problems.

Before commiting, you should use grammalecte to check for your translations.

What to translate

You can start with easy tasks like reviewing fuzzy entries to help keeping the documentation up to date (find them using make fuzzy).

You can also proofread already translated entries, and finally translate untranslated ones (find them using make todo)..

  • 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.
  • If you translate a link title, please translate the link too (typically if it's Wikipedia and the article has a translation). If no translation of the target exists, do not translate the title.

Where to get help

The coordinator for this translation is mdk.

Feel free to ask your questions on the #python-fr channel on freenode (does not require registration) or the AFPy traductions mailing list.

Translation Resources

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.

TermProposed Translation
-like-compatible
abstract data typetype abstrait
argumentargument (Don't mix with parameter)
backslashantislash, backslash
boundlier
bugbogue, bug
built-innative
call stackpile d'appels
debuggingdébogage
double quoteguillemet
e.g.e.g. (pour exempli gratia)
garbage collectorramasse-miettes
identifieridentifiant
immutableimmuable
interpreterinterpréteur
librarybibliothèque
list comprehensionliste en compréhension (liste en intension est valide, mais nous ne l'utilisons pas)
little-endian, big-endianpetit-boutiste, gros-boutiste
mutablemuable
namespacenamespace, espace de noms
parameterparamètre
promptinvite
raiselever
regular expressionexpression rationnelle, expression régulière
returnrenvoie, donne (on évite "retourne" qui pourrait porter à confusion).
simple quoteguillemet simple, apostrophe (apostrophe is to glue, guillemet is to surround)
socketsocket
statementinstruction
threadfil d'exécution
underscoretiret bas, underscore

Project History

This project was started around 2012 by afpy members, in 2017 this project became the official french Python documentation translation thanks to PEP 545.

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/shgrep -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:

.. code-block:: bash
~/ ├── 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

make merge

Find fuzzy strings

make fuzzy

Run a test build locally

make

Synchronize translation with Transifex

You'll need the transifex-client and poindent from Pypi.

You'll need to configure tx via tx init if not already done.

You should work on a separate transifex branch.

tx pull
poindent --modified
git commit -m "tx pull"
git checkout 3.6
git merge transifex -Xours
tx push -t

About

French translation of the Python documentation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

French Translation of the Python Documentation

Translated: 29%

Documentation Contribution Agreement

NOTE REGARDING THE LICENSE FOR TRANSLATIONS: Python's documentation is maintained using a global network of volunteers. By posting this project on Transifex, Github, and other public places, and inviting you to participate, we are proposing an agreement that you will provide your improvements to Python's documentation or the translation of Python's documentation for the PSF's use under the CC0 license (available at https://creativecommons.org/publicdomain/zero/1.0/legalcode). In return, you may publicly claim credit for the portion of the translation you contributed and if your translation is accepted by the PSF, you may (but are not required to) submit a patch including an appropriate annotation in the Misc/ACKS or TRANSLATORS file. Although nothing in this Documentation Contribution Agreement obligates the PSF to incorporate your textual contribution, your participation in the 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

How to Contribute

You can contribute using:

Contributing using Github

Prerequisites:

Let's start:

You'll need to fork the python-docs-fr clicking its Fork button. This creates a copy of the whole project on your github account: a place where you have the rights to do modifications.

Step by step:

# Git clone your github fork using ssh (replace JulienPalard):
git clone git@github.com:JulienPalard/python-docs-fr.git
# Go to the cloned directory:cd python-docs-fr/
# Add the upstream (the public repository) using HTTPS (won't ask for password):
git remote add upstream https://github.com/python/python-docs-fr.git

Now you're ready to start a work session, each time you'll start a new task, start here:

# To work, we'll need a branch, based on an up-to-date (freshly fetched)# upstream/3.7 branch, let's say we'll work on glossary so we name# the branch "glossary":
git fetch upstream
git checkout -b glossary upstream/3.7
# You can now work on the file, typically using poedit,
poedit directory/file.po
# After writing your changes to disk, check for correctness:
make
# Sphinx will tell you if there is any syntax error in the files# you modified. Note that in the French Translation, we try to keep Sphinx# warnings to zero.# you may want to check if there are semantic errors.# Open the translated file in your browser to check how it renders.# Don't forget to verify the typography. The French conventions are not# the English ones, especially for punctuation.# Also, Grammalecte, a browser plugin avaliable in your browser store,# is your friend even if, because of the technical words that appear# everywhere in the documentation, it points out many false positive.
exo-open ../cpython/Doc/build/html/directory/file.html
# When everything is clear (syntax errors from Sphinx, html rendering,# semantics, typography),# you can commit your work with a nice explicit message:
git commit -a -m "Working on glossary."# Then push your modifications to your github clone,# as they are ephemeral branches, let's not configure git to track them all,# "origin HEAD" is a "special" syntax to say "Push on origin,# on a branch with the same name as the local one",# it's nice as it's exactly what we want:
git push origin HEAD
# Now you can open the pull request on github, just go to# https://github.com/python/python-docs-fr/ and a nice "Compare & pull request"# button should appear after a few seconds telling you can ask for a pull request.# Now someone is reviewing your modifications, and you'll want to fix their# findings, get back to your branch# (in case you started something else on another branch):
git checkout glossary
# Fix the issues, then commit again:
git commit -a -m "glossary: small fixes."
git push origin HEAD

You may have noted that this looks like a triangle, with a missing segment:

  • You're fetching from upstream (public common repo on github)
  • You're pushing to origin (your clone on github)

So yes it's the work of someone to add the last segment, from your origin to the public upstream, to "close the loop", that's the role of the people who merges pull requests after proofreading them.

You may also have noted you never ever commit on a version branch (3.6, 3.7, ...), only pull from them, consider them read-only you'll avoid problems.

Before commiting, you should use grammalecte to check for your translations.

What to translate

You can start with easy tasks like reviewing fuzzy entries to help keeping the documentation up to date (find them using make fuzzy).

You can also proofread already translated entries, and finally translate untranslated ones (find them using make todo)..

  • 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.
  • If you translate a link title, please translate the link too (typically if it's Wikipedia and the article has a translation). If no translation of the target exists, do not translate the title.

Where to get help

The coordinator for this translation is mdk.

Feel free to ask your questions on the #python-fr channel on freenode (does not require registration) or the AFPy traductions mailing list.

Translation Resources

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.

TermProposed Translation
-like-compatible
abstract data typetype abstrait
argumentargument (Don't mix with parameter)
backslashantislash, backslash
boundlier
bugbogue, bug
built-innative
call stackpile d'appels
debuggingdébogage
double quoteguillemet
e.g.e.g. (pour exempli gratia)
garbage collectorramasse-miettes
identifieridentifiant
immutableimmuable
interpreterinterpréteur
librarybibliothèque
list comprehensionliste en compréhension (liste en intension est valide, mais nous ne l'utilisons pas)
little-endian, big-endianpetit-boutiste, gros-boutiste
mutablemuable
namespacenamespace, espace de noms
parameterparamètre
promptinvite
raiselever
regular expressionexpression rationnelle, expression régulière
returnrenvoie, donne (on évite "retourne" qui pourrait porter à confusion).
simple quoteguillemet simple, apostrophe (apostrophe is to glue, guillemet is to surround)
socketsocket
statementinstruction
threadfil d'exécution
underscoretiret bas, underscore

Project History

This project was started around 2012 by afpy members, in 2017 this project became the official french Python documentation translation thanks to PEP 545.

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/shgrep -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:

.. code-block:: bash
~/ ├── 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

make merge

Find fuzzy strings

make fuzzy

Run a test build locally

make

Synchronize translation with Transifex

You'll need the transifex-client and poindent from Pypi.

You'll need to configure tx via tx init if not already done.

You should work on a separate transifex branch.

tx pull
poindent --modified
git commit -m "tx pull"
git checkout 3.6
git merge transifex -Xours
tx push -t

About

French translation of the Python documentation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

French Translation of the Python Documentation

Translated: 29%

Documentation Contribution Agreement

NOTE REGARDING THE LICENSE FOR TRANSLATIONS: Python's documentation is maintained using a global network of volunteers. By posting this project on Transifex, Github, and other public places, and inviting you to participate, we are proposing an agreement that you will provide your improvements to Python's documentation or the translation of Python's documentation for the PSF's use under the CC0 license (available at https://creativecommons.org/publicdomain/zero/1.0/legalcode). In return, you may publicly claim credit for the portion of the translation you contributed and if your translation is accepted by the PSF, you may (but are not required to) submit a patch including an appropriate annotation in the Misc/ACKS or TRANSLATORS file. Although nothing in this Documentation Contribution Agreement obligates the PSF to incorporate your textual contribution, your participation in the 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

How to Contribute

You can contribute using:

Contributing using Github

Prerequisites:

Let's start:

You'll need to fork the python-docs-fr clicking its Fork button. This creates a copy of the whole project on your github account: a place where you have the rights to do modifications.

Step by step:

# Git clone your github fork using ssh (replace JulienPalard):
git clone git@github.com:JulienPalard/python-docs-fr.git
# Go to the cloned directory:cd python-docs-fr/
# Add the upstream (the public repository) using HTTPS (won't ask for password):
git remote add upstream https://github.com/python/python-docs-fr.git

Now you're ready to start a work session, each time you'll start a new task, start here:

# To work, we'll need a branch, based on an up-to-date (freshly fetched)# upstream/3.7 branch, let's say we'll work on glossary so we name# the branch "glossary":
git fetch upstream
git checkout -b glossary upstream/3.7
# You can now work on the file, typically using poedit,
poedit directory/file.po
# After writing your changes to disk, check for correctness:
make
# Sphinx will tell you if there is any syntax error in the files# you modified. Note that in the French Translation, we try to keep Sphinx# warnings to zero.# you may want to check if there are semantic errors.# Open the translated file in your browser to check how it renders.# Don't forget to verify the typography. The French conventions are not# the English ones, especially for punctuation.# Also, Grammalecte, a browser plugin avaliable in your browser store,# is your friend even if, because of the technical words that appear# everywhere in the documentation, it points out many false positive.
exo-open ../cpython/Doc/build/html/directory/file.html
# When everything is clear (syntax errors from Sphinx, html rendering,# semantics, typography),# you can commit your work with a nice explicit message:
git commit -a -m "Working on glossary."# Then push your modifications to your github clone,# as they are ephemeral branches, let's not configure git to track them all,# "origin HEAD" is a "special" syntax to say "Push on origin,# on a branch with the same name as the local one",# it's nice as it's exactly what we want:
git push origin HEAD
# Now you can open the pull request on github, just go to# https://github.com/python/python-docs-fr/ and a nice "Compare & pull request"# button should appear after a few seconds telling you can ask for a pull request.# Now someone is reviewing your modifications, and you'll want to fix their# findings, get back to your branch# (in case you started something else on another branch):
git checkout glossary
# Fix the issues, then commit again:
git commit -a -m "glossary: small fixes."
git push origin HEAD

You may have noted that this looks like a triangle, with a missing segment:

  • You're fetching from upstream (public common repo on github)
  • You're pushing to origin (your clone on github)

So yes it's the work of someone to add the last segment, from your origin to the public upstream, to "close the loop", that's the role of the people who merges pull requests after proofreading them.

You may also have noted you never ever commit on a version branch (3.6, 3.7, ...), only pull from them, consider them read-only you'll avoid problems.

Before commiting, you should use grammalecte to check for your translations.

What to translate

You can start with easy tasks like reviewing fuzzy entries to help keeping the documentation up to date (find them using make fuzzy).

You can also proofread already translated entries, and finally translate untranslated ones (find them using make todo)..

  • 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.
  • If you translate a link title, please translate the link too (typically if it's Wikipedia and the article has a translation). If no translation of the target exists, do not translate the title.

Where to get help

The coordinator for this translation is mdk.

Feel free to ask your questions on the #python-fr channel on freenode (does not require registration) or the AFPy traductions mailing list.

Translation Resources

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.

TermProposed Translation
-like-compatible
abstract data typetype abstrait
argumentargument (Don't mix with parameter)
backslashantislash, backslash
boundlier
bugbogue, bug
built-innative
call stackpile d'appels
debuggingdébogage
double quoteguillemet
e.g.e.g. (pour exempli gratia)
garbage collectorramasse-miettes
identifieridentifiant
immutableimmuable
interpreterinterpréteur
librarybibliothèque
list comprehensionliste en compréhension (liste en intension est valide, mais nous ne l'utilisons pas)
little-endian, big-endianpetit-boutiste, gros-boutiste
mutablemuable
namespacenamespace, espace de noms
parameterparamètre
promptinvite
raiselever
regular expressionexpression rationnelle, expression régulière
returnrenvoie, donne (on évite "retourne" qui pourrait porter à confusion).
simple quoteguillemet simple, apostrophe (apostrophe is to glue, guillemet is to surround)
socketsocket
statementinstruction
threadfil d'exécution
underscoretiret bas, underscore

Project History

This project was started around 2012 by afpy members, in 2017 this project became the official french Python documentation translation thanks to PEP 545.

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/shgrep -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:

.. code-block:: bash
~/ ├── 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

make merge

Find fuzzy strings

make fuzzy

Run a test build locally

make

Synchronize translation with Transifex

You'll need the transifex-client and poindent from Pypi.

You'll need to configure tx via tx init if not already done.

You should work on a separate transifex branch.

tx pull
poindent --modified
git commit -m "tx pull"
git checkout 3.6
git merge transifex -Xours
tx push -t

About

French translation of the Python documentation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

French Translation of the Python Documentation

Translated: 29%

Documentation Contribution Agreement

NOTE REGARDING THE LICENSE FOR TRANSLATIONS: Python's documentation is maintained using a global network of volunteers. By posting this project on Transifex, Github, and other public places, and inviting you to participate, we are proposing an agreement that you will provide your improvements to Python's documentation or the translation of Python's documentation for the PSF's use under the CC0 license (available at https://creativecommons.org/publicdomain/zero/1.0/legalcode). In return, you may publicly claim credit for the portion of the translation you contributed and if your translation is accepted by the PSF, you may (but are not required to) submit a patch including an appropriate annotation in the Misc/ACKS or TRANSLATORS file. Although nothing in this Documentation Contribution Agreement obligates the PSF to incorporate your textual contribution, your participation in the 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

How to Contribute

You can contribute using:

Contributing using Github

Prerequisites:

Let's start:

You'll need to fork the python-docs-fr clicking its Fork button. This creates a copy of the whole project on your github account: a place where you have the rights to do modifications.

Step by step:

# Git clone your github fork using ssh (replace JulienPalard):
git clone git@github.com:JulienPalard/python-docs-fr.git
# Go to the cloned directory:cd python-docs-fr/
# Add the upstream (the public repository) using HTTPS (won't ask for password):
git remote add upstream https://github.com/python/python-docs-fr.git

Now you're ready to start a work session, each time you'll start a new task, start here:

# To work, we'll need a branch, based on an up-to-date (freshly fetched)# upstream/3.7 branch, let's say we'll work on glossary so we name# the branch "glossary":
git fetch upstream
git checkout -b glossary upstream/3.7
# You can now work on the file, typically using poedit,
poedit directory/file.po
# After writing your changes to disk, check for correctness:
make
# Sphinx will tell you if there is any syntax error in the files# you modified. Note that in the French Translation, we try to keep Sphinx# warnings to zero.# you may want to check if there are semantic errors.# Open the translated file in your browser to check how it renders.# Don't forget to verify the typography. The French conventions are not# the English ones, especially for punctuation.# Also, Grammalecte, a browser plugin avaliable in your browser store,# is your friend even if, because of the technical words that appear# everywhere in the documentation, it points out many false positive.
exo-open ../cpython/Doc/build/html/directory/file.html
# When everything is clear (syntax errors from Sphinx, html rendering,# semantics, typography),# you can commit your work with a nice explicit message:
git commit -a -m "Working on glossary."# Then push your modifications to your github clone,# as they are ephemeral branches, let's not configure git to track them all,# "origin HEAD" is a "special" syntax to say "Push on origin,# on a branch with the same name as the local one",# it's nice as it's exactly what we want:
git push origin HEAD
# Now you can open the pull request on github, just go to# https://github.com/python/python-docs-fr/ and a nice "Compare & pull request"# button should appear after a few seconds telling you can ask for a pull request.# Now someone is reviewing your modifications, and you'll want to fix their# findings, get back to your branch# (in case you started something else on another branch):
git checkout glossary
# Fix the issues, then commit again:
git commit -a -m "glossary: small fixes."
git push origin HEAD

You may have noted that this looks like a triangle, with a missing segment:

  • You're fetching from upstream (public common repo on github)
  • You're pushing to origin (your clone on github)

So yes it's the work of someone to add the last segment, from your origin to the public upstream, to "close the loop", that's the role of the people who merges pull requests after proofreading them.

You may also have noted you never ever commit on a version branch (3.6, 3.7, ...), only pull from them, consider them read-only you'll avoid problems.

Before commiting, you should use grammalecte to check for your translations.

What to translate

You can start with easy tasks like reviewing fuzzy entries to help keeping the documentation up to date (find them using make fuzzy).

You can also proofread already translated entries, and finally translate untranslated ones (find them using make todo)..

  • 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.
  • If you translate a link title, please translate the link too (typically if it's Wikipedia and the article has a translation). If no translation of the target exists, do not translate the title.

Where to get help

The coordinator for this translation is mdk.

Feel free to ask your questions on the #python-fr channel on freenode (does not require registration) or the AFPy traductions mailing list.

Translation Resources

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.

TermProposed Translation
-like-compatible
abstract data typetype abstrait
argumentargument (Don't mix with parameter)
backslashantislash, backslash
boundlier
bugbogue, bug
built-innative
call stackpile d'appels
debuggingdébogage
double quoteguillemet
e.g.e.g. (pour exempli gratia)
garbage collectorramasse-miettes
identifieridentifiant
immutableimmuable
interpreterinterpréteur
librarybibliothèque
list comprehensionliste en compréhension (liste en intension est valide, mais nous ne l'utilisons pas)
little-endian, big-endianpetit-boutiste, gros-boutiste
mutablemuable
namespacenamespace, espace de noms
parameterparamètre
promptinvite
raiselever
regular expressionexpression rationnelle, expression régulière
returnrenvoie, donne (on évite "retourne" qui pourrait porter à confusion).
simple quoteguillemet simple, apostrophe (apostrophe is to glue, guillemet is to surround)
socketsocket
statementinstruction
threadfil d'exécution
underscoretiret bas, underscore

Project History

This project was started around 2012 by afpy members, in 2017 this project became the official french Python documentation translation thanks to PEP 545.

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/shgrep -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:

.. code-block:: bash
~/ ├── 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

make merge

Find fuzzy strings

make fuzzy

Run a test build locally

make

Synchronize translation with Transifex

You'll need the transifex-client and poindent from Pypi.

You'll need to configure tx via tx init if not already done.

You should work on a separate transifex branch.

tx pull
poindent --modified
git commit -m "tx pull"
git checkout 3.6
git merge transifex -Xours
tx push -t

About

French translation of the Python documentation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

French Translation of the Python Documentation

Translated: 29%

Documentation Contribution Agreement

NOTE REGARDING THE LICENSE FOR TRANSLATIONS: Python's documentation is maintained using a global network of volunteers. By posting this project on Transifex, Github, and other public places, and inviting you to participate, we are proposing an agreement that you will provide your improvements to Python's documentation or the translation of Python's documentation for the PSF's use under the CC0 license (available at https://creativecommons.org/publicdomain/zero/1.0/legalcode). In return, you may publicly claim credit for the portion of the translation you contributed and if your translation is accepted by the PSF, you may (but are not required to) submit a patch including an appropriate annotation in the Misc/ACKS or TRANSLATORS file. Although nothing in this Documentation Contribution Agreement obligates the PSF to incorporate your textual contribution, your participation in the 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

How to Contribute

You can contribute using:

Contributing using Github

Prerequisites:

Let's start:

You'll need to fork the python-docs-fr clicking its Fork button. This creates a copy of the whole project on your github account: a place where you have the rights to do modifications.

Step by step:

# Git clone your github fork using ssh (replace JulienPalard):
git clone git@github.com:JulienPalard/python-docs-fr.git
# Go to the cloned directory:cd python-docs-fr/
# Add the upstream (the public repository) using HTTPS (won't ask for password):
git remote add upstream https://github.com/python/python-docs-fr.git

Now you're ready to start a work session, each time you'll start a new task, start here:

# To work, we'll need a branch, based on an up-to-date (freshly fetched)# upstream/3.7 branch, let's say we'll work on glossary so we name# the branch "glossary":
git fetch upstream
git checkout -b glossary upstream/3.7
# You can now work on the file, typically using poedit,
poedit directory/file.po
# After writing your changes to disk, check for correctness:
make
# Sphinx will tell you if there is any syntax error in the files# you modified. Note that in the French Translation, we try to keep Sphinx# warnings to zero.# you may want to check if there are semantic errors.# Open the translated file in your browser to check how it renders.# Don't forget to verify the typography. The French conventions are not# the English ones, especially for punctuation.# Also, Grammalecte, a browser plugin avaliable in your browser store,# is your friend even if, because of the technical words that appear# everywhere in the documentation, it points out many false positive.
exo-open ../cpython/Doc/build/html/directory/file.html
# When everything is clear (syntax errors from Sphinx, html rendering,# semantics, typography),# you can commit your work with a nice explicit message:
git commit -a -m "Working on glossary."# Then push your modifications to your github clone,# as they are ephemeral branches, let's not configure git to track them all,# "origin HEAD" is a "special" syntax to say "Push on origin,# on a branch with the same name as the local one",# it's nice as it's exactly what we want:
git push origin HEAD
# Now you can open the pull request on github, just go to# https://github.com/python/python-docs-fr/ and a nice "Compare & pull request"# button should appear after a few seconds telling you can ask for a pull request.# Now someone is reviewing your modifications, and you'll want to fix their# findings, get back to your branch# (in case you started something else on another branch):
git checkout glossary
# Fix the issues, then commit again:
git commit -a -m "glossary: small fixes."
git push origin HEAD

You may have noted that this looks like a triangle, with a missing segment:

  • You're fetching from upstream (public common repo on github)
  • You're pushing to origin (your clone on github)

So yes it's the work of someone to add the last segment, from your origin to the public upstream, to "close the loop", that's the role of the people who merges pull requests after proofreading them.

You may also have noted you never ever commit on a version branch (3.6, 3.7, ...), only pull from them, consider them read-only you'll avoid problems.

Before commiting, you should use grammalecte to check for your translations.

What to translate

You can start with easy tasks like reviewing fuzzy entries to help keeping the documentation up to date (find them using make fuzzy).

You can also proofread already translated entries, and finally translate untranslated ones (find them using make todo)..

  • 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.
  • If you translate a link title, please translate the link too (typically if it's Wikipedia and the article has a translation). If no translation of the target exists, do not translate the title.

Where to get help

The coordinator for this translation is mdk.

Feel free to ask your questions on the #python-fr channel on freenode (does not require registration) or the AFPy traductions mailing list.

Translation Resources

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.

TermProposed Translation
-like-compatible
abstract data typetype abstrait
argumentargument (Don't mix with parameter)
backslashantislash, backslash
boundlier
bugbogue, bug
built-innative
call stackpile d'appels
debuggingdébogage
double quoteguillemet
e.g.e.g. (pour exempli gratia)
garbage collectorramasse-miettes
identifieridentifiant
immutableimmuable
interpreterinterpréteur
librarybibliothèque
list comprehensionliste en compréhension (liste en intension est valide, mais nous ne l'utilisons pas)
little-endian, big-endianpetit-boutiste, gros-boutiste
mutablemuable
namespacenamespace, espace de noms
parameterparamètre
promptinvite
raiselever
regular expressionexpression rationnelle, expression régulière
returnrenvoie, donne (on évite "retourne" qui pourrait porter à confusion).
simple quoteguillemet simple, apostrophe (apostrophe is to glue, guillemet is to surround)
socketsocket
statementinstruction
threadfil d'exécution
underscoretiret bas, underscore

Project History

This project was started around 2012 by afpy members, in 2017 this project became the official french Python documentation translation thanks to PEP 545.

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/shgrep -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:

.. code-block:: bash
~/ ├── 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

make merge

Find fuzzy strings

make fuzzy

Run a test build locally

make

Synchronize translation with Transifex

You'll need the transifex-client and poindent from Pypi.

You'll need to configure tx via tx init if not already done.

You should work on a separate transifex branch.

tx pull
poindent --modified
git commit -m "tx pull"
git checkout 3.6
git merge transifex -Xours
tx push -t

About

French translation of the Python documentation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

French Translation of the Python Documentation

Translated: 29%

Documentation Contribution Agreement

NOTE REGARDING THE LICENSE FOR TRANSLATIONS: Python's documentation is maintained using a global network of volunteers. By posting this project on Transifex, Github, and other public places, and inviting you to participate, we are proposing an agreement that you will provide your improvements to Python's documentation or the translation of Python's documentation for the PSF's use under the CC0 license (available at https://creativecommons.org/publicdomain/zero/1.0/legalcode). In return, you may publicly claim credit for the portion of the translation you contributed and if your translation is accepted by the PSF, you may (but are not required to) submit a patch including an appropriate annotation in the Misc/ACKS or TRANSLATORS file. Although nothing in this Documentation Contribution Agreement obligates the PSF to incorporate your textual contribution, your participation in the 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

How to Contribute

You can contribute using:

Contributing using Github

Prerequisites:

Let's start:

You'll need to fork the python-docs-fr clicking its Fork button. This creates a copy of the whole project on your github account: a place where you have the rights to do modifications.

Step by step:

# Git clone your github fork using ssh (replace JulienPalard):
git clone git@github.com:JulienPalard/python-docs-fr.git
# Go to the cloned directory:cd python-docs-fr/
# Add the upstream (the public repository) using HTTPS (won't ask for password):
git remote add upstream https://github.com/python/python-docs-fr.git

Now you're ready to start a work session, each time you'll start a new task, start here:

# To work, we'll need a branch, based on an up-to-date (freshly fetched)# upstream/3.7 branch, let's say we'll work on glossary so we name# the branch "glossary":
git fetch upstream
git checkout -b glossary upstream/3.7
# You can now work on the file, typically using poedit,
poedit directory/file.po
# After writing your changes to disk, check for correctness:
make
# Sphinx will tell you if there is any syntax error in the files# you modified. Note that in the French Translation, we try to keep Sphinx# warnings to zero.# you may want to check if there are semantic errors.# Open the translated file in your browser to check how it renders.# Don't forget to verify the typography. The French conventions are not# the English ones, especially for punctuation.# Also, Grammalecte, a browser plugin avaliable in your browser store,# is your friend even if, because of the technical words that appear# everywhere in the documentation, it points out many false positive.
exo-open ../cpython/Doc/build/html/directory/file.html
# When everything is clear (syntax errors from Sphinx, html rendering,# semantics, typography),# you can commit your work with a nice explicit message:
git commit -a -m "Working on glossary."# Then push your modifications to your github clone,# as they are ephemeral branches, let's not configure git to track them all,# "origin HEAD" is a "special" syntax to say "Push on origin,# on a branch with the same name as the local one",# it's nice as it's exactly what we want:
git push origin HEAD
# Now you can open the pull request on github, just go to# https://github.com/python/python-docs-fr/ and a nice "Compare & pull request"# button should appear after a few seconds telling you can ask for a pull request.# Now someone is reviewing your modifications, and you'll want to fix their# findings, get back to your branch# (in case you started something else on another branch):
git checkout glossary
# Fix the issues, then commit again:
git commit -a -m "glossary: small fixes."
git push origin HEAD

You may have noted that this looks like a triangle, with a missing segment:

  • You're fetching from upstream (public common repo on github)
  • You're pushing to origin (your clone on github)

So yes it's the work of someone to add the last segment, from your origin to the public upstream, to "close the loop", that's the role of the people who merges pull requests after proofreading them.

You may also have noted you never ever commit on a version branch (3.6, 3.7, ...), only pull from them, consider them read-only you'll avoid problems.

Before commiting, you should use grammalecte to check for your translations.

What to translate

You can start with easy tasks like reviewing fuzzy entries to help keeping the documentation up to date (find them using make fuzzy).

You can also proofread already translated entries, and finally translate untranslated ones (find them using make todo)..

  • 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.
  • If you translate a link title, please translate the link too (typically if it's Wikipedia and the article has a translation). If no translation of the target exists, do not translate the title.

Where to get help

The coordinator for this translation is mdk.

Feel free to ask your questions on the #python-fr channel on freenode (does not require registration) or the AFPy traductions mailing list.

Translation Resources

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.

TermProposed Translation
-like-compatible
abstract data typetype abstrait
argumentargument (Don't mix with parameter)
backslashantislash, backslash
boundlier
bugbogue, bug
built-innative
call stackpile d'appels
debuggingdébogage
double quoteguillemet
e.g.e.g. (pour exempli gratia)
garbage collectorramasse-miettes
identifieridentifiant
immutableimmuable
interpreterinterpréteur
librarybibliothèque
list comprehensionliste en compréhension (liste en intension est valide, mais nous ne l'utilisons pas)
little-endian, big-endianpetit-boutiste, gros-boutiste
mutablemuable
namespacenamespace, espace de noms
parameterparamètre
promptinvite
raiselever
regular expressionexpression rationnelle, expression régulière
returnrenvoie, donne (on évite "retourne" qui pourrait porter à confusion).
simple quoteguillemet simple, apostrophe (apostrophe is to glue, guillemet is to surround)
socketsocket
statementinstruction
threadfil d'exécution
underscoretiret bas, underscore

Project History

This project was started around 2012 by afpy members, in 2017 this project became the official french Python documentation translation thanks to PEP 545.

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/shgrep -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:

.. code-block:: bash
~/ ├── 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

make merge

Find fuzzy strings

make fuzzy

Run a test build locally

make

Synchronize translation with Transifex

You'll need the transifex-client and poindent from Pypi.

You'll need to configure tx via tx init if not already done.

You should work on a separate transifex branch.

tx pull
poindent --modified
git commit -m "tx pull"
git checkout 3.6
git merge transifex -Xours
tx push -t

About

French translation of the Python documentation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

French Translation of the Python Documentation

Translated: 29%

Documentation Contribution Agreement

NOTE REGARDING THE LICENSE FOR TRANSLATIONS: Python's documentation is maintained using a global network of volunteers. By posting this project on Transifex, Github, and other public places, and inviting you to participate, we are proposing an agreement that you will provide your improvements to Python's documentation or the translation of Python's documentation for the PSF's use under the CC0 license (available at https://creativecommons.org/publicdomain/zero/1.0/legalcode). In return, you may publicly claim credit for the portion of the translation you contributed and if your translation is accepted by the PSF, you may (but are not required to) submit a patch including an appropriate annotation in the Misc/ACKS or TRANSLATORS file. Although nothing in this Documentation Contribution Agreement obligates the PSF to incorporate your textual contribution, your participation in the 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

How to Contribute

You can contribute using:

Contributing using Github

Prerequisites:

Let's start:

You'll need to fork the python-docs-fr clicking its Fork button. This creates a copy of the whole project on your github account: a place where you have the rights to do modifications.

Step by step:

# Git clone your github fork using ssh (replace JulienPalard):
git clone git@github.com:JulienPalard/python-docs-fr.git
# Go to the cloned directory:cd python-docs-fr/
# Add the upstream (the public repository) using HTTPS (won't ask for password):
git remote add upstream https://github.com/python/python-docs-fr.git

Now you're ready to start a work session, each time you'll start a new task, start here:

# To work, we'll need a branch, based on an up-to-date (freshly fetched)# upstream/3.7 branch, let's say we'll work on glossary so we name# the branch "glossary":
git fetch upstream
git checkout -b glossary upstream/3.7
# You can now work on the file, typically using poedit,
poedit directory/file.po
# After writing your changes to disk, check for correctness:
make
# Sphinx will tell you if there is any syntax error in the files# you modified. Note that in the French Translation, we try to keep Sphinx# warnings to zero.# you may want to check if there are semantic errors.# Open the translated file in your browser to check how it renders.# Don't forget to verify the typography. The French conventions are not# the English ones, especially for punctuation.# Also, Grammalecte, a browser plugin avaliable in your browser store,# is your friend even if, because of the technical words that appear# everywhere in the documentation, it points out many false positive.
exo-open ../cpython/Doc/build/html/directory/file.html
# When everything is clear (syntax errors from Sphinx, html rendering,# semantics, typography),# you can commit your work with a nice explicit message:
git commit -a -m "Working on glossary."# Then push your modifications to your github clone,# as they are ephemeral branches, let's not configure git to track them all,# "origin HEAD" is a "special" syntax to say "Push on origin,# on a branch with the same name as the local one",# it's nice as it's exactly what we want:
git push origin HEAD
# Now you can open the pull request on github, just go to# https://github.com/python/python-docs-fr/ and a nice "Compare & pull request"# button should appear after a few seconds telling you can ask for a pull request.# Now someone is reviewing your modifications, and you'll want to fix their# findings, get back to your branch# (in case you started something else on another branch):
git checkout glossary
# Fix the issues, then commit again:
git commit -a -m "glossary: small fixes."
git push origin HEAD

You may have noted that this looks like a triangle, with a missing segment:

  • You're fetching from upstream (public common repo on github)
  • You're pushing to origin (your clone on github)

So yes it's the work of someone to add the last segment, from your origin to the public upstream, to "close the loop", that's the role of the people who merges pull requests after proofreading them.

You may also have noted you never ever commit on a version branch (3.6, 3.7, ...), only pull from them, consider them read-only you'll avoid problems.

Before commiting, you should use grammalecte to check for your translations.

What to translate

You can start with easy tasks like reviewing fuzzy entries to help keeping the documentation up to date (find them using make fuzzy).

You can also proofread already translated entries, and finally translate untranslated ones (find them using make todo)..

  • 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.
  • If you translate a link title, please translate the link too (typically if it's Wikipedia and the article has a translation). If no translation of the target exists, do not translate the title.

Where to get help

The coordinator for this translation is mdk.

Feel free to ask your questions on the #python-fr channel on freenode (does not require registration) or the AFPy traductions mailing list.

Translation Resources

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.

TermProposed Translation
-like-compatible
abstract data typetype abstrait
argumentargument (Don't mix with parameter)
backslashantislash, backslash
boundlier
bugbogue, bug
built-innative
call stackpile d'appels
debuggingdébogage
double quoteguillemet
e.g.e.g. (pour exempli gratia)
garbage collectorramasse-miettes
identifieridentifiant
immutableimmuable
interpreterinterpréteur
librarybibliothèque
list comprehensionliste en compréhension (liste en intension est valide, mais nous ne l'utilisons pas)
little-endian, big-endianpetit-boutiste, gros-boutiste
mutablemuable
namespacenamespace, espace de noms
parameterparamètre
promptinvite
raiselever
regular expressionexpression rationnelle, expression régulière
returnrenvoie, donne (on évite "retourne" qui pourrait porter à confusion).
simple quoteguillemet simple, apostrophe (apostrophe is to glue, guillemet is to surround)
socketsocket
statementinstruction
threadfil d'exécution
underscoretiret bas, underscore

Project History

This project was started around 2012 by afpy members, in 2017 this project became the official french Python documentation translation thanks to PEP 545.

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/shgrep -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:

.. code-block:: bash
~/ ├── 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

make merge

Find fuzzy strings

make fuzzy

Run a test build locally

make

Synchronize translation with Transifex

You'll need the transifex-client and poindent from Pypi.

You'll need to configure tx via tx init if not already done.

You should work on a separate transifex branch.

tx pull
poindent --modified
git commit -m "tx pull"
git checkout 3.6
git merge transifex -Xours
tx push -t

About

French translation of the Python documentation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages