Debian Codegraph @

translations/manual/es/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 # Edgar Carballo <[email protected]>, 2015
7 # Jellby <[email protected]>, 2014-2017,2020-2021,2023-2024
8 # JUAN DAVID JARAMILLO ORTIZ <[email protected]>, 2015
9 # Walter Paterno <[email protected]>, 2024,2026
10 msgid ""
11 msgstr ""
12 "Project-Id-Version: calibre\n"
13 "Report-Msgid-Bugs-To: \n"
14 "POT-Creation-Date: 2026-03-12 02:31+0000\n"
15 "PO-Revision-Date: 2014-11-21 02:54+0000\n"
16 "Last-Translator: Walter Paterno <[email protected]>, 2024,2026\n"
17 "Language-Team: Spanish (http://app.transifex.com/calibre/calibre/language/es/)\n"
18 "MIME-Version: 1.0\n"
19 "Content-Type: text/plain; charset=UTF-8\n"
20 "Content-Transfer-Encoding: 8bit\n"
21 "Language: es\n"
22 "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
23
24 #: ../../../__w/calibre/calibre/manual/function_mode.rst:2
25 msgid "Function mode for Search & replace in the Editor"
26 msgstr "Modo de función para buscar y sustituir en el editor"
27
28 #: ../../../__w/calibre/calibre/manual/function_mode.rst:4
29 msgid ""
30 "The :guilabel:`Search & replace` tool in the editor supports a *function "
31 "mode*. In this mode, you can combine regular expressions (see :doc:`regexp`)"
32 " with arbitrarily powerful Python functions to do all sorts of advanced text"
33 " processing."
34 msgstr "La herramienta \"Buscar y reemplazar\" del editor admite un *modo de función*. En este modo, se pueden combinar expresiones regulares (véase :doc:`regexp`) con funciones de Python de cualquier potencia para realizar todo tipo de procesamiento de texto avanzado."
35
36 #: ../../../__w/calibre/calibre/manual/function_mode.rst:9
37 msgid ""
38 "In the standard *regexp* mode for search and replace, you specify both a "
39 "regular expression to search for as well as a template that is used to "
40 "replace all found matches. In function mode, instead of using a fixed "
41 "template, you specify an arbitrary function, in the `Python programming "
42 "language <https://docs.python.org>`_. This allows you to do lots of things "
43 "that are not possible with simple templates."
44 msgstr "En el modo estándar de *expresiones regulares* para buscar y sustituir, se especifica una expresión regular para buscar y una plantilla que se usa para sustituir todas las coincidencias. En el modo de función, en lugar de usar una sola plantilla, se especifica una función arbitraria en el `lenguaje de programación Python <https://docs.python.org>`_. Esto le permite hacer muchas cosas que no son posibles sólo con plantillas."
45
46 #: ../../../__w/calibre/calibre/manual/function_mode.rst:16
47 msgid ""
48 "Techniques for using function mode and the syntax will be described by means"
49 " of examples, showing you how to create functions to perform progressively "
50 "more complex tasks."
51 msgstr "Algunas técnicas para usar el modo de función y su sintaxis se describirán a través de ejemplos, que le mostrarán cómo crear funciones para realizar tareas cada vez más complejas."
52
53 #: ../../../__w/calibre/calibre/manual/function_mode.rst:21
54 msgid "The Function mode"
55 msgstr "El modo de función"
56
57 #: ../../../__w/calibre/calibre/manual/function_mode.rst:26
58 msgid "Automatically fixing the case of headings in the document"
59 msgstr "Corregir automáticamente las mayúsculas y minúsculas en las cabeceras del documento"
60
61 #: ../../../__w/calibre/calibre/manual/function_mode.rst:28
62 msgid ""
63 "Here, we will leverage one of the builtin functions in the editor to "
64 "automatically change the case of all text inside heading tags to title "
65 "case::"
66 msgstr "Aquí aprovecharemos una de las funciones incorporadas del editor para poner la primera letra de cada palabra dentro de una etiqueta de encabezado en mayúscula::"
67
68 #: ../../../__w/calibre/calibre/manual/function_mode.rst:33
69 msgid ""
70 "For the function, simply choose the :guilabel:`Title-case text (ignore "
71 "tags)` builtin function. This will change titles that look like: ``<h1>some "
72 "titLE</h1>`` to ``<h1>Some Title</h1>``. It will work even if there are "
73 "other HTML tags inside the heading tags."
74 msgstr "Para esta función, simplemente seleccione la función integrada :guilabel:`Texto de título en mayúsculas y minúsculas (ignorar etiquetas)`. Esto cambiará los títulos similares a ``<h1>some titLE</h1>`` a ``<h1>Some Title</h1>``. Funcionará incluso si hay otras etiquetas HTML dentro de las etiquetas de encabezado."
75
76 #: ../../../__w/calibre/calibre/manual/function_mode.rst:40
77 msgid "Your first custom function - smartening hyphens"
78 msgstr "La primera función personalizada: mejorar guiones"
79
80 #: ../../../__w/calibre/calibre/manual/function_mode.rst:42
81 msgid ""
82 "The real power of function mode comes from being able to create your own "
83 "functions to process text in arbitrary ways. The Smarten Punctuation tool in"
84 " the editor leaves individual hyphens alone, so you can use this function to"
85 " replace them with em-dashes."
86 msgstr "El verdadero poder del modo función reside en la posibilidad de crear funciones propias para procesar texto de forma arbitraria. La herramienta \"Puntuación inteligente\" del editor no modifica los guiones individuales, por lo que puede usar esta función para reemplazarlos con guiones largos."
87
88 #: ../../../__w/calibre/calibre/manual/function_mode.rst:47
89 msgid ""
90 "To create a new function, simply click the :guilabel:`Create/edit` button to"
91 " create a new function and copy the Python code from below."
92 msgstr "Para crear una nueva función, simplemente pulse en el botón :guilabel:`Crear o modificar` y copie el código Python siguiente."
93
94 #: ../../../__w/calibre/calibre/manual/function_mode.rst:55
95 msgid ""
96 "Every :guilabel:`Search & replace` custom function must have a unique name "
97 "and consist of a Python function named replace, that accepts all the "
98 "arguments shown above. For the moment, we won't worry about all the "
99 "different arguments to ``replace()`` function. Just focus on the ``match`` "
100 "argument. It represents a match when running a search and replace. Its full "
101 "documentation in available `here "
102 "<https://docs.python.org/library/re.html#match-objects>`_. ``match.group()``"
103 " simply returns all the matched text and all we do is replace hyphens in "
104 "that text with em-dashes, first replacing double hyphens and then single "
105 "hyphens."
106 msgstr "Toda función personalizada de :guilabel:`Buscar y sustituir` debe tener un nombre único y consister en una función Python llamada «replace», que acepte todos los argumentos mostrados arriba. Por ahora no vamos a preocuparnos de los diferentes argumentos de la función ``replace()``. Fíjese sólo en el argumento ``match``. Representa una coincidencia al realizar una búsqueda y sustitución. La documentación completa se encuentra `aquí <https://docs.python.org/library/re.html#match-objects>`_. ``match.group()`` devuelve todo el texto de la coincidencia y todo lo que hacemos es sustituir los guiones del texto por rayas, sustituyendo primero los guiones dobles y luego los sencillos."
107
108 #: ../../../__w/calibre/calibre/manual/function_mode.rst:65
109 msgid "Use this function with the find regular expression::"
110 msgstr "Use esta función con la expresión regular de búsqueda::"
111
112 #: ../../../__w/calibre/calibre/manual/function_mode.rst:69
113 msgid ""
114 "And it will replace all hyphens with em-dashes, but only in actual text and "
115 "not inside HTML tag definitions."
116 msgstr "Y sustituirá todos los guiones por rayas, pero sólo en texto real y no dentro de las definiciones de etiqueta HTML."
117
118 #: ../../../__w/calibre/calibre/manual/function_mode.rst:74
119 msgid ""
120 "The power of function mode - using a spelling dictionary to fix mis-"
121 "hyphenated words"
122 msgstr "La potencia del modo de función: usar un diccionario para corregir palabras mal divididas por guiones"
123
124 #: ../../../__w/calibre/calibre/manual/function_mode.rst:76
125 msgid ""
126 "Often, e-books created from scans of printed books contain mis-hyphenated "
127 "words -- words that were split at the end of the line on the printed page. "
128 "We will write a simple function to automatically find and fix such words."
129 msgstr "A menudo, los libros electrónicos creados a partir de imágenes de libros impresos contienen palabras mal divididas por guiones: palabras que estaban divididas al final de un renglón en la página impresa. Vamos a escribir una función sencilla para encontrar y corregir automáticamente estas palabras."
130
131 #: ../../../__w/calibre/calibre/manual/function_mode.rst:101
132 msgid "Use this function with the same find expression as before, namely::"
133 msgstr "Use esta función con la misma expresión de búsqueda anterior, es decir::"
134
135 #: ../../../__w/calibre/calibre/manual/function_mode.rst:105
136 msgid ""
137 "And it will magically fix all mis-hyphenated words in the text of the book. "
138 "The main trick is to use one of the useful extra arguments to the replace "
139 "function, ``dictionaries``. This refers to the dictionaries the editor "
140 "itself uses to spell check text in the book. What this function does is look"
141 " for words separated by a hyphen, remove the hyphen and check if the "
142 "dictionary recognizes the composite word, if it does, the original words are"
143 " replaced by the hyphen free composite word."
144 msgstr "Y corregirá automáticamente todas las palabras con guiones incorrectos en el el texto del libro. El truco principal es utilizar uno de los argumentos adicionales de la función «replace»: ``dictionaries``. Esto se refiere a los diccionarios que el propio editor usa para comprobar la ortografía en el libro. Lo que hace esta función es buscar palabras unidas por un guión, eliminar el guión y comprobar si el diccionario reconoce la palabra compuesta; si lo hace, las palabras originales se sustituyen por la palabra sin guión."
145
146 #: ../../../__w/calibre/calibre/manual/function_mode.rst:113
147 msgid ""
148 "Note that one limitation of this technique is it will only work for mono-"
149 "lingual books, because, by default, ``dictionaries.recognized()`` uses the "
150 "main language of the book."
151 msgstr "Tenga en cuenta que una limitación de esta técnica es que sólo funciona par libros monolingües, porque de manera predeterminada ``dictionaries.recognized()``usa el idioma principal del libro."
152
153 #: ../../../__w/calibre/calibre/manual/function_mode.rst:119
154 msgid "Auto numbering sections"
155 msgstr "Enumerar secciones automáticamente"
156
157 #: ../../../__w/calibre/calibre/manual/function_mode.rst:121
158 msgid ""
159 "Now we will see something a little different. Suppose your HTML file has "
160 "many sections, each with a heading in an :code:`<h2>` tag that looks like "
161 ":code:`<h2>Some text</h2>`. You can create a custom function that will "
162 "automatically number these headings with consecutive section numbers, so "
163 "that they look like :code:`<h2>1. Some text</h2>`."
164 msgstr "Ahora veremos algo un poco diferente. Supongamos que un archivo HTML tiene muchas secciones, cada una con una cabecera en una etiqueta :code:`<h2>` de esta forma: :code:`<h2>Algún texto</h2>`. Puede crear una función personalizada que numere automáticamente estas cabeceras con números consecutivos, para que tengan esta forma: :code:`<h2>1. Algún texto</h2>`."
165
166 #: ../../../__w/calibre/calibre/manual/function_mode.rst:137
167 msgid "Use it with the find expression::"
168 msgstr "Úselo con la expresión de búsqueda::"
169
170 #: ../../../__w/calibre/calibre/manual/function_mode.rst:141
171 msgid ""
172 "Place the cursor at the top of the file and click :guilabel:`Replace all`."
173 msgstr "Coloque el cursor al principio del archivo y pulse :guilabel:`Sustituir todo`."
174
175 #: ../../../__w/calibre/calibre/manual/function_mode.rst:143
176 msgid ""
177 "This function uses another of the useful extra arguments to ``replace()``: "
178 "the ``number`` argument. When doing a :guilabel:`Replace All` number is "
179 "automatically incremented for every successive match."
180 msgstr "Esta función usa otro de los prácticos argumentos adicionales de ``replace()``: el argumento ``number``. Al usar :guilabel:`Sustituir todo`, ``number`` se incrementa automáticamente en cada coincidencia."
181
182 #: ../../../__w/calibre/calibre/manual/function_mode.rst:147
183 msgid ""
184 "Another new feature is the use of ``replace.file_order`` -- setting that to "
185 "``'spine'`` means that if this search is run on multiple HTML files, the "
186 "files are processed in the order in which they appear in the book. See "
187 ":ref:`file_order_replace_all` for details."
188 msgstr "Otra característica nueva es el uso de ``replace.file_order``. Establecerlo en ``'spine'`` significa que si la búsqueda se ejecuta sobre múltiples archivos HTML, los archivos se procesarán en el orden en el que aparecen en el libro. Más detalles en :ref:`file_order_replace_all`."
189
190 #: ../../../__w/calibre/calibre/manual/function_mode.rst:154
191 msgid "Auto create a Table of Contents"
192 msgstr "Crear un índice automáticamente"
193
194 #: ../../../__w/calibre/calibre/manual/function_mode.rst:156
195 msgid ""
196 "Finally, let's try something a little more ambitious. Suppose your book has "
197 "headings in ``h1`` and ``h2`` tags that look like ``<h1 id=\"someid\">Some "
198 "Text</h1>``. We will auto-generate an HTML Table of Contents based on these "
199 "headings. Create the custom function below:"
200 msgstr "Finalmente, probemos algo un poco más ambicioso. Supongamos que su libro tiene encabezados en las etiquetas ``h1`` y ``h2`` que parecen ``<h1 id=\"someid\">Texto</h1>``. Generaremos automáticamente una tabla de contenido HTML basada en estos encabezados. Cree la siguiente función personalizada:"
201
202 #: ../../../__w/calibre/calibre/manual/function_mode.rst:199
203 msgid "And use it with the find expression::"
204 msgstr "Y úselo con la expresión de búsqueda::"
205
206 #: ../../../__w/calibre/calibre/manual/function_mode.rst:203
207 msgid ""
208 "Run the search on :guilabel:`All text files` and at the end of the search, a"
209 " window will popup with \"Debug output from your function\" which will have "
210 "the HTML Table of Contents, ready to be pasted into :file:`toc.html`."
211 msgstr "Ejecutamos la búsqueda sobre :guilabel:`Todos los archivos de texto` y al final de la búsqueda se abrirá una ventana con «Salida de depuración de la función», que contendrá el índice HTML, listo par copiarlo en :file:`toc.html`."
212
213 #: ../../../__w/calibre/calibre/manual/function_mode.rst:207
214 msgid ""
215 "The function above is heavily commented, so it should be easy to follow. The"
216 " key new feature is the use of another useful extra argument to the "
217 "``replace()`` function, the ``data`` object. The ``data`` object is a Python"
218 " *dictionary* that persists between all successive invocations of "
219 "``replace()`` during a single :guilabel:`Replace All` operation."
220 msgstr "La función de arriba está muy comentada, así que debe ser fácil de seguir. La principal nueva característica es el uso de un argumento adicional de la función ``replace()``, el objeto ``data``. El objeto ``data`` es un *diccionario* Python que sobrevive entre sucesivas llamadas a la función ``replace()`` durante una única operación :guilabel:`Sustituir todo`."
221
222 #: ../../../__w/calibre/calibre/manual/function_mode.rst:213
223 msgid ""
224 "Another new feature is the use of ``call_after_last_match`` -- setting that "
225 "to ``True`` on the ``replace()`` function means that the editor will call "
226 "``replace()`` one extra time after all matches have been found. For this "
227 "extra call, the match object will be ``None``."
228 msgstr "Otra característica nueva es el uso de ``call_after_last_match``. Establecerlo en ``True`` en la función ``replace()`` significa que el editor ejecutará ``replace()`` una vez adicional después de haber encontrado todas las coincidencias. En esa ejecución adicional el objeto de coincidencia será ``None``."
229
230 #: ../../../__w/calibre/calibre/manual/function_mode.rst:218
231 msgid ""
232 "This was just a demonstration to show you the power of function mode, if you"
233 " really needed to generate a Table of Contents from headings in your book, "
234 "you would be better off using the dedicated Table of Contents tool in "
235 ":guilabel:`Tools->Table of Contents`."
236 msgstr "Esto ha sido sólo una demostración de la potencia del modo de función, si realmente necesita generar un índice a partir de encabezados en un libro, es mejor usar la herramienta específica para índices en :guilabel:`Herramientas > Índice`."
237
238 #: ../../../__w/calibre/calibre/manual/function_mode.rst:224
239 msgid "The API for the function mode"
240 msgstr "La API para el modo de función"
241
242 #: ../../../__w/calibre/calibre/manual/function_mode.rst:226
243 msgid ""
244 "All function mode functions must be Python functions named replace, with the"
245 " following signature::"
246 msgstr "Todas las funciones del modo función deben ser funciones Python con el nombre «replace» y con la siguiente firma::"
247
248 #: ../../../__w/calibre/calibre/manual/function_mode.rst:232
249 msgid ""
250 "When a find/replace is run, for every match that is found, the ``replace()``"
251 " function will be called, it must return the replacement string for that "
252 "match. If no replacements are to be done, it should return ``match.group()``"
253 " which is the original string. The various arguments to the ``replace()`` "
254 "function are documented below."
255 msgstr "Cuando se realiza una búsqueda y sustitución, la función ``replace()`` se ejecuta para cada coincidencia, debe devolver el texto de sustitución para dicha coincidencia. Si no se ha de efectuar ninguna sustitución, debe devolver ``match.group()``, que es el texto original. Los distintos argumentos de la función ``replace()`` se documentan a continuación."
256
257 #: ../../../__w/calibre/calibre/manual/function_mode.rst:239
258 msgid "The ``match`` argument"
259 msgstr "El argumento ``match``"
260
261 #: ../../../__w/calibre/calibre/manual/function_mode.rst:241
262 msgid ""
263 "The ``match`` argument represents the currently found match. It is a `Python"
264 " Match object <https://docs.python.org/library/re.html#match-objects>`_. Its"
265 " most useful method is ``group()`` which can be used to get the matched text"
266 " corresponding to individual capture groups in the search regular "
267 "expression."
268 msgstr "El argumento ``match`` representa la coincidencia actual. Es un `objeto Match de Python <https://docs.python.org/library/re.html#match-objects>`_. Su método más útil es ``group()``, que puede emplearse para obtener el texto correspondiente a los grupos de captura individuales en la expresión regular de búsqueda."
269
270 #: ../../../__w/calibre/calibre/manual/function_mode.rst:248
271 msgid "The ``number`` argument"
272 msgstr "El argumento ``number``"
273
274 #: ../../../__w/calibre/calibre/manual/function_mode.rst:250
275 msgid ""
276 "The ``number`` argument is the number of the current match. When you run "
277 ":guilabel:`Replace All`, every successive match will cause ``replace()`` to "
278 "be called with an increasing number. The first match has number 1."
279 msgstr "El argumento ``number`` es el número de la coincidencia actual. Al ejecutar :guilabel:`Sustituir todo`, cada coincidencia sucesiva da lugar a una ejecución de ``replace()``, con un número que va en aumento. La primera coincidencia tiene el número 1."
280
281 #: ../../../__w/calibre/calibre/manual/function_mode.rst:255
282 msgid "The ``file_name`` argument"
283 msgstr "El argumento ``file_name``"
284
285 #: ../../../__w/calibre/calibre/manual/function_mode.rst:257
286 msgid ""
287 "This is the filename of the file in which the current match was found. When "
288 "searching inside marked text, the ``file_name`` is empty. The ``file_name`` "
289 "is in canonical form, a path relative to the root of the book, using ``/`` "
290 "as the path separator."
291 msgstr "Éste es el nombre del archivo donde se encontró la coincidencia actual. Al buscar un texto marcado, ``file_name`` está vacío. El argumento ``file_name`` está en forma canónica: una ruta de acceso relativa a la raíz del libro, usando ``/`` como separador."
292
293 #: ../../../__w/calibre/calibre/manual/function_mode.rst:263
294 msgid "The ``metadata`` argument"
295 msgstr "El argumento ``metadata``"
296
297 #: ../../../__w/calibre/calibre/manual/function_mode.rst:265
298 msgid ""
299 "This represents the metadata of the current book, such as title, authors, "
300 "language, etc. It is an object of class "
301 ":class:`calibre.ebooks.metadata.book.base.Metadata`. Useful attributes "
302 "include, ``title``, ``authors`` (a list of authors) and ``language`` (the "
303 "language code)."
304 msgstr "Esto representa los metadatos del libro actual, como título, autores, idioma, etc. Es un objeto de clase :class:`calibre.ebooks.metadata.book.base.Metadata`. Algunos atributos útiles son ``title``, ``authors`` (una lista de autores) y ``language`` (el código del idioma)."
305
306 #: ../../../__w/calibre/calibre/manual/function_mode.rst:271
307 msgid "The ``dictionaries`` argument"
308 msgstr "El argumento ``dictionaries``"
309
310 #: ../../../__w/calibre/calibre/manual/function_mode.rst:273
311 msgid ""
312 "This represents the collection of dictionaries used for spell checking the "
313 "current book. Its most useful method is ``dictionaries.recognized(word)`` "
314 "which will return ``True`` if the passed in word is recognized by the "
315 "dictionary for the current book's language."
316 msgstr "Esto representa la colección de diccionarios usados para la comprobación de ortografía del libro actual. Su método más útil es ``dictionaries.recognized(word)``, que devuelve True si la palabra ``word`` es reconocida por el diccionario para el idioma del libro actual."
317
318 #: ../../../__w/calibre/calibre/manual/function_mode.rst:279
319 msgid "The ``data`` argument"
320 msgstr "El argumento ``data``"
321
322 #: ../../../__w/calibre/calibre/manual/function_mode.rst:281
323 msgid ""
324 "This a simple Python ``dictionary``. When you run :guilabel:`Replace all`, "
325 "every successive match will cause ``replace()`` to be called with the same "
326 "``dictionary`` as data. You can thus use it to store arbitrary data between "
327 "invocations of ``replace()`` during a :guilabel:`Replace all` operation."
328 msgstr "Esto es un diccionario de Python sencillo. Al ejecutar :guilabel:`Sustituir todo`, cada coincidencia sucesiva da lugar a una ejecución de ``replace()`` con el mismo ``data``. Por lo tanto puede usarlo para almacenar datos arbitrarios entre ejecuciones de ``replace()`` durante una operación de :guilabel:`Sustituir todo`."
329
330 #: ../../../__w/calibre/calibre/manual/function_mode.rst:288
331 msgid "The ``functions`` argument"
332 msgstr "El argumento ``functions``"
333
334 #: ../../../__w/calibre/calibre/manual/function_mode.rst:290
335 msgid ""
336 "The ``functions`` argument gives you access to all other user defined "
337 "functions. This is useful for code re-use. You can define utility functions "
338 "in one place and re-use them in all your other functions. For example, "
339 "suppose you create a function named ``My Function`` like this:"
340 msgstr "El argumento ``funciones`` da acceso a todas las demás funciones definidas por el usuario. Esto es útil para la reutilización de código. Puedes definir funciones de utilidad en un solo lugar y reutilizarlas en todas tus demás funciones. Por ejemplo, supongamos que creas una función llamada ``Mi Función`` de esta manera:"
341
342 #: ../../../__w/calibre/calibre/manual/function_mode.rst:303
343 msgid ""
344 "Then, in another function, you can access the ``utility()`` function like "
345 "this:"
346 msgstr "Luego, en otra función, puede acceder a la función ``utility()`` de esta manera:"
347
348 #: ../../../__w/calibre/calibre/manual/function_mode.rst:311
349 msgid ""
350 "You can also use the functions object to store persistent data, that can be "
351 "re-used by other functions. For example, you could have one function that "
352 "when run with :guilabel:`Replace All` collects some data and another "
353 "function that uses it when it is run afterwards. Consider the following two "
354 "functions:"
355 msgstr "También puede usar el objeto ``functions`` para guardar datos persistentes que sean accesibles a otras funciones. Por ejemplo, puede tener una función que al ejecutarse con :guilabel:`Sustituir todo` recopile datos y otra función que los use cuando se ejecuta a continuación. Considere las dos funciones siguientes:"
356
357 #: ../../../__w/calibre/calibre/manual/function_mode.rst:331
358 msgid "Debugging your functions"
359 msgstr "Depurar las funciones propias"
360
361 #: ../../../__w/calibre/calibre/manual/function_mode.rst:333
362 msgid ""
363 "You can debug the functions you create by using the standard ``print()`` "
364 "function from Python. The output of print will be displayed in a popup "
365 "window after the Find/replace has completed. You saw an example of using "
366 "``print()`` to output an entire table of contents above."
367 msgstr "Puede depurar las funciones que cree utilizando la función estándar de Python ``print()``. La salida de ``print()`` se mostrará en una ventana emergente cuando la búsqueda y sustitución se haya completado. Ya hemos visto anteriormente un ejemplo del uso de ``print()`` para generar un índice completo."
368
369 #: ../../../__w/calibre/calibre/manual/function_mode.rst:341
370 msgid "Choose file order when running on multiple HTML files"
371 msgstr "Elegir un orden de archivos al ejecutar sobre múltiples archivos HTML"
372
373 #: ../../../__w/calibre/calibre/manual/function_mode.rst:343
374 msgid ""
375 "When you run a :guilabel:`Replace all` on multiple HTML files, the order in "
376 "which the files are processed depends on what files you have open for "
377 "editing. You can force the search to process files in the order in which "
378 "they appear by setting the ``file_order`` attribute on your function, like "
379 "this:"
380 msgstr "Al ejecutar `:guilabel:`Reemplazar todo` en varios archivos HTML, el orden en que se procesan depende de los archivos que tenga abiertos para editar. Puede forzar la búsqueda para que procese los archivos en el orden en que aparecen configurando el atributo ``file_order`` en su función, de la siguiente manera:"
381
382 #: ../../../__w/calibre/calibre/manual/function_mode.rst:355
383 msgid ""
384 "``file_order`` accepts two values, ``spine`` and ``spine-reverse`` which "
385 "cause the search to process multiple files in the order they appear in the "
386 "book, either forwards or backwards, respectively."
387 msgstr "``file_order`` acepta dos valores, ``spine`` y ``spine-reverse``, que hacen que el la búsqueda procese archivos múltiples en el orden en que aparecen en el libro, hacia adelante o hacia atrás, respectivamente"
388
389 #: ../../../__w/calibre/calibre/manual/function_mode.rst:360
390 msgid ""
391 "Having your function called an extra time after the last match is found"
392 msgstr "Hacer que una función se ejecute una vez más después de la última coincidencia"
393
394 #: ../../../__w/calibre/calibre/manual/function_mode.rst:362
395 msgid ""
396 "Sometimes, as in the auto generate table of contents example above, it is "
397 "useful to have your function called an extra time after the last match is "
398 "found. You can do this by setting the ``call_after_last_match`` attribute on"
399 " your function, like this:"
400 msgstr "A veces, como en el ejemplo anterior del índice generado automáticamente, es útil que la función se ejecute una vez adicional después de haber encontrado la última coincidencia. Puede conseguir esto estableciendo el atributo ``call_after_last_match`` en la función, de esta manera:"
401
402 #: ../../../__w/calibre/calibre/manual/function_mode.rst:376
403 msgid "Appending the output from the function to marked text"
404 msgstr "Añadir la salida de una función al texto marcado"
405
406 #: ../../../__w/calibre/calibre/manual/function_mode.rst:378
407 msgid ""
408 "When running search and replace on marked text, it is sometimes useful to "
409 "append some text to the end of the marked text. You can do that by setting "
410 "the ``append_final_output_to_marked`` attribute on your function (note that "
411 "you also need to set ``call_after_last_match``), like this:"
412 msgstr "Al ejecutar la función de búsqueda y reemplazo en texto marcado, a veces resulta útil añadir texto al final. Puede hacerlo configurando el atributo ``append_final_output_to_marked`` en su función (tenga en cuenta que también debe configurar ``call_after_last_match``), de la siguiente manera:"
413
414 #: ../../../__w/calibre/calibre/manual/function_mode.rst:393
415 msgid "Suppressing the result dialog when performing searches on marked text"
416 msgstr "No mostrar el cuadro de diálogo de resultados al hacer búsquedas en texto marcado"
417
418 #: ../../../__w/calibre/calibre/manual/function_mode.rst:395
419 msgid ""
420 "You can also suppress the result dialog (which can slow down the repeated "
421 "application of a search/replace on many blocks of text) by setting the "
422 "``suppress_result_dialog`` attribute on your function, like this:"
423 msgstr "También puede evitar que se muestre el cuadro de diálogo de resultados (que puede ralentizar la aplicación de una búsqueda o sustitución en múltiples bloques de texto) estableciendo el atributo ``suppress_result_dialog`` de la función, de esta manera:"
424
425 #: ../../../__w/calibre/calibre/manual/function_mode.rst:408
426 msgid "More examples"
427 msgstr "Más ejemplos"
428
429 #: ../../../__w/calibre/calibre/manual/function_mode.rst:410
430 msgid ""
431 "More useful examples, contributed by calibre users, can be found in the "
432 "`calibre E-book editor forum "
433 "<https://www.mobileread.com/forums/showthread.php?t=237181>`_."
434 msgstr "Otros ejemplos útiles, creados por usarios de calibre, pueden encontrarse en el `foro del editor libros electrónicos de calibre <https://www.mobileread.com/forums/showthread.php?t=237181>`_ (en inglés)."