| 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 |
msgid "" |
| 7 |
msgstr "" |
| 8 |
"Project-Id-Version: calibre\n" |
| 9 |
"Report-Msgid-Bugs-To: \n" |
| 10 |
"POT-Creation-Date: 2026-02-17 16:44+0000\n" |
| 11 |
"PO-Revision-Date: 2014-06-17 08:35+0000\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: French (Canada) (http://app.transifex.com/calibre/calibre/language/fr_CA/)\n" |
| 14 |
"MIME-Version: 1.0\n" |
| 15 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 16 |
"Content-Transfer-Encoding: 8bit\n" |
| 17 |
"Language: fr_CA\n" |
| 18 |
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" |
| 19 |
|
| 20 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:4 |
| 21 |
msgid "XPath tutorial" |
| 22 |
msgstr "Tutoriel XPath" |
| 23 |
|
| 24 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:6 |
| 25 |
msgid "" |
| 26 |
"In this tutorial, you will be given a gentle introduction to `XPath " |
| 27 |
"<https://en.wikipedia.org/wiki/XPath>`_, a query language that can be used " |
| 28 |
"to select arbitrary parts of `HTML <https://en.wikipedia.org/wiki/HTML>`_ " |
| 29 |
"documents in calibre. XPath is a widely used standard, and googling it will " |
| 30 |
"yield a ton of information. This tutorial, however, focuses on using XPath " |
| 31 |
"for e-book related tasks like finding chapter headings in an unstructured " |
| 32 |
"HTML document." |
| 33 |
msgstr "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é." |
| 34 |
|
| 35 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:16 |
| 36 |
msgid "Contents" |
| 37 |
msgstr "Contenu" |
| 38 |
|
| 39 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:19 |
| 40 |
msgid "Selecting by tag name" |
| 41 |
msgstr "Sélection par nom de balise" |
| 42 |
|
| 43 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:21 |
| 44 |
msgid "" |
| 45 |
"The simplest form of selection is to select tags by name. For example, " |
| 46 |
"suppose you want to select all the ``<h2>`` tags in a document. The XPath " |
| 47 |
"query for this is simply::" |
| 48 |
msgstr "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 ::" |
| 49 |
|
| 50 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:27 |
| 51 |
msgid "" |
| 52 |
"The prefix `//` means *search at any level of the document*. Now suppose you" |
| 53 |
" want to search for ``<span>`` tags that are inside ``<a>`` tags. That can " |
| 54 |
"be achieved with::" |
| 55 |
msgstr "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 ::" |
| 56 |
|
| 57 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:33 |
| 58 |
msgid "" |
| 59 |
"If you want to search for tags at a particular level in the document, change" |
| 60 |
" the prefix::" |
| 61 |
msgstr "Si vous voulez rechercher des balises à un niveau particulier dans le document, changez le préfixe ::" |
| 62 |
|
| 63 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:39 |
| 64 |
msgid "" |
| 65 |
"This will match only ``<p>A very short e-book to demonstrate the use of " |
| 66 |
"XPath.</p>`` in the :ref:`sample_ebook` but not any of the other ``<p>`` " |
| 67 |
"tags. The ``h:`` prefix in the above examples is needed to match XHTML tags." |
| 68 |
" This is because internally, calibre represents all content as XHTML. In " |
| 69 |
"XHTML tags have a *namespace*, and ``h:`` is the namespace prefix for HTML " |
| 70 |
"tags." |
| 71 |
msgstr "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." |
| 72 |
|
| 73 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:45 |
| 74 |
msgid "" |
| 75 |
"Now suppose you want to select both ``<h1>`` and ``<h2>`` tags. To do that, " |
| 76 |
"we need an XPath construct called *predicate*. A :dfn:`predicate` is simply " |
| 77 |
"a test that is used to select tags. Tests can be arbitrarily powerful and as" |
| 78 |
" this tutorial progresses, you will see more powerful examples. A predicate " |
| 79 |
"is created by enclosing the test expression in square brackets::" |
| 80 |
msgstr "" |
| 81 |
|
| 82 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:53 |
| 83 |
msgid "" |
| 84 |
"There are several new features in this XPath expression. The first is the " |
| 85 |
"use of the wildcard ``*``. It means *match any tag*. Now look at the test " |
| 86 |
"expression ``name()='h1' or name()='h2'``. :term:`name()` is an example of a" |
| 87 |
" *built-in function*. It simply evaluates to the name of the tag. So by " |
| 88 |
"using it, we can select tags whose names are either `h1` or `h2`. Note that " |
| 89 |
"the :term:`name()` function ignores namespaces so that there is no need for " |
| 90 |
"the ``h:`` prefix. XPath has several useful built-in functions. A few more " |
| 91 |
"will be introduced in this tutorial." |
| 92 |
msgstr "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." |
| 93 |
|
| 94 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:62 |
| 95 |
msgid "Selecting by attributes" |
| 96 |
msgstr "Sélection par attributs" |
| 97 |
|
| 98 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:64 |
| 99 |
msgid "" |
| 100 |
"To select tags based on their attributes, the use of predicates is " |
| 101 |
"required::" |
| 102 |
msgstr "Pour sélectionner des balises sur base de leurs attributs, l'utilisation des prédicats est requise //" |
| 103 |
|
| 104 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:70 |
| 105 |
msgid "" |
| 106 |
"Here, the ``@`` operator refers to the attributes of the tag. You can use " |
| 107 |
"some of the `XPath built-in functions`_ to perform more sophisticated " |
| 108 |
"matching on attribute values." |
| 109 |
msgstr "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." |
| 110 |
|
| 111 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:76 |
| 112 |
msgid "Selecting by tag content" |
| 113 |
msgstr "Sélection par contenu de balise" |
| 114 |
|
| 115 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:78 |
| 116 |
msgid "" |
| 117 |
"Using XPath, you can even select tags based on the text they contain. The " |
| 118 |
"best way to do this is to use the power of *regular expressions* via the " |
| 119 |
"built-in function :term:`re:test()`::" |
| 120 |
msgstr "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()`::" |
| 121 |
|
| 122 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:84 |
| 123 |
msgid "" |
| 124 |
"Here the ``.`` operator refers to the contents of the tag, just as the ``@``" |
| 125 |
" operator referred to its attributes." |
| 126 |
msgstr "Ici l'opérateur ``.`` réfère au contenu de la balise, tout comme l'opérateur ``@`` réfère à ses attributs." |
| 127 |
|
| 128 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:90 |
| 129 |
msgid "Sample e-book" |
| 130 |
msgstr "Exemple de livre numérique" |
| 131 |
|
| 132 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:96 |
| 133 |
msgid "XPath built-in functions" |
| 134 |
msgstr "Les fonctions XPath intégrées" |
| 135 |
|
| 136 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:99 |
| 137 |
msgid "name()" |
| 138 |
msgstr "name()" |
| 139 |
|
| 140 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:101 |
| 141 |
msgid "The name of the current tag." |
| 142 |
msgstr "Le nom de la balise actuelle." |
| 143 |
|
| 144 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:102 |
| 145 |
msgid "contains()" |
| 146 |
msgstr "contains()" |
| 147 |
|
| 148 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:104 |
| 149 |
msgid "``contains(s1, s2)`` returns `true` if s1 contains s2." |
| 150 |
msgstr "``contains(s1, s2)`` renvoie `true` si s1 contient s2." |
| 151 |
|
| 152 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:105 |
| 153 |
msgid "re:test()" |
| 154 |
msgstr "re:test()" |
| 155 |
|
| 156 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:107 |
| 157 |
msgid "" |
| 158 |
"``re:test(src, pattern, flags)`` returns `true` if the string `src` matches " |
| 159 |
"the regular expression `pattern`. A particularly useful flag is ``i``, it " |
| 160 |
"makes matching case insensitive. A good primer on the syntax for regular " |
| 161 |
"expressions can be found at `regexp syntax " |
| 162 |
"<https://docs.python.org/library/re.html>`_" |
| 163 |
msgstr "``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>`_" |