1
0
Fork 0

Traduction de library/fileinput.po (#1690)

Automerge of PR #1690 by @Jean-Abou-Samra
#1689

Closes #1689

Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
This commit is contained in:
Jean-Abou-Samra 2021-09-20 14:32:23 +02:00 committed by GitHub
parent 6254b89f8c
commit 073a3a277e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 128 additions and 13 deletions

1
dict
View File

@ -71,6 +71,7 @@ fredrik
freeze freeze
glibc glibc
guido guido
gzip
hachabilité hachabilité
hachable hachable
hachables hachables

View File

@ -5,18 +5,19 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Python 3\n" "Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-01 16:00+0200\n" "POT-Creation-Date: 2021-09-08 14:47+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: 2021-09-19 23:19+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" "Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n" "Language: fr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Last-Translator: Jean Abou Samra <jean@abou-samra.fr>\n"
"X-Generator: Poedit 2.4.1\n"
#: library/fileinput.rst:2 #: library/fileinput.rst:2
msgid ":mod:`fileinput` --- Iterate over lines from multiple input streams" msgid ":mod:`fileinput` --- Iterate over lines from multiple input streams"
msgstr "" msgstr ":mod:`fileinput`  Parcourt les lignes provenant de plusieurs entrées"
#: library/fileinput.rst:10 #: library/fileinput.rst:10
msgid "**Source code:** :source:`Lib/fileinput.py`" msgid "**Source code:** :source:`Lib/fileinput.py`"
@ -28,10 +29,13 @@ msgid ""
"over standard input or a list of files. If you just want to read or write " "over standard input or a list of files. If you just want to read or write "
"one file see :func:`open`." "one file see :func:`open`."
msgstr "" msgstr ""
"Ce module offre une classe auxiliaire et des fonctions pour lire facilement "
"l'entrée standard ou bien les fichiers d'une liste. Si vous n'avez besoin de "
"lire ou écrire qu'un seul fichier, il suffit de :func:`open`."
#: library/fileinput.rst:18 #: library/fileinput.rst:18
msgid "The typical use is::" msgid "The typical use is::"
msgstr "" msgstr "Ce module s'utilise le plus couramment comme ceci :"
#: library/fileinput.rst:24 #: library/fileinput.rst:24
msgid "" msgid ""
@ -42,6 +46,12 @@ msgid ""
"it as the first argument to :func:`.input`. A single file name is also " "it as the first argument to :func:`.input`. A single file name is also "
"allowed." "allowed."
msgstr "" msgstr ""
"Ce code traite une à une les lignes des fichiers de ``sys.argv[1:]``. Si "
"cette liste est vide (pas d'argument en ligne de commande), il lit l'entrée "
"standard. Le nom de fichier ``'-'`` est équivalent à l'entrée standard (les "
"arguments facultatifs *mode* et *openhook* sont ignorés dans ce cas). On "
"peut aussi passer la liste des fichiers comme argument à :func:`.input`, "
"voire un nom de fichier unique."
#: library/fileinput.rst:30 #: library/fileinput.rst:30
msgid "" msgid ""
@ -50,12 +60,16 @@ msgid ""
"`FileInput`. If an I/O error occurs during opening or reading a file, :exc:" "`FileInput`. If an I/O error occurs during opening or reading a file, :exc:"
"`OSError` is raised." "`OSError` is raised."
msgstr "" msgstr ""
"Par défaut, tous les fichiers sont ouverts en mode texte. On peut changer ce "
"comportement à l'aide du paramètre *mode* de la fonction :func:`.input` ou "
"du constructeur de :class:`FileInput`. Si une erreur d'entrée-sortie se "
"produit durant l'ouverture ou la lecture d'un fichier, l'exception :exc:"
"`OSError` est levée."
#: library/fileinput.rst:35 #: library/fileinput.rst:35
#, fuzzy
msgid ":exc:`IOError` used to be raised; it is now an alias of :exc:`OSError`." msgid ":exc:`IOError` used to be raised; it is now an alias of :exc:`OSError`."
msgstr "" msgstr ""
":exc:`IOError` était normalement levée, elle est maintenant un alias de :exc:" ":exc:`IOError` était levée auparavant, elle est devenue un alias de :exc:"
"`OSError`." "`OSError`."
#: library/fileinput.rst:38 #: library/fileinput.rst:38
@ -64,6 +78,10 @@ msgid ""
"return no lines, except perhaps for interactive use, or if it has been " "return no lines, except perhaps for interactive use, or if it has been "
"explicitly reset (e.g. using ``sys.stdin.seek(0)``)." "explicitly reset (e.g. using ``sys.stdin.seek(0)``)."
msgstr "" msgstr ""
"Si ``sys.stdin`` apparaît plus d'une fois dans la liste, toutes les lignes "
"sont consommées dès la première fois, sauf éventuellement en cas d'usage "
"interactif ou si le flux d'entrée standard a été modifié dans l'intervalle "
"(par exemple avec ``sys.stdin.seek(0)``)."
#: library/fileinput.rst:42 #: library/fileinput.rst:42
msgid "" msgid ""
@ -71,12 +89,18 @@ msgid ""
"in the list of filenames is noticeable at all is when the last file opened " "in the list of filenames is noticeable at all is when the last file opened "
"is empty." "is empty."
msgstr "" msgstr ""
"Les fichiers vides sont ouverts et refermés immédiatement. Ils ne sont pas "
"détectables dans la liste des fichiers, sauf éventuellement dans le cas où "
"le dernier fichier est vide."
#: library/fileinput.rst:46 #: library/fileinput.rst:46
msgid "" msgid ""
"Lines are returned with any newlines intact, which means that the last line " "Lines are returned with any newlines intact, which means that the last line "
"in a file may not have one." "in a file may not have one."
msgstr "" msgstr ""
"Les caractères de saut de ligne sont préservés, donc toutes les lignes se "
"terminent par un saut de ligne, sauf éventuellement la dernière ligne d'un "
"fichier."
#: library/fileinput.rst:49 #: library/fileinput.rst:49
msgid "" msgid ""
@ -86,10 +110,17 @@ msgid ""
"returns an accordingly opened file-like object. Two useful hooks are already " "returns an accordingly opened file-like object. Two useful hooks are already "
"provided by this module." "provided by this module."
msgstr "" msgstr ""
"Le paramètre *openhook* donne le contrôle sur la manière dont les fichiers "
"sont ouverts par :func:`fileinput.input` ou :class:`FileInput()`. Il s'agit "
"d'un point d'entrée automatique (*hook* en anglais). S'il est précisé, sa "
"valeur doit être une fonction, qui est appelée avec les arguments *filename* "
"et *mode* pour renvoyer un objet fichier-compatible ouvert selon *mode*. Ce "
"module contient deux fonctions prédéfinies qui peuvent être passées pour "
"*openhook*."
#: library/fileinput.rst:55 #: library/fileinput.rst:55
msgid "The following function is the primary interface of this module:" msgid "The following function is the primary interface of this module:"
msgstr "" msgstr "La fonction suivante constitue l'interface principale du module :"
#: library/fileinput.rst:60 #: library/fileinput.rst:60
msgid "" msgid ""
@ -98,6 +129,11 @@ msgid ""
"to use during iteration. The parameters to this function will be passed " "to use during iteration. The parameters to this function will be passed "
"along to the constructor of the :class:`FileInput` class." "along to the constructor of the :class:`FileInput` class."
msgstr "" msgstr ""
"Crée une instance de :class:`FileInput`, qui devient l'état global pour "
"toutes les fonctions du module. Elle est également renvoyée afin que "
"l'utilisateur puisse la parcourir comme un objet itérable. Tous les "
"paramètres de cette fonction sont transmis au constructeur de :class:"
"`FileInput`."
#: library/fileinput.rst:65 #: library/fileinput.rst:65
msgid "" msgid ""
@ -105,32 +141,44 @@ msgid ""
"keyword:`with` statement. In this example, *input* is closed after the :" "keyword:`with` statement. In this example, *input* is closed after the :"
"keyword:`!with` statement is exited, even if an exception occurs::" "keyword:`!with` statement is exited, even if an exception occurs::"
msgstr "" msgstr ""
"Les instances de :class:`FileInput` peuvent s'utiliser comme gestionnaires "
"de contexte, avec l'instruction :keyword:`with`. Dans le code suivant, "
"*input* est fermé lorsque le bloc :keyword:`!with` se termine, y compris si "
"une exception l'a interrompu."
#: library/fileinput.rst:166 #: library/fileinput.rst:166
msgid "Can be used as a context manager." msgid "Can be used as a context manager."
msgstr "" msgstr "prise en charge du protocole de gestionnaire de contexte."
#: library/fileinput.rst:76 #: library/fileinput.rst:76
msgid "The keyword parameters *mode* and *openhook* are now keyword-only." msgid "The keyword parameters *mode* and *openhook* are now keyword-only."
msgstr "" msgstr "les paramètres *mode* et *openhook* doivent être nommés."
#: library/fileinput.rst:80 #: library/fileinput.rst:80
msgid "" msgid ""
"The following functions use the global state created by :func:`fileinput." "The following functions use the global state created by :func:`fileinput."
"input`; if there is no active state, :exc:`RuntimeError` is raised." "input`; if there is no active state, :exc:`RuntimeError` is raised."
msgstr "" msgstr ""
"Toutes les fonctions suivantes font appel à l'état global du module mis en "
"place par :func:`fileinput.input`. L'absence de cet état déclenche "
"l'exception :exc:`RuntimeError`."
#: library/fileinput.rst:86 #: library/fileinput.rst:86
msgid "" msgid ""
"Return the name of the file currently being read. Before the first line has " "Return the name of the file currently being read. Before the first line has "
"been read, returns ``None``." "been read, returns ``None``."
msgstr "" msgstr ""
"Renvoie le nom du fichier en train d'être lu, ou ``None`` avant la lecture "
"de la toute première ligne."
#: library/fileinput.rst:92 #: library/fileinput.rst:92
msgid "" msgid ""
"Return the integer \"file descriptor\" for the current file. When no file is " "Return the integer \"file descriptor\" for the current file. When no file is "
"opened (before the first line and between files), returns ``-1``." "opened (before the first line and between files), returns ``-1``."
msgstr "" msgstr ""
"Renvoie le descripteur de fichier (sous forme d'entier) utilisé pour lire le "
"fichier courant. Si aucun fichier n'est ouvert (avant la première ligne et "
"entre les fichiers), le résultat est ``-1``."
#: library/fileinput.rst:98 #: library/fileinput.rst:98
msgid "" msgid ""
@ -138,6 +186,10 @@ msgid ""
"Before the first line has been read, returns ``0``. After the last line of " "Before the first line has been read, returns ``0``. After the last line of "
"the last file has been read, returns the line number of that line." "the last file has been read, returns the line number of that line."
msgstr "" msgstr ""
"Renvoie le numéro de la ligne qui vient d'être lue, en commençant par la "
"première ligne du premier fichier. Avant cette toute première ligne, renvoie "
"``0``. Après la dernière ligne du dernier fichier, renvoie le numéro de "
"cette ligne."
#: library/fileinput.rst:105 #: library/fileinput.rst:105
msgid "" msgid ""
@ -145,18 +197,25 @@ msgid ""
"read, returns ``0``. After the last line of the last file has been read, " "read, returns ``0``. After the last line of the last file has been read, "
"returns the line number of that line within the file." "returns the line number of that line within the file."
msgstr "" msgstr ""
"Renvoie le numéro de ligne relatif au fichier courant. Avant la toute "
"première ligne, renvoie ``0``. Après la toute dernière ligne, renvoie le "
"numéro de cette ligne par rapport à son fichier source."
#: library/fileinput.rst:112 #: library/fileinput.rst:112
msgid "" msgid ""
"Return ``True`` if the line just read is the first line of its file, " "Return ``True`` if the line just read is the first line of its file, "
"otherwise return ``False``." "otherwise return ``False``."
msgstr "" msgstr ""
"Renvoie ``True`` ou ``False`` selon que la ligne qui vient d'être lue est la "
"première du fichier."
#: library/fileinput.rst:118 #: library/fileinput.rst:118
msgid "" msgid ""
"Return ``True`` if the last line was read from ``sys.stdin``, otherwise " "Return ``True`` if the last line was read from ``sys.stdin``, otherwise "
"return ``False``." "return ``False``."
msgstr "" msgstr ""
"``True`` ou ``False`` selon que la dernière ligne lue provenait de ``sys."
"stdin`` ou non."
#: library/fileinput.rst:124 #: library/fileinput.rst:124
msgid "" msgid ""
@ -168,16 +227,27 @@ msgid ""
"file. After the last line of the last file has been read, this function has " "file. After the last line of the last file has been read, this function has "
"no effect." "no effect."
msgstr "" msgstr ""
"Ferme le fichier courant et laisse la lecture se poursuivre au début du "
"suivant (ou se terminer si c'était le dernier fichier ; dans ce cas cette "
"fonction ne fait rien). Les lignes court-circuitées ne comptent pas dans les "
"numéros des lignes des fichiers suivants. Le nom du fichier courant n'est "
"pas modifié immédiatement, mais seulement après que la première ligne du "
"fichier suivant a été lue. Cette fonction n'a pas d'effet avant la lecture "
"de la première ligne (elle ne peut pas sauter le premier fichier)."
#: library/fileinput.rst:134 #: library/fileinput.rst:134
msgid "Close the sequence." msgid "Close the sequence."
msgstr "" msgstr ""
"Ferme le fichier courant et termine la lecture en sautant les fichiers "
"suivants."
#: library/fileinput.rst:136 #: library/fileinput.rst:136
msgid "" msgid ""
"The class which implements the sequence behavior provided by the module is " "The class which implements the sequence behavior provided by the module is "
"available for subclassing as well:" "available for subclassing as well:"
msgstr "" msgstr ""
"La classe qui implémente ce comportement du module est publique. On peut en "
"créer des classes filles."
#: library/fileinput.rst:142 #: library/fileinput.rst:142
msgid "" msgid ""
@ -190,12 +260,24 @@ msgid ""
"behavior. The sequence must be accessed in strictly sequential order; random " "behavior. The sequence must be accessed in strictly sequential order; random "
"access and :meth:`~io.TextIOBase.readline` cannot be mixed." "access and :meth:`~io.TextIOBase.readline` cannot be mixed."
msgstr "" msgstr ""
":class:`FileInput` est l'implémentation principale du module. Ses méthodes :"
"meth:`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:"
"`isfirstline`, :meth:`isstdin`, :meth:`nextfile` et :meth:`close` "
"correspondent aux fonctions du même nom au niveau du module. Elle possède "
"également une méthode :meth:`~io.TextIOBase.readline`, qui lit une nouvelle "
"ligne et la renvoie, ainsi qu'une méthode :meth:`__getitem__` qui permet "
"l'accès à un indice. Il faut lire les éléments de la séquence strictement "
"dans l'ordre (l'accès à un indice arbitraire n'étant pas compatible avec :"
"meth:`~io.TextIOBase.readline`)."
#: library/fileinput.rst:151 #: library/fileinput.rst:151
msgid "" msgid ""
"With *mode* you can specify which file mode will be passed to :func:`open`. " "With *mode* you can specify which file mode will be passed to :func:`open`. "
"It must be one of ``'r'``, ``'rU'``, ``'U'`` and ``'rb'``." "It must be one of ``'r'``, ``'rU'``, ``'U'`` and ``'rb'``."
msgstr "" msgstr ""
"Le paramètre *mode* permet de préciser le mode d'ouverture des fichiers. Il "
"est passé directement à :func:`open`. Les valeurs possibles sont ``'r'``, "
"``'rU'``, ``'U'`` et ``'rb'``."
#: library/fileinput.rst:154 #: library/fileinput.rst:154
msgid "" msgid ""
@ -203,6 +285,10 @@ msgid ""
"*filename* and *mode*, and returns an accordingly opened file-like object. " "*filename* and *mode*, and returns an accordingly opened file-like object. "
"You cannot use *inplace* and *openhook* together." "You cannot use *inplace* and *openhook* together."
msgstr "" msgstr ""
"S'il est fourni, l'argument *openhook* est une fonction. Elle est appelée "
"avec les paramètres *filename* et *mode*, et renvoie un objet fichier-"
"compatible ouvert selon *mode*. Notez que *openhook* et *inplace* sont "
"mutuellement exclusifs."
#: library/fileinput.rst:158 #: library/fileinput.rst:158
msgid "" msgid ""
@ -210,18 +296,22 @@ msgid ""
"keyword:`with` statement. In this example, *input* is closed after the :" "keyword:`with` statement. In this example, *input* is closed after the :"
"keyword:`!with` statement is exited, even if an exception occurs::" "keyword:`!with` statement is exited, even if an exception occurs::"
msgstr "" msgstr ""
"Les objets :class:`FileInput` peuvent aussi fonctionner comme gestionnaires "
"de contexte dans un bloc :keyword:`with`. Dans l'exemple suivant, *input* "
"est fermé à la fin du bloc :keyword:`!with`, même arrêté par une exception."
#: library/fileinput.rst:169 #: library/fileinput.rst:169
msgid "The ``'rU'`` and ``'U'`` modes." msgid "The ``'rU'`` and ``'U'`` modes."
msgstr "" msgstr "modes ``'rU'`` et ``'U'``."
#: library/fileinput.rst:172 #: library/fileinput.rst:172
msgid "Support for :meth:`__getitem__` method is deprecated." msgid "Support for :meth:`__getitem__` method is deprecated."
msgstr "" msgstr "accès à un indice avec :meth:`__getitem__`."
#: library/fileinput.rst:175 #: library/fileinput.rst:175
msgid "The keyword parameter *mode* and *openhook* are now keyword-only." msgid "The keyword parameter *mode* and *openhook* are now keyword-only."
msgstr "" msgstr ""
"les paramètres *mode* et *openhook* doivent impérativement être nommés."
#: library/fileinput.rst:180 #: library/fileinput.rst:180
msgid "" msgid ""
@ -236,10 +326,22 @@ msgid ""
"extension is ``'.bak'`` and it is deleted when the output file is closed. " "extension is ``'.bak'`` and it is deleted when the output file is closed. "
"In-place filtering is disabled when standard input is read." "In-place filtering is disabled when standard input is read."
msgstr "" msgstr ""
"**Filtrage sur place optionnel :** si ``inplace=True`` est passé à :func:"
"`fileinput.input` ou au constructeur de :class:`FileInput`, chaque fichier "
"d'entrée est déplacé vers une sauvegarde et la sortie standard est redirigée "
"vers le fichier lui-même, ce qui permet d'écrire des filtres qui modifient "
"directement les fichiers existants. Si le paramètre *backup* est fourni, il "
"donne l'extension des fichiers de sauvegarde. Dans ce cas, la sauvegarde est "
"conservée après l'opération. Par défaut, les fichiers de sauvegarde ont "
"l'extension ``'.bak'`` et sont supprimés dès que le fichier de sortie est "
"fermé. Si un fichier existe avec le même nom que la sauvegarde, il est "
"écrasé. Le filtrage sur place ne fait rien pour l'entrée standard."
#: library/fileinput.rst:192 #: library/fileinput.rst:192
msgid "The two following opening hooks are provided by this module:" msgid "The two following opening hooks are provided by this module:"
msgstr "" msgstr ""
"Les deux fonctions suivantes fournissent des valeurs prédéfinies pour "
"*openhook*."
#: library/fileinput.rst:196 #: library/fileinput.rst:196
msgid "" msgid ""
@ -248,25 +350,37 @@ msgid ""
"modules. If the filename extension is not ``'.gz'`` or ``'.bz2'``, the file " "modules. If the filename extension is not ``'.gz'`` or ``'.bz2'``, the file "
"is opened normally (ie, using :func:`open` without any decompression)." "is opened normally (ie, using :func:`open` without any decompression)."
msgstr "" msgstr ""
"Ouvre de façon transparente les fichiers compressés avec gzip ou bzip2, à "
"l'aide des modules :mod:`gzip` et :mod:`bz2`. Les fichiers compressés sont "
"reconnus aux extensions ``'.gz'`` et ``'.bz2'``. Tous les fichiers qui n'ont "
"pas l'une de ces deux extensions sont ouverts normalement (avec :func:"
"`open`, sans décompression)."
#: library/fileinput.rst:201 #: library/fileinput.rst:201
msgid "" msgid ""
"Usage example: ``fi = fileinput.FileInput(openhook=fileinput." "Usage example: ``fi = fileinput.FileInput(openhook=fileinput."
"hook_compressed)``" "hook_compressed)``"
msgstr "" msgstr ""
"Exemple d'utilisation : ``fi = fileinput.FileInput(openhook=fileinput."
"hook_compressed)``."
#: library/fileinput.rst:206 #: library/fileinput.rst:206
msgid "" msgid ""
"Returns a hook which opens each file with :func:`open`, using the given " "Returns a hook which opens each file with :func:`open`, using the given "
"*encoding* and *errors* to read the file." "*encoding* and *errors* to read the file."
msgstr "" msgstr ""
"Renvoie une fonction qui ouvre les fichiers en passant à :func:`open` les "
"arguments *encoding* et *errors*. Le résultat peut être exploité à travers "
"le point d'entrée automatique *openhook*."
#: library/fileinput.rst:209 #: library/fileinput.rst:209
msgid "" msgid ""
"Usage example: ``fi = fileinput.FileInput(openhook=fileinput." "Usage example: ``fi = fileinput.FileInput(openhook=fileinput."
"hook_encoded(\"utf-8\", \"surrogateescape\"))``" "hook_encoded(\"utf-8\", \"surrogateescape\"))``"
msgstr "" msgstr ""
"Exemple d'utilisation : ``fi = fileinput.FileInput(openhook=fileinput."
"hook_encoded(\"utf-8\", \"surrogateescape\"))``."
#: library/fileinput.rst:213 #: library/fileinput.rst:213
msgid "Added the optional *errors* parameter." msgid "Added the optional *errors* parameter."
msgstr "" msgstr "ajout du paramètre facultatif *errors*."