Debian Codegraph @

translations/manual/fr/function_mode.po

raw
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 <[email protected]>, 2015
7 # Ptit Prince <[email protected]>, 2014-2015
8 # Nicolas F. <[email protected]>, 2017
9 # Ptit Prince <[email protected]>, 2016-2017,2020-2021
10 # un_pogaz, 2023-2024
11 # un_pogaz, 2026
12 msgid ""
13 msgstr ""
14 "Project-Id-Version: calibre\n"
15 "Report-Msgid-Bugs-To: \n"
16 "POT-Creation-Date: 2026-02-17 16:44+0000\n"
17 "PO-Revision-Date: 2014-11-21 02:54+0000\n"
18 "Last-Translator: un_pogaz, 2026\n"
19 "Language-Team: French (http://app.transifex.com/calibre/calibre/language/fr/)\n"
20 "MIME-Version: 1.0\n"
21 "Content-Type: text/plain; charset=UTF-8\n"
22 "Content-Transfer-Encoding: 8bit\n"
23 "Language: fr\n"
24 "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
25
26 #: ../../../__w/calibre/calibre/manual/function_mode.rst:2
27 msgid "Function mode for Search & replace in the Editor"
28 msgstr "Mode fonction pour Rechercher & remplacer dans l'Éditeur"
29
30 #: ../../../__w/calibre/calibre/manual/function_mode.rst:4
31 msgid ""
32 "The :guilabel:`Search & replace` tool in the editor supports a *function "
33 "mode*. In this mode, you can combine regular expressions (see :doc:`regexp`)"
34 " with arbitrarily powerful Python functions to do all sorts of advanced text"
35 " processing."
36 msgstr "L'outil :guilabel:`Rechercher & remplacer` dans l'éditeur supporte un *mode fonction*. Dans ce mode, vous pouvez combiner des expressions régulières (voir :doc:`regexp`) avec de puissantes fonctions Python pour faire toutes sortes de traitements avancés de texte."
37
38 #: ../../../__w/calibre/calibre/manual/function_mode.rst:9
39 msgid ""
40 "In the standard *regexp* mode for search and replace, you specify both a "
41 "regular expression to search for as well as a template that is used to "
42 "replace all found matches. In function mode, instead of using a fixed "
43 "template, you specify an arbitrary function, in the `Python programming "
44 "language <https://docs.python.org>`_. This allows you to do lots of things "
45 "that are not possible with simple templates."
46 msgstr "Dans le mode standard *regexp* pour rechercher et remplacer, vous spécifiez tant une expression régulière à rechercher qu'un modèle qui est utilisé pour remplacer toutes les correspondances trouvées. Dans le mode fonction, à la place d'utiliser un modèle fixe, vous spécifiez une fonction quelconque, dans le `langage de programmation Python <https://docs.python.org>`_. Ceci vous permet de faire beaucoup de choses qui ne sont pas possibles avec de simples modèles."
47
48 #: ../../../__w/calibre/calibre/manual/function_mode.rst:16
49 msgid ""
50 "Techniques for using function mode and the syntax will be described by means"
51 " of examples, showing you how to create functions to perform progressively "
52 "more complex tasks."
53 msgstr "Les techniques pour utiliser le mode fonction et la syntaxe seront décrites à l'aide d'exemples, vous montrant comment créer des fonctions pour effectuer progressivement des tâches plus complexes."
54
55 #: ../../../__w/calibre/calibre/manual/function_mode.rst:21
56 msgid "The Function mode"
57 msgstr "Le mode Fonction"
58
59 #: ../../../__w/calibre/calibre/manual/function_mode.rst:26
60 msgid "Automatically fixing the case of headings in the document"
61 msgstr "Réparer automatiquement la casse des titres dans le document"
62
63 #: ../../../__w/calibre/calibre/manual/function_mode.rst:28
64 msgid ""
65 "Here, we will leverage one of the builtin functions in the editor to "
66 "automatically change the case of all text inside heading tags to title "
67 "case::"
68 msgstr "Ici , nous utiliserons l'une des fonctions intégrée dans l'éditeur pour changer automatiquement la casse de tous le texte à l'intérieur des balises titre en casse titre ::"
69
70 #: ../../../__w/calibre/calibre/manual/function_mode.rst:33
71 msgid ""
72 "For the function, simply choose the :guilabel:`Title-case text (ignore "
73 "tags)` builtin function. This will change titles that look like: ``<h1>some "
74 "titLE</h1>`` to ``<h1>Some Title</h1>``. It will work even if there are "
75 "other HTML tags inside the heading tags."
76 msgstr "Pour la fonction, choisissez simplement la fonction intégrée :guilabel:`Texte en casse de titre(ignorer les balises)`. Ceci changera les titres qui ressemblent à : ``<h1>certains titRES</h1>`` en ``<h1>Certains Titres</h1>``. Elle fonctionnera même s'il y a d'autres balises HTML dans les balises de titre."
77
78 #: ../../../__w/calibre/calibre/manual/function_mode.rst:40
79 msgid "Your first custom function - smartening hyphens"
80 msgstr "Votre première fonction personnalisée - les traits d'union d'embellissement"
81
82 #: ../../../__w/calibre/calibre/manual/function_mode.rst:42
83 msgid ""
84 "The real power of function mode comes from being able to create your own "
85 "functions to process text in arbitrary ways. The Smarten Punctuation tool in"
86 " the editor leaves individual hyphens alone, so you can use this function to"
87 " replace them with em-dashes."
88 msgstr "La vraie puissance du mode fonction vient du fait de pouvoir créer vos propres fonctions pour traiter le texte de manières quelconques. L'outil de Ponctuation Intelligente dans l'éditeur laisse les traits d'union individuels de côté, vous pouvez employer cette fonction pour les remplacer par des tirets fins."
89
90 #: ../../../__w/calibre/calibre/manual/function_mode.rst:47
91 msgid ""
92 "To create a new function, simply click the :guilabel:`Create/edit` button to"
93 " create a new function and copy the Python code from below."
94 msgstr "Pour créer une nouvelle fonction, cliquez simplement le bouton :guilabel:`Créer/Éditer` pour créer une nouvelle fonction et copiez le code Python qui se trouve ci-dessous."
95
96 #: ../../../__w/calibre/calibre/manual/function_mode.rst:55
97 msgid ""
98 "Every :guilabel:`Search & replace` custom function must have a unique name "
99 "and consist of a Python function named replace, that accepts all the "
100 "arguments shown above. For the moment, we won't worry about all the "
101 "different arguments to ``replace()`` function. Just focus on the ``match`` "
102 "argument. It represents a match when running a search and replace. Its full "
103 "documentation in available `here "
104 "<https://docs.python.org/library/re.html#match-objects>`_. ``match.group()``"
105 " simply returns all the matched text and all we do is replace hyphens in "
106 "that text with em-dashes, first replacing double hyphens and then single "
107 "hyphens."
108 msgstr "Chaque fonction personnalisée :guilabel:`Rechercher & remplacer` doit avoir un nom unique et consister en une fonction Python nommée replace, qui accepte tous les arguments affichés ci-dessus. Pour le moment, nous ne nous inquiéterons pas à propos de tous les différents arguments de la fonction ``replace()``. Focalisons-nous uniquement sur l'argument ``match``. Il représente une correspondance lors de l'exécution d'un rechercher et remplacer. Sa documentation complète est disponible `ici <https://docs.python.org/library/re.html#match-objects>`_. ``match.group()`` renvoie simplement tout le texte correspondant et tout ce que nous faisons est de remplacer les traits d'union dans ce texte par des tirets fins, en remplaçant d'abord les doubles traits d'union et ensuite les traits d'union seuls."
109
110 #: ../../../__w/calibre/calibre/manual/function_mode.rst:65
111 msgid "Use this function with the find regular expression::"
112 msgstr "Utilisez cette fonction avec l'expression régulière de recherche ::"
113
114 #: ../../../__w/calibre/calibre/manual/function_mode.rst:69
115 msgid ""
116 "And it will replace all hyphens with em-dashes, but only in actual text and "
117 "not inside HTML tag definitions."
118 msgstr "Et il remplacera tous les traits d'union par des tirets fins, mais seulement dans le texte actuel et non dans les définitions de balises HTML."
119
120 #: ../../../__w/calibre/calibre/manual/function_mode.rst:74
121 msgid ""
122 "The power of function mode - using a spelling dictionary to fix mis-"
123 "hyphenated words"
124 msgstr "La force du mode fonction - utiliser un dictionnaire orthographique pour réparer les mots aux mauvais traits d'union "
125
126 #: ../../../__w/calibre/calibre/manual/function_mode.rst:76
127 msgid ""
128 "Often, e-books created from scans of printed books contain mis-hyphenated "
129 "words -- words that were split at the end of the line on the printed page. "
130 "We will write a simple function to automatically find and fix such words."
131 msgstr "Souvent les livres numériques créés à partir de scans de livres imprimés contiennent des mots avec de mauvais traits d'union -- les mots qui sont divisés à la fin de la ligne de la page imprimée. Nous écrirons une fonction simple pour trouver et réparer automatiquement de tels mots."
132
133 #: ../../../__w/calibre/calibre/manual/function_mode.rst:101
134 msgid "Use this function with the same find expression as before, namely::"
135 msgstr "Utilisez cette fonction avec la même expression de recherche que précédemment, à savoir ::"
136
137 #: ../../../__w/calibre/calibre/manual/function_mode.rst:105
138 msgid ""
139 "And it will magically fix all mis-hyphenated words in the text of the book. "
140 "The main trick is to use one of the useful extra arguments to the replace "
141 "function, ``dictionaries``. This refers to the dictionaries the editor "
142 "itself uses to spell check text in the book. What this function does is look"
143 " for words separated by a hyphen, remove the hyphen and check if the "
144 "dictionary recognizes the composite word, if it does, the original words are"
145 " replaced by the hyphen free composite word."
146 msgstr "Et il réparera magiquement tous les mots avec de mauvais traits d'union dans le texte du livre. L'astuce principale est d'utiliser l'un des utiles arguments supplémentaires de la fonction de remplacement, ``dictionaries``. Celui-ci se réfère aux dictionnaires que l'éditeur utilise lui-même pour vérifier orthographiquement le texte dans le livre. Ce que fait cette fonction est de regarder aux mots séparés par un trait d'union, supprimer le trait d'union et vérifier si le dictionnaire reconnait le mot composé, s'il le fait, les mots originaux sont remplacés par le mot composé libre du trait d'union."
147
148 #: ../../../__w/calibre/calibre/manual/function_mode.rst:113
149 msgid ""
150 "Note that one limitation of this technique is it will only work for mono-"
151 "lingual books, because, by default, ``dictionaries.recognized()`` uses the "
152 "main language of the book."
153 msgstr "Notez qu'une limitation à cette technique est qu'elle ne fonctionnera uniquement qu'avec les livres unilingues, car, par défaut, ``dictionaries.recognized()`` utilise la langue principale du livre."
154
155 #: ../../../__w/calibre/calibre/manual/function_mode.rst:119
156 msgid "Auto numbering sections"
157 msgstr "Auto numérotation des sections"
158
159 #: ../../../__w/calibre/calibre/manual/function_mode.rst:121
160 msgid ""
161 "Now we will see something a little different. Suppose your HTML file has "
162 "many sections, each with a heading in an :code:`<h2>` tag that looks like "
163 ":code:`<h2>Some text</h2>`. You can create a custom function that will "
164 "automatically number these headings with consecutive section numbers, so "
165 "that they look like :code:`<h2>1. Some text</h2>`."
166 msgstr "Maintenant nous allons voir quelque chose d'un peu différent. Supposons que votre fichier HTML ait beaucoup de sections, chacune avec un titre dans une balise :code:`<h2>` ressemblant à :code:`<h2>Un certain texte</h2>`. Vous pouvez créer une fonction personnalisée qui numérotera automatiquement ces titres avec des numéros de section consécutifs, afin qu'elles ressemblent à :code:`<h2>1. Un certain texte</h2>`."
167
168 #: ../../../__w/calibre/calibre/manual/function_mode.rst:137
169 msgid "Use it with the find expression::"
170 msgstr "Utilisez la avec l'expression de recherche ::"
171
172 #: ../../../__w/calibre/calibre/manual/function_mode.rst:141
173 msgid ""
174 "Place the cursor at the top of the file and click :guilabel:`Replace all`."
175 msgstr "Placez le curseur en haut du fichier et cliquez :guilabel:`Remplacez tout`"
176
177 #: ../../../__w/calibre/calibre/manual/function_mode.rst:143
178 msgid ""
179 "This function uses another of the useful extra arguments to ``replace()``: "
180 "the ``number`` argument. When doing a :guilabel:`Replace All` number is "
181 "automatically incremented for every successive match."
182 msgstr "Cette fonction utilise l'un des utiles arguments supplémentaires pour ``replace()`` l'argument ``number`. Lorsque vous faites un :guilabel:`Remplacer Tout` le nombre est incrémenté automatiquement pour chaque correspondante successive ."
183
184 #: ../../../__w/calibre/calibre/manual/function_mode.rst:147
185 msgid ""
186 "Another new feature is the use of ``replace.file_order`` -- setting that to "
187 "``'spine'`` means that if this search is run on multiple HTML files, the "
188 "files are processed in the order in which they appear in the book. See "
189 ":ref:`file_order_replace_all` for details."
190 msgstr "Une autre nouvelle fonctionnalité est l'utilisation de `replace.file_order`` -- régler cela à ``spine`` signifie que si cette recherche est exécutée sur de multiples fichiers HTML, ces fichiers seront traités dans l'ordre dans lequel ils apparaissent dans le livre. Voir :ref:`file_order_replace_all` pour des détails."
191
192 #: ../../../__w/calibre/calibre/manual/function_mode.rst:154
193 msgid "Auto create a Table of Contents"
194 msgstr "Auto créer une Table des Matières"
195
196 #: ../../../__w/calibre/calibre/manual/function_mode.rst:156
197 msgid ""
198 "Finally, let's try something a little more ambitious. Suppose your book has "
199 "headings in ``h1`` and ``h2`` tags that look like ``<h1 id=\"someid\">Some "
200 "Text</h1>``. We will auto-generate an HTML Table of Contents based on these "
201 "headings. Create the custom function below:"
202 msgstr "Finalement, essayons quelque chose d'un peu plus ambitieux. Supposons que votre livre à des titres dans des balises ``h1`` et ``h2`` qui ressemblent à <h1 id=\"someid\">Un certain texte</h1>``. Nous auto générerons une Table des Matières HTML basée sur ces titres. Créez la fonction personnalisée suivante :"
203
204 #: ../../../__w/calibre/calibre/manual/function_mode.rst:199
205 msgid "And use it with the find expression::"
206 msgstr "Et utilisez là pour trouver l'expression::"
207
208 #: ../../../__w/calibre/calibre/manual/function_mode.rst:203
209 msgid ""
210 "Run the search on :guilabel:`All text files` and at the end of the search, a"
211 " window will popup with \"Debug output from your function\" which will have "
212 "the HTML Table of Contents, ready to be pasted into :file:`toc.html`."
213 msgstr "Lancez la recherche sur :guilabel:`Tous les fichiers textes` et à la fin de la recherche, une fenêtre apparaîtra avec \"Résultat de débogage pour votre fonction\" qui contiendra la Table des Matières HTML, prête à être collée dans :file:`toc.html`."
214
215 #: ../../../__w/calibre/calibre/manual/function_mode.rst:207
216 msgid ""
217 "The function above is heavily commented, so it should be easy to follow. The"
218 " key new feature is the use of another useful extra argument to the "
219 "``replace()`` function, the ``data`` object. The ``data`` object is a Python"
220 " *dictionary* that persists between all successive invocations of "
221 "``replace()`` during a single :guilabel:`Replace All` operation."
222 msgstr "La fonction ci-dessus est fortement commentée, aussi elle devrait être facile à suivre. La nouvelle fonctionnalité clé est l'utilisation d'un autre argument supplémentaire utile à la fonction ``replace()``, l'objet ``data``. L'objet ``data`` est un *dictionnaire* Python qui persiste entre les invocations successives de ``replace()`` pendant une seule opération :guilabel:`Remplacer Tout`."
223
224 #: ../../../__w/calibre/calibre/manual/function_mode.rst:213
225 msgid ""
226 "Another new feature is the use of ``call_after_last_match`` -- setting that "
227 "to ``True`` on the ``replace()`` function means that the editor will call "
228 "``replace()`` one extra time after all matches have been found. For this "
229 "extra call, the match object will be ``None``."
230 msgstr "Une autre nouvelle fonctionnalité est l'utilisation de ``call_after_last_match`` -- paramétrer cela à ``True`` sur la fonction ``replace()`` signifie que l'éditeur appellera ``replace()`` une fois de plus après que toutes les correspondances aient été trouvées. Pour cet appel supplémentaire, l'objet correspondant sera``None``"
231
232 #: ../../../__w/calibre/calibre/manual/function_mode.rst:218
233 msgid ""
234 "This was just a demonstration to show you the power of function mode, if you"
235 " really needed to generate a Table of Contents from headings in your book, "
236 "you would be better off using the dedicated Table of Contents tool in "
237 ":guilabel:`Tools->Table of Contents`."
238 msgstr "Ceci était juste une démonstration pour vous montrer la puissance du mode fonction. Si vous avez réellement besoin de générer une Table des Matières à partir des titres dans votre livre, vous aurez mieux en utilisant l'outil Table des Matières dédié dans :guilabel:`Tools->Table des Matières`."
239
240 #: ../../../__w/calibre/calibre/manual/function_mode.rst:224
241 msgid "The API for the function mode"
242 msgstr "L'API pour le mode fonction"
243
244 #: ../../../__w/calibre/calibre/manual/function_mode.rst:226
245 msgid ""
246 "All function mode functions must be Python functions named replace, with the"
247 " following signature::"
248 msgstr "Toutes les fonctions du mode fonction doivent être des fonctions Python nommées replace, avec la signature suivante ::"
249
250 #: ../../../__w/calibre/calibre/manual/function_mode.rst:232
251 msgid ""
252 "When a find/replace is run, for every match that is found, the ``replace()``"
253 " function will be called, it must return the replacement string for that "
254 "match. If no replacements are to be done, it should return ``match.group()``"
255 " which is the original string. The various arguments to the ``replace()`` "
256 "function are documented below."
257 msgstr "Quand un rechercher/remplacer est exécuté, pour chaque correspondance qui est trouvée, la fonction ``replace()`` sera appelée, elle doit retourner la chaîne de remplacement pour cette correspondance. Si aucuns remplacements ne doivent être effectués, elle devrait retourner ``match.group()`` qui est la chaîne originale. Les divers arguments de la fonction ``replace()`` sont documentées ci-dessous."
258
259 #: ../../../__w/calibre/calibre/manual/function_mode.rst:239
260 msgid "The ``match`` argument"
261 msgstr "L'argument ``match``"
262
263 #: ../../../__w/calibre/calibre/manual/function_mode.rst:241
264 msgid ""
265 "The ``match`` argument represents the currently found match. It is a `Python"
266 " Match object <https://docs.python.org/library/re.html#match-objects>`_. Its"
267 " most useful method is ``group()`` which can be used to get the matched text"
268 " corresponding to individual capture groups in the search regular "
269 "expression."
270 msgstr "L'argument ``match`` représente la correspondance actuellement trouvée. C'est un `objet Python Match <https://docs.python.org/library/re.html#match-objects>`_. Sa méthode la plus utile est ``group()`` qui peut être utilisée pour récupérer le texte apparié correspondant à la capture de groupes individuels dans l'expression régulière de recherche."
271
272 #: ../../../__w/calibre/calibre/manual/function_mode.rst:248
273 msgid "The ``number`` argument"
274 msgstr "L'argument ``number``"
275
276 #: ../../../__w/calibre/calibre/manual/function_mode.rst:250
277 msgid ""
278 "The ``number`` argument is the number of the current match. When you run "
279 ":guilabel:`Replace All`, every successive match will cause ``replace()`` to "
280 "be called with an increasing number. The first match has number 1."
281 msgstr "L'argument ``number`` est le nombre de l'actuelle correspondance. Lorsque vous exécutez :guilabel:`Remplacer Tout`, chaque correspondance successive entraînera ``replace()`` à être appelé avec un nombre incrémenté. La première correspondance porte le numéro 1."
282
283 #: ../../../__w/calibre/calibre/manual/function_mode.rst:255
284 msgid "The ``file_name`` argument"
285 msgstr "L'argument ``file_name``"
286
287 #: ../../../__w/calibre/calibre/manual/function_mode.rst:257
288 msgid ""
289 "This is the filename of the file in which the current match was found. When "
290 "searching inside marked text, the ``file_name`` is empty. The ``file_name`` "
291 "is in canonical form, a path relative to the root of the book, using ``/`` "
292 "as the path separator."
293 msgstr "Ceci est le nom du fichier dans lequel la correspondance actuelle a été trouvée. Lors d'une recherche à l'intérieur d'un texte marqué, le ``file_name`` est vide. Le ``file_name`` est de forme reconnue, une chemin relatif à la racine du livre, utilisant ``/`` comme séparateur de chemin."
294
295 #: ../../../__w/calibre/calibre/manual/function_mode.rst:263
296 msgid "The ``metadata`` argument"
297 msgstr "L'argument ``metadata``"
298
299 #: ../../../__w/calibre/calibre/manual/function_mode.rst:265
300 msgid ""
301 "This represents the metadata of the current book, such as title, authors, "
302 "language, etc. It is an object of class "
303 ":class:`calibre.ebooks.metadata.book.base.Metadata`. Useful attributes "
304 "include, ``title``, ``authors`` (a list of authors) and ``language`` (the "
305 "language code)."
306 msgstr "Ceci représente les métadonnées du livre actuel, comme le titre, les auteurs, la langue, etc. C'est un objet de la classe :class:`calibre.ebooks.metadata.book.base.Metadata`. Les attributs utiles incluent, ``title``, ``authors`` (une liste d'auteur) et ``language`` (le code de langue)."
307
308 #: ../../../__w/calibre/calibre/manual/function_mode.rst:271
309 msgid "The ``dictionaries`` argument"
310 msgstr "L'argument ``dictionaries``"
311
312 #: ../../../__w/calibre/calibre/manual/function_mode.rst:273
313 msgid ""
314 "This represents the collection of dictionaries used for spell checking the "
315 "current book. Its most useful method is ``dictionaries.recognized(word)`` "
316 "which will return ``True`` if the passed in word is recognized by the "
317 "dictionary for the current book's language."
318 msgstr "Ceci représente la collection de dictionnaires utilisés pour la vérification orthographique du livre actuel. Sa méthode la plus utile est ``dictionaries.recognized(word)`` qui renverra ``True```si le mot analysé est reconnu par le dictionnaire de la langue actuelle du livre."
319
320 #: ../../../__w/calibre/calibre/manual/function_mode.rst:279
321 msgid "The ``data`` argument"
322 msgstr "L'argument ``data``"
323
324 #: ../../../__w/calibre/calibre/manual/function_mode.rst:281
325 msgid ""
326 "This a simple Python ``dictionary``. When you run :guilabel:`Replace all`, "
327 "every successive match will cause ``replace()`` to be called with the same "
328 "``dictionary`` as data. You can thus use it to store arbitrary data between "
329 "invocations of ``replace()`` during a :guilabel:`Replace all` operation."
330 msgstr "Ceci est un un simple ``dictionnaire`` Python. Lorsque vous exécutez :guilabel:`Remplacer tout`, toutes les correspondances suivantes entraîneront un appel de ``replace()`` avec le même ``dictionnaire`` en tant que données. Vous pouvez donc l'utiliser pour stocker arbitrairement des données entre des invocations de ``replace()`` pendant une opération :guilabel:`Remplacer tout`."
331
332 #: ../../../__w/calibre/calibre/manual/function_mode.rst:288
333 msgid "The ``functions`` argument"
334 msgstr "L'argument ``functions``"
335
336 #: ../../../__w/calibre/calibre/manual/function_mode.rst:290
337 msgid ""
338 "The ``functions`` argument gives you access to all other user defined "
339 "functions. This is useful for code re-use. You can define utility functions "
340 "in one place and re-use them in all your other functions. For example, "
341 "suppose you create a function named ``My Function`` like this:"
342 msgstr "L'argument ``functions`` vous donne accès à toutes les autres fonctions définies par l'utilisateur. Ceci est utile pour ré-utiliser du code. Vous pouvez définir les fonctions utilitaires à un seul endroit et les ré-utiliser dans toutes vos autres fonctions. Par exemple, supposons la création d'une fonction nommée ``My Function`` comme ceci :"
343
344 #: ../../../__w/calibre/calibre/manual/function_mode.rst:303
345 msgid ""
346 "Then, in another function, you can access the ``utility()`` function like "
347 "this:"
348 msgstr "Alors, dans une autre fonction, vous pouvez accéder à la fonction ``utility()`` comme ceci :"
349
350 #: ../../../__w/calibre/calibre/manual/function_mode.rst:311
351 msgid ""
352 "You can also use the functions object to store persistent data, that can be "
353 "re-used by other functions. For example, you could have one function that "
354 "when run with :guilabel:`Replace All` collects some data and another "
355 "function that uses it when it is run afterwards. Consider the following two "
356 "functions:"
357 msgstr "Vous pouvez aussi utiliser les objets fonctions pour stocker des données persistantes, qui peuvent être ré-utilisées par d'autres fonctions. Par exemple, vous pourriez avoir une fonction qui lorsqu'elle s'exécute avec :guilabel:`Remplacer Tout` collecte des données et une autre fonction qui les utilisera lorsqu'elle sera lancée plus tard. Considérez les deux fonctions suivantes :"
358
359 #: ../../../__w/calibre/calibre/manual/function_mode.rst:331
360 msgid "Debugging your functions"
361 msgstr "Dépanner vos fonctions"
362
363 #: ../../../__w/calibre/calibre/manual/function_mode.rst:333
364 msgid ""
365 "You can debug the functions you create by using the standard ``print()`` "
366 "function from Python. The output of print will be displayed in a popup "
367 "window after the Find/replace has completed. You saw an example of using "
368 "``print()`` to output an entire table of contents above."
369 msgstr "Vous pouvez dépanner les fonctions que vous créez en utilisant la fonction standard ``print()`` de Python. Le résultat de print sera affiché dans une fenêtre popup après que le Rechercher/remplacer soit terminé. Nous avons vu un exemple de l'utilisation de ``print()`` pour sortir une table des matières entière plus haut."
370
371 #: ../../../__w/calibre/calibre/manual/function_mode.rst:341
372 msgid "Choose file order when running on multiple HTML files"
373 msgstr "Choisissez l'ordre de fichier lors de l'exécution sur de multiples fichiers HTML"
374
375 #: ../../../__w/calibre/calibre/manual/function_mode.rst:343
376 msgid ""
377 "When you run a :guilabel:`Replace all` on multiple HTML files, the order in "
378 "which the files are processed depends on what files you have open for "
379 "editing. You can force the search to process files in the order in which "
380 "they appear by setting the ``file_order`` attribute on your function, like "
381 "this:"
382 msgstr "Lorsque vous lancez :guilabel:`Remplacer tout` sur de multiples fichiers HTML, l'ordre dans lequel les fichiers sont traités dépend de quels fichiers vous avez ouvert pour l'édition. Vous pouvez forcer la recherche à traiter les fichiers dans l'ordre dans lequel ils apparaissent en paramétrant l'attribut ``file_order`` de votre fonction, comme ceci :"
383
384 #: ../../../__w/calibre/calibre/manual/function_mode.rst:355
385 msgid ""
386 "``file_order`` accepts two values, ``spine`` and ``spine-reverse`` which "
387 "cause the search to process multiple files in the order they appear in the "
388 "book, either forwards or backwards, respectively."
389 msgstr "``file_order`` accepte deux valeurs, ``spine`` et ``spine-reverse`` qui entraîne le traitement de multiples fichiers dans l'ordre où ils apparaissent dans le livre, soit descendant soit ascendant, respectivement."
390
391 #: ../../../__w/calibre/calibre/manual/function_mode.rst:360
392 msgid ""
393 "Having your function called an extra time after the last match is found"
394 msgstr "Appelle votre fonction une dernière fois après que la dernière correspondance ait été trouvée."
395
396 #: ../../../__w/calibre/calibre/manual/function_mode.rst:362
397 msgid ""
398 "Sometimes, as in the auto generate table of contents example above, it is "
399 "useful to have your function called an extra time after the last match is "
400 "found. You can do this by setting the ``call_after_last_match`` attribute on"
401 " your function, like this:"
402 msgstr "Parfois, comme dans l'exemple de la table des matières auto-générée ci-dessus, il est utile que votre fonction soit appelée une nouvelle fois après que la dernière correspondance ait été trouvée. Vous pouvez faire ceci en paramétrant l'attribut ``call_after_last_match`` dans votre fonction, comme ceci :"
403
404 #: ../../../__w/calibre/calibre/manual/function_mode.rst:376
405 msgid "Appending the output from the function to marked text"
406 msgstr "Ajouter le résultat de la fonction au texte marqué"
407
408 #: ../../../__w/calibre/calibre/manual/function_mode.rst:378
409 msgid ""
410 "When running search and replace on marked text, it is sometimes useful to "
411 "append some text to the end of the marked text. You can do that by setting "
412 "the ``append_final_output_to_marked`` attribute on your function (note that "
413 "you also need to set ``call_after_last_match``), like this:"
414 msgstr "Lorsque vous effectuez un rechercher et remplacer sur du texte marqué, il est quelquefois utile d'ajouter du texte à la fin du texte marqué. Vous pouvez faire cela en paramétrant l'attribut ``append_final_output_to_marked`` sur votre fonction (notez que vous aurez également besoin de paramétrer ``call_after_last_match`), comme ceci :"
415
416 #: ../../../__w/calibre/calibre/manual/function_mode.rst:393
417 msgid "Suppressing the result dialog when performing searches on marked text"
418 msgstr "Suppression du dialogue résultant lorsque des recherches sont effectuées sur du texte marqué"
419
420 #: ../../../__w/calibre/calibre/manual/function_mode.rst:395
421 msgid ""
422 "You can also suppress the result dialog (which can slow down the repeated "
423 "application of a search/replace on many blocks of text) by setting the "
424 "``suppress_result_dialog`` attribute on your function, like this:"
425 msgstr "Vous pouvez également supprimer le résultat du dialogue (qui peut ralentir l'application répétée d'un rechercher/remplacer sur beaucoup de blocs de texte) en paramétrant l'attribut ``suppress_result_dialog`` sur votre fonction, comme ceci :"
426
427 #: ../../../__w/calibre/calibre/manual/function_mode.rst:408
428 msgid "More examples"
429 msgstr "Plus d'exemples"
430
431 #: ../../../__w/calibre/calibre/manual/function_mode.rst:410
432 msgid ""
433 "More useful examples, contributed by calibre users, can be found in the "
434 "`calibre E-book editor forum "
435 "<https://www.mobileread.com/forums/showthread.php?t=237181>`_."
436 msgstr "Plus d'exemples utiles, fournis par des utilisateurs de calibre, peuvent être trouvés dans le `Forum Éditeur de livre numérique de calibre <https://www.mobileread.com/forums/showthread.php?t=237181>`_."