1# SOME DESCRIPTIVE TITLE.
2# Copyright (C) Kovid Goyal
3# This file is distributed under the same license as the calibre package.
4#
5# Translators:
6# Xotes <alois.glibert@gmail.com>, 2015
7# Ptit Prince <leporello1791@gmail.com>, 2014-2015
8# Ptit Prince <leporello1791@gmail.com>, 2014
9# Ptit Prince <leporello1791@gmail.com>, 2016-2017,2020
10msgid ""
11msgstr ""
12"Project-Id-Version: calibre\n"
13"Report-Msgid-Bugs-To: \n"
14"POT-Creation-Date: 2020-07-03 07:43+0530\n"
15"PO-Revision-Date: 2020-07-03 06:05+0000\n"
16"Last-Translator: Ptit Prince <leporello1791@gmail.com>\n"
17"Language-Team: French (http://www.transifex.com/calibre/calibre/language/fr/)\n"
18"MIME-Version: 1.0\n"
19"Content-Type: text/plain; charset=UTF-8\n"
20"Content-Transfer-Encoding: 8bit\n"
21"Language: fr\n"
22"Plural-Forms: nplurals=2; plural=(n > 1);\n"
23
24#: ../../home/kovid/work/calibre/manual/xpath.rst:4
25msgid "XPath tutorial"
26msgstr "Tutoriel XPath"
27
28#: ../../home/kovid/work/calibre/manual/xpath.rst:6
29msgid ""
30"In this tutorial, you will be given a gentle introduction to `XPath "
31"<https://en.wikipedia.org/wiki/XPath>`_, a query language that can be used "
32"to select arbitrary parts of `HTML <https://en.wikipedia.org/wiki/HTML>`_ "
33"documents in calibre. XPath is a widely used standard, and googling it will "
34"yield a ton of information. This tutorial, however, focuses on using XPath "
35"for e-book related tasks like finding chapter headings in an unstructured "
36"HTML document."
37msgstr "Dans ce tutoriel, il vous sera donné une légère introduction à  `XPath <https://fr.wikipedia.org/wiki/XPath>`_, un langage de requête qui peut être utilisé pour sélectionner des parties quelconques de documents `HTML <https://fr.wikipedia.org/wiki/HTML>`_ dans calibre. XPath est un standard utilisé largement, et faire une recherche sur Google produira une tonne d'information. Ce tutoriel, toutefois, se concentrera sur l'utilisation d'XPath pour des tâches relatives aux livres numériques comme trouver les entêtes de chapitre dans un document HTML non structuré."
38
39#: ../../home/kovid/work/calibre/manual/xpath.rst:16
40msgid "Contents"
41msgstr "Contenu"
42
43#: ../../home/kovid/work/calibre/manual/xpath.rst:19
44msgid "Selecting by tag name"
45msgstr "Sélection par nom de balise"
46
47#: ../../home/kovid/work/calibre/manual/xpath.rst:21
48msgid ""
49"The simplest form of selection is to select tags by name. For example, "
50"suppose you want to select all the ``<h2>`` tags in a document. The XPath "
51"query for this is simply::"
52msgstr "La forme la plus simple de sélection est de sélectionner les balises par nom. Par exemple, supposons que vous voulez sélectionner toutes les balises ``<h2>`` dans un document. La requête XPath pour cela est simplement ::"
53
54#: ../../home/kovid/work/calibre/manual/xpath.rst:27
55msgid ""
56"The prefix `//` means *search at any level of the document*. Now suppose you"
57" want to search for ``<span>`` tags that are inside ``<a>`` tags. That can "
58"be achieved with::"
59msgstr "Le préfixe `//`signifie *rechercher à n'importe quel niveau du document*. Maintenant supposons que vous voulez rechercher les balises ``<span>`` qui sont contenues dans des balises ``<a>``. Ceci peut être accompli avec ::"
60
61#: ../../home/kovid/work/calibre/manual/xpath.rst:33
62msgid ""
63"If you want to search for tags at a particular level in the document, change"
64" the prefix::"
65msgstr "Si vous voulez rechercher des balises à un niveau particulier dans le document, changez le préfixe ::"
66
67#: ../../home/kovid/work/calibre/manual/xpath.rst:39
68msgid ""
69"This will match only ``<p>A very short e-book to demonstrate the use of "
70"XPath.</p>`` in the :ref:`sample_ebook` but not any of the other ``<p>`` "
71"tags. The ``h:`` prefix in the above examples is needed to match XHTML tags."
72" This is because internally, calibre represents all content as XHTML. In "
73"XHTML tags have a *namespace*, and ``h:`` is the namespace prefix for HTML "
74"tags."
75msgstr "Ceci correspondra uniquement à ``<p>Un livre numérique très court pour démontrer l'utilisation d'XPath.</p>`` dans le :ref:`sample_ebook` mais dans aucune des autres balises ``<p>``. Le préfixe ``h:`` dans l'exemple plus haut est nécessaire pour correspondre aux balises XHTML. Ceci car, en interne, calibre représente tout le contenu comme du XHTML. En XHTML les balises ont un *espace de nom*, et  ``h:`` est le préfixe d'espace de nom pour les balises HTML."
76
77#: ../../home/kovid/work/calibre/manual/xpath.rst:45
78msgid ""
79"Now suppose you want to select both ``<h1>`` and ``<h2>`` tags. To do that, "
80"we need a XPath construct called *predicate*. A :dfn:`predicate` is simply a"
81" test that is used to select tags. Tests can be arbitrarily powerful and as "
82"this tutorial progresses, you will see more powerful examples. A predicate "
83"is created by enclosing the test expression in square brackets::"
84msgstr "Maintenant supposons que vous voulez sélectionner conjointement les balises ``<h1>`` et ``<h2>``. Pour faire cela, nous avons besoin d'une construction XPath appelée *prédicat*. Un :dfn:`prédicat` est simplement un test qui est utilisé pour sélectionner les balises. Les tests peuvent être arbitrairement puissants et au long de la progression de ce tutoriel, vous verrez des exemples plus puissants. Un prédicat est créé en mettant l'expression test entre crochets."
85
86#: ../../home/kovid/work/calibre/manual/xpath.rst:53
87msgid ""
88"There are several new features in this XPath expression. The first is the "
89"use of the wildcard ``*``. It means *match any tag*. Now look at the test "
90"expression ``name()='h1' or name()='h2'``. :term:`name()` is an example of a"
91" *built-in function*. It simply evaluates to the name of the tag. So by "
92"using it, we can select tags whose names are either `h1` or `h2`. Note that "
93"the :term:`name()` function ignores namespaces so that there is no need for "
94"the ``h:`` prefix. XPath has several useful built-in functions. A few more "
95"will be introduced in this tutorial."
96msgstr "Il y a plusieurs nouvelles caractéristiques dans cette expression XPath. La première est l'utilisation du joker ``*``. Il signifie *correspond à n'importe quelle balise*. Maintenant regardez l'expression test ``name()='h1' or name()='h2'``. :term:`name()` est un exemple d'une *fonction intégrée*. Il évalue simplement le nom de la balise. Donc en l'utilisant, nous pouvons sélectionner des balises dont les noms sont soit `h1` ou `h2`. Notez que la fonction :term:`name()` ignore les espaces de nom de sorte qu'il n'est d'aucune nécessité du préfixe ``h:``. XPath a plusieurs fonctions intégrées utiles. Quelques unes de plus seront introduites dans ce tutoriel."
97
98#: ../../home/kovid/work/calibre/manual/xpath.rst:62
99msgid "Selecting by attributes"
100msgstr "Sélection par attributs"
101
102#: ../../home/kovid/work/calibre/manual/xpath.rst:64
103msgid ""
104"To select tags based on their attributes, the use of predicates is "
105"required::"
106msgstr "Pour sélectionner des balises sur base de leurs attributs, l'utilisation des prédicats est requise //"
107
108#: ../../home/kovid/work/calibre/manual/xpath.rst:70
109msgid ""
110"Here, the ``@`` operator refers to the attributes of the tag. You can use "
111"some of the `XPath built-in functions`_ to perform more sophisticated "
112"matching on attribute values."
113msgstr "Ici l'opérateur ``@`` réfère aux attributs de la balise. Vous pouvez utiliser certaines des `Fonctions intégrées XPath`_ pour effectuer des correspondances plus sophistiquées sur les valeurs attribut."
114
115#: ../../home/kovid/work/calibre/manual/xpath.rst:76
116msgid "Selecting by tag content"
117msgstr "Sélection par contenu de balise"
118
119#: ../../home/kovid/work/calibre/manual/xpath.rst:78
120msgid ""
121"Using XPath, you can even select tags based on the text they contain. The "
122"best way to do this is to use the power of *regular expressions* via the "
123"built-in function :term:`re:test()`::"
124msgstr "En utilisant XPath, vous pouvez même sélectionner des balises basées sur le texte qu'elles contiennent. La meilleure manière de faire cela est d'utiliser la puissance des *expressions régulières* par l'intermédiaire de la fonction intégrée :term:`re:test()`::"
125
126#: ../../home/kovid/work/calibre/manual/xpath.rst:84
127msgid ""
128"Here the ``.`` operator refers to the contents of the tag, just as the ``@``"
129" operator referred to its attributes."
130msgstr "Ici l'opérateur ``.`` réfère au contenu de la balise, tout comme l'opérateur ``@`` réfère à ses attributs."
131
132#: ../../home/kovid/work/calibre/manual/xpath.rst:90
133msgid "Sample e-book"
134msgstr "Exemple de livre numérique"
135
136#: ../../home/kovid/work/calibre/manual/xpath.rst:96
137msgid "XPath built-in functions"
138msgstr "Les fonctions XPath intégrées"
139
140#: ../../home/kovid/work/calibre/manual/xpath.rst:99
141msgid "name()"
142msgstr "name()"
143
144#: ../../home/kovid/work/calibre/manual/xpath.rst:101
145msgid "The name of the current tag."
146msgstr "Le nom de la balise actuelle."
147
148#: ../../home/kovid/work/calibre/manual/xpath.rst:102
149msgid "contains()"
150msgstr "contains()"
151
152#: ../../home/kovid/work/calibre/manual/xpath.rst:104
153msgid "``contains(s1, s2)`` returns `true` if s1 contains s2."
154msgstr "``contains(s1, s2)`` renvoie `true` si s1 contient s2."
155
156#: ../../home/kovid/work/calibre/manual/xpath.rst:105
157msgid "re:test()"
158msgstr "re:test()"
159
160#: ../../home/kovid/work/calibre/manual/xpath.rst:107
161msgid ""
162"``re:test(src, pattern, flags)`` returns `true` if the string `src` matches "
163"the regular expression `pattern`. A particularly useful flag is ``i``, it "
164"makes matching case insensitive. A good primer on the syntax for regular "
165"expressions can be found at `regexp syntax "
166"<https://docs.python.org/library/re.html>`_"
167msgstr "``re:test(src, pattern, flags)`` renvoie `true` si la chaîne `src` correspond au `pattern` de l'expression régulière. un indicateur particulièrement utile est ``i``, il rend les correspondances sensibles à la casse. Une bonne amorce sur la syntaxe pour les expressions régulières peut être trouvée sur `regexp syntax <https://docs.python.org/library/re.html>`_"
168