forked from AFPy/potodo
Add some tests.
This commit is contained in:
parent
673408c9af
commit
de07f0f620
|
@ -200,7 +200,7 @@ def buffer_add(
|
|||
|
||||
# the order of the keys is the display order
|
||||
d = dict(
|
||||
name=f"{directory}/{filename.strip('.po')}",
|
||||
name=f"{directory}/{filename.replace('.po', '')}",
|
||||
path=str(path),
|
||||
entries=po_file_size,
|
||||
fuzzies=fuzzy_nb,
|
||||
|
|
248
tests/fixtures/python-docs-fr/bugs.po
vendored
248
tests/fixtures/python-docs-fr/bugs.po
vendored
|
@ -1,248 +0,0 @@
|
|||
# Copyright (C) 2001-2018, Python Software Foundation
|
||||
# For licence information, see README file.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-09-04 11:33+0200\n"
|
||||
"PO-Revision-Date: 2019-12-12 00:24+0100\n"
|
||||
"Last-Translator: Antoine Wecxsteen\n"
|
||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.2.3\n"
|
||||
|
||||
#: ../Doc/bugs.rst:5
|
||||
msgid "Dealing with Bugs"
|
||||
msgstr "S'attaquer aux bogues"
|
||||
|
||||
#: ../Doc/bugs.rst:7
|
||||
msgid ""
|
||||
"Python is a mature programming language which has established a reputation "
|
||||
"for stability. In order to maintain this reputation, the developers would "
|
||||
"like to know of any deficiencies you find in Python."
|
||||
msgstr ""
|
||||
"Python est un langage de programmation robuste réputé pour sa stabilité. "
|
||||
"Afin de maintenir cette réputation, les développeurs souhaitent connaître "
|
||||
"tout problème que vous pourriez rencontrer dans Python."
|
||||
|
||||
#: ../Doc/bugs.rst:11
|
||||
msgid ""
|
||||
"It can be sometimes faster to fix bugs yourself and contribute patches to "
|
||||
"Python as it streamlines the process and involves less people. Learn how to :"
|
||||
"ref:`contribute <contributing-to-python>`."
|
||||
msgstr ""
|
||||
"Il est parfois plus rapide de réparer les bogues soi-même et d'en proposer "
|
||||
"les correctifs, ça simplifie le processus et implique moins de monde. "
|
||||
"Apprenez à :ref:`contribuer <contributing-to-python>`."
|
||||
|
||||
#: ../Doc/bugs.rst:16
|
||||
msgid "Documentation bugs"
|
||||
msgstr "Bogues de documentation"
|
||||
|
||||
#: ../Doc/bugs.rst:18
|
||||
msgid ""
|
||||
"If you find a bug in this documentation or would like to propose an "
|
||||
"improvement, please submit a bug report on the :ref:`tracker <using-the-"
|
||||
"tracker>`. If you have a suggestion on how to fix it, include that as well."
|
||||
msgstr ""
|
||||
"Si vous trouvez un bogue dans cette documentation ou si vous désirez "
|
||||
"proposer une amélioration, si cela concerne aussi la documentation en "
|
||||
"anglais, ouvrez un rapport sur le :ref:`tracker <using-the-tracker>` "
|
||||
"décrivant en anglais le bogue et où vous l'avez trouvé. Si le problème ne "
|
||||
"touche que la traduction en français, ouvrez un ticket sur https://github."
|
||||
"com/python/python-docs-fr/issues, ou venez nous en toucher un mot sur le "
|
||||
"canal #python-fr sur *freenode* (https://webchat.freenode.net/). Si vous "
|
||||
"avez une suggestion de correction, merci de l'inclure également."
|
||||
|
||||
#: ../Doc/bugs.rst:22
|
||||
msgid ""
|
||||
"If you're short on time, you can also email documentation bug reports to "
|
||||
"docs@python.org (behavioral bugs can be sent to python-list@python.org). "
|
||||
"'docs@' is a mailing list run by volunteers; your request will be noticed, "
|
||||
"though it may take a while to be processed."
|
||||
msgstr ""
|
||||
"Si vous êtes limité par le temps, vous pouvez aussi envoyer un courriel à "
|
||||
"docs@python.org (les bogues de comportement peuvent être envoyés à python-"
|
||||
"list@python.org). 'docs@' est une liste de diffusion gérée par des "
|
||||
"volontaires, votre requête sera vue, mais elle peut prendre un moment pour "
|
||||
"être traitée."
|
||||
|
||||
#: ../Doc/bugs.rst:30
|
||||
msgid "`Documentation bugs`_"
|
||||
msgstr "`Bogues de documentation`_"
|
||||
|
||||
#: ../Doc/bugs.rst:30
|
||||
msgid ""
|
||||
"A list of documentation bugs that have been submitted to the Python issue "
|
||||
"tracker."
|
||||
msgstr ""
|
||||
"Liste des bogues de documentation soumis à l'outil de suivi des problèmes "
|
||||
"Python."
|
||||
|
||||
#: ../Doc/bugs.rst:33
|
||||
msgid "`Issue Tracking <https://devguide.python.org/tracker/>`_"
|
||||
msgstr "`Outil de suivi des problèmes <https://devguide.python.org/tracker/>`_"
|
||||
|
||||
#: ../Doc/bugs.rst:33
|
||||
msgid ""
|
||||
"Overview of the process involved in reporting an improvement on the tracker."
|
||||
msgstr ""
|
||||
"Vue d'ensemble du processus pour proposer une amélioration avec l'outil de "
|
||||
"suivi."
|
||||
|
||||
#: ../Doc/bugs.rst:35
|
||||
msgid ""
|
||||
"`Helping with Documentation <https://devguide.python.org/docquality/#helping-"
|
||||
"with-documentation>`_"
|
||||
msgstr ""
|
||||
"`Aider avec la documentation <https://devguide.python.org/docquality/"
|
||||
"#helping-with-documentation>`_"
|
||||
|
||||
#: ../Doc/bugs.rst:36
|
||||
msgid ""
|
||||
"Comprehensive guide for individuals that are interested in contributing to "
|
||||
"Python documentation."
|
||||
msgstr "Guide complet pour qui souhaite contribuer à la documentation Python."
|
||||
|
||||
#: ../Doc/bugs.rst:41
|
||||
msgid "Using the Python issue tracker"
|
||||
msgstr "Utilisation du gestionnaire de tickets Python"
|
||||
|
||||
#: ../Doc/bugs.rst:43
|
||||
msgid ""
|
||||
"Bug reports for Python itself should be submitted via the Python Bug Tracker "
|
||||
"(https://bugs.python.org/). The bug tracker offers a Web form which allows "
|
||||
"pertinent information to be entered and submitted to the developers."
|
||||
msgstr ""
|
||||
"Les rapports de bogues pour Python lui-même devraient être soumis via le "
|
||||
"*Bug Tracker Python* (http://bugs.python.org/). Le gestionnaire de tickets "
|
||||
"propose un formulaire Web permettant de saisir des informations pertinentes "
|
||||
"à soumettre aux développeurs."
|
||||
|
||||
#: ../Doc/bugs.rst:47
|
||||
msgid ""
|
||||
"The first step in filing a report is to determine whether the problem has "
|
||||
"already been reported. The advantage in doing so, aside from saving the "
|
||||
"developers time, is that you learn what has been done to fix it; it may be "
|
||||
"that the problem has already been fixed for the next release, or additional "
|
||||
"information is needed (in which case you are welcome to provide it if you "
|
||||
"can!). To do this, search the bug database using the search box on the top "
|
||||
"of the page."
|
||||
msgstr ""
|
||||
"La première étape pour remplir un rapport est de déterminer si le problème a "
|
||||
"déjà été rapporté. L'avantage de cette approche, en plus d'économiser du "
|
||||
"temps aux développeurs, est d'apprendre ce qui a été fait pour le résoudre ; "
|
||||
"il se peut que le problème soit déjà résolu dans la prochaine version, ou "
|
||||
"que des informations complémentaires soient attendues (auquel cas votre "
|
||||
"contribution est la bienvenue !). Pour ce faire, cherchez dans la base de "
|
||||
"données de bogues grâce à la boîte de recherche en haut de la page."
|
||||
|
||||
#: ../Doc/bugs.rst:54
|
||||
msgid ""
|
||||
"If the problem you're reporting is not already in the bug tracker, go back "
|
||||
"to the Python Bug Tracker and log in. If you don't already have a tracker "
|
||||
"account, select the \"Register\" link or, if you use OpenID, one of the "
|
||||
"OpenID provider logos in the sidebar. It is not possible to submit a bug "
|
||||
"report anonymously."
|
||||
msgstr ""
|
||||
"Si le problème que vous soumettez n'est pas déjà dans le *bug tracker*, "
|
||||
"revenez au *Python Bug Tracker* et connectez-vous. Si vous n'avez pas déjà "
|
||||
"un compte pour le *tracker*, cliquez sur le lien « S'enregistrer », ou, si "
|
||||
"vous utilisez *OpenID*, sur l'un des logos des fournisseurs *OpenID* dans la "
|
||||
"barre latérale. Il n'est pas possible de soumettre un rapport de bogue de "
|
||||
"manière anonyme."
|
||||
|
||||
#: ../Doc/bugs.rst:59
|
||||
msgid ""
|
||||
"Being now logged in, you can submit a bug. Select the \"Create New\" link "
|
||||
"in the sidebar to open the bug reporting form."
|
||||
msgstr ""
|
||||
"Une fois identifié, pour pouvez rapporter un bogue. Sélectionnez le lien "
|
||||
"*Create New* dans la barre latérale pour ouvrir un nouveau formulaire de "
|
||||
"rapport de bogue."
|
||||
|
||||
#: ../Doc/bugs.rst:62
|
||||
msgid ""
|
||||
"The submission form has a number of fields. For the \"Title\" field, enter "
|
||||
"a *very* short description of the problem; less than ten words is good. In "
|
||||
"the \"Type\" field, select the type of your problem; also select the "
|
||||
"\"Component\" and \"Versions\" to which the bug relates."
|
||||
msgstr ""
|
||||
"Le formulaire de soumission a un certain nombre de champs. Pour le champ "
|
||||
"« Titre », saisissez une *très* courte description du problème ; moins de "
|
||||
"dix mots est approprié. Dans le champ « Type », sélectionnez le type de "
|
||||
"problème ; sélectionnez aussi « Composant » et « Versions » en rapport avec "
|
||||
"le bogue."
|
||||
|
||||
#: ../Doc/bugs.rst:67
|
||||
msgid ""
|
||||
"In the \"Comment\" field, describe the problem in detail, including what you "
|
||||
"expected to happen and what did happen. Be sure to include whether any "
|
||||
"extension modules were involved, and what hardware and software platform you "
|
||||
"were using (including version information as appropriate)."
|
||||
msgstr ""
|
||||
"Dans le champ « Commentaire », décrivez le problème de manière détaillée, "
|
||||
"incluant ce à quoi vous vous attendiez et ce qui s'est vraiment produit. "
|
||||
"Assurez-vous d'y inclure les éventuels modules d'extensions impliqués et la "
|
||||
"plateforme matérielle et logicielle vous utilisiez (en incluant les "
|
||||
"informations de versions)."
|
||||
|
||||
#: ../Doc/bugs.rst:72
|
||||
msgid ""
|
||||
"Each bug report will be assigned to a developer who will determine what "
|
||||
"needs to be done to correct the problem. You will receive an update each "
|
||||
"time action is taken on the bug."
|
||||
msgstr ""
|
||||
"Chaque bogue sera attribué à un développeur qui déterminera ce qui est "
|
||||
"nécessaire d'entreprendre pour corriger le problème. Vous recevrez une "
|
||||
"notification à chaque action effectuée sur le bogue."
|
||||
|
||||
#: ../Doc/bugs.rst:81
|
||||
msgid ""
|
||||
"`How to Report Bugs Effectively <https://www.chiark.greenend.org.uk/"
|
||||
"~sgtatham/bugs.html>`_"
|
||||
msgstr ""
|
||||
"`Comment signaler des bogues de manière efficace <https://www.chiark."
|
||||
"greenend.org.uk/~sgtatham/bugs.html>`_ (en anglais)"
|
||||
|
||||
#: ../Doc/bugs.rst:80
|
||||
msgid ""
|
||||
"Article which goes into some detail about how to create a useful bug report. "
|
||||
"This describes what kind of information is useful and why it is useful."
|
||||
msgstr ""
|
||||
"Article qui entre dans les détails sur la manière de créer un rapport de "
|
||||
"bogue utile. Il décrit quel genre d'information est utile et pourquoi elle "
|
||||
"est utile."
|
||||
|
||||
#: ../Doc/bugs.rst:84
|
||||
msgid ""
|
||||
"`Bug Report Writing Guidelines <https://developer.mozilla.org/en-US/docs/"
|
||||
"Mozilla/QA/Bug_writing_guidelines>`_"
|
||||
msgstr ""
|
||||
"`Guide pour la rédaction de rapports de bogues <https://developer.mozilla."
|
||||
"org/en-US/docs/Mozilla/QA/Bug_writing_guidelines>`_"
|
||||
|
||||
#: ../Doc/bugs.rst:84
|
||||
msgid ""
|
||||
"Information about writing a good bug report. Some of this is specific to "
|
||||
"the Mozilla project, but describes general good practices."
|
||||
msgstr ""
|
||||
"Conseils pour écrire un bon rapport de bogue. Certains sont spécifiques au "
|
||||
"projet Mozilla mais présentent des bonnes pratiques générales."
|
||||
|
||||
#: ../Doc/bugs.rst:90
|
||||
msgid "Getting started contributing to Python yourself"
|
||||
msgstr "Commencer à contribuer à Python vous-même"
|
||||
|
||||
#: ../Doc/bugs.rst:92
|
||||
msgid ""
|
||||
"Beyond just reporting bugs that you find, you are also welcome to submit "
|
||||
"patches to fix them. You can find more information on how to get started "
|
||||
"patching Python in the `Python Developer's Guide`_. If you have questions, "
|
||||
"the `core-mentorship mailing list`_ is a friendly place to get answers to "
|
||||
"any and all questions pertaining to the process of fixing issues in Python."
|
||||
msgstr ""
|
20
tests/fixtures/python-docs-fr/file1.po
vendored
Normal file
20
tests/fixtures/python-docs-fr/file1.po
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
#: /un/chemin/idiot.rst:69
|
||||
msgid "This is a dummy sentence."
|
||||
msgstr "Ceci est une phrase bateau."
|
||||
|
||||
#, fuzzy
|
||||
#: /un/chemin/idiot.rst:420
|
||||
msgid "Incredibly useful as a tool, this potodo"
|
||||
msgstr "Incroyablement inutile comme outil, ce potodo"
|
||||
|
||||
#: /un/chemin/idiot.rst:666
|
||||
msgid "We should translate this eventually"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Hello darkness my old friend"
|
||||
#~ msgstr "Vous qui lisez cette ligne, vous êtes très beau."
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "I am only there to make sure"
|
||||
#~ msgstr "I don't get counted as a fuzzy entry"
|
||||
|
3
tests/fixtures/python-docs-fr/file2.po
vendored
Normal file
3
tests/fixtures/python-docs-fr/file2.po
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
#: /un/chemin/idiot.rst:666
|
||||
msgid "We should also translate this eventually"
|
||||
msgstr ""
|
3
tests/fixtures/python-docs-fr/folder/file3.po
vendored
Normal file
3
tests/fixtures/python-docs-fr/folder/file3.po
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
#: /un/chemin/idiot.rst:666
|
||||
msgid "We should also translate this eventually"
|
||||
msgstr ""
|
2773
tests/fixtures/python-docs-fr/glossary.po
vendored
2773
tests/fixtures/python-docs-fr/glossary.po
vendored
File diff suppressed because it is too large
Load Diff
331
tests/fixtures/python-docs-fr/library/token.po
vendored
331
tests/fixtures/python-docs-fr/library/token.po
vendored
|
@ -1,331 +0,0 @@
|
|||
# Copyright (C) 2001-2018, Python Software Foundation
|
||||
# For licence information, see README file.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-11-15 18:54+0100\n"
|
||||
"PO-Revision-Date: 2018-09-28 10:04+0200\n"
|
||||
"Last-Translator: Mickaël Bergem <suixo@securem.eu>\n"
|
||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.0.9\n"
|
||||
|
||||
#: ../Doc/library/token.rst:2
|
||||
msgid ":mod:`token` --- Constants used with Python parse trees"
|
||||
msgstr ""
|
||||
":mod:`token` --- Constantes utilisées avec les arbres d'analyse Python "
|
||||
"(*parse trees*)"
|
||||
|
||||
#: ../Doc/library/token.rst:9
|
||||
msgid "**Source code:** :source:`Lib/token.py`"
|
||||
msgstr "**Code source :** :source:`Lib/token.py`"
|
||||
|
||||
#: ../Doc/library/token.rst:13
|
||||
msgid ""
|
||||
"This module provides constants which represent the numeric values of leaf "
|
||||
"nodes of the parse tree (terminal tokens). Refer to the file :file:`Grammar/"
|
||||
"Grammar` in the Python distribution for the definitions of the names in the "
|
||||
"context of the language grammar. The specific numeric values which the "
|
||||
"names map to may change between Python versions."
|
||||
msgstr ""
|
||||
"Ce module fournit des constantes qui représentent les valeurs numériques des "
|
||||
"nœuds enfants du *parse tree* (les jetons \"terminaux\"). Voir le fichier :"
|
||||
"file:`Grammar/Grammar` dans la distribution Python pour la définitions des "
|
||||
"noms dans le contexte de la grammaire. Les valeurs numériques correspondant "
|
||||
"aux noms sont susceptibles de changer entre deux versions de Python."
|
||||
|
||||
#: ../Doc/library/token.rst:19
|
||||
msgid ""
|
||||
"The module also provides a mapping from numeric codes to names and some "
|
||||
"functions. The functions mirror definitions in the Python C header files."
|
||||
msgstr ""
|
||||
"Le module fournit également une correspondance entre les codes numériques et "
|
||||
"les noms et certaines fonctions. Les fonctions reflètent les définitions des "
|
||||
"fichiers d'en-tête C de Python."
|
||||
|
||||
#: ../Doc/library/token.rst:25
|
||||
msgid ""
|
||||
"Dictionary mapping the numeric values of the constants defined in this "
|
||||
"module back to name strings, allowing more human-readable representation of "
|
||||
"parse trees to be generated."
|
||||
msgstr ""
|
||||
"Dictionnaire faisant correspondre les valeurs numériques des constantes "
|
||||
"définies dans ce module à leurs noms, permettant de générer une "
|
||||
"représentation plus humaine des arbres syntaxiques."
|
||||
|
||||
#: ../Doc/library/token.rst:32
|
||||
#, fuzzy
|
||||
msgid "Return ``True`` for terminal token values."
|
||||
msgstr "Renvoie ``True`` pour les valeurs des jetons terminaux."
|
||||
|
||||
#: ../Doc/library/token.rst:37
|
||||
#, fuzzy
|
||||
msgid "Return ``True`` for non-terminal token values."
|
||||
msgstr "Renvoie ``True`` pour les valeurs des jetons non terminaux."
|
||||
|
||||
#: ../Doc/library/token.rst:42
|
||||
#, fuzzy
|
||||
msgid "Return ``True`` if *x* is the marker indicating the end of input."
|
||||
msgstr ""
|
||||
"Renvoie ``True`` si *x* est le marqueur indiquant la fin de de la source."
|
||||
|
||||
#: ../Doc/library/token.rst:45
|
||||
msgid "The token constants are:"
|
||||
msgstr "Les constantes associées aux jetons sont :"
|
||||
|
||||
#: ../Doc/library/token-list.inc:18
|
||||
msgid "Token value for ``\"(\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:22
|
||||
msgid "Token value for ``\")\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:26
|
||||
msgid "Token value for ``\"[\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:30
|
||||
msgid "Token value for ``\"]\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:34
|
||||
msgid "Token value for ``\":\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:38
|
||||
msgid "Token value for ``\",\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:42
|
||||
msgid "Token value for ``\";\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:46
|
||||
msgid "Token value for ``\"+\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:50
|
||||
msgid "Token value for ``\"-\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:54
|
||||
msgid "Token value for ``\"*\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:58
|
||||
msgid "Token value for ``\"/\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:62
|
||||
msgid "Token value for ``\"|\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:66
|
||||
msgid "Token value for ``\"&\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:70
|
||||
msgid "Token value for ``\"<\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:74
|
||||
msgid "Token value for ``\">\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:78
|
||||
msgid "Token value for ``\"=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:82
|
||||
msgid "Token value for ``\".\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:86
|
||||
msgid "Token value for ``\"%\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:90
|
||||
msgid "Token value for ``\"{\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:94
|
||||
msgid "Token value for ``\"}\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:98
|
||||
msgid "Token value for ``\"==\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:102
|
||||
msgid "Token value for ``\"!=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:106
|
||||
msgid "Token value for ``\"<=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:110
|
||||
msgid "Token value for ``\">=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:114
|
||||
msgid "Token value for ``\"~\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:118
|
||||
msgid "Token value for ``\"^\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:122
|
||||
msgid "Token value for ``\"<<\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:126
|
||||
msgid "Token value for ``\">>\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:130
|
||||
msgid "Token value for ``\"**\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:134
|
||||
msgid "Token value for ``\"+=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:138
|
||||
msgid "Token value for ``\"-=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:142
|
||||
msgid "Token value for ``\"*=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:146
|
||||
msgid "Token value for ``\"/=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:150
|
||||
msgid "Token value for ``\"%=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:154
|
||||
msgid "Token value for ``\"&=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:158
|
||||
msgid "Token value for ``\"|=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:162
|
||||
msgid "Token value for ``\"^=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:166
|
||||
msgid "Token value for ``\"<<=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:170
|
||||
msgid "Token value for ``\">>=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:174
|
||||
msgid "Token value for ``\"**=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:178
|
||||
msgid "Token value for ``\"//\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:182
|
||||
msgid "Token value for ``\"//=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:186
|
||||
msgid "Token value for ``\"@\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:190
|
||||
msgid "Token value for ``\"@=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:194
|
||||
msgid "Token value for ``\"->\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:198
|
||||
msgid "Token value for ``\"...\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token-list.inc:202
|
||||
msgid "Token value for ``\":=\"``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token.rst:49
|
||||
msgid ""
|
||||
"The following token type values aren't used by the C tokenizer but are "
|
||||
"needed for the :mod:`tokenize` module."
|
||||
msgstr ""
|
||||
"Les types de jetons suivants ne sont pas utilisés par l'analyseur lexical C "
|
||||
"mais sont requis par le module :mod:`tokenize`."
|
||||
|
||||
#: ../Doc/library/token.rst:54
|
||||
msgid "Token value used to indicate a comment."
|
||||
msgstr "Valeur du jeton utilisée pour indiquer un commentaire."
|
||||
|
||||
#: ../Doc/library/token.rst:59
|
||||
msgid ""
|
||||
"Token value used to indicate a non-terminating newline. The :data:`NEWLINE` "
|
||||
"token indicates the end of a logical line of Python code; ``NL`` tokens are "
|
||||
"generated when a logical line of code is continued over multiple physical "
|
||||
"lines."
|
||||
msgstr ""
|
||||
"Valeur du jeton utilisée pour indiquer un retour à la ligne non terminal. Le "
|
||||
"jeton :data:`NEWLINE` indique la fin d'une ligne logique de code Python; les "
|
||||
"jetons ``NL`` sont générés quand une ligne logique de code s'étend sur "
|
||||
"plusieurs lignes."
|
||||
|
||||
#: ../Doc/library/token.rst:67
|
||||
msgid ""
|
||||
"Token value that indicates the encoding used to decode the source bytes into "
|
||||
"text. The first token returned by :func:`tokenize.tokenize` will always be "
|
||||
"an ``ENCODING`` token."
|
||||
msgstr ""
|
||||
"Valeur de jeton qui indique l'encodage utilisé pour décoder le fichier "
|
||||
"initial. Le premier jeton renvoyé par :func:`tokenize.tokenize` sera "
|
||||
"toujours un jeton ``ENCODING``."
|
||||
|
||||
#: ../Doc/library/token.rst:74
|
||||
msgid ""
|
||||
"Token value indicating that a type comment was recognized. Such tokens are "
|
||||
"only produced when :func:`ast.parse()` is invoked with "
|
||||
"``type_comments=True``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/token.rst:79
|
||||
msgid "Added :data:`AWAIT` and :data:`ASYNC` tokens."
|
||||
msgstr "Ajout des jetons :data:`AWAIT` et :data:`ASYNC`."
|
||||
|
||||
#: ../Doc/library/token.rst:82
|
||||
msgid "Added :data:`COMMENT`, :data:`NL` and :data:`ENCODING` tokens."
|
||||
msgstr "Ajout des jetons :data:`COMMENT`, :data:`NL` et :data:`ENCODING`."
|
||||
|
||||
#: ../Doc/library/token.rst:85
|
||||
msgid ""
|
||||
"Removed :data:`AWAIT` and :data:`ASYNC` tokens. \"async\" and \"await\" are "
|
||||
"now tokenized as :data:`NAME` tokens."
|
||||
msgstr ""
|
||||
"Suppression des jetons :data:`AWAIT` et :data:`ASYNC`. ``async`` et "
|
||||
"``await`` sont maintenant transformés en jetons :data:`NAME`."
|
||||
|
||||
#: ../Doc/library/token.rst:89
|
||||
msgid ""
|
||||
"Added :data:`TYPE_COMMENT`. Added :data:`AWAIT` and :data:`ASYNC` tokens "
|
||||
"back (they're needed to support parsing older Python versions for :func:`ast."
|
||||
"parse` with ``feature_version`` set to 6 or lower)."
|
||||
msgstr ""
|
39
tests/fixtures/python-docs-fr/obsolete.po
vendored
39
tests/fixtures/python-docs-fr/obsolete.po
vendored
|
@ -1,39 +0,0 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Python 3\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-10-09 17:54+0200\n"
|
||||
"PO-Revision-Date: 2019-11-02 14:46+0100\n"
|
||||
"Last-Translator: XXX\n"
|
||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.2.1\n"
|
||||
|
||||
#: /un/chemin/idiot.rst:69
|
||||
msgid "This is a dummy sentence."
|
||||
msgstr "Ceci est une phrase bateau."
|
||||
|
||||
#: /un/chemin/idiot.rst:420
|
||||
msgid "Incredibly useful as a tool, this potodo"
|
||||
msgstr "Incroyablement utile comme outil, ce potodo"
|
||||
|
||||
#: /un/chemin/idiot.rst:666
|
||||
msgid "We should translate this eventually"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Supported Versions"
|
||||
#~ msgstr "Versions supportées"
|
||||
|
||||
#~ msgid "Other resources"
|
||||
#~ msgstr "Autres ressources"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "MingW -- Python extensions"
|
||||
#~ msgstr "Utiliser Python sur Windows"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "A Python for Windows Tutorial"
|
||||
#~ msgstr "Utiliser Python sur Windows"
|
|
@ -1,14 +1,15 @@
|
|||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from potodo.potodo import exec_potodo
|
||||
|
||||
|
||||
FIXTURE_DIR = Path(__file__).resolve().parent / "fixtures"
|
||||
REPO_DIR = "python-docs-fr"
|
||||
|
||||
|
||||
def test_potodo(capsys):
|
||||
exec_potodo(
|
||||
path=FIXTURE_DIR / "python-docs-fr",
|
||||
path=FIXTURE_DIR / REPO_DIR,
|
||||
above=0,
|
||||
below=100,
|
||||
fuzzy=False,
|
||||
|
@ -18,10 +19,67 @@ def test_potodo(capsys):
|
|||
json_format=False,
|
||||
)
|
||||
captured = capsys.readouterr()
|
||||
assert "bugs.po" in captured.out
|
||||
assert "# library" in captured.out
|
||||
assert "token.po" in captured.out
|
||||
assert "glossary.po" not in captured.out
|
||||
assert "sphinx.po" not in captured.out
|
||||
assert "file1.po" in captured.out
|
||||
assert "file2.po" in captured.out
|
||||
assert "# folder" in captured.out
|
||||
assert "file3.po" in captured.out
|
||||
assert "1 fuzzy" in captured.out
|
||||
assert "2 fuzzy" not in captured.out
|
||||
assert "3 fuzzy" in captured.out
|
||||
|
||||
|
||||
def test_json_output(capsys):
|
||||
exec_potodo(
|
||||
path=FIXTURE_DIR / REPO_DIR,
|
||||
above=0,
|
||||
below=100,
|
||||
fuzzy=False,
|
||||
hide_reserved=False,
|
||||
counts=False,
|
||||
offline=True,
|
||||
json_format=True,
|
||||
)
|
||||
output = json.loads(capsys.readouterr().out)
|
||||
|
||||
expected = [
|
||||
{
|
||||
"name": "folder/",
|
||||
"percent_translated": 0.0,
|
||||
"files": [
|
||||
{
|
||||
"name": "folder/file3",
|
||||
"path": str(FIXTURE_DIR / REPO_DIR / "folder" / "file3.po"),
|
||||
"entries": 1,
|
||||
"fuzzies": 0,
|
||||
"translated": 0,
|
||||
"percent_translated": 0,
|
||||
"reserved_by": None,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "python-docs-fr/",
|
||||
"percent_translated": 16.5,
|
||||
"files": [
|
||||
{
|
||||
"name": "python-docs-fr/file1",
|
||||
"path": str(FIXTURE_DIR / REPO_DIR / "file1.po"),
|
||||
"entries": 3,
|
||||
"fuzzies": 1,
|
||||
"translated": 1,
|
||||
"percent_translated": 33,
|
||||
"reserved_by": None,
|
||||
},
|
||||
{
|
||||
"name": "python-docs-fr/file2",
|
||||
"path": str(FIXTURE_DIR / REPO_DIR / "file2.po"),
|
||||
"entries": 1,
|
||||
"fuzzies": 0,
|
||||
"translated": 0,
|
||||
"percent_translated": 0,
|
||||
"reserved_by": None,
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
assert expected == output
|
||||
|
|
Loading…
Reference in New Issue
Block a user