From 7acacbb2a4a7359a38b63c4d402cc7bdb08638c8 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Wed, 22 Mar 2023 23:00:40 +0100 Subject: [PATCH] Backporting from 3.11 after upstream merge. --- extending/embedding.po | 5 +-- howto/annotations.po | 5 +++ howto/logging-cookbook.po | 76 ++++++++++++++++++++++++++++---------- library/argparse.po | 46 +++++++++-------------- library/functions.po | 36 ++++++++---------- library/pathlib.po | 22 ++++++----- library/re.po | 20 ++++++---- library/sqlite3.po | 9 ++++- library/struct.po | 12 +++--- merge.py | 25 +++++++++---- tutorial/classes.po | 10 ++--- tutorial/datastructures.po | 3 +- tutorial/introduction.po | 4 ++ 13 files changed, 162 insertions(+), 111 deletions(-) diff --git a/extending/embedding.po b/extending/embedding.po index a9d298ca..1256471a 100644 --- a/extending/embedding.po +++ b/extending/embedding.po @@ -421,13 +421,12 @@ msgstr "" "compiler :" #: extending/embedding.rst:304 -#, fuzzy msgid "" "``pythonX.Y-config --ldflags --embed`` will give you the recommended flags " "when linking:" msgstr "" -"``pythonX.Y-config --ldflags`` vous donnera les drapeaux recommandés lors de " -"l'édition de lien :" +"``pythonX.Y-config --ldflags --embed`` vous donnera les drapeaux recommandés " +"lors de l'édition de lien :" #: extending/embedding.rst:313 msgid "" diff --git a/howto/annotations.po b/howto/annotations.po index 663db47c..c0adc085 100644 --- a/howto/annotations.po +++ b/howto/annotations.po @@ -132,6 +132,11 @@ msgid "" "parent's ``__annotations__``. In Python 3.10 and newer, the child class's " "annotations will be an empty dict instead." msgstr "" +"Dans les versions antérieures à Python 3.10, l'accès aux ``__annotations__`` " +"d'une classe qui n'a pas d'annotation mais dont un parent de cette classe en " +"a, aurait renvoyé les ``__annotations__`` de la classe parent. Dans les " +"versions 3.10 et plus récentes, le résultat d'annotations de la classe " +"enfant est un dictionnaire vide." #: howto/annotations.rst:68 msgid "Accessing The Annotations Dict Of An Object In Python 3.9 And Older" diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index 4d75f330..e9399c8f 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -526,7 +526,6 @@ msgstr "" "Journalisation en production à l'aide d'un connecteur en écoute sur le réseau" #: howto/logging-cookbook.rst:770 -#, fuzzy msgid "" "To run a logging listener in production, you may need to use a process-" "management tool such as `Supervisor `_. `Here is a " @@ -534,84 +533,90 @@ msgid "" "the above functionality using Supervisor. It consists of the following files:" msgstr "" "Pour de la journalisation en production *via* un connecteur réseau en " -"écoute, il est probable que vous ayez besoin d'utiliser un outil de " +"écoute, il est probable que vous ayez besoin d’utiliser un outil de " "surveillance tel que `Supervisor `_. Vous trouverez " -"dans ce `Gist `_ des gabarits pour assurer cette " -"fonction avec *Supervisor* : vous aurez besoin de modifier les parties ``/" -"path/to/`` du *Gist* pour refléter les chemins réels que vous utilisez." +"dans ce `Gist `__ des gabarits pour assurer cette " +"fonction avec *Supervisor*. Il est composé des fichiers suivants :" #: howto/logging-cookbook.rst:777 msgid "File" -msgstr "" +msgstr "Fichier" #: howto/logging-cookbook.rst:777 msgid "Purpose" -msgstr "" +msgstr "Objectif" #: howto/logging-cookbook.rst:779 msgid ":file:`prepare.sh`" -msgstr "" +msgstr ":file:`prepare.sh`" #: howto/logging-cookbook.rst:779 msgid "A Bash script to prepare the environment for testing" -msgstr "" +msgstr "Script Bash pour préparer l'environnement de test" #: howto/logging-cookbook.rst:782 msgid ":file:`supervisor.conf`" -msgstr "" +msgstr ":file:`supervisor.conf`" #: howto/logging-cookbook.rst:782 msgid "" "The Supervisor configuration file, which has entries for the listener and a " "multi-process web application" msgstr "" +"Fichier de configuration de *Supervisor*, avec les entrées pour le " +"connecteur en écoute et l'application web multi-processus" #: howto/logging-cookbook.rst:786 msgid ":file:`ensure_app.sh`" -msgstr "" +msgstr ":file:`ensure_app.sh`" #: howto/logging-cookbook.rst:786 msgid "" "A Bash script to ensure that Supervisor is running with the above " "configuration" msgstr "" +"Script Bash pour s'assurer que *Supervisor* fonctionne bien avec la " +"configuration ci-dessus" #: howto/logging-cookbook.rst:789 msgid ":file:`log_listener.py`" -msgstr "" +msgstr ":file:`log_listener.py`" #: howto/logging-cookbook.rst:789 msgid "" "The socket listener program which receives log events and records them to a " "file" msgstr "" +"Programme en écoute sur le réseau qui reçoit les événements de " +"journalisation et les enregistre dans un fichier" #: howto/logging-cookbook.rst:792 msgid ":file:`main.py`" -msgstr "" +msgstr ":file:`main.py`" #: howto/logging-cookbook.rst:792 msgid "" "A simple web application which performs logging via a socket connected to " "the listener" -msgstr "" +msgstr "Application web simple qui journalise *via* un connecteur réseau" #: howto/logging-cookbook.rst:795 msgid ":file:`webapp.json`" -msgstr "" +msgstr ":file:`webapp.json`" #: howto/logging-cookbook.rst:795 msgid "A JSON configuration file for the web application" -msgstr "" +msgstr "Fichier JSON de configuration de l'application web" #: howto/logging-cookbook.rst:797 msgid ":file:`client.py`" -msgstr "" +msgstr ":file:`client.py`" #: howto/logging-cookbook.rst:797 msgid "A Python script to exercise the web application" msgstr "" +"Script Python qui interagit avec l'application web pour effectuer des appels " +"à la journalisation" #: howto/logging-cookbook.rst:800 msgid "" @@ -621,20 +626,30 @@ msgid "" "same log file without conflicting with one another --- they all go through " "the socket listener." msgstr "" +"L'application Web utilise `Gunicorn `_, qui est un " +"serveur d'applications Web populaire qui démarre plusieurs processus de " +"travail pour gérer les demandes. Cet exemple de configuration montre comment " +"les processus peuvent écrire dans le même fichier journal sans entrer en " +"conflit les uns avec les autres — ils passent tous par le connecteur en " +"écoute." #: howto/logging-cookbook.rst:805 msgid "To test these files, do the following in a POSIX environment:" msgstr "" +"Pour tester ces fichiers, suivez cette procédure dans un environnement " +"POSIX :" #: howto/logging-cookbook.rst:807 msgid "" "Download `the Gist `__ as a ZIP archive using the :" "guilabel:`Download ZIP` button." msgstr "" +"Téléchargez l'archive ZIP du `Gist `__ à l'aide du " +"bouton :guilabel:`Download ZIP`." #: howto/logging-cookbook.rst:810 msgid "Unzip the above files from the archive into a scratch directory." -msgstr "" +msgstr "Décompressez les fichiers de l'archive dans un répertoire de travail." #: howto/logging-cookbook.rst:812 msgid "" @@ -643,18 +658,27 @@ msgid "" "files, and a :file:`venv` subdirectory to contain a virtual environment into " "which ``bottle``, ``gunicorn`` and ``supervisor`` are installed." msgstr "" +"Dans le répertoire de travail, exécutez le script de préparation par ``bash " +"prepare.sh``. Cela crée un sous-répertoire :file:`run` pour contenir les " +"fichiers journaux et ceux relatifs à *Supervisor*, ainsi qu'un sous-" +"répertoire :file:`venv` pour contenir un environnement virtuel dans lequel " +"``bottle``, ``gunicorn`` et ``supervisor`` sont installés." #: howto/logging-cookbook.rst:817 msgid "" "Run ``bash ensure_app.sh`` to ensure that Supervisor is running with the " "above configuration." msgstr "" +"Exécutez ``bash ensure_app.sh`` pour vous assurer que *Supervisor* s'exécute " +"avec la configuration ci-dessus." #: howto/logging-cookbook.rst:820 msgid "" "Run ``venv/bin/python client.py`` to exercise the web application, which " "will lead to records being written to the log." msgstr "" +"Exécutez ``venv/bin/python client.py`` pour tester l'application Web, ce qui " +"entraîne l'écriture d'enregistrements dans le journal." #: howto/logging-cookbook.rst:823 msgid "" @@ -663,18 +687,28 @@ msgid "" "won't be in any particular order, since they have been handled concurrently " "by different worker processes in a non-deterministic way." msgstr "" +"Inspectez les fichiers journaux dans le sous-répertoire :file:`run`. Vous " +"devriez voir les lignes de journal les plus récentes dans les fichiers de " +"type :file:`app.log*`. Ils ne seront pas dans un ordre particulier, car ils " +"ont été traités par les différents processus de travail de manière non " +"déterministe." #: howto/logging-cookbook.rst:828 msgid "" "You can shut down the listener and the web application by running ``venv/bin/" "supervisorctl -c supervisor.conf shutdown``." msgstr "" +"Vous pouvez arrêter le connecteur en écoute et l'application Web en " +"exécutant ``venv/bin/supervisorctl -c supervisor.conf shutdown``." #: howto/logging-cookbook.rst:831 msgid "" "You may need to tweak the configuration files in the unlikely event that the " "configured ports clash with something else in your test environment." msgstr "" +"Vous devrez peut-être modifier les fichiers de configuration dans le cas peu " +"probable où les ports configurés entrent en conflit avec autre chose dans " +"votre environnement de test." #: howto/logging-cookbook.rst:837 msgid "Adding contextual information to your logging output" @@ -1596,11 +1630,15 @@ msgid "" "An example of how you can define a namer and rotator is given in the " "following runnable script, which shows gzip compression of the log file::" msgstr "" +"L’extrait de code suivant fournit un exemple de la façon dont vous pouvez " +"définir un nom et un rotateur, avec la compression par *zlib* du journal ::" #: howto/logging-cookbook.rst:2015 msgid "" "After running this, you will see six new files, five of which are compressed:" msgstr "" +"Après l'avoir exécuté, vous verrez six nouveaux fichiers, dont cinq sont " +"compressés :" #: howto/logging-cookbook.rst:2028 msgid "A more elaborate multiprocessing example" diff --git a/library/argparse.po b/library/argparse.po index db0f9cd4..f296821b 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -206,18 +206,16 @@ msgstr "" "partir des arguments ajoutés à l'analyseur) ;" #: library/argparse.rst:157 -#, fuzzy msgid "" "description_ - Text to display before the argument help (by default, no text)" msgstr "" -"description_ – Texte à afficher avant l'aide des arguments (par défaut : " -"vide) ;" +"description_ – Texte à afficher au dessus de l'aide pour les arguments (vide " +"par défaut) ;" #: library/argparse.rst:160 -#, fuzzy msgid "epilog_ - Text to display after the argument help (by default, no text)" msgstr "" -"epilog_ – Texte à afficher après l'aide des arguments (par défaut : vide) ;" +"epilog_ – Texte à afficher après l'aide des arguments (vide par défaut) ;" #: library/argparse.rst:162 msgid "" @@ -828,11 +826,8 @@ msgstr "" "converti ;" #: library/argparse.rst:705 -#, fuzzy msgid "choices_ - A sequence of the allowable values for the argument." -msgstr "" -"choices_ – Conteneur qui contient toutes les valeurs permises pour cet " -"argument ;" +msgstr "choices_ – La séquence de valeurs autorisées pour cet argument ;" #: library/argparse.rst:707 msgid "" @@ -1366,7 +1361,6 @@ msgid "choices" msgstr "Le paramètre *choices*" #: library/argparse.rst:1126 -#, fuzzy msgid "" "Some command-line arguments should be selected from a restricted set of " "values. These can be handled by passing a sequence object as the *choices* " @@ -1375,32 +1369,29 @@ msgid "" "be displayed if the argument was not one of the acceptable values::" msgstr "" "Certains arguments de la ligne de commande doivent être choisis parmi un " -"ensemble fermé de valeurs. Ceux-ci peuvent être gérés en passant un " -"conteneur à l'argument nommé *choices* de la méthode :meth:`~ArgumentParser." -"add_argument`. Quand la ligne de commande est analysée, les valeurs de " -"l'argument sont comparées et un message d'erreur est affiché si l'argument " -"n'est pas parmi les valeurs acceptables ::" +"ensemble prédéfini de valeurs. Celles-ci doivent être déclarées dans la " +"séquence passée à l'argument *choices* de la méthode :meth:`~ArgumentParser." +"add_argument`. Un message d'erreur est alors affiché si l'utilisateur passe " +"un argument qui n'est pas parmi les valeurs acceptables ::" #: library/argparse.rst:1141 -#, fuzzy msgid "" "Note that inclusion in the *choices* sequence is checked after any type_ " "conversions have been performed, so the type of the objects in the *choices* " "sequence should match the type_ specified::" msgstr "" -"Prenez note que le test d'inclusion dans le conteur *choices* est fait après " -"la conversion de type_. Le type des objets dans le conteneur *choices* " -"doivent donc correspondre au type_ spécifié ::" +"Prenez note que le test d'inclusion dans le conteneur *choices* est fait " +"après la conversion de type_. Le type des objets dans le conteneur *choices* " +"doit donc correspondre au type_ spécifié ::" #: library/argparse.rst:1153 -#, fuzzy msgid "" "Any sequence can be passed as the *choices* value, so :class:`list` " "objects, :class:`tuple` objects, and custom sequences are all supported." msgstr "" -"N'importe quel conteneur peut être fourni pour la valeur de *choices*, donc " -"les objets :class:`list`, les objets :class:`set` et les conteneurs " -"personnalisés sont tous acceptés." +"N'importe quel séquence peut être utilisée comme valeur de *choices*, dont " +"les objets de type :class:`list`, :class:`set` ou des conteneurs " +"personnalisés." #: library/argparse.rst:1156 msgid "" @@ -2145,16 +2136,15 @@ msgstr "" "`open` pour plus de détails) ::" #: library/argparse.rst:1834 -#, fuzzy msgid "" "FileType objects understand the pseudo-argument ``'-'`` and automatically " "convert this into :data:`sys.stdin` for readable :class:`FileType` objects " "and :data:`sys.stdout` for writable :class:`FileType` objects::" msgstr "" -"Les objets ``FileType`` reconnaissent le pseudo-argument ``'-'`` et en font " -"automatiquement la conversion vers ``sys.stdin`` pour les objets :class:" -"`FileType` ouverts en lecture et vers ``sys.stdout`` pour les objets :class:" -"`FileType` ouverts en écriture ::" +"Les objets ``FileType`` reconnaissent le pseudo-argument ``'-'`` et le " +"convertissent automatiquement vers :data:`sys.stdin` pour les objets :class:" +"`FileType` ouverts en lecture, et vers :data:`sys.stdout` pour les objets :" +"class:`FileType` ouverts en écriture ::" #: library/argparse.rst:1843 msgid "The *encodings* and *errors* keyword arguments." diff --git a/library/functions.po b/library/functions.po index bf9dc892..8b19b874 100644 --- a/library/functions.po +++ b/library/functions.po @@ -1386,7 +1386,6 @@ msgstr "" "Renvoie un nombre a virgule flottante depuis un nombre ou une chaîne *x*." #: library/functions.rst:626 -#, fuzzy msgid "" "If the argument is a string, it should contain a decimal number, optionally " "preceded by a sign, and optionally embedded in whitespace. The optional " @@ -1402,20 +1401,19 @@ msgstr "" "d'effet sur la valeur produite. L'argument peut aussi être une chaîne " "représentant un *NaN* (*Not-a-Number* ou *pas un nombre* en français), " "l'infini positif, ou l'infini négatif. Plus précisément, l'argument doit se " -"conformer à la grammaire suivante, après que les espaces en début et fin de " -"chaîne aient été retirées :" +"conformer à ``floatvalue`` tel que défini la grammaire suivante, après que " +"les espaces en début et fin de chaîne aient été retirées :" #: library/functions.rst:644 -#, fuzzy msgid "" "Here ``digit`` is a Unicode decimal digit (character in the Unicode general " "category ``Nd``). Case is not significant, so, for example, \"inf\", " "\"Inf\", \"INFINITY\", and \"iNfINity\" are all acceptable spellings for " "positive infinity." msgstr "" -"Ici ``floatnumber`` est un nombre a virgule flottante littéral Python, " -"décrit dans :ref:`floating`. La casse n'y est pas significative, donc, par " -"exemple, ``\"inf\"``, ``\" Inf\"``, ``\"INFINITY\"``, et ``\" iNfiNity\"`` " +"Ici ``digit`` est un chiffre décimal Unicode (caractère de la catégorie " +"générale Unicode ``Nd``). La casse n'y est pas significative, donc, par " +"exemple, ``\"inf\"``, ``\" Inf\"``, ``\"INFINITY\"`` et ``\" iNfiNity\"`` " "sont tous des orthographes valides pour un infini positif." #: library/functions.rst:649 @@ -1777,7 +1775,6 @@ msgid "" msgstr "" #: library/functions.rst:876 -#, fuzzy msgid "" "A base-n integer string contains digits, each representing a value from 0 to " "n-1. The values 0--9 can be represented by any Unicode decimal digit. The " @@ -1790,19 +1787,18 @@ msgid "" "prefix. Base 0 also disallows leading zeros: ``int('010', 0)`` is not legal, " "while ``int('010')`` and ``int('010', 8)`` are." msgstr "" -"Si *x* n'est pas un nombre ou si *base* est fourni, alors *x* doit être une " -"chaîne, un :class:`bytes`, ou un :class:`bytearray` représentant un :ref:" -"`entier littéral ` de base *base*. Le littéral peut être précédé " -"d'un ``+`` ou d'un ``-`` (sans être séparés par une espace), et peut être " -"entouré d'espaces. Un littéral de base *n* est composé des symboles de 0 à " -"n-1 où ``a`` jusqu'à ``z`` (ou ``A`` à ``Z``) représentent les valeurs de 10 " -"à 35. La *base* par défaut est 10. Les valeurs autorisées pour *base* sont 0 " -"et 2--36. Les littéraux en base 2, 8, et 16 peuvent être préfixés avec " +"Une chaine représentant un entier en base *n* contient des chiffres, chacun " +"représentant une valeur de 0 à n-1. Les valeurs 0 à 9 peuvent être " +"représentées par n'importe lequel des chiffres décimaux Unicode. Les valeurs " +"de 10 à 35 peuvent être représentées par ``a`` jusqu'à ``z`` (ou ``A`` à " +"``Z``). La *base* par défaut est 10. Les valeurs autorisées pour *base* sont " +"0 et 2 à 36. Les littéraux en base 2, 8, et 16 peuvent être préfixés avec " "``0b``/``0B``, ``0o``/``0O``, ou ``0x``/``0X`` tout comme les littéraux dans " -"le code. Fournir 0 comme *base* demande d'interpréter exactement comme un " -"littéral dans Python, donc la base sera 2, 8, 10, ou 16, ainsi ``int('010', " -"0)`` n'est pas légal, alors que ``int('010')`` l'est tout comme ``int('010', " -"8)``." +"le code. Fournir 0 comme *base* demande d'interpréter exactement comme un :" +"ref:`entier littéral dans du code ` Python, donc la base sera 2, " +"8, 10, ou 16 en fonction du préfixe. Indiquer 0 comme base interdit les " +"zéros en tête, ainsi ``int('010', 0)`` n'est pas légal, alors que " +"``int('010')`` l'est tout comme ``int('010', 8)``." #: library/functions.rst:887 msgid "The integer type is described in :ref:`typesnumeric`." diff --git a/library/pathlib.po b/library/pathlib.po index fd53f850..3c07f9e2 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -158,19 +158,20 @@ msgid "When *pathsegments* is empty, the current directory is assumed::" msgstr "Quand *pathsegments* est vide, le dossier courant est utilisé ::" #: library/pathlib.rst:121 -#, fuzzy msgid "" "If a segment is an absolute path, all previous segments are ignored (like :" "func:`os.path.join`)::" msgstr "" -"Quand plusieurs chemins absolus sont fournis, le dernier est pris comme " -"ancre (recopiant le comportement de :func:`os.path.join`) ::" +"Si un segment est un chemin absolu, tous les segments précédents sont " +"ignorés (comme :func:`os.path.join`) ::" #: library/pathlib.rst:129 msgid "" "On Windows, the drive is not reset when a rooted relative path segment (e." "g., ``r'\\foo'``) is encountered::" msgstr "" +"Sous Windows, le nom de lecteur est conservé quand un chemin relatif à la " +"racine (par exemple ``r'\\foo'``) est rencontré ::" #: library/pathlib.rst:135 msgid "" @@ -267,6 +268,10 @@ msgid "" "the drive is not reset when the argument is a rooted relative path (e.g., " "``r'\\foo'``)::" msgstr "" +"L'opérateur slash aide à créer les chemins enfants, de manière similaire à :" +"func:`os.path.join`. Si l'argument est un chemin absolu, le chemin précédent " +"est ignoré. Sous Windows, le lecteur n'est pas effacé quand l'argument est " +"un chemin relatif enraciné (par exemple ``r'\\foo'``)::" #: library/pathlib.rst:233 msgid "" @@ -1033,6 +1038,8 @@ msgid "" "It is implemented in terms of :func:`os.rename` and gives the same " "guarantees." msgstr "" +"Cette méthode est implémentée d'après :func:`os.rename` et fournit les mêmes " +"garanties." # « nouveau dans la version … » #: library/pathlib.rst:1087 @@ -1462,18 +1469,16 @@ msgid ":func:`os.path.basename`" msgstr ":func:`os.path.basename`" #: library/pathlib.rst:1309 -#, fuzzy msgid ":attr:`PurePath.name`" -msgstr ":data:`PurePath.name`" +msgstr ":attr:`PurePath.name`" #: library/pathlib.rst:1310 msgid ":func:`os.path.dirname`" msgstr ":func:`os.path.dirname`" #: library/pathlib.rst:1310 -#, fuzzy msgid ":attr:`PurePath.parent`" -msgstr ":data:`PurePath.parent`" +msgstr ":attr:`PurePath.parent`" #: library/pathlib.rst:1311 msgid ":func:`os.path.samefile`" @@ -1488,9 +1493,8 @@ msgid ":func:`os.path.splitext`" msgstr ":func:`os.path.splitext`" #: library/pathlib.rst:1312 -#, fuzzy msgid ":attr:`PurePath.stem` and :attr:`PurePath.suffix`" -msgstr ":data:`PurePath.suffix`" +msgstr ":attr:`PurePath.stem` et :attr:`PurePath.suffix`" #: library/pathlib.rst:1317 msgid "Footnotes" diff --git a/library/re.po b/library/re.po index 6471b035..00fe3328 100644 --- a/library/re.po +++ b/library/re.po @@ -1087,16 +1087,15 @@ msgid "``\\w``" msgstr "``\\w``" #: library/re.rst:530 -#, fuzzy msgid "" "Matches Unicode word characters; this includes alphanumeric characters (as " "defined by :meth:`str.isalnum`) as well as the underscore (``_``). If the :" "const:`ASCII` flag is used, only ``[a-zA-Z0-9_]`` is matched." msgstr "" -"Valide les caractères Unicode de mot ; cela inclut la plupart des caractères " -"qui peuvent être compris dans un mot d'une quelconque langue, aussi bien que " -"les nombres et les tirets bas. Si l'option :const:`ASCII` est utilisée, " -"seuls les caractères de la classe ``[a-zA-Z0-9_]`` sont validés." +"Valide les caractères Unicode de mot ; cela inclut les caractères " +"alphanumériques (tels que définis par :meth:`str.isalnum`), ainsi que les " +"tirets bas(``_``). Si l'option :const:`ASCII` est utilisée, seuls les " +"caractères de la classe ``[a-zA-Z0-9_]`` sont validés." #: library/re.rst:535 msgid "" @@ -2373,21 +2372,28 @@ msgstr "search() vs. match()" msgid "" "Python offers different primitive operations based on regular expressions:" msgstr "" +"Python offre différentes opérations primitives basées sur des expressions " +"régulières." #: library/re.rst:1476 -#, fuzzy msgid ":func:`re.match` checks for a match only at the beginning of the string" -msgstr "Correspond uniquement à la fin d'une chaîne de caractères." +msgstr "" +":func:`re.match` cherche une correspondance uniquement au début de la chaîne " +"de caractères" #: library/re.rst:1477 msgid "" ":func:`re.search` checks for a match anywhere in the string (this is what " "Perl does by default)" msgstr "" +":func:`re.search` cherche une correspondance n'importe où dans la chaîne de " +"caractères (ce que fait Perl par défaut)" #: library/re.rst:1479 msgid ":func:`re.fullmatch` checks for entire string to be a match" msgstr "" +":func:`re.fullmatch` cherche une correspondance avec l'intégralité de la " +"chaîne de caractères." #: library/re.rst:1491 msgid "" diff --git a/library/sqlite3.po b/library/sqlite3.po index f27524b1..0b1c4f71 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -327,9 +327,8 @@ msgstr "" "context-manager>`" #: library/sqlite3.rst:242 -#, fuzzy msgid ":ref:`sqlite3-howto-row-factory`" -msgstr ":ref:`convertisseurs sqlite3 `" +msgstr ":ref:`guide de fabrique de ligne sqlite3 `" #: library/sqlite3.rst:244 msgid "" @@ -424,6 +423,12 @@ msgid "" "operations may need to be serialized by the user to avoid data corruption. " "See :attr:`threadsafety` for more information." msgstr "" +"Si ``True`` (par défaut), :exc:`ProgrammingError` sera levée si la connexion " +"à la base de données est utilisée par un thread autre que celui qui l’a " +"créée. Si ``False``, la connexion peut être utilisée par plusieurs threads ; " +"les opérations d’écriture devront peut-être être sérialisées par " +"l’utilisateur pour éviter la corruption des données. Voir :attr:`sécurité " +"des threads ` pour plus d’informations." #: library/sqlite3.rst:310 msgid "" diff --git a/library/struct.po b/library/struct.po index bce28d57..6e132419 100644 --- a/library/struct.po +++ b/library/struct.po @@ -416,7 +416,7 @@ msgstr "pas de valeur" #: library/struct.rst:207 msgid "\\(7)" -msgstr "" +msgstr "\\(7)" #: library/struct.rst:209 msgid "``c``" @@ -640,7 +640,7 @@ msgstr "*bytes* (séquence d'octets)" #: library/struct.rst:244 msgid "\\(9)" -msgstr "" +msgstr "\\(9)" #: library/struct.rst:246 msgid "``p``" @@ -648,7 +648,7 @@ msgstr "``p``" #: library/struct.rst:246 msgid "\\(8)" -msgstr "" +msgstr "\\(8)" #: library/struct.rst:248 msgid "``P``" @@ -932,18 +932,16 @@ msgid "Packed binary storage of homogeneous data." msgstr "Stockage agrégé binaire de données homogènes." #: library/struct.rst:435 -#, fuzzy msgid "Module :mod:`json`" -msgstr "Module :mod:`array`" +msgstr "Module :mod:`json`" #: library/struct.rst:435 msgid "JSON encoder and decoder." msgstr "" #: library/struct.rst:437 -#, fuzzy msgid "Module :mod:`pickle`" -msgstr "Module :mod:`xdrlib`" +msgstr "Module :mod:`pickle`" #: library/struct.rst:438 msgid "Python object serialization." diff --git a/merge.py b/merge.py index 08aa0dee..6cc9f608 100644 --- a/merge.py +++ b/merge.py @@ -2,14 +2,17 @@ given branch. """ +import argparse import re import shutil -from pathlib import Path -import argparse import subprocess +from pathlib import Path from subprocess import PIPE + from tqdm import tqdm +NOT_TO_TRANSLATE = {Path("whatsnew/changelog.po")} + def run(*args: str | Path, **kwargs) -> subprocess.CompletedProcess: """Run a shell command with subprocess.run() with check=True and @@ -26,14 +29,20 @@ def parse_args(): type=Path, help="Use this given cpython clone.", ) - parser.add_argument("branch", help="Merge from this branch") + parser.add_argument( + "branch", + help="Merge from this branch or from this commit", + ) return parser.parse_args() def setup_repo(repo_path: Path, branch: str): """Ensure we're up-to-date.""" - run("git", "-C", repo_path, "checkout", branch) - run("git", "-C", repo_path, "pull", "--ff-only") + if branch.find('.') == 1: + run("git", "-C", repo_path, "checkout", branch) + run("git", "-C", repo_path, "pull", "--ff-only") + else: # it's a commit + run("git", "-C", repo_path, "checkout", branch) def copy_new_files(new_files: set[Path], pot_path: Path) -> None: @@ -43,6 +52,7 @@ def copy_new_files(new_files: set[Path], pot_path: Path) -> None: file.parent.mkdir(parents=True, exist_ok=True) src = (pot_path / file).with_suffix(".pot") run("msgcat", "-o", file, src) + run("git", "add", file) def update_known_files(known_files: set[Path], pot_path: Path) -> None: @@ -107,7 +117,6 @@ def git_add_relevant_files(): run("git", "add", file) else: run("git", "checkout", "--", file) - run("rm", "-f", "whatsnew/changelog.po") # We don't translate this file. def main(): @@ -121,7 +130,7 @@ def main(): upstream = { file.relative_to(pot_path).with_suffix(".po") for file in pot_path.glob("**/*.pot") - } + } - NOT_TO_TRANSLATE downstream = { Path(po) for po in run("git", "ls-files", "*.po", stdout=PIPE).stdout.splitlines() @@ -129,7 +138,7 @@ def main(): copy_new_files(upstream - downstream, pot_path=pot_path) update_known_files(upstream & downstream, pot_path=pot_path) remove_old_files(downstream - upstream) - clean_paths((upstream - downstream) | (upstream & downstream)) + clean_paths(upstream) shutil.rmtree(pot_path) run("powrap", "-m") update_makefile(args.cpython_repo) diff --git a/tutorial/classes.po b/tutorial/classes.po index 44f93713..a6f319ae 100644 --- a/tutorial/classes.po +++ b/tutorial/classes.po @@ -306,7 +306,6 @@ msgstr "" "contenant les primitives." #: tutorial/classes.rst:126 -#, fuzzy msgid "" "If a name is declared global, then all references and assignments go " "directly to the next-to-last scope containing the module's global names. To " @@ -317,7 +316,7 @@ msgid "" "outer variable unchanged)." msgstr "" "Si un nom est déclaré comme global, alors toutes les références et " -"affectations vont directement dans la portée intermédiaire contenant les " +"affectations vont directement dans l'avant-dernière portée contenant les " "noms globaux du module. Pour pointer une variable qui se trouve en dehors de " "la portée la plus locale, vous pouvez utiliser l'instruction :keyword:" "`nonlocal`. Si une telle variable n'est pas déclarée *nonlocal*, elle est en " @@ -1217,16 +1216,15 @@ msgid "Odds and Ends" msgstr "Trucs et astuces" #: tutorial/classes.rst:739 -#, fuzzy msgid "" "Sometimes it is useful to have a data type similar to the Pascal \"record\" " "or C \"struct\", bundling together a few named data items. The idiomatic " "approach is to use :mod:`dataclasses` for this purpose::" msgstr "" -"Il est parfois utile d'avoir un type de donnée similaire au \"record\" du " +"Il est parfois utile d'avoir un type de donnée similaire au *record* du " "Pascal ou au *struct* du C, qui regroupent ensemble quelques attributs " -"'données' nommés. La définition d'une classe vide remplit parfaitement ce " -"besoin ::" +"« données » nommés. L'approche idiomatique correspondante en Python est " +"d'utiliser des :mod:`dataclasses` ::" #: tutorial/classes.rst:759 msgid "" diff --git a/tutorial/datastructures.po b/tutorial/datastructures.po index 6bca294e..a77ff093 100644 --- a/tutorial/datastructures.po +++ b/tutorial/datastructures.po @@ -139,7 +139,6 @@ msgid "An example that uses most of the list methods::" msgstr "L'exemple suivant utilise la plupart des méthodes des listes ::" #: tutorial/datastructures.rst:123 -#, fuzzy msgid "" "You might have noticed that methods like ``insert``, ``remove`` or ``sort`` " "that only modify the list have no return value printed -- they return the " @@ -148,7 +147,7 @@ msgid "" msgstr "" "Vous avez probablement remarqué que les méthodes qui ne font que modifier la " "liste, comme ``insert``, ``remove`` ou ``sort``, n'affichent pas de valeur " -"de retour (elles renvoient ``None``) [1]_. C'est un principe respecté par " +"de retour (elles renvoient ``None``) [#]_. C'est un principe respecté par " "toutes les structures de données muables en Python." #: tutorial/datastructures.rst:128 diff --git a/tutorial/introduction.po b/tutorial/introduction.po index 6e315863..49bdb7e5 100644 --- a/tutorial/introduction.po +++ b/tutorial/introduction.po @@ -248,6 +248,10 @@ msgid "" "odd number of ``\\`` characters; see :ref:`the FAQ entry ` for more information and workarounds." msgstr "" +"Il existe une petite subtilité concernant les chaînes brutes : une chaîne " +"brute ne peut pas se terminer par un nombre impair de caractères ``\\`` ; " +"voir :ref:`l'entrée FAQ ` pour plus " +"d'informations et des solutions de contournement." #: tutorial/introduction.rst:197 msgid ""