From e9e1d4fcdd93dc3ffc7201b7a310d1b7844b9f4d Mon Sep 17 00:00:00 2001 From: Mathieu Dupuy Date: Thu, 2 Apr 2020 15:58:21 +0200 Subject: [PATCH] using/windows : UTF-8 + locale.getlocaleencoding (#1215) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * supprime les traductions commentées * section 'UTF-8' de using/windows + locale.getlocaleencoding * Apply suggestions from code review Co-Authored-By: Antoine <43954001+awecx@users.noreply.github.com> * codage partout, justice nulle part * "utilisable sans protection dans les programmes à fils d'exécutions multiples" --- library/locale.po | 20 +++++++++-- using/windows.po | 92 +++++++++++++++++------------------------------ 2 files changed, 51 insertions(+), 61 deletions(-) diff --git a/library/locale.po b/library/locale.po index ab584437..5474b14d 100644 --- a/library/locale.po +++ b/library/locale.po @@ -6,13 +6,14 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-12-17 21:38+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2020-03-28 20:05+0100\n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Last-Translator: Mathieu Dupuy \n" +"X-Generator: Poedit 2.3\n" #: ../Doc/library/locale.rst:2 msgid ":mod:`locale` --- Internationalization services" @@ -509,6 +510,11 @@ msgid "" "available programmatically on some systems, so this function only returns a " "guess." msgstr "" +"Renvoie le codage utilisé pour les données textuelles, selon les préférences " +"de l'utilisateur. Les préférences de l'utilisateur sont exprimées " +"différemment selon les systèmes et peuvent ne pas être disponibles via les " +"interfaces de programmation sur certains systèmes. Cette fonction ne renvoie " +"donc qu'une supposition." #: ../Doc/library/locale.rst:323 msgid "" @@ -516,18 +522,28 @@ msgid "" "user preferences, so this function is not thread-safe. If invoking setlocale " "is not necessary or desired, *do_setlocale* should be set to ``False``." msgstr "" +"Sur certains systèmes, il est nécessaire d'invoquer :func:`setlocale` pour " +"obtenir les préférences de l'utilisateur, cette fonction n'est donc pas " +"utilisable sans protection dans les programmes à fils d'exécutions " +"multiples. Si l'appel de `setlocale` n'est pas nécessaire ou souhaité, " +"*do_setlocale* doit être réglé à ``False``." #: ../Doc/library/locale.rst:327 msgid "" "On Android or in the UTF-8 mode (:option:`-X` ``utf8`` option), always " "return ``'UTF-8'``, the locale and the *do_setlocale* argument are ignored." msgstr "" +"Sur Android ou dans le mode UTF-8 (avec l'option :option:`-X` ``utf8``), " +"renvoie toujours ``'UTF-8'``, la locale et l'argument *do_setlocale* sont " +"ignorés." #: ../Doc/library/locale.rst:330 msgid "" "The function now always returns ``UTF-8`` on Android or if the UTF-8 mode is " "enabled." msgstr "" +"La fonction renvoie maintenant toujours ``UTF-8`` sur Android ou si le mode " +"UTF-8 est activé." #: ../Doc/library/locale.rst:337 msgid "" diff --git a/using/windows.po b/using/windows.po index f1216884..635299a6 100644 --- a/using/windows.po +++ b/using/windows.po @@ -6,15 +6,15 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-02-04 10:00+0100\n" -"PO-Revision-Date: 2019-12-01 23:28+0100\n" -"Last-Translator: Jules Lasne \n" +"PO-Revision-Date: 2020-03-28 20:03+0100\n" +"Last-Translator: Mathieu Dupuy \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 2.3\n" "X-Poedit-SourceCharset: UTF-8\n" #: ../Doc/using/windows.rst:7 @@ -1394,7 +1394,7 @@ msgstr "" #: ../Doc/using/windows.rst:608 msgid "UTF-8 mode" -msgstr "" +msgstr "Mode UTF-8" #: ../Doc/using/windows.rst:612 msgid "" @@ -1402,12 +1402,18 @@ msgid "" "Page). Python uses it for the default encoding of text files (e.g. :func:" "`locale.getpreferredencoding`)." msgstr "" +"Windows utilise toujours les anciens codages pour l'encodage du système (la " +"page de code ANSI). Python l'utilise pour le codage par défaut des fichiers " +"texte (par exemple :func:`locale.getpreferredencoding`)." #: ../Doc/using/windows.rst:616 msgid "" "This may cause issues because UTF-8 is widely used on the internet and most " "Unix systems, including WSL (Windows Subsystem for Linux)." msgstr "" +"Cela peut poser des problèmes car l'UTF-8 est largement utilisé sur Internet " +"et sur la plupart des systèmes Unix, y compris le WSL (*Windows Subsystem " +"for Linux*)." #: ../Doc/using/windows.rst:619 msgid "" @@ -1417,10 +1423,15 @@ msgid "" "enabling UTF-8 mode, and :ref:`setting-envvars` for how to modify " "environment variables." msgstr "" +"Vous pouvez utiliser le mode UTF-8 pour changer le codage de texte par " +"défaut en UTF-8. Vous pouvez activer le mode UTF-8 via l'option de ligne de " +"commande ``-X utf8`` ou la variable d'environnement ``PYTHONUTF8=1``. Voir :" +"envvar:`PYTHONUTF8` pour activer le mode UTF-8, et :ref:`setting-envvars` " +"pour savoir comment modifier les variables d'environnement." #: ../Doc/using/windows.rst:625 msgid "When UTF-8 mode is enabled:" -msgstr "" +msgstr "Lorsque le mode UTF-8 est activé :" #: ../Doc/using/windows.rst:627 msgid "" @@ -1429,16 +1440,23 @@ msgid "" "many places, including :func:`open`, :class:`Popen`, :meth:`Path.read_text`, " "etc." msgstr "" +":func:`locale.getpreferredencoding` renvoie ``UTF-8`` au lieu de l'encodage " +"du système. Cette fonction est utilisée pour le codage du texte par défaut " +"à de nombreux endroits, y compris :func:`open`, :class:`Popen`, :meth:`Path." +"read_text`, etc." #: ../Doc/using/windows.rst:631 msgid "" ":data:`sys.stdin`, :data:`sys.stdout`, and :data:`sys.stderr` all use UTF-8 " "as their text encoding." msgstr "" +":data:`sys.stdin`, :data:`sys.stdout`, et :data:`sys.stderr` utilisent tous " +"l'UTF-8 comme codage de texte." #: ../Doc/using/windows.rst:633 msgid "You can still use the system encoding via the \"mbcs\" codec." msgstr "" +"Vous pouvez toujours utiliser l'encodage du système via le codec ``mbcs``." #: ../Doc/using/windows.rst:635 msgid "" @@ -1448,20 +1466,30 @@ msgid "" "recommended to set the environment variable temporarily or use the ``-X " "utf8`` command line option." msgstr "" +"Notez que l'ajout de ``PYTHONUTF8=1`` aux variables d'environnement par " +"défaut affectera toutes les applications Python 3.7+ sur votre système. Si " +"vous avez des applications Python 3.7+ qui dépendent de l'encodage du " +"système existant, il est recommandé de définir la variable d'environnement " +"temporairement ou d'utiliser l'option de ligne de commande ``-X utf8``." #: ../Doc/using/windows.rst:642 msgid "" "Even when UTF-8 mode is disabled, Python uses UTF-8 by default on Windows " "for:" msgstr "" +"même lorsque le mode UTF-8 est désactivé, Python utilise UTF-8 par défaut " +"sur Windows pour :" #: ../Doc/using/windows.rst:645 msgid "Console I/O including standard I/O (see :pep:`528` for details)." msgstr "" +"Les E/S de la console, y compris les E/S standards (voir :pep:`528` pour " +"plus de détails)." #: ../Doc/using/windows.rst:646 msgid "The filesystem encoding (see :pep:`529` for details)." msgstr "" +"L'encodage du système de fichiers (voir :pep:`529` pour plus de détails)." #: ../Doc/using/windows.rst:652 msgid "Python Launcher for Windows" @@ -2541,57 +2569,3 @@ msgstr "" "Voir `Python pour Windows `_ pour " "des instructions détaillées sur les plateformes avec installateurs pré-" "compilés." - -#~ msgid "" -#~ "Currently, the ``py.exe`` launcher cannot be used to start Python when it " -#~ "has been installed from the Microsoft Store." -#~ msgstr "" -#~ "Actuellement, le lanceur ``py.exe`` ne peut pas être utilisé pour " -#~ "démarrer Python lorsqu'il a été installé à partir de la boutique " -#~ "Microsoft." - -#~ msgid "" -#~ "The Microsoft Store package is currently considered unstable while its " -#~ "interactions with other tools and other copies of Python are evaluated. " -#~ "While Python itself is stable, this installation method may change its " -#~ "behavior and capabilities during Python 3.7 releases." -#~ msgstr "" -#~ "Le paquet *Microsoft Store* est actuellement considéré comme instable le " -#~ "temps que ses interactions avec d'autres outils et d'autres copies de " -#~ "Python soient évaluées. Bien que Python lui-même soit stable, cette " -#~ "méthode d'installation peut modifier son comportement et ses capacités " -#~ "durant les versions de Python 3.7." - -#~ msgid "by Trent Apted et al, 2007" -#~ msgstr "par Trent Apted et al, 2007" - -#~ msgid "Installing Python" -#~ msgstr "Installer Python" - -#~ msgid "Supported Versions" -#~ msgstr "Versions supportées" - -#~ msgid "Other resources" -#~ msgstr "Autres ressources" - -#~ msgid "" -#~ "\"Help for Windows Programmers\" by Mark Hammond and Andy Robinson, " -#~ "O'Reilly Media, 2000, ISBN 1-56592-621-8" -#~ msgstr "" -#~ "\"Help for Windows Programmers\" de Mark Hammond et Andy Robinson, " -#~ "O'Reilly Media, 2000, ISBN 1-56592-621-8" - -#~ msgid "by Amanda Birmingham, 2004" -#~ msgstr "par Amanda Birmingham, 2004" - -#, fuzzy -#~ msgid "WinPython" -#~ msgstr "Installer Python" - -#, fuzzy -#~ msgid "MingW -- Python extensions" -#~ msgstr "Utiliser Python sur Windows" - -#, fuzzy -#~ msgid "A Python for Windows Tutorial" -#~ msgstr "Utiliser Python sur Windows"