Debian Codegraph @

translations/manual/es/template_lang.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 # Darío Hereñú, 2014-2015
7 # David Martínez <[email protected]>, 2015
8 # david ruiz <[email protected]>, 2015
9 # Jellby <[email protected]>, 2014-2018,2020-2025
10 # Jose Antonio Mireles <[email protected]>, 2015
11 # Qualified Projects <[email protected]>, 2015
12 # Walter Paterno <[email protected]>, 2020-2021,2023-2026
13 msgid ""
14 msgstr ""
15 "Project-Id-Version: calibre\n"
16 "Report-Msgid-Bugs-To: \n"
17 "POT-Creation-Date: 2026-03-12 02:31+0000\n"
18 "PO-Revision-Date: 2014-06-17 08:34+0000\n"
19 "Last-Translator: Walter Paterno <[email protected]>, 2020-2021,2023-2026\n"
20 "Language-Team: Spanish (http://app.transifex.com/calibre/calibre/language/es/)\n"
21 "MIME-Version: 1.0\n"
22 "Content-Type: text/plain; charset=UTF-8\n"
23 "Content-Transfer-Encoding: 8bit\n"
24 "Language: es\n"
25 "Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
26
27 #: ../../../__w/calibre/calibre/manual/template_lang.rst:4
28 msgid "The calibre template language"
29 msgstr "El lenguaje de plantillas de calibre"
30
31 #: ../../../__w/calibre/calibre/manual/template_lang.rst:6
32 msgid ""
33 "The calibre template language is a calibre-specific language used throughout"
34 " calibre for tasks such as specifying file paths, formatting values, and "
35 "computing the value for user-specified columns. Examples:"
36 msgstr "El lenguaje de plantillas de calibre es un lenguaje específico de calibre que se utiliza en todo calibre para tareas como especificar rutas de archivo, dar formato a valores y calcular el valor de las columnas especificadas por el usuario. Ejemplos:"
37
38 #: ../../../__w/calibre/calibre/manual/template_lang.rst:8
39 msgid ""
40 "Specify the folder structure and file names when saving files from the "
41 "calibre library to the disk or e-book reader."
42 msgstr "Especifar la estructura de carpetas y los nombres de archivo al guardar archivos de la biblioteca de calibre en el disco o en el lector de libros electrónicos."
43
44 #: ../../../__w/calibre/calibre/manual/template_lang.rst:9
45 msgid "Define rules for adding icons and colors to the calibre book list."
46 msgstr "Definir reglas para añadir iconos y colores a la lista de libros de calibre."
47
48 #: ../../../__w/calibre/calibre/manual/template_lang.rst:10
49 msgid "Define `virtual columns` that contain data from other columns."
50 msgstr "Definir `columnas virtuales` que contienen datos de otras columnas."
51
52 #: ../../../__w/calibre/calibre/manual/template_lang.rst:11
53 msgid "Advanced library searching."
54 msgstr "Búsqueda avanzada en la bibliotecas."
55
56 #: ../../../__w/calibre/calibre/manual/template_lang.rst:12
57 msgid "Advanced metadata search and replace."
58 msgstr "Búsqueda y sustitución avanzada de metadatos."
59
60 #: ../../../__w/calibre/calibre/manual/template_lang.rst:14
61 msgid ""
62 "The language is built around the notion of a `template`, which specifies "
63 "which book metadata to use, computations on that metadata, and how it is to "
64 "be formatted."
65 msgstr "El lenguaje está construido en torno al concepto de una «plantilla», que especifica qué metadatos del libro se usan, las operaciones que se realizan sobre los metadatos y qué formato se aplica."
66
67 #: ../../../__w/calibre/calibre/manual/template_lang.rst:17
68 msgid "Basic templates"
69 msgstr "Plantillas básicas"
70
71 #: ../../../__w/calibre/calibre/manual/template_lang.rst:19
72 msgid ""
73 "A basic template consists of one or more ``template expressions``. A "
74 "``template expression`` consists of text and names in curly brackets "
75 "(``{}``) that is replaced by the corresponding metadata from the book being "
76 "processed. For example, the default template in calibre used for saving "
77 "books to device has 4 ``template expressions``::"
78 msgstr "Una plantilla básica consta de una o más ``expresiones de plantilla``. Una ``expresiones de plantilla`` consta de texto y nombres entre llaves (``{}``) que se reemplazan por los metadatos correspondientes del libro que se está procesando. Por ejemplo, la plantilla predeterminada de calibre, utilizada para guardar libros en el dispositivo, tiene 4 ``expresiones de plantilla``::"
79
80 #: ../../../__w/calibre/calibre/manual/template_lang.rst:23
81 msgid "For the book \"The Foundation\" by \"Isaac Asimov\" the template will become::"
82 msgstr "Para el libro «The Foundation» de «Isaac Asimov» la plantilla da lugar a::"
83
84 #: ../../../__w/calibre/calibre/manual/template_lang.rst:27
85 msgid ""
86 "The slashes are not ``template expressions`` because they are not in between"
87 " ``{}``. Such text is left where it appears. For example, if the template "
88 "is::"
89 msgstr "Las barras no son ``expresiones de plantilla`` porque no están entre ``{}``. Este tipo de texto se mantiene donde aparece. Por ejemplo, si la plantilla es::"
90
91 #: ../../../__w/calibre/calibre/manual/template_lang.rst:31
92 msgid "then for \"The Foundation\" the template produces::"
93 msgstr "entonces para «The Foundation» la plantilla produce::"
94
95 #: ../../../__w/calibre/calibre/manual/template_lang.rst:35
96 msgid ""
97 "A ``template expression`` can access all the metadata available in calibre, "
98 "including custom columns (columns you create yourself), by using a column's "
99 "``lookup name``. To find the lookup name for a `column` (sometimes called "
100 "`fields`), hover your mouse over the column header in calibre's book list. "
101 "Lookup names for custom columns always begin with ``#``. For series type "
102 "columns there is an additional field named ``#lookup name_index`` that is "
103 "the series index for that book in the series. For example, if you have a "
104 "custom series column named ``#myseries``, there will also be a column named "
105 "``#myseries_index``. The standard series column's index is named "
106 "``series_index``."
107 msgstr "Una ``expresión de plantilla`` tiene acceso a todos los metadatos disponibles en calibre, incluidas las columnas personalizadas que haya creado, usando su el ``nombre de consulta`` de una columna. Para obtener el nombre de consulta de una `columna` (también llamada `campo`), pase el cursor sobre el encabezado de la columna en la lista de libros de calibre. Los nombres de consulta para las columnas personalizadas siempre empiezan por ``#``. Para columnas personalizadas de tipo serie, siempre hay un campo adicional llamado ``#nombre de consulta_index`` que es el índice de serie para el libro en la serie. Por ejemplo, si tiene una columna personalizada de serie llamada ``#miserie``, también habrá una columna llamada ``#miserie_index``. La columna de índice para la serie normal se llama ``series_index``."
108
109 #: ../../../__w/calibre/calibre/manual/template_lang.rst:37
110 msgid "In addition to the standard column based fields, you also can use:"
111 msgstr "Además de los campos basados en columnas normales, también puede usar:"
112
113 #: ../../../__w/calibre/calibre/manual/template_lang.rst:39
114 msgid ""
115 "``{formats}`` - A list of formats available in the calibre library for a "
116 "book"
117 msgstr "``{formats}`` - Una lista de los formatos disponibles en la biblioteca de calibre para un libro"
118
119 #: ../../../__w/calibre/calibre/manual/template_lang.rst:40
120 msgid "``{identifiers:select(isbn)}`` - The ISBN of the book"
121 msgstr "``{identifiers:select(isbn)}`` - El ISBN del libro"
122
123 #: ../../../__w/calibre/calibre/manual/template_lang.rst:42
124 msgid ""
125 "If the metadata for the field for a given book is not defined then the field"
126 " in the template is replaced by the empty string (``''``). For example, "
127 "consider the following template::"
128 msgstr "Si un campo de metadatos para un libro determinado no está definido, entonces el campo en la plantilla se sustituye por un texto vacío (``''``). Por ejemplo, considere la siguiente plantilla::"
129
130 #: ../../../__w/calibre/calibre/manual/template_lang.rst:46
131 msgid ""
132 "If Asimov's book \"Second Foundation\" is in the series \"Foundation\" then "
133 "the template produces::"
134 msgstr "Si el libro de Asimov «Second Foundation» está en la serie «Foundation», la plantilla produce::"
135
136 #: ../../../__w/calibre/calibre/manual/template_lang.rst:50
137 msgid ""
138 "If a series has not been entered for the book then the template produces::"
139 msgstr "Si no se ha introducido la serie para el libro, la plantilla produce::"
140
141 #: ../../../__w/calibre/calibre/manual/template_lang.rst:54
142 msgid ""
143 "The template processor automatically removes multiple slashes and leading or"
144 " trailing spaces."
145 msgstr "El procesador de plantillas elimina automáticamente barras múltiples y espacios iniciales o finales."
146
147 #: ../../../__w/calibre/calibre/manual/template_lang.rst:57
148 msgid "Advanced formatting"
149 msgstr "Formato avanzado"
150
151 #: ../../../__w/calibre/calibre/manual/template_lang.rst:59
152 msgid ""
153 "In addition to metadata substitution, templates can conditionally include "
154 "additional text and control how substituted data is formatted."
155 msgstr "Además de sustituir metadatos, las plantillas pueden incluir texto adicional de manera condicional y controlar el formato de los datos sustituidos."
156
157 #: ../../../__w/calibre/calibre/manual/template_lang.rst:61
158 msgid "**Conditionally including text**"
159 msgstr "**Incluir texto de mane condicional**"
160
161 #: ../../../__w/calibre/calibre/manual/template_lang.rst:63
162 msgid ""
163 "Sometimes you want text to appear in the output only if a field is not "
164 "empty. A common case is ``series`` and ``series_index`` where you want "
165 "either nothing or the two values separated by a hyphen. calibre handles this"
166 " case using a special ``template expression`` syntax."
167 msgstr "A veces puede querer que aparezca un texto en la salida sólo si un campo no está vacío. Un caso común es ``series`` y ``series_index``, para los que puede querer o nada o ambos valores separados por un guión. calibre tiene en cuenta este caso usando una sintaxis de ``expresión de plantilla`` especial."
168
169 #: ../../../__w/calibre/calibre/manual/template_lang.rst:65
170 msgid ""
171 "For example and using the above Foundation example, assume you want the "
172 "template to produce `Foundation - 3 - Second Foundation`. This template "
173 "produces that output:"
174 msgstr "Por ejemplo, y usando el caso anterior de la serie «Foundation», suponga que quiere que la plantilla produzca `Foundation - 3 - Second Foundation`. Esta plantilla cumple el cometido:"
175
176 #: ../../../__w/calibre/calibre/manual/template_lang.rst:67
177 msgid "``{series} - {series_index} - {title}``"
178 msgstr "``{series} - {series_index} - {title}``"
179
180 #: ../../../__w/calibre/calibre/manual/template_lang.rst:69
181 msgid ""
182 "However, if a book has no series the template will produce `- - the title`, "
183 "which is probably not what you want. Generally, people want the result be "
184 "the title without the extraneous hyphens. You can accomplish this using the "
185 "following template syntax:"
186 msgstr "Sin embargo, si un libro no tiene serie, la plantilla producirá `- - el título`, que probablemente no sea lo que deseaba. Normalmente preferiría que el resultado fuese el título sin los guiones. Puede conseguir esto usando la siguiente sintaxis de plantilla:"
187
188 #: ../../../__w/calibre/calibre/manual/template_lang.rst:71
189 msgid "``{field:|prefix_text|suffix_text}``"
190 msgstr "``{campo:|prefijo|sufijo}``"
191
192 #: ../../../__w/calibre/calibre/manual/template_lang.rst:73
193 msgid ""
194 "This ``template expression`` says that if ``field`` has the value `XXXX` "
195 "then the result will be `prefix_textXXXXXsuffix_text`. If ``field`` is empty"
196 " (has no value) then the result will be the empty string (nothing) because "
197 "the prefix and suffix are ignored. The prefix and suffix can contain blanks."
198 msgstr "Esta ``expresión de plantilla`` dice que si ``campo`` tiene el valor `XXXX`, el resultado será `prefijoXXXXXsufijo`. Si ``campo`` está vacío (no tiene ningún valor) el resultado será un texto vacío (nada), porque el prefijo y el sufijo se ignoran. Tanto el prefijo como el sufijo pueden contener espacios."
199
200 #: ../../../__w/calibre/calibre/manual/template_lang.rst:75
201 msgid ""
202 "**Do not use subtemplates (`{ ... }`) or functions (see below) in the prefix"
203 " or the suffix.**"
204 msgstr "**No use subplantillas ({...}) o funciones (ver más adelante) en el prefijo o el sufijo.**"
205
206 #: ../../../__w/calibre/calibre/manual/template_lang.rst:77
207 msgid ""
208 "Using this syntax, we can solve the above no-series problem with the "
209 "template::"
210 msgstr "Usando esta sintaxis, podemos resolver el problema anterior de los libros sin serie con esta plantilla::"
211
212 #: ../../../__w/calibre/calibre/manual/template_lang.rst:81
213 msgid ""
214 "The hyphens will be included only if the book has a series index, which it "
215 "has only if it has a series. Continuing the Foundation example again, the "
216 "template will produce `Foundation - 1 - Second Foundation`."
217 msgstr "Los guiones se incluirán solamente si el libro tiene índice de serie, que sólo tendrá si tiene una serie. Continuando con el ejemplo de la serie «Foundation», la plantilla producirá `Foundation - 1 - Second Foundation`."
218
219 #: ../../../__w/calibre/calibre/manual/template_lang.rst:83
220 #: ../../../__w/calibre/calibre/manual/template_lang.rst:293
221 #: ../../../__w/calibre/calibre/manual/template_lang.rst:469
222 msgid "Notes:"
223 msgstr "Notas:"
224
225 #: ../../../__w/calibre/calibre/manual/template_lang.rst:85
226 msgid ""
227 "You must include the colon after the ``lookup name`` if you are using a "
228 "prefix or a suffix."
229 msgstr "Debe incluir los dos puntos tras el ``nombre de consulta`` si usa un prefijo o sufijo."
230
231 #: ../../../__w/calibre/calibre/manual/template_lang.rst:86
232 msgid ""
233 "You must use either no or both ``|`` characters. Using one, as in ``{field:|"
234 " - }``, is not allowed."
235 msgstr "Debe utilizar ninguno o ambos caracteres ``|``. No se permite utilizar uno solo, como en ``{field:| - }``."
236
237 #: ../../../__w/calibre/calibre/manual/template_lang.rst:87
238 msgid ""
239 "It is OK to provide no text for either the prefix or the suffix, such as in "
240 "``{series:|| - }``. The template ``{title:||}`` is the same as ``{title}``."
241 msgstr "Es posible asignar un texto vació para el prefijo o sufijo, como en ``{series:|| - }``. La plantilla ``{title:||}`` es lo mismo que ``{title}``."
242
243 #: ../../../__w/calibre/calibre/manual/template_lang.rst:89
244 msgid "**Formatting**"
245 msgstr "**Formato**"
246
247 #: ../../../__w/calibre/calibre/manual/template_lang.rst:91
248 msgid ""
249 "Suppose you want the ``series_index`` to be formatted as three digits with "
250 "leading zeros. This does the trick:"
251 msgstr "Supongamos que queremos asegurarnos de que ``series_index`` aparezca con dígitos, con ceros a la izquierda. Se consigue de esta manera::"
252
253 #: ../../../__w/calibre/calibre/manual/template_lang.rst:93
254 msgid "``{series_index:0>3s}`` - Three digits with leading zeros"
255 msgstr "``{series_index:0>3s}`` - Tres dígitos con ceros a la izquierda"
256
257 #: ../../../__w/calibre/calibre/manual/template_lang.rst:95
258 msgid "For trailing zeros, use:"
259 msgstr "Para obtener ceros a la derecha use:"
260
261 #: ../../../__w/calibre/calibre/manual/template_lang.rst:97
262 msgid "``{series_index:0<3s}`` - Three digits with trailing zeros"
263 msgstr "``{series_index:0<3s}`` - Tres dígitos con ceros a la derecha"
264
265 #: ../../../__w/calibre/calibre/manual/template_lang.rst:99
266 msgid ""
267 "If you use series indices with fractional values, e.g., 1.1, you might want "
268 "the decimal points to line up. For example, you might want the indices 1 and"
269 " 2.5 to appear as 01.00 and 02.50 so that they will sort correctly on a "
270 "device that does lexical sorting. To do this, use:"
271 msgstr "Si usa índices de serie con decimales (por ejemplo 1.1), puede querer asegurarse de que los decimales queden alineados. Por ejemplo, puede que los índices 1 y 2.5 aparezcan como 01.00 y 02.50 para que se ordenen correctamente en un dispositivo que utilice un orden lexicográfico. Para ello, use:"
272
273 #: ../../../__w/calibre/calibre/manual/template_lang.rst:101
274 msgid ""
275 "``{series_index:0>5.2f}`` - Five characters consisting of two digits with "
276 "leading zeros, a decimal point, then 2 digits after the decimal point."
277 msgstr "``{series_index:0>5.2f}`` - Cinco caracteres que incluyen dos dígitos con cero a la izquierda, un punto decimal y dos dígitos tras el punto decimal."
278
279 #: ../../../__w/calibre/calibre/manual/template_lang.rst:103
280 msgid "If you want only the first two letters of the data, use:"
281 msgstr "Si quiere sólo las dos primeras letras de los datos, use:"
282
283 #: ../../../__w/calibre/calibre/manual/template_lang.rst:105
284 msgid ""
285 "``{author_sort:.2}`` - Only the first two letters of the author sort name"
286 msgstr "``{author_sort:.2}`` - Sólo las primeras dos letras del orden de autor"
287
288 #: ../../../__w/calibre/calibre/manual/template_lang.rst:107
289 msgid ""
290 "Much of the calibre template language formatting comes from Python. For more"
291 " details on the syntax of these advanced formatting operations see the "
292 "`Python documentation "
293 "<https://docs.python.org/3/library/string.html#formatstrings>`_."
294 msgstr "Gran parte del formato del lenguaje de plantillas de calibre proviene de Python. Para obtener más detalles sobre la sintaxis de estas operaciones de formato avanzadas, vea la `documentación de Python <https://docs.python.org/3/library/string.html#formatstrings>`_ (en inglés)."
295
296 #: ../../../__w/calibre/calibre/manual/template_lang.rst:111
297 msgid "Using templates to define custom columns"
298 msgstr "Usar plantillas para definir columnas personalizadas"
299
300 #: ../../../__w/calibre/calibre/manual/template_lang.rst:113
301 msgid ""
302 "Templates can be used to display information that isn't in calibre metadata,"
303 " or to display metadata differently from calibre's normal format. For "
304 "example, you might want to show the ``ISBN``, a field that calibre does not "
305 "display. You can accomplish this creating a custom column with the type "
306 "`Column built from other columns` (hereafter called `composite columns`) and"
307 " providing a template to generate the displayed text. The column will "
308 "display the result of evaluating the template. For example, to display the "
309 "ISBN, create the column and enter ``{identifiers:select(isbn)}`` in the "
310 "template box. To display a column containing the values of two series custom"
311 " columns, separated by a comma, use ``{#series1:||,}{#series2}``."
312 msgstr "Las plantillas pueden usarse para mostrar información que no está en los metadatos de calibre o para mostrar los metadatos de una manera diferente al formato normal de calibre. Por ejemplo, puede querer mostrar el ``ISBN``, un campo que calibre no muestra. Puede conseguirlo creando una columna personalizadad de tipo `columna generada a partir de otras columnas` (en lo sucesivo llamadas `columnas compuestas`), e introduciendo una plantilla para generar el texto mostrado. La columna mostrará el resultado de evaluar la plantilla. Por ejemplo, para mostrar el ISBN, cree la columna e introduzca ``{identifiers:select(isbn)}`` en el cuadro de plantilla. Para mostrar una columna que contenga los valores de dos campos personalizados de serie separados por una coma, use ``{#serie1:||,}{#serie2}``."
313
314 #: ../../../__w/calibre/calibre/manual/template_lang.rst:115
315 msgid "Composite columns can use any template option, including formatting."
316 msgstr "Las columnas compuestas pueden utilizar cualquier opción de plantilla, incluidas las de formato."
317
318 #: ../../../__w/calibre/calibre/manual/template_lang.rst:117
319 msgid ""
320 "Note: You cannot edit the data displayed in a composite column. Instead you "
321 "edit the source columns. If you edit a composite column, for example by "
322 "double-clicking it, calibre will open the template for editing, not the "
323 "underlying data."
324 msgstr "Nota: No puede modificar los datos mostrados en una columna compuesta, debe modificar las columnas de origen. Si modifica una columna compuesta, por ejemplo pulsando dos veces sobre ella, calibre abrirá la plantilla para modificarla, no los datos resultantes."
325
326 #: ../../../__w/calibre/calibre/manual/template_lang.rst:121
327 msgid "Templates and plugboards"
328 msgstr "Plantillas y controles de metadatos"
329
330 #: ../../../__w/calibre/calibre/manual/template_lang.rst:123
331 msgid ""
332 "Plugboards are used for changing the metadata written into books during "
333 "send-to-device and save-to-disk operations. A plugboard permits you to "
334 "specify a template to provide the data to write into the book's metadata. "
335 "You can use plugboards to modify the following fields: authors, author_sort,"
336 " language, publisher, tags, title, title_sort. This feature helps people who"
337 " want to use different metadata in books on devices to solve sorting or "
338 "display issues."
339 msgstr "Los paneles de conexiones se usan para cambiar los metadatos escritos en los libros durante las operaciones de guardado en disco y de envío a dispositivo. Un panel de conexiones le permite especificar una plantilla para suministrar los datos que se escribirán en los metadatos del libro. Puede usar los paneles de conexiones para modificar los siguientes campos: authors, author_sort, language, publisher, tags, title, title_sort. Esa función es útil para los que quieren usar metadatos diferentes en los libros de los dispositivos, para solucionar problemas de ordenación o de visualización."
340
341 #: ../../../__w/calibre/calibre/manual/template_lang.rst:125
342 msgid ""
343 "When you create a plugboard, you specify the format and device for which the"
344 " plugboard is to be used. A special device is provided, ``save_to_disk``, "
345 "that is used when saving formats (as opposed to sending them to a device). "
346 "Once you have chosen the format and device, you choose the metadata fields "
347 "to change, providing templates to supply the new values. These templates are"
348 " `connected` to their destination fields, hence the name `plugboards`. You "
349 "can of course use composite columns in these templates."
350 msgstr "Cuando cree un panel de conexiones, especifique el formato y dispositivo para los que se usará. Hay un dispositivo especial ``save_to_disk``, que se usa para guardar formatos (en lugar de enviarlos a un dispositivo). Una vez que ha elegido el formato y dispositivo, elija los campos de metadatos para cambiar, y suministre plantillas para obtener los nuevos valores. Estas plantillas están `conectadas` con sus campos de destino, de ahí el nombre `panel de conexiones`. Por supuesto, puede usar columnas compuestas en estas plantillas."
351
352 #: ../../../__w/calibre/calibre/manual/template_lang.rst:127
353 msgid ""
354 "Plugboards are quite flexible and can be written in Single Function Mode, "
355 "Template Program Mode, General Program Mode, or Python Template mode."
356 msgstr "Los paneles de conexiones son muy flexibles y pueden escribirse en modo de función única, en modo programación de plantillas, en modo de programación general o en modo de plantilla de Python."
357
358 #: ../../../__w/calibre/calibre/manual/template_lang.rst:129
359 msgid ""
360 "When a plugboard might apply (Content server, save to disk, or send to "
361 "device), calibre searches the defined plugboards to choose the correct one "
362 "for the given format and device. For example, to find the appropriate "
363 "plugboard for an EPUB book being sent to an ANDROID device, calibre searches"
364 " the plugboards using the following search order:"
365 msgstr "Cuando un panel de conexiones pueda aplicarse (servidor de contenido, guardado en disco o envío a dispositivo), calibre busca los paneles definidos para elegir el correcto según el formato y dispositivo. Por ejemplo, para encontrar el panel de conexiones apropiado para enviar un libro EPUB a un dispositivo ANDROID, calibre busca en los paneles en el siguiente orden:"
366
367 #: ../../../__w/calibre/calibre/manual/template_lang.rst:133
368 msgid ""
369 "a plugboard with an exact match on format and device, e.g., ``EPUB`` and "
370 "``ANDROID``"
371 msgstr "un panel de conexiones con una coincidencia exacta de formato y dispositivo, por ejemplo: ``EPUB`` y ``ANDROID``"
372
373 #: ../../../__w/calibre/calibre/manual/template_lang.rst:134
374 msgid ""
375 "a plugboard with an exact match on format and the special ``any device`` "
376 "choice, e.g., ``EPUB`` and ``any device``"
377 msgstr "un panel de conexiones con una coincidencia exacta de formato y el dispositivo especial ``any device``, por ejemplo ``EPUB`` y ``any device``"
378
379 #: ../../../__w/calibre/calibre/manual/template_lang.rst:135
380 msgid ""
381 "a plugboard with the special ``any format`` choice and an exact match on "
382 "device, e.g., ``any format`` and ``ANDROID``"
383 msgstr "un panel de conexiones con el formato especial ``any format`` y una coincidencia exacta de dispositivo, por ejemplo: ``any format`` y ``ANDROID``"
384
385 #: ../../../__w/calibre/calibre/manual/template_lang.rst:136
386 msgid "a plugboard with ``any format`` and ``any device``"
387 msgstr "un panel de conexiones con ``any format`` y ``any device``"
388
389 #: ../../../__w/calibre/calibre/manual/template_lang.rst:138
390 msgid ""
391 "The tags and authors fields have special treatment, because both of these "
392 "fields can hold more than one item. A book can have many tags and many "
393 "authors. When you specify that one of these two fields is to be changed, the"
394 " template's result is examined to see if more than one item is there. For "
395 "tags, the result is cut apart wherever calibre finds a comma. For example, "
396 "if the template produces the value ``Thriller, Horror``, then the result "
397 "will be two tags, ``Thriller`` and ``Horror``. There is no way to put a "
398 "comma in the middle of a tag."
399 msgstr "Los campos etiquetas y autores tienen un trato especial, debido a que ambos pueden tener más de un elemento. Un libro puede poseer varias etiquetas y varios autores. Cuando indique que desea cambiar uno de estos campos, la plantilla se examina para comprobar si hay más de un elemento. Para las etiquetas, el resultado se divide dondequiera que calibre encuentre una coma. Por ejemplo, si la plantilla produce el valor ``Intriga, Terror``, el resultado serán dos etiquetas: ``Intriga`` y ``Terror``. No existe manera de poner una coma dentro de una etiqueta."
400
401 #: ../../../__w/calibre/calibre/manual/template_lang.rst:141
402 msgid ""
403 "The same thing happens for authors, but using a different character for the "
404 "cut, a `&` (ampersand) instead of a comma. For example, if the template "
405 "produces the value ``Blogs, Joe&Posts, Susan``, then the book will end up "
406 "with two authors, ``Blogs, Joe`` and ``Posts, Susan``. If the template "
407 "produces the value ``Blogs, Joe;Posts, Susan``, then the book will have one "
408 "author with a rather strange name."
409 msgstr "Lo mismo ocurre con los autores, pero usando un carácter diferente para el corte, un signo «&» en lugar de una coma. Por ejemplo, si la plantilla produce el valor ``Blogs, Joe&Posts, Susan``, el libro acabará con dos autores, ``Blogs, Joe`` y ``Posts, Susan``. Si la plantilla produce el valor ``Blogs, Joe;Posts, Susan``, el libro tendrá un autor con un nombre peculiar."
410
411 #: ../../../__w/calibre/calibre/manual/template_lang.rst:143
412 msgid ""
413 "Plugboards affect the metadata written into the book when it is saved to "
414 "disk or written to the device. Plugboards do not affect the metadata used by"
415 " ``save to disk`` and ``send to device`` to create the file names. Instead, "
416 "file names are constructed using the templates entered on the appropriate "
417 "preferences window."
418 msgstr "Los paneles de conexiones afectan a los metadatos escritos en el libro cuando se guarda en disco o se escribe en un dispositivo. Los paneles de conexiones no afectan a los metadatos usados por las funciones :guilabel:`Guardar en el disco` :guilabel:`Enviar al dispositivo` para crear los nombres de archivo. En lugar de ello, los nombres de archivo se construyen usando las plantillas introducidas en la ventana de preferencias correspondiente."
419
420 #: ../../../__w/calibre/calibre/manual/template_lang.rst:148
421 msgid "Using functions in templates - Single Function Mode"
422 msgstr "Usar funciones en plantillas: modo de función única"
423
424 #: ../../../__w/calibre/calibre/manual/template_lang.rst:150
425 msgid ""
426 "Suppose you want to display the value of a field in upper case when that "
427 "field is normally in title case. You can do this using `template functions`."
428 " For example, to display the title in upper case use the ``uppercase`` "
429 "function, as in ``{title:uppercase()}``. To display it in title case, use "
430 "``{title:titlecase()}``."
431 msgstr "Supongamos que desea mostrar el valor de un campo en mayúsculas, aunque normalmente el valor del campo tiene sólo las iniciales en mayúscula. Puede conseguir esto usando las `funciones de plantilla`. Por ejemplo, para mostrar el título en mayúsculas use la función ``uppercase``, como en ``{title:uppercase()}``. Para mostrarlo con las iniciales en mayúscula use ``{title:titlecase()}``."
432
433 #: ../../../__w/calibre/calibre/manual/template_lang.rst:152
434 msgid ""
435 "Functions go into the format part of the template, after the ``:`` and "
436 "before the first ``|`` or the closing ``}`` if no prefix/suffix is used. If "
437 "you have both a format and a function reference, the function comes after a "
438 "second ``:``. Functions return the value of the column specified in the "
439 "template, suitably modified."
440 msgstr "Las funciones van en la parte del formato de la plantilla, después de ``:`` y antes del primer ``|`` o del ``}`` de cierre si no se usa ningún prefijo o sufijo. Si tiene tanto un formato como una referencia de función, la función va después de otro ``:``. Las funciones devuelven el valor de la columna especificada en la plantilla, modificado de manera adecuada."
441
442 #: ../../../__w/calibre/calibre/manual/template_lang.rst:154
443 msgid "The syntax for using functions is one of::"
444 msgstr "La sintaxis para usar funciones es una de::"
445
446 #: ../../../__w/calibre/calibre/manual/template_lang.rst:161
447 msgid ""
448 "Function names must always be followed by opening and closing parentheses. "
449 "Some functions require extra values (arguments), and these go inside the "
450 "parentheses. Arguments are separated by commas. Literal commas (commas as "
451 "text, not argument separators) must be preceded by a backslash (``\\``) . "
452 "The last (or only) argument cannot contain a textual closing parenthesis."
453 msgstr "Los nombres de función deben is siempre seguidos de paréntesis de apertura y cierre. Algunas funciones requieren valores adicionales (argumentos), y éstos van dentro de los paréntesis. Los argumentos se separan por comas. Una coma literal (como texto, no como separador de argumentos) debe ir precedida de una barra invertida (``\\``). El último (o único) argumento no puede contener un paréntesis de cierre textual."
454
455 #: ../../../__w/calibre/calibre/manual/template_lang.rst:163
456 msgid ""
457 "Functions are evaluated before format specifications and the prefix/suffix. "
458 "See further down for an example of using both a format and a function."
459 msgstr "Las funciones se evalúan antes de las especificaciones de formato y del prefijo y sufijo. Véase más abajo un ejemplo de cómo usar un formato y una función."
460
461 #: ../../../__w/calibre/calibre/manual/template_lang.rst:165
462 msgid ""
463 "**Important**: If you have programming experience, please note that the "
464 "syntax in `Single Function Mode` is not what you expect. Strings are not "
465 "quoted and spaces are significant. All arguments are considered to be "
466 "constants; there are no expressions."
467 msgstr "**Importante**: Si tiene experiencia en programación, tenga en cuenta que la sintaxis del `modo de función única` no es la que podría esperarse. Los textos van sin comillas y los espacios son importantes. Todos los argumentos se interpretan como constantes; no hay expresiones."
468
469 #: ../../../__w/calibre/calibre/manual/template_lang.rst:167
470 msgid ""
471 "**Do not use subtemplates (`{ ... }`) as function arguments.** Instead, use "
472 ":ref:`Template Program Mode <template_mode>` and :ref:`General Program Mode "
473 "<general_mode>`."
474 msgstr "**No use subplantillas ({...}) como argumentos de función.** En su lugar, use el :ref:`modo de programación de plantilla <template_mode>` o el :ref:`modo de programación general <general_mode>`."
475
476 #: ../../../__w/calibre/calibre/manual/template_lang.rst:169
477 msgid "Notes on calling functions in Single Function Mode:"
478 msgstr "Notas sobre la ejecución de funciones en modo de función única:"
479
480 #: ../../../__w/calibre/calibre/manual/template_lang.rst:171
481 msgid ""
482 "When functions are used in Single Function Mode, the first parameter, "
483 "``value``, is automatically replaced by the content of the field specified "
484 "in the template. For example, when the template ``{title:capitalize()}`` is "
485 "processed, the content of the ``title`` field is passed as the parameter "
486 "``value`` to the capitalize function."
487 msgstr "Cuando se usan las funciones en modo de función única, el primer parámetro, ``valor``, se sustituye automáticamente por el contenido del campo especificado en la plantilla. Por ejemplo, cuando se procesa la plantilla ``{title:capitalize()}``, el contenido del campo ``title`` se pasa como el parámetro ``valor`` a la función ``capitalize``."
488
489 #: ../../../__w/calibre/calibre/manual/template_lang.rst:172
490 msgid ""
491 "In the function documentation, the notation ``[something]*`` means that "
492 "``something`` can be repeated zero or more times. The notation "
493 "``[something]+`` means that the ``something`` is repeated one or more times "
494 "(must exist at least one time)."
495 msgstr "En la documentación de funciones, la notación ``[algo]*`` significa que ``algo`` puede repetirse cero o más veces. La notación ``[algo]+`` significa que ``algo`` se repite una o más veces (debe existir al menos una vez)."
496
497 #: ../../../__w/calibre/calibre/manual/template_lang.rst:173
498 msgid ""
499 "Some functions use regular expressions. In the template language regular "
500 "expression matching is case-insensitive."
501 msgstr "Algunas funciones usan expresiones regulares. En el lenguaje de plantillas, las expresiones regulares no distinguen entre mayúsculas y minúsculas."
502
503 #: ../../../__w/calibre/calibre/manual/template_lang.rst:175
504 msgid ""
505 "Functions are documented in :ref:`template_functions_reference`. The "
506 "documentation tells you what arguments the functions require and what the "
507 "functions do. For example, here is the documentation of the "
508 ":ref:`ff_ifempty` function."
509 msgstr "Las funciones están documentadas en :ref:`template_functions_reference`. La documentación indica qué argumentos requieren las funciones y qué hacen. Por ejemplo, aquí está la documentación de la función :ref:`ff_ifempty`."
510
511 #: ../../../__w/calibre/calibre/manual/template_lang.rst:179
512 msgid ""
513 "You see that the function requires two arguments, ``value`` and "
514 "``text_if_empty``. However, because we are using Single Function Mode, we "
515 "omit the ``value`` argument, passing only ``text_if_empty``. For example, "
516 "this template::"
517 msgstr "La función requiere dos argumentos, ``valor`` y ``texto_si_vacío``. Sin embargo, debido a que estamos usando el modo de función única, omitimos el argumento ``valor``, pasando sólo ``texto_si_vacío``. Por ejemplo, esta plantilla::"
518
519 #: ../../../__w/calibre/calibre/manual/template_lang.rst:183
520 msgid ""
521 "shows the tags for a book, if any. If it has no tags then it shows `No tags "
522 "on this book`."
523 msgstr "Muestra las etiquetas de un libro, si las tiene. Si no tiene etiquetas, muestra \"No hay etiquetas en este libro\"."
524
525 #: ../../../__w/calibre/calibre/manual/template_lang.rst:185
526 msgid ""
527 "The following functions are usable in Single Function Mode because their "
528 "first parameter is ``value``."
529 msgstr "Las siguientes funciones se pueden usar en el modo de función única porque su primer parámetro es ``valor``."
530
531 #: ../../../__w/calibre/calibre/manual/template_lang.rst:227
532 msgid "**Using functions and formatting in the same template**"
533 msgstr "**Usar funciones y formato en la misma plantilla**"
534
535 #: ../../../__w/calibre/calibre/manual/template_lang.rst:229
536 msgid ""
537 "Suppose you have an integer custom column ``#myint`` that you want displayed"
538 " with leading zeros, as in ``003``. One way to do this is to use a format of"
539 " ``0>3s``. However, by default if a number (integer or float) equals zero "
540 "then the value is displayed as the empty string so zero values will produce "
541 "the empty string, not ``000``. If you want to see ``000`` values then you "
542 "use both the format string and the ``ifempty`` function to change the empty "
543 "value back to a zero. The template would be::"
544 msgstr "Supongamos que tiene una columna personalizada con números enteros ``#myint``, que quiere mostrar con ceros a la izquierda, como en ``003``. Una posibilidad es usa como formato ``0>3s``. Sin embargo, de manera predeterminada, si un número (entero o decimal) es igual a cero, el valor se muestra como un texto vacío, así que el valor cero producirá un texto vacío, no ``000``. Si quiere ver los valores como ``000``, debe usar tanto el texto de formato como la función ``ifempty`` para cambiar el valor vacío a cero de nuevo, la plantilla sería::"
545
546 #: ../../../__w/calibre/calibre/manual/template_lang.rst:233
547 msgid ""
548 "Note that you can use the prefix and suffix as well. If you want the number "
549 "to appear as ``[003]`` or ``[000]``, then use the template::"
550 msgstr "Tenga en cuenta que puede usar también prefijo y sufijo. Si desea que el número aparezca como ``[003]`` o ``[000]``, use la plantilla::"
551
552 #: ../../../__w/calibre/calibre/manual/template_lang.rst:240
553 msgid "General Program Mode"
554 msgstr "Modo de programación general"
555
556 #: ../../../__w/calibre/calibre/manual/template_lang.rst:242
557 msgid ""
558 "`General Program Mode` (`GPM`) replaces `template expressions` with a "
559 "program written in the `template language`. The syntax of the language is "
560 "defined by the following grammar::"
561 msgstr "El `Modo de programación general` (`MPG`) sustituye las `expresiones de plantilla` por un programa escrito en el `lenguaje de plantillas`. La sintaxis del lenguaje está definida por la siguiente gramática::"
562
563 #: ../../../__w/calibre/calibre/manual/template_lang.rst:295
564 msgid ""
565 "a ``top_expression`` always has a value. The value of an ``expression_list``"
566 " is the value of the last ``top_expression`` in the list. For example, the "
567 "value of the expression list ``1;2;'foobar';3`` is ``3``."
568 msgstr "una ``top_expression`` siempre tiene un valor. El valor de una ``expression_list`` es el valor de la última ``top_expression`` de la lista. Por ejemplo, el valor de la ``expression_list`` ``1;2;'blabla';3`` es ``3``."
569
570 #: ../../../__w/calibre/calibre/manual/template_lang.rst:296
571 msgid "In a logical context, any non-empty value is ``True``"
572 msgstr "En un contexto lógico, cualquier valor que no sea vacío es ``True`` (verdadero)"
573
574 #: ../../../__w/calibre/calibre/manual/template_lang.rst:297
575 msgid "In a logical context, the empty value is ``False``"
576 msgstr "En un contexto lógico, el valor vacío es ``False`` (falso)"
577
578 #: ../../../__w/calibre/calibre/manual/template_lang.rst:298
579 msgid ""
580 "Strings and numbers can be used interchangeably. For example, ``10`` and "
581 "``'10'`` are the same thing."
582 msgstr "Textos y números pueden usarse indistintamente. Por ejemplo, ``10`` y ``'10'`` son lo mismo."
583
584 #: ../../../__w/calibre/calibre/manual/template_lang.rst:299
585 msgid ""
586 "Comments are lines starting with a '#' character, possibly preceded by "
587 "blanks or tabs."
588 msgstr "Los comentarios son líneas que empiezan por un carácter «#», posiblemente precedido por espacios o tabulaciones."
589
590 #: ../../../__w/calibre/calibre/manual/template_lang.rst:301
591 msgid "**Operator precedence**"
592 msgstr "**Prioridad de operadores**"
593
594 #: ../../../__w/calibre/calibre/manual/template_lang.rst:303
595 msgid ""
596 "The operator precedence (order of evaluation) from highest (evaluated first)"
597 " to lowest (evaluated last) is:"
598 msgstr "La prioridad de los operadores (orden de evaluación) de mayor (se evalúa primero) a menor (se evalúa el último) es:"
599
600 #: ../../../__w/calibre/calibre/manual/template_lang.rst:305
601 msgid ""
602 "Function calls, constants, parenthesized expressions, statement expressions,"
603 " assignment expressions, field references."
604 msgstr "Llamadas a función, constantes, expresiones entre paréntesis, expresiones de declaración, expresiones de asignación, referencias de campo."
605
606 #: ../../../__w/calibre/calibre/manual/template_lang.rst:306
607 msgid ""
608 "Unary plus (``+``) and minus (``-``). These operators evaluate right to "
609 "left."
610 msgstr "Más (``+``) y menos (``-``) unarios. Estos operadores se evalúan de derecha a izquierda."
611
612 #: ../../../__w/calibre/calibre/manual/template_lang.rst:308
613 msgid ""
614 "These and all the other arithmetic operators return integers if the "
615 "expression results in a fractional part equal to zero. For example, if an "
616 "expression returns ``3.0`` it is changed to ``3``."
617 msgstr "Estas y todas las otras operaciones aritméticas devuelven enteros si la expresión resulta en una parte decimal igual a cero. Por ejemplo, si la expresión devuelve ``3.0`` se cambia a ``3``."
618
619 #: ../../../__w/calibre/calibre/manual/template_lang.rst:309
620 msgid ""
621 "Multiply (``*``) and divide (``/``). These operators are associative and "
622 "evaluate left to right. Use parentheses if you want to change the order of "
623 "evaluation."
624 msgstr "Multiplicación (``*``) y división (``/``). Estas operaciones son asociativas y se evalúan de izquierda a derecha. Use paréntesis si quiere cambiar el orden de evaluación."
625
626 #: ../../../__w/calibre/calibre/manual/template_lang.rst:310
627 msgid ""
628 "Add (``+``) and subtract (``-``). These operators are associative and "
629 "evaluate left to right."
630 msgstr "Suma (``+``) y resta (``-``). Estas operaciones son asociativas y se evalúan de izquierda a derecha."
631
632 #: ../../../__w/calibre/calibre/manual/template_lang.rst:311
633 msgid ""
634 "Numeric and string comparisons. These operators return ``'1'`` if the "
635 "comparison succeeds, otherwise the empty string (``''``). Comparisons are "
636 "not associative: ``a < b < c`` is a syntax error."
637 msgstr "Comparaciones numéricas y de textos. Estas operaciones devuelven ``'1'`` si la comparación tiene éxito, en caso contrario un texto vacío (``''``). Las comparaciones no son asociativas: ``a < b < c`` es un error de sintaxis."
638
639 #: ../../../__w/calibre/calibre/manual/template_lang.rst:312
640 msgid ""
641 "String concatenation (``&``). The ``&`` operator returns a string formed by "
642 "concatenating the left-hand and right-hand expressions. Example: ``'aaa' & "
643 "'bbb'`` returns ``'aaabbb'``. The operator is associative and evaluates left"
644 " to right."
645 msgstr "Concatenación de textos (``&``). El operador ``&`` devuelve un texto formado por concatenación de las expresiones a su izquierda y derecha. Ejemplo: ``'aaa' & 'bbb'`` devuelve ``'aaabbb'``. El operador es asociativo y se evalúa de izquierda a derecha."
646
647 #: ../../../__w/calibre/calibre/manual/template_lang.rst:313
648 msgid ""
649 "Unary logical not (``!``). This operator returns ``'1'`` if the expression "
650 "is False (evaluates to the empty string), otherwise ``''``."
651 msgstr "Negación lógica unaria (``!``). Esta operación devuelve ``'1'`` si la expresión es ``False`` (da como resultado un texto vacío), en caso contrario ``''``."
652
653 #: ../../../__w/calibre/calibre/manual/template_lang.rst:314
654 msgid ""
655 "Logical and (``&&``). This operator returns '1' if both the left-hand and "
656 "right-hand expressions are True, or the empty string ``''`` if either is "
657 "False. It is associative, evaluates left to right, and does `short-"
658 "circuiting <https://chortle.ccsu.edu/java5/Notes/chap40/ch40_2.html>`_."
659 msgstr "Y lógico (``&&``). Esta operación devuelve ``'1'`` si ambas expresiones a derecha e izquierda son ``True``, o un texto vacío (``''``) si alguna es ``False``. Es asociativa, se evalúa de izquierda a derecha y con cortocircuito `<https://chortle.ccsu.edu/java5/Notes/chap40/ch40_2.html>`_."
660
661 #: ../../../__w/calibre/calibre/manual/template_lang.rst:315
662 msgid ""
663 "Logical or (``||``). This operator returns ``'1'`` if either the left-hand "
664 "or right-hand expression is True, or ``''`` if both are False. It is "
665 "associative, evaluates left to right, and does `short-circuiting "
666 "<https://chortle.ccsu.edu/java5/Notes/chap40/ch40_2.html>`_. It is an "
667 "`inclusive or`, returning ``'1'`` if both the left- and right-hand "
668 "expressions are True."
669 msgstr "O lógico (``||``). Esta operación devuelve ``'1'`` si alguna de las expresiones a derecha e izquierda es ``True``, o un ``''`` si ambas son ``False``. Es asociativa, se evalúa de izquierda a derecha y con cortocircuito `<https://chortle.ccsu.edu/java5/Notes/chap40/ch40_8.html>`_."
670
671 #: ../../../__w/calibre/calibre/manual/template_lang.rst:317
672 msgid "**Field references**"
673 msgstr "**Referencias de campo**"
674
675 #: ../../../__w/calibre/calibre/manual/template_lang.rst:319
676 msgid ""
677 "A ``field_reference`` evaluates to the value of the metadata field named by "
678 "lookup name that follows the ``$`` or ``$$``. Using ``$`` is equivalent to "
679 "using the :ref:`ff_field` function. Using ``$$`` is equivalent to using the "
680 ":ref:`ff_raw_field` function. Examples::"
681 msgstr "Un elemento de tipo ``field_reference`` (referencia de campo) se evalúa como el valor del campo de metadatos nombrado por el nombre de consulta que sigue al ``$`` o ``$$``. Usar ``$`` es equivalente a usar la función :ref:`ff_field`. Usar ``$$`` es equivalente a usar la función :ref:`ff_raw_field`. Ejemplos::"
682
683 #: ../../../__w/calibre/calibre/manual/template_lang.rst:326
684 msgid "**If expressions**"
685 msgstr "**Expresiones condicionales**"
686
687 #: ../../../__w/calibre/calibre/manual/template_lang.rst:328
688 msgid ""
689 "``If`` expressions first evaluate the ``condition``. If the ``condition`` is"
690 " True (a non-empty value) then the ``expression_list`` in the ``then`` "
691 "clause is evaluated. If it is False then if present the ``expression_list`` "
692 "in the ``elif`` or ``else`` clause is evaluated. The ``elif`` and ``else`` "
693 "parts are optional. The words ``if``, ``then``, ``elif``, ``else``, and "
694 "``fi`` are reserved; you cannot use them as identifier names. You can put "
695 "newlines and white space wherever they make sense. The ``condition`` is a "
696 "``top_expression`` not an ``expression_list``; semicolons are not allowed. "
697 "The ``expression_lists`` are semicolon-separated sequences of "
698 "``top_expressions``. An ``if`` expression returns the result of the last "
699 "``top_expression`` in the evaluated ``expression_list``, or the empty string"
700 " if no expression list was evaluated."
701 msgstr "Las expresiones condicionales (``if_expression``) evalúan primero la ``condition``. Si la ``condition`` es ``True`` (un valor no vacío) entonces se evalúa ``expression_list`` en la sentencia ``then``. Si es ``False``, entonces se evalúa ``expression_list`` en la sentencia ``elif`` o ``else``, si existen. Las partes ``elif`` y ``else`` son opcionales. Las palabras ``if``, ``then``, ``elif``, ``else`` y ``fi`` están reservadas, no pueden usarse como nombres de identificador. Se pueden añadir espacios y saltos de línea donde sea conveniente. La ``condition`` es una ``top_expression``, no usa ``expression_list``, no se permite punto y coma. Los elementos de tipo ``expression_list`` son secuencias de ``top_expression`` separadas por punto y coma. Una expresión condicional devuelve el resultado de la última ``top_expression`` en la ``expression_list`` evaluada, o un texto vacío si no se evaluó ninguna ``expression_list``."
702
703 #: ../../../__w/calibre/calibre/manual/template_lang.rst:330
704 msgid "Examples::"
705 msgstr "Ejemplos::"
706
707 #: ../../../__w/calibre/calibre/manual/template_lang.rst:343
708 msgid "Nested ``if`` example::"
709 msgstr "Ejemplo de ``if`` anidado::"
710
711 #: ../../../__w/calibre/calibre/manual/template_lang.rst:356
712 msgid ""
713 "As said above, an ``if`` produces a value. This means that all the following"
714 " are equivalent::"
715 msgstr "Como se ha mencionado, un ``if`` produce un valor. Esto significa que todas las siguientes expresiones son equivalentes:"
716
717 #: ../../../__w/calibre/calibre/manual/template_lang.rst:362
718 msgid ""
719 "For example, this program returns the value of the ``series`` column if the "
720 "book has a series, otherwise the value of the ``title`` column::"
721 msgstr "Por ejemplo, este programa devuelve el valor de la columna ``series`` si el libro tiene una serie, de lo contrario, el valor de la columna ``title``::"
722
723 #: ../../../__w/calibre/calibre/manual/template_lang.rst:366
724 msgid "**For expressions**"
725 msgstr "**Expresiones de bucle**"
726
727 #: ../../../__w/calibre/calibre/manual/template_lang.rst:368
728 msgid ""
729 "The ``for`` expression iterates over a list of values, processing them one "
730 "at a time. The ``list_expression`` must evaluate either to a metadata field "
731 "``lookup name`` e.g., ``tags`` or ``#genre``, or to a list of values. The "
732 ":ref:`ff_range` generates a list of numbers. If the result is a valid "
733 "``lookup name`` then the field's value is fetched and the separator "
734 "specified for that field type is used. If the result isn't a valid lookup "
735 "name then it is assumed to be a list of values. The list is assumed to be "
736 "separated by commas unless the optional keyword ``separator`` is supplied, "
737 "in which case the list values must be separated by the result of evaluating "
738 "the ``separator_expr``. A separator cannot be used if the list is generated "
739 "by ``range()``. Each value in the list is assigned to the specified variable"
740 " then the ``expression_list`` is evaluated. You can use ``break`` to jump "
741 "out of the loop, and ``continue`` to jump to the beginning of the loop for "
742 "the next iteration."
743 msgstr "Una expresión de bucle (``for_expression``) itera sobre una lista de valores, procesando uno cada vez. La ``list_expression`` debe resultar en el ``nombre de consulta`` de un campo de metadatos, como ``tags`` o ``#genero``, o una lista de valores. La función :ref:`ff_range` genera una lista de números. Si el resultado es un ``nombre de consulta`` válido, se obtiene el valor del campo y se usa el separador especificado para ese tipo de campo. Si el resultado no es un ``nombre de consulta`` válido, se supone que es una lista de valores. La lista se supone separada por comas, a no ser que use la palabra clave opcional ``separator``, en ese caso los valores de la lista deben estar separados por el resultado de evaluar ``separator_expr``. No se puede usar un separador si la lista es generada por ``range()``. Cada valor de la lista se asigna a la variable especificada y luego se evalúa ``expression_list``. Puede usar ``break`` para salir del bucle y ``continue`` para comenzar con la siguiente iteración."
744
745 #: ../../../__w/calibre/calibre/manual/template_lang.rst:370
746 msgid ""
747 "Example: This template removes the first hierarchical name for each value in"
748 " Genre (``#genre``), constructing a list with the new names::"
749 msgstr "Ejemplo: Esta plantilla elimina el primer nombre jerárquico para cada valor de Género (``#genre```), construyendo una lista con los nuevos nombres."
750
751 #: ../../../__w/calibre/calibre/manual/template_lang.rst:380
752 msgid ""
753 "If the original Genre is `History.Military, Science Fiction.Alternate "
754 "History, ReadMe` then the template returns `Military, Alternate History, "
755 "ReadMe`. You could use this template in calibre's :guilabel:`Edit metadata "
756 "in bulk -> Search & replace` with :guilabel:`Search for` set to ``template``"
757 " to strip off the first level of the hierarchy and assign the resulting "
758 "value to Genre."
759 msgstr "Si el Género original es `Historia.Militar, Ciencia ficción.Historia alternativa, Léeme`, la plantilla devolverá `Militar, Historia alternativa, Léeme`. Puede usar esta plantilla en :guilabel:`Modificar metadatos en masa > Buscar y sustituir` con :guilabel:`Buscar` establecido en ``plantilla`` para eliminar el primer nivel de la jerarquía y asignar el valor resultante a Género."
760
761 #: ../../../__w/calibre/calibre/manual/template_lang.rst:383
762 msgid ""
763 "Note: the last line in the template, ``new_tags``, isn't strictly necessary "
764 "in this case because ``for`` returns the value of the last top_expression in"
765 " the expression list. The value of an assignment is the value of its "
766 "expression, so the value of the ``for`` statement is what was assigned to "
767 "``new_tags``."
768 msgstr "Nota: la última línea en la plantilla, ``new_tags``, no es estrictamente necesaria en este caso, porque ``for`` devuelve el valor de la última ``top_expression`` en ``expression_list``. El valor de una asignación (``assignment``) es el valor de su expresión, así que el valor del ``for`` es lo que se asignó a ``new_tags``."
769
770 #: ../../../__w/calibre/calibre/manual/template_lang.rst:385
771 msgid "**with expressions**"
772 msgstr "**Expresiones with**"
773
774 #: ../../../__w/calibre/calibre/manual/template_lang.rst:387
775 msgid "The ``with`` expression:"
776 msgstr "La expresión ``with``:"
777
778 #: ../../../__w/calibre/calibre/manual/template_lang.rst:389
779 msgid ""
780 "changes the current book to the book with calibre book id (an integer) "
781 "produced by evaluating the ``top_expression``."
782 msgstr "cambia el libro actual al libro con id de libro de calibre (un entero) producido al evaluar la ``top_expression``."
783
784 #: ../../../__w/calibre/calibre/manual/template_lang.rst:390
785 msgid "runs the ``expression_list``."
786 msgstr "ejecuta ``expression_list``."
787
788 #: ../../../__w/calibre/calibre/manual/template_lang.rst:391
789 msgid "then resets the current book back to what it was."
790 msgstr "y después restablece el libro actual al que lo era anteriormente."
791
792 #: ../../../__w/calibre/calibre/manual/template_lang.rst:393
793 msgid ""
794 "The ``with`` expression returns the result of the last ``top_expression`` in"
795 " the evaluated ``expression_list``, or the empty string if no expression "
796 "list was evaluated."
797 msgstr "La expresión ``with`` devuelve el resultado de la última ``top_expression`` en la ``expression_list`` evaluada, o un texto vacío si no se evaluó ninguna ``expression_list``."
798
799 #: ../../../__w/calibre/calibre/manual/template_lang.rst:396
800 msgid ""
801 "For example, this template returns a list of the titles of each book "
802 "selected in the GUI::"
803 msgstr "Por ejemplo, esta plantilla devuelve una lista con los títulos de los libros seleccionados en la interfaz gráfica::"
804
805 #: ../../../__w/calibre/calibre/manual/template_lang.rst:408
806 msgid "**Return stmt**"
807 msgstr "**Instrucción de retorno**"
808
809 #: ../../../__w/calibre/calibre/manual/template_lang.rst:410
810 msgid ""
811 "Return the value of the ``expression``. If executed in a function then it "
812 "returns the value of the expression to the caller. If executed in the "
813 "outermost context (the template) then it sets the value of the template to "
814 "the value of the expression and exits the template."
815 msgstr "Devuelve el valor de la ``expression``. Si se ejecuta en una función, devuelve el valor de la expresión a quien la llamó. Si se ejecuta en el contexto más externo (la plantilla), asigna el valor de la expresión como el valor de la plantilla y sale de la plantilla."
816
817 #: ../../../__w/calibre/calibre/manual/template_lang.rst:412
818 msgid "**Function definition**"
819 msgstr "**Definición de funciones**"
820
821 #: ../../../__w/calibre/calibre/manual/template_lang.rst:414
822 msgid ""
823 "If you have repeated code in a template then you can put that code into a "
824 "local function. The ``def`` keyword starts the definition. It is followed by"
825 " the function name, the argument list, then the code in the function. The "
826 "function definition ends with the ``fed`` keyword."
827 msgstr "Si tiene código repetido en una plantilla, puede poner ese código en una función local. La palabra clave ``def`` comienza la definición. Le sigue el nombre de la función, la lista de argumentos y el código en la función. La definición de función termina con la palabra clave ``fed``."
828
829 #: ../../../__w/calibre/calibre/manual/template_lang.rst:416
830 msgid ""
831 "Arguments are positional. When a function is called the supplied arguments "
832 "are matched left to right against the defined parameters, with the value of "
833 "the argument assigned to the parameter. It is an error to provide more "
834 "arguments than defined parameters. Parameters can have default values, such "
835 "as ``a = 25``. If an argument is not supplied for that parameter then the "
836 "default value is used, otherwise the parameter is set to the empty string."
837 msgstr "Los argumentos son posicionales. Cuando se invoca una función, los argumentos proporcionados se hacen corresponder de izquierda a derecha con los parámetros definidos, con el valor del argumento asignado al parámetro. Es un error proporcionar más argumentos que parámetros definidos. Los parámetros pueden tener valores predeterminados, como ``a = 25``. Si no se proporciona un argumento para un parámetro, se usará el valor predeterminado, en caso contrario el parámetro será un texto vacío."
838
839 #: ../../../__w/calibre/calibre/manual/template_lang.rst:418
840 msgid "The ``return`` statement can be used in a local function."
841 msgstr "La instrucción ``return`` se puede usar en una función local."
842
843 #: ../../../__w/calibre/calibre/manual/template_lang.rst:420
844 msgid "A function must be defined before it can be used."
845 msgstr "Una función debe definirse antes de poder usarse."
846
847 #: ../../../__w/calibre/calibre/manual/template_lang.rst:422
848 msgid ""
849 "Example: This template computes an approximate duration in years, months, "
850 "and days from a number of days. The function ``to_plural()`` formats the "
851 "computed values. Note that the example also uses the ``&`` operator::"
852 msgstr "Ejemplo: Esta plantilla calcula una duración aproximada en años, meses y días a partir de un número de días. La función ``to_plural()`` da formato a los valores calculados. Tenga en cuenta que el ejemplo también usa el operador ``&``::"
853
854 #: ../../../__w/calibre/calibre/manual/template_lang.rst:437
855 msgid "**Relational operators**"
856 msgstr "**Operadores de relación**"
857
858 #: ../../../__w/calibre/calibre/manual/template_lang.rst:439
859 msgid ""
860 "Relational operators return ``'1'`` if the comparison is true, otherwise the"
861 " empty string (``''``)."
862 msgstr "Los operadores de relación devuelven ``'1'`` si la comparación es cierta, en caso contrario devuelven un texto vacío (``''``)."
863
864 #: ../../../__w/calibre/calibre/manual/template_lang.rst:441
865 msgid ""
866 "There are two forms of relational operators: string comparisons and numeric "
867 "comparisons."
868 msgstr "Hay dos formas de operadores de relación: comparaciones de texto y comparaciones numéricas."
869
870 #: ../../../__w/calibre/calibre/manual/template_lang.rst:443
871 msgid ""
872 "String comparisons do case-insensitive string comparison using lexical "
873 "order. The supported string comparison operators are ``==``, ``!=``, ``<``, "
874 "``<=``, ``>``, ``>=``, ``in``, ``inlist``, and ``inlist_field``. For the "
875 "``in``, ``inlist``, and ``inlist_field`` operators, the result of the left "
876 "hand expression is interpreted as a regular expression pattern. They are "
877 "true if the value of left-hand regular expression matches the value of the "
878 "right hand expression. The regular expressions are case-insensitive."
879 msgstr "Las comparaciones de texto usan el orden lexicográfico y no distinguen mayúsculas y minúsculas. Las comparaciones de texto permitidas son ``==``, ``!=``, ``<``, ``<=``, ``>``, ``>=``, ``in``, ``inlist`` e ``inlist_field``. Para los operadores ``in``, ``inlist`` e ``inlist_field``, el resultado de la expresión de la izquierda se interpreta como un patrón de expresión regular. El resultado es ``True`` si el valor de la expresión regular de la izquierda coincide con el valor de la expresión de la derecha. Las expresiones regulares no distinguen mayúsculas y minúsculas."
880
881 #: ../../../__w/calibre/calibre/manual/template_lang.rst:446
882 msgid ""
883 "The ``inlist`` operator is true if the left hand regular expression matches "
884 "any one of the items in the right hand list where the items in the list are "
885 "separated by commas. The ``inlist_field`` operator is true if the left hand "
886 "regular expression matches any of the items in the field (column) named by "
887 "the right hand expression, using the separator defined for the field. NB: "
888 "the ``inlist_field`` operator requires the right hand expression to evaluate"
889 " to a field name, while the ``inlist`` operator requires the right hand "
890 "expression to evaluate to a string containing a comma-separated list. "
891 "Because of this difference, ``inlist_field`` is substantially faster than "
892 "``inlist`` because no string conversions or list constructions are done."
893 msgstr "El operador ``inlist`` es ``True`` si la expresión regular de la izquierda coincide con alguno de los elementos de la lista de la derecha, en la que los elementos están separados por comas. El operador ``inlist_field`` es ``True`` si la expresión regular de la izquierda coincide con alguno de los elementos del campo (columna) nombrado por la expresión de la derecha, usando el separador definido para el campo. Nota: el operador ``inlist_field`` requiere que la expresión de la derecha resulte en un nombre de campo, mientras que el operador ``inlist`` requiere que la expresión de la derecha resulte en un texto que contenga una lista separada por comas. Debido a esta diferencia, ``inlist_field`` es bastante más rápido que ``inlist`` porque no implica conversiones de texto o construcciones de listas."
894
895 #: ../../../__w/calibre/calibre/manual/template_lang.rst:448
896 msgid ""
897 "The numeric comparison operators are ``==#``, ``!=#``, ``<#``, ``<=#``, "
898 "``>#``, ``>=#``. The left and right expressions must evaluate to numeric "
899 "values with two exceptions: both the string value \"None\" (undefined field)"
900 " and the empty string evaluate to the value zero."
901 msgstr "Los operadores de comparación numérica son ``==#``, ``!=#``, ``<#``, ``<=#``, ``>#`` y ``>=#``. Las expresiones de la izquierda y la derecha deben resultar en valores numéricos con dos excepciones: Tanto el valor textual ``None`` (campo no definido) como el texto vacío equivalen al valor cero."
902
903 #: ../../../__w/calibre/calibre/manual/template_lang.rst:450
904 msgid "Examples:"
905 msgstr "Ejemplos:"
906
907 #: ../../../__w/calibre/calibre/manual/template_lang.rst:452
908 msgid ""
909 "``program: field('series') == 'foo'`` returns ``'1'`` if the book's series "
910 "is `foo`, otherwise ``''``."
911 msgstr "``program: field('series') == 'lala'`` devuelve ``'1'`` si la serie del libro es `lala`, en caso contrario devuelve ``''``."
912
913 #: ../../../__w/calibre/calibre/manual/template_lang.rst:453
914 msgid ""
915 "``program: 'f.o' in field('series')`` returns ``'1'`` if the book's series "
916 "matches the regular expression ``f.o`` (e.g., `foo`, `Off Onyx`, etc.), "
917 "otherwise ``''``."
918 msgstr "``program: 'l.a' in field('series')`` devuelve ``'1'`` si la serie del libro coincide con la expresión regular ``l..a`` (por ejemplo, `lala`, `El asesino de reyes`, etc.), en caso contrario devuelve ``''``."
919
920 #: ../../../__w/calibre/calibre/manual/template_lang.rst:454
921 msgid ""
922 "``program: 'science' inlist $#genre`` returns ``'1'`` if any of the values "
923 "retrieved from the book's genres match the regular expression ``science``, "
924 "e.g., `Science`, `History of Science`, `Science Fiction` etc., otherwise "
925 "``''``."
926 msgstr "``program: 'ciencia' inlist $#genero` devuelve ``'1'`` si alguno de los valores obtenidos de los géneros del libro coincide con la expresión regular ``ciencia`` (por ejemplo `Ciencia`, `Historia de la ciencia`, `Ciencia ficción`, etc.), en caso contrario devuelve ``''``."
927
928 #: ../../../__w/calibre/calibre/manual/template_lang.rst:455
929 msgid ""
930 "``program: '^science$' inlist $#genre`` returns ``'1'`` if any of the book's"
931 " genres exactly match the regular expression ``^science$``, e.g., `Science`,"
932 " otherwise ``''``. The genres `History of Science` and `Science Fiction` "
933 "don't match."
934 msgstr "``program: '^ciencia$' inlist $#genero`` devuelve ``'1'`` si alguno de los géneros del libro coincide con la expresión regular ``^ciencia$`` (por ejemplo `Ciencia`). Los géneros `Historia de la ciencia` y `Ciencia ficción` no coinciden."
935
936 #: ../../../__w/calibre/calibre/manual/template_lang.rst:456
937 msgid ""
938 "``program: 'asimov' inlist $authors`` returns ``'1'`` if any author matches "
939 "the regular expression ``asimov``, e.g., `Asimov, Isaac` or `Isaac Asimov`, "
940 "otherwise ``''``."
941 msgstr "``program: 'asimov' inlist $authors`` devuelve ``'1'`` si algún autor coincide con la expresión regular ``asimov`` (por ejemplo `Asimov, Isaac` o `Isaac Asimov`), en caso contrario devuelve ``''``."
942
943 #: ../../../__w/calibre/calibre/manual/template_lang.rst:457
944 msgid ""
945 "``program: 'asimov' inlist_field 'authors'`` returns ``'1'`` if any author "
946 "matches the regular expression ``asimov``, e.g., `Asimov, Isaac` or `Isaac "
947 "Asimov`, otherwise ``''``."
948 msgstr "``program: 'asimov' inlist_field 'authors'`` devuelve ``'1'`` si algún autor coincide con la expresión regular ``asimov`` (por ejemplo `Asimov, Isaac` o `Isaac Asimov`), en caso contrario devuelve ``''``."
949
950 #: ../../../__w/calibre/calibre/manual/template_lang.rst:458
951 msgid ""
952 "``program: 'asimov$' inlist_field 'authors'`` returns ``'1'`` if any author "
953 "matches the regular expression ``asimov$``, e.g., `Isaac Asimov`, otherwise "
954 "``''``. It doesn't match `Asimov, Isaac` because of the ``$`` anchor in the "
955 "regular expression."
956 msgstr "``program: 'asimov$' inlist_field 'authors'`` devuelve ``'1'`` si algún autor coincide con la expresión regular ``asimov$`` (por ejemplo `Isaac Asimov`), en caso contrario devuelve ``''``. No coincide con `Asimov, Isaac` debido al punto de anclaje ``$`` en la expresión regular."
957
958 #: ../../../__w/calibre/calibre/manual/template_lang.rst:459
959 msgid ""
960 "``program: if field('series') != 'foo' then 'bar' else 'mumble' fi`` returns"
961 " ``'bar'`` if the book's series is not `foo`. Otherwise it returns "
962 "``'mumble'``."
963 msgstr "``program: if field('series') != 'lala' then 'nana' else 'blabla' fi`` devuelve ``'nana'`` si la serie del libro no es `lala`, en caso contrario devuelve ``'blabla'``."
964
965 #: ../../../__w/calibre/calibre/manual/template_lang.rst:460
966 msgid ""
967 "``program: if field('series') == 'foo' || field('series') == '1632' then "
968 "'yes' else 'no' fi`` returns ``'yes'`` if series is either `foo` or `1632`, "
969 "otherwise ``'no'``."
970 msgstr "``program: if field('series') == 'lala' || field('series') == '1632' then 'sí' else 'no' fi`` devuelve ``'sí'`` si la serie es `lala` o `1632`, en caso contrario devuelve ``'no'``."
971
972 #: ../../../__w/calibre/calibre/manual/template_lang.rst:461
973 msgid ""
974 "``program: if '^(foo|1632)$' in field('series') then 'yes' else 'no' fi`` "
975 "returns ``'yes'`` if series is either `foo` or `1632`, otherwise ``'no'``."
976 msgstr "``program: if '^(lala|1632)$' in field('series') then 'sí' else 'no' fi`` devuelve ``'sí'`` si la serie es `lala` o `1632`, en caso contrario devuelve ``'no'``."
977
978 #: ../../../__w/calibre/calibre/manual/template_lang.rst:462
979 msgid ""
980 "``program: if 11 > 2 then 'yes' else 'no' fi`` returns ``'no'`` because the "
981 "``>`` operator does a lexical comparison."
982 msgstr "``program: if 11 > 2 then 'sí' else 'no' fi`` devuelve ``'no'`` porque el operador ``>`` realiza una comparación lexicográfica."
983
984 #: ../../../__w/calibre/calibre/manual/template_lang.rst:463
985 msgid ""
986 "``program: if 11 ># 2 then 'yes' else 'no' fi`` returns ``'yes'`` because "
987 "the ``>#`` operator does a numeric comparison."
988 msgstr "``program: if 11 ># 2 then 'sí' else 'no' fi`` devuelve ``'sí'`` porque el operador ``>#`` realiza una comparación numérica."
989
990 #: ../../../__w/calibre/calibre/manual/template_lang.rst:465
991 msgid "**Functions in General Program Mode**"
992 msgstr "**Funciones en modo de programación general**"
993
994 #: ../../../__w/calibre/calibre/manual/template_lang.rst:467
995 msgid ""
996 "See :ref:`template_functions_reference` for the list of functions built into"
997 " the template language."
998 msgstr "Consulte :ref:`template_functions_reference` para ver la lista de funciones predefinidas en el lenguaje de plantillas."
999
1000 #: ../../../__w/calibre/calibre/manual/template_lang.rst:471
1001 msgid ""
1002 "As opposed to :ref:`Single Function Mode <single_mode>`, in General Program "
1003 "Mode you must specify the first parameter ``value``."
1004 msgstr "A diferencia del :ref:`modo de función única <single_mode>`, en el modo de programación general debe especificar el primer parámetro ``valor``."
1005
1006 #: ../../../__w/calibre/calibre/manual/template_lang.rst:472
1007 msgid "All parameters are expression_lists (see the grammar above)."
1008 msgstr "Todos los parámetros son elementos de tipo ``expression_list`` (ver la gramática más arriba)."
1009
1010 #: ../../../__w/calibre/calibre/manual/template_lang.rst:477
1011 msgid "More complex programs in template expressions - Template Program Mode"
1012 msgstr "Programas más complejos en expresiones de plantilla: modo de programación de plantillas"
1013
1014 #: ../../../__w/calibre/calibre/manual/template_lang.rst:479
1015 msgid ""
1016 "`Template Program Mode` (`TPM`) is a blend of :ref:`General Program Mode "
1017 "<general_mode>` and :ref:`Single Function Mode <single_mode>`. `TPM` differs"
1018 " from Single Function Mode in that it permits writing template expressions "
1019 "that refer to other metadata fields, use nested functions, modify variables,"
1020 " and do arithmetic. It differs from `General Program Mode` in that the "
1021 "template is contained between ``{`` and ``}`` characters and doesn't begin "
1022 "with the word ``program:``. The program portion of the template is a General"
1023 " Program Mode expression list."
1024 msgstr "El `modo de programación de plantillas` (`MPP`) es una mezcla entre el :ref:`modo de programación general <general_mode>` y el :ref:`modo de función única <single_mode>`. El `MPP` se diferencia del `modo de función única` en que permite escribir expresiones de plantilla que hacen referencia a otros campos de metadatos, usar funciones anidadas, modificar variables y hacer operaciones aritméticas. Se diferencia del `modo de programación general` en que la plantilla está entre caracteres ``{`` y ``}`` y no empieza por la palabra ``program``. La parte del programa de la plantilla es una ``expression_list`` del `modo de programación general`."
1025
1026 #: ../../../__w/calibre/calibre/manual/template_lang.rst:482
1027 msgid ""
1028 "Example: assume you want a template to show the series for a book if it has "
1029 "one, otherwise show the value of a custom field #genre. You cannot do this "
1030 "in the :ref:`Single Function Mode <single_mode>` because you cannot make "
1031 "reference to another metadata field within a template expression. In `TPM` "
1032 "you can, as the following expression demonstrates::"
1033 msgstr "Un ejemplo: supongamos que quiere una plantilla que muestre la serie de un libro si la tiene, y en caso contrario muestre el valor del campo personalizado ``#genre``. Esto no se puede hacer en el :ref:`modo de función única <single_mode>`, porque no se puede hacer referencia a otro campo en la expresión de la plantilla. En el `MPP` sí se puede. La siguiente expresión lo demuestra::"
1034
1035 #: ../../../__w/calibre/calibre/manual/template_lang.rst:487
1036 msgid "The example shows several things:"
1037 msgstr "El ejemplo muestra varias cosas:"
1038
1039 #: ../../../__w/calibre/calibre/manual/template_lang.rst:489
1040 msgid ""
1041 "`TPM` is used if the expression begins with ``:'`` and ends with ``'}``. "
1042 "Anything else is assumed to be in :ref:`Single Function Mode <single_mode>`."
1043 msgstr "El `MPP` se usa si la expresión empieza por ``:'`` y termina en ``'}``. Cualquier otra cosa se supone que corresponde al :ref:`modo de función única <single_mode>`."
1044
1045 #: ../../../__w/calibre/calibre/manual/template_lang.rst:491
1046 msgid ""
1047 "If the template contains a prefix and suffix, the expression ends with "
1048 "``'|`` where the ``|`` is the delimiter for the prefix. Example::"
1049 msgstr "Si la plantilla contiene un prefijo y un sufijo, la expresión termina con ``'|`` donde ``|`` es el delimitador para el prefijo. Ejemplo::"
1050
1051 #: ../../../__w/calibre/calibre/manual/template_lang.rst:495
1052 msgid ""
1053 "Functions must be given all their arguments. For example, the standard "
1054 "built-in functions must be given the initial parameter ``value``."
1055 msgstr "Las funciones deben llevar todos sus argumentos. Por ejemplo, las funciones estándar predefinidas deben tener el parámetro inicial ``valor``."
1056
1057 #: ../../../__w/calibre/calibre/manual/template_lang.rst:496
1058 msgid ""
1059 "The variable ``$`` is usable as the ``value`` argument and stands for the "
1060 "value of the field named in the template, ``series`` in this case."
1061 msgstr "La variable ``$`` se puede usar como el argumento ``valor`` y representa el valor del campo nombrado en la plantilla, ``series`` en este caso."
1062
1063 #: ../../../__w/calibre/calibre/manual/template_lang.rst:497
1064 msgid "white space is ignored and can be used anywhere within the expression."
1065 msgstr "los espacios en blanco se ignoran y se pueden utilizar en cualquier lugar dentro de la expresión."
1066
1067 #: ../../../__w/calibre/calibre/manual/template_lang.rst:498
1068 msgid ""
1069 "constant strings are enclosed in matching quotes, either ``'`` or ``\"``."
1070 msgstr "los textos constantes se encierran en comillas del mismo tipo, ya sea ``'`` o ``\"``."
1071
1072 #: ../../../__w/calibre/calibre/manual/template_lang.rst:500
1073 msgid ""
1074 "In `TPM`, using ``{`` and ``}`` characters in string literals can lead to "
1075 "errors or unexpected results because they confuse the template processor. It"
1076 " tries to treat them as template expression boundaries, not characters. In "
1077 "some but not all cases you can replace a ``{`` with ``[[`` and a ``}`` with "
1078 "`]]`. Advice: if your program contains ``{`` and ``}`` characters then you "
1079 "should use `General Program Mode`."
1080 msgstr "En el `MPP`, usar los caracteres ``{`` y ``}`` en textos literales puede conducir a errores o resultados inesperados porque confunden al procesador de plantillas. Éste intenta interpretarlos como límites de expresiones de plantilla y no como caracteres. En algunos casos, pero no todos, puede sustituir un ``{`` por ``[[`` y un ``}`` por ``]]``. Consejo: si el programa contiene caracteres ``{`` y ``}``, es mejor usar el `modo de programación general`."
1081
1082 #: ../../../__w/calibre/calibre/manual/template_lang.rst:505
1083 msgid "Python Template Mode"
1084 msgstr "Modo de plantilla de Python"
1085
1086 #: ../../../__w/calibre/calibre/manual/template_lang.rst:507
1087 msgid ""
1088 "Python Template Mode (PTM) lets you write templates using native Python and "
1089 "the `calibre API <https://manual.calibre-ebook.com/develop.html#api-"
1090 "documentation-for-various-parts-of-calibre>`_. The database API will be of "
1091 "most use; further discussion is beyond the scope of this manual. PTM "
1092 "templates are faster and can do more complicated operations but you must "
1093 "know how to write code in Python using the calibre API."
1094 msgstr "El modo de plantilla de Python (MPPy) le permite escribir plantillas usando el lenguaje Python nativo y la `interfaz de programación de calibre <https://manual.calibre-ebook.com/develop.html#api-documentation-for-various-parts-of-calibre>`_. La interfaz de programación de base de datos será la más útil, pero en este manual no se discutirán más detalles. Las plantillas MPPy son más rápidas y pueden realizar operaciones más complicadas, pero debe saber escribir código Python usando la interfaz de programación de calibre."
1095
1096 #: ../../../__w/calibre/calibre/manual/template_lang.rst:509
1097 msgid "A PTM template begins with:"
1098 msgstr "Una plantilla MPPy empieza por:"
1099
1100 #: ../../../__w/calibre/calibre/manual/template_lang.rst:527
1101 msgid ""
1102 "You can add the above text to your template using the context menu, usually "
1103 "accessed with a right click. The comments are not significant and can be "
1104 "removed. You must use python indenting."
1105 msgstr "Puede añadir el texto anterior a la plantilla usando el menú contextual, al que normalmente se accede pulsando el botón derecho. Los comentarios no son importantes y pueden eliminarse. Debe usar la sangría de Python."
1106
1107 #: ../../../__w/calibre/calibre/manual/template_lang.rst:529
1108 msgid ""
1109 "The context object supports ``str(context)`` that returns a string of the "
1110 "context's contents, and ``context.attributes`` that returns a list of the "
1111 "attribute names in the context."
1112 msgstr "El objeto de contexto admite ``str(context)``, que devuelve un texto con el contenido del contexto y ``context.attributes``, que devuelve una lista con los nombres de los atributos del contexto."
1113
1114 #: ../../../__w/calibre/calibre/manual/template_lang.rst:531
1115 msgid ""
1116 "The ``context.funcs`` attribute allows calling Built-in and User template "
1117 "functions, and Stored GPM/Python templates, so that you can execute them "
1118 "directly in your code. The functions are retrieved using their names. If the"
1119 " name conflicts with a Python keyword, add an underscore to the end of the "
1120 "name. Examples:"
1121 msgstr "El atributo ``context.funcs`` le permite invocar funciones incorporadas y de usuario, así como plantillas guardadas MPG o Python, de manera que puede ejecutarlas directamente en el código. Las funciones se identifican por sus nombres. Si el nombre entra en conflicto con una palabra clave de Python, añada un guión bajo al final. Ejemplos:"
1122
1123 #: ../../../__w/calibre/calibre/manual/template_lang.rst:538
1124 msgid ""
1125 "Here is an example of a PTM template that produces a list of all the authors"
1126 " for a series. The list is stored in a `Column built from other columns, "
1127 "behaves like tags`. It shows in :guilabel:`Book details` and has the "
1128 ":guilabel:`on separate lines` checked (in :guilabel:`Preferences->Look & "
1129 "feel->Book details`). That option requires the list to be comma-separated. "
1130 "To satisfy that requirement the template converts commas in author names to "
1131 "semicolons then builds a comma-separated list of authors. The authors are "
1132 "then sorted, which is why the template uses author_sort."
1133 msgstr "He aquí un ejemplo de una plantilla MPPy que genera una lista de todos los autores de una serie. La lista se guarda en una `Columna generada a partir de otras columnas, funciona como etiquetas`. Se muestra en los :guilabel:`detalles del libro` y tiene la opción :guilabel:`en líneas separadas` activada (en :guilabel:`Preferencias > Apariencia > Detalles del libro`). Esta opción requiere que la lista esté separada por comas. Para satisfacer este requisito la plantilla convierte las comas en los nombres de autor a punto y coma y luego construye una lista de autores separados por comas. Los autores se ordenan, razón por la cual la plantilla usa author_sort."
1134
1135 #: ../../../__w/calibre/calibre/manual/template_lang.rst:559
1136 msgid "The output in :guilabel:`Book details` looks like this:"
1137 msgstr "La salida en los :guilabel:`detalles del libro` tiene este aspecto:"
1138
1139 #: ../../../__w/calibre/calibre/manual/template_lang.rst:561
1140 msgid "E-book conversion dialog"
1141 msgstr "Diálogo de conversión de libros electrónicos"
1142
1143 #: ../../../__w/calibre/calibre/manual/template_lang.rst:569
1144 msgid "Templates and URLs"
1145 msgstr "Plantillas y URL"
1146
1147 #: ../../../__w/calibre/calibre/manual/template_lang.rst:571
1148 msgid "You can use templates to construct URLs. Two cases are described here:"
1149 msgstr "Puede usar plantillas para generar URL. Se describen dos casos a continuación:"
1150
1151 #: ../../../__w/calibre/calibre/manual/template_lang.rst:573
1152 msgid "Custom column :guilabel:`Book details` search URLs"
1153 msgstr "URL de búsqueda para columnas personalizadas en :guilabel:`Detalles del libro`"
1154
1155 #: ../../../__w/calibre/calibre/manual/template_lang.rst:574
1156 msgid "The calibre URL scheme"
1157 msgstr "El esquema de URL de calibre"
1158
1159 #: ../../../__w/calibre/calibre/manual/template_lang.rst:576
1160 msgid "**Custom column book details search URLs**"
1161 msgstr "**URL de búsqueda para columnas personalizadas en detalles del libro**"
1162
1163 #: ../../../__w/calibre/calibre/manual/template_lang.rst:578
1164 msgid ""
1165 "When you create a custom column you can provide a URL to be used in "
1166 ":guilabel:`Book details` using a template. For example, if you have a custom"
1167 " column for `Translators` you can define a URL to take you to a site for "
1168 "translators. Book details search URLs can be provided for `Text`, "
1169 "`Enumerated`, `Series`, and `Column built from other column` column types."
1170 msgstr "Cuando crea una columna personalizada, puede proporcionar un URL para usar en :guilabel:`Detalles del libro` usando una plantilla. Por ejemplo, si tiene una columna personalizada para `Traductores` puede definir un URL que lleve a una página de traductores. Los URL de búsqueda de detalles del libro pueden proporcionarse para tipos de columna de `Texto`, `Enumerado`, `Serie` y `Columna generada a partir de otras columnas`."
1171
1172 #: ../../../__w/calibre/calibre/manual/template_lang.rst:580
1173 msgid ""
1174 "When an item with a `search template` is clicked in :guilabel:`Book details`"
1175 " the template is evaluated. It is provided the normal book metadata. It is "
1176 "also provided three additional fields:"
1177 msgstr "Cuando se pulsa sobre un elemento con una `plantilla de búsqueda` en :guilabel:`Detalles del libro`, se evalúa la plantilla. Se le suministran los metadatos normales del libro. También se le suministran tres campos adicionales:"
1178
1179 #: ../../../__w/calibre/calibre/manual/template_lang.rst:582
1180 msgid "``item_value``: the value of the clicked item."
1181 msgstr "``item_value``: el valor del elemento sobre el que se pulsa."
1182
1183 #: ../../../__w/calibre/calibre/manual/template_lang.rst:583
1184 msgid ""
1185 "``item_value_quoted``: the value of clicked item, URL-encoded. Special "
1186 "characters are escaped to make them valid in URLs and spaces are replaced by"
1187 " ``'+'`` (plus) signs."
1188 msgstr "``item_value_quoted``. El valor del elemento sobre el que se pulsa, codificado para URL. Los caracteres especiales se escapan para que sean válidos en un URL y los espacios se sustituyen por signos ``+`` (más)."
1189
1190 #: ../../../__w/calibre/calibre/manual/template_lang.rst:584
1191 msgid ""
1192 "``item_value_no_plus``: the value of clicked item, URL-encoded. Special "
1193 "characters are escaped to make them valid in URLs and spaces are replaced by"
1194 " the ``%20``, not plus."
1195 msgstr "``item_value_no_plus``. El valor del elemento sobre el que se pulsa, codificado para URL. Los caracteres especiales se escapan para que sean válidos en un URL y los espacios se sustituyen por ``%20``, no signos más."
1196
1197 #: ../../../__w/calibre/calibre/manual/template_lang.rst:586
1198 msgid ""
1199 "There are several ways to construct the URL. The following use Wikipedia as "
1200 "an example."
1201 msgstr "Hay varias maneras de generar el URL. A continuación se usa Wikipedia como un ejemplo."
1202
1203 #: ../../../__w/calibre/calibre/manual/template_lang.rst:588
1204 msgid "The simplest is a basic template::"
1205 msgstr "Lo más sencillo es una plantilla básica::"
1206
1207 #: ../../../__w/calibre/calibre/manual/template_lang.rst:592
1208 msgid ""
1209 "In some cases you might want to do more processing. There are four template "
1210 "functions you can use, depending on the complexity of the processing."
1211 msgstr "En algunos casos puede querer hacer algún procesado. Hay cuatro funciones de plantilla que puede usar, según la complejidad del procesado."
1212
1213 #: ../../../__w/calibre/calibre/manual/template_lang.rst:599
1214 msgid ""
1215 "For example, assume you have a custom column `Translators` "
1216 "(``#translators``) where the names are `Last name, First name`. You might "
1217 "need to convert the name to `First name Last name` when creating the URL. "
1218 "You can use the :ref:`ff_make_url` function to do this::"
1219 msgstr "Por ejemplo, supongamos que tiene una columna personalizada `Traductores` (``#traductores``) en la que los nombres son de la forma `Apellidos, Nombre``. Puede que tenga que convertir el nombre a `Nombre Apellidos` al crear el URL. Puede usar la función :ref:`ff_make_url` para hacerlo::"
1220
1221 #: ../../../__w/calibre/calibre/manual/template_lang.rst:603
1222 msgid ""
1223 "If we assume that the translator's name is `Boy-Żeleński, Tadeusz` then the "
1224 "above template produces the link::"
1225 msgstr "Si el nombre del traductor es `Boy-Żeleński, Tadeusz`, la plantilla anterior produce el enlace::"
1226
1227 #: ../../../__w/calibre/calibre/manual/template_lang.rst:607
1228 msgid ""
1229 "Note that the person's first name is now first, the space is now a plus, and"
1230 " that the non-English characters in the last name are URL-encoded."
1231 msgstr "Advierta que el nombre de pila aparece ahora primero, el espacio es un signo más y los caracteres acentuados del apellido están codificados para URL."
1232
1233 #: ../../../__w/calibre/calibre/manual/template_lang.rst:609
1234 msgid ""
1235 "The functions :ref:`ff_make_url_extended`, :ref:`ff_query_string`, and "
1236 ":ref:`ff_encode_for_url` might be useful depending upon any additional "
1237 "processing complexity."
1238 msgstr "Las funciones :ref:`ff_make_url_extended`, :ref:`ff_query_string` y :ref:`ff_encode_for_url` pueden ser útiles dependiendo de la complejidad adicional del procesado."
1239
1240 #: ../../../__w/calibre/calibre/manual/template_lang.rst:611
1241 msgid "**The calibre URL scheme**"
1242 msgstr "**El esquema de URL de calibre**"
1243
1244 #: ../../../__w/calibre/calibre/manual/template_lang.rst:613
1245 msgid ""
1246 "Calibre supports several different URLs to navigate your calibre libraries. "
1247 "This section shows how to use templates to construct some of the URLs. See "
1248 ":doc:`url_scheme` for details on the URLs available."
1249 msgstr "Calibre admite distintos tipos de URL para explorar las bibliotecas. Esta sección le muestra cómo usar plantillas para generar algunos de los URL. Vea :doc:`url_scheme` para más detalles sobre los URL disponibles."
1250
1251 #: ../../../__w/calibre/calibre/manual/template_lang.rst:616
1252 msgid "Switch to a specific library. The syntax of this URL is::"
1253 msgstr "Cambiar a una biblioteca específica. La sintaxis de este URL es::"
1254
1255 #: ../../../__w/calibre/calibre/manual/template_lang.rst:620
1256 msgid ""
1257 "``Library_Name`` must be replaced with the name of the calibre library you "
1258 "wish to open. The library name is shown in the title bar of the window. It "
1259 "is a simple name, not the file path to the library. You must spell it as "
1260 "shown in the title bar, including letter case. The character ``_`` "
1261 "(underscore) stands for the current library. If the name contains any spaces"
1262 " or special characters then it must be hex encoded using the "
1263 ":ref:`ff_to_hex` function, as in the following example::"
1264 msgstr "``Library_Name`` debe sustituirse por el nombre de la biblioteca de calibre que quiera abrir. El nombre de la biblioteca se muestra en la barra de título de la ventana. Es un nombre simple, no la ruta de la biblioteca. Debe escribirlo tal como se muestra en la barra de título, respetando mayúsculas y minúsculas. El carácter ``_`` (guión bajo) representa la biblioteca actual. Si el nombre contiene espacios o caracteres especiales, deberá codificarse con la función :ref:`ff_to_hex` como en el siguiente ejemplo::"
1265
1266 #: ../../../__w/calibre/calibre/manual/template_lang.rst:628
1267 msgid "The template generates the URL::"
1268 msgstr "La plantilla genera el URL::"
1269
1270 #: ../../../__w/calibre/calibre/manual/template_lang.rst:632
1271 msgid ""
1272 "You can replace the ``current_library_name()`` function with the actual name"
1273 " of the library, as in::"
1274 msgstr "Puede sustituir la función ``current_library_name()`` por el nombre real de la biblioteca, como en::"
1275
1276 #: ../../../__w/calibre/calibre/manual/template_lang.rst:636
1277 msgid ""
1278 "Links to show books. These links select a book in the calibre library. The "
1279 "syntax for this URL is::"
1280 msgstr "Enlaces para mostrar libros. Estos enlaces seleccionan un libro en la biblioteca de calibre. La sintaxis para este URL es::"
1281
1282 #: ../../../__w/calibre/calibre/manual/template_lang.rst:640
1283 msgid ""
1284 "The ``book id`` is the numeric calibre id for the book, available to "
1285 "templates as ``$id``. As above, the library name might need to be hex "
1286 "encoded. Here is an example::"
1287 msgstr "El ``book_id`` es el identificador numérico de calibre para el libro, disponible en las plantillas como ``$id``. Como anteriormente, el nombre de la biblioteca puede tener que ser codificado como hexadecimal. He aquí un ejemplo::"
1288
1289 #: ../../../__w/calibre/calibre/manual/template_lang.rst:645
1290 msgid "It produces the URL::"
1291 msgstr "Produce el URL::"
1292
1293 #: ../../../__w/calibre/calibre/manual/template_lang.rst:649
1294 msgid ""
1295 "Searching for books. These links search for books in the specified calibre "
1296 "library. The syntax for this URL is::"
1297 msgstr "Buscar libros: Estos enlaces buscan libros en la biblioteca de calibre especificada. La sintaxis para este URL es::"
1298
1299 #: ../../../__w/calibre/calibre/manual/template_lang.rst:654
1300 msgid ""
1301 "where `query` is any valid calibre search expression. You must hex encode "
1302 "any query containing spaces or special characters, which generally means all"
1303 " of them. For example, the calibre search expression for searching for a "
1304 "hierarchical tag beginning with 'AA' is ``tags:\"=.AA\"``. This template "
1305 "constructs a search URL for that expression::"
1306 msgstr "Donde ``query`` es cualquier expresión de búsqueda válida de calibre. Deberá codificar como hexadecimal cualquier consulta que contenga espacios o caracteres especiales, generalmente todas. Por ejemplo, la expresión de búsqueda de calibre para buscar una etiqueta jerárquica que empiece por 'AA' es ``tags:\"=.AA\"``. Esta plantilla genera un URL de búsqueda para dicha expresión::"
1307
1308 #: ../../../__w/calibre/calibre/manual/template_lang.rst:660
1309 msgid "The resulting URL is::"
1310 msgstr "El URL resultante es::"
1311
1312 #: ../../../__w/calibre/calibre/manual/template_lang.rst:664
1313 msgid ""
1314 "Here is an example of the same URL built using the "
1315 ":ref:``ff_make_url_extended`` function instead of :ref:`ff_strcat`::"
1316 msgstr "Aquí se muestra un ejemplo que genera el mismo URL usando la función ref:``ff_make_url_extended`` en lugar de :ref:`ff_strcat`::"
1317
1318 #: ../../../__w/calibre/calibre/manual/template_lang.rst:669
1319 msgid ""
1320 "Open a book details window on a book in some library. The syntax for this "
1321 "URL is::"
1322 msgstr "Abrir una ventana de detalles del libro para un libro en alguna biblioteca. La sintaxis para este URL es::"
1323
1324 #: ../../../__w/calibre/calibre/manual/template_lang.rst:673
1325 msgid "An example template is::"
1326 msgstr "Una plantilla de ejemplo es::"
1327
1328 #: ../../../__w/calibre/calibre/manual/template_lang.rst:677
1329 #: ../../../__w/calibre/calibre/manual/template_lang.rst:694
1330 msgid "which produces the URL::"
1331 msgstr "que produce el URL::"
1332
1333 #: ../../../__w/calibre/calibre/manual/template_lang.rst:681
1334 msgid ""
1335 "Open the notes associated with an author/series/etc. The syntax of the URL "
1336 "is::"
1337 msgstr "Abrir las notas asociadas con un autor, serie, etc. La sintaxis del URL es::"
1338
1339 #: ../../../__w/calibre/calibre/manual/template_lang.rst:686
1340 msgid ""
1341 "``Field_Name`` is the lookup name of the field. If the field is a custom "
1342 "column then replace the ``#`` character with an underscore (``_``). "
1343 "``Item_Id`` is the internal numeric ID of the value in the field. There "
1344 "isn't a template function that returns the ``Item_Id``, so templates will "
1345 "normally use the second form, ``Hex_Encoded_Item_Name``. Here is a sample "
1346 "template that opens the note for the person ``Boy-Żeleński, Tadeusz`` in the"
1347 " field ``#authtest``::"
1348 msgstr "``Field_Name`` es el nombre de consulta del campo. Si el campo es una columna personalizada, sustituya el carácter ``#`` por un guión bajo (``_``). ``Item_Id`` es el identificador numérico interno del valor del campo. No existe una función de plantilla que devuelva el ``Item_Id``, por lo que las plantillas normalmente usarán la segunda forma, ``Hex_Encoded_Item_Name``. Esta plantilla de muestra abre la nota para el nombre ``Boy-Żeleński, Tadeusz`` en el campo ``#authtest``::"
1349
1350 #: ../../../__w/calibre/calibre/manual/template_lang.rst:700
1351 msgid "Stored templates"
1352 msgstr "Plantillas guardadas"
1353
1354 #: ../../../__w/calibre/calibre/manual/template_lang.rst:702
1355 msgid ""
1356 "Both :ref:`General Program Mode <general_mode>` and :ref:`Python Template "
1357 "Mode <python_mode>` support saving templates and calling those templates "
1358 "from another template, much like calling stored functions. You save "
1359 "templates using :guilabel:`Preferences->Advanced->Template functions`. More "
1360 "information is provided in that dialog. You call a template the same way you"
1361 " call a function, passing positional arguments if desired. An argument can "
1362 "be any expression. Examples of calling a template, assuming the stored "
1363 "template is named ``foo``:"
1364 msgstr "El :ref:`modo de programación general <general_mode>` y el :ref:`modo de plantilla de Python <python_mode>` permiten guardar plantillas e invocarlas desde otra plantilla, casi como invocar funciones guardadas. Puede guardar plantillas en :guilabel:`Preferencias > Avanzado > Funciones de plantilla`. Hay más información en el diálogo correspondiente. Puede invocar una plantilla de la misma manera que una función, pasando argumentos por posición si lo desea. Un argumento puede ser una expresión. Ejemplos para invocar una plantilla, suponiendo que la plantilla guardada se llame ``foo``:"
1365
1366 #: ../../../__w/calibre/calibre/manual/template_lang.rst:704
1367 msgid "``foo()`` -- call the template passing no arguments."
1368 msgstr "``lala()`` -- invoca la plantilla sin pasar argumentos."
1369
1370 #: ../../../__w/calibre/calibre/manual/template_lang.rst:705
1371 msgid ""
1372 "``foo(a, b)`` call the template passing the values of the two variables "
1373 "``a`` and ``b``."
1374 msgstr "``lala(a, b)`` -- invoca la plantilla pasando los valores de las variables ``a`` y ``b``."
1375
1376 #: ../../../__w/calibre/calibre/manual/template_lang.rst:706
1377 msgid ""
1378 "``foo(if field('series') then field('series_index') else 0 fi)`` -- if the "
1379 "book has a ``series`` then pass the ``series_index``, otherwise pass the "
1380 "value ``0``."
1381 msgstr "``lala(if field('series') then field('series_index') else 0 fi)`` -- si el libro tiene ``series``, pasa el valor de ``series_index``, en caso contrario pasa el valor ``0``."
1382
1383 #: ../../../__w/calibre/calibre/manual/template_lang.rst:708
1384 msgid ""
1385 "In GPM you retrieve the arguments passed in the call to the stored template "
1386 "using the ``arguments`` function. It both declares and initializes local "
1387 "variables, effectively parameters. The variables are positional; they get "
1388 "the value of the parameter given in the call in the same position. If the "
1389 "corresponding parameter is not provided in the call then ``arguments`` "
1390 "assigns that variable the provided default value. If there is no default "
1391 "value then the variable is set to the empty string. For example, the "
1392 "following ``arguments`` function declares 2 variables, ``key``, "
1393 "``alternate``::"
1394 msgstr "En el MPG, puede obtener el valor de los argumentos pasados en la invocación de la plantilla guardada usando la función ``arguments``. Esta función declara e inicializa las variables locales, parámetros en la práctica. Las variables son posicionales: obtienen el valor del argumento usado en la misma posición en la invocación. Si el argumento correspondiente no aparece en la invocación, ``arguments`` asigna a esa variable el valor predeterminado suministrado. Si no hay valor predeterminado, será un texto vacío. Por ejemplo, la siguiente función ``arguments`` declara dos variables: ``key`` y ``alternate`::"
1395
1396 #: ../../../__w/calibre/calibre/manual/template_lang.rst:712
1397 msgid "Examples, again assuming the stored template is named ``foo``:"
1398 msgstr "Ejemplos, suponiendo de nuevo que la plantilla guardada se llame ``lala``:"
1399
1400 #: ../../../__w/calibre/calibre/manual/template_lang.rst:714
1401 msgid ""
1402 "``foo('#myseries')`` -- argument ``key`` is assigned the value "
1403 "``'myseries'`` and the argument ``alternate`` is assigned the default value "
1404 "``'series'``."
1405 msgstr "``lala('#miserie')`` -- a la variable ``key`` se le asigna el valor ``'#miserie'`` y a la variable ``alternate`` se le asigna el valor predeterminado ``'serie'``."
1406
1407 #: ../../../__w/calibre/calibre/manual/template_lang.rst:715
1408 msgid ""
1409 "``foo('series', '#genre')`` the variable ``key`` is assigned the value "
1410 "``'series'`` and the variable ``alternate`` is assigned the value "
1411 "``'#genre'``."
1412 msgstr "``lala('series', '#genero')`` a la variable ``key`` se le asigna el valor ``'series'`` y a la variable ``alternate`` se le asigna el valor ``'#genero'``."
1413
1414 #: ../../../__w/calibre/calibre/manual/template_lang.rst:716
1415 msgid ""
1416 "``foo()`` -- the variable ``key`` is assigned the empty string and the "
1417 "variable ``alternate`` is assigned the value ``'series'``."
1418 msgstr "``lala()`` -- a la variable ``key`` se le asigna un texto vacío y a la variable ``alternate`` se le asigna el valor predeterminado ``'series'``."
1419
1420 #: ../../../__w/calibre/calibre/manual/template_lang.rst:718
1421 msgid ""
1422 "In PTM the arguments are passed in the ``arguments`` parameter, which is a "
1423 "list of strings. There isn't any way to specify default values. You must "
1424 "check the length of the ``arguments`` list to be sure that the number of "
1425 "arguments is what you expect."
1426 msgstr "En el MPPy los argumentos se pasan en el parámetro ``arguments``, que es una lista de textos. No existe la posibilidad de especificar valores predeterminados. Debe comprobar la longitud de la lista ``arguments`` para asegurarse de que el número de argumentos es el esperado."
1427
1428 #: ../../../__w/calibre/calibre/manual/template_lang.rst:720
1429 msgid ""
1430 "An easy way to test stored templates is using the ``Template tester`` "
1431 "dialog. For ease of access give it a keyboard shortcut in "
1432 ":guilabel:`Preferences->Advanced->Keyboard shortcuts->Template tester`. "
1433 "Giving the ``Stored templates`` dialog a shortcut will help switching more "
1434 "rapidly between the tester and editing the stored template's source code."
1435 msgstr "Una buena manera de probar las plantillas guardadas es usar el diálogo :guilabel:`Prueba de plantillas`. Para facilitar su acceso, asígnele un atajo de teclado en :guilabel:`Preferencias > Avanzado > Atajos > Prueba de plantillas`. Si le asigna un atajo de teclado podrá alternar rápidamente entre la prueba de plantillas y la modificación del código de programa de la plantilla."
1436
1437 #: ../../../__w/calibre/calibre/manual/template_lang.rst:723
1438 msgid "Providing additional information to templates"
1439 msgstr "Pasar información adicional a las plantillas"
1440
1441 #: ../../../__w/calibre/calibre/manual/template_lang.rst:725
1442 msgid ""
1443 "A developer can choose to pass additional information to the template "
1444 "processor, such as application-specific book metadata or information about "
1445 "what the processor is being asked to do. A template can access this "
1446 "information and use it during the evaluation."
1447 msgstr "Un desarrollador puede decidir pasar información adicional al procesador de plantillas, como metadatos del libro específicos para una aplicación o información sobre lo que se quiere que haga el procesador. Una plantilla puede acceder a esta información y usarla durante la evaluación."
1448
1449 #: ../../../__w/calibre/calibre/manual/template_lang.rst:727
1450 msgid "**Developer: how to pass additional information**"
1451 msgstr "**Desarrollador: cómo pasar información adicional**"
1452
1453 #: ../../../__w/calibre/calibre/manual/template_lang.rst:729
1454 msgid ""
1455 "The additional information is a Python dictionary containing pairs "
1456 "``variable_name: variable_value`` where the values must be strings. The "
1457 "template can access the dictionary, creating template local variables named "
1458 "``variable_name`` containing the value ``variable_value``. The user cannot "
1459 "change the name so it is best to use names that won't collide with other "
1460 "template local variables, for example by prefixing the name with an "
1461 "underscore."
1462 msgstr "La información adicional es un diccionario Python que contiene pares ``nombre_de_variable: valor de variable`` donde los valores deberían ser textos. La plantilla puede acceder al diccionario, creando variables locales con nombre ``nombre_de_variable`` y valor ``valor de variable``. El usuario no puede cambiar el nombre, así que lo mejor es usar nombres que no entren en conflicto con otras variables locales, por ejemplo añadiendo un guión bajo al principio del nombre."
1463
1464 #: ../../../__w/calibre/calibre/manual/template_lang.rst:731
1465 msgid ""
1466 "This dictionary is passed to the template processor (the ``formatter``) "
1467 "using the named parameter ``global_vars=your_dict``. The full method "
1468 "signature is::"
1469 msgstr "El diccionario se pasa al procesador de plantillas (el ``formatter``) usando el argumento ``global_vars=diccionario``. La forma completa del método es::"
1470
1471 #: ../../../__w/calibre/calibre/manual/template_lang.rst:739
1472 msgid "**Template writer: how to access the additional information**"
1473 msgstr "**Creador de plantillas: cómo acceder a la información adicional**"
1474
1475 #: ../../../__w/calibre/calibre/manual/template_lang.rst:741
1476 msgid ""
1477 "You access the additional information (the ``globals`` dictionary) in a "
1478 "template using the template function::"
1479 msgstr "Puede acceder a la información adicional (el diccionario ``globals``) en una plantilla usando la función de plantilla::"
1480
1481 #: ../../../__w/calibre/calibre/manual/template_lang.rst:745
1482 msgid ""
1483 "where ``id`` is any legal variable name. This function checks whether the "
1484 "additional information provided by the developer contains the name. If it "
1485 "does then the function assigns the provided value to a template local "
1486 "variable with that name. If the name is not in the additional information "
1487 "and if an ``expression`` is provided, the ``expression`` is evaluated and "
1488 "the result is assigned to the local variable. If neither a value nor an "
1489 "expression is provided, the function assigns the empty string (``''``) to "
1490 "the local variable."
1491 msgstr "donde ``id`` es cualquier nombre de variable permitido. Esta función comprueba si la información adicional prevista por el desarrollador contiene el nombre. Si es así, la función asigna el valor a una variable local con ese nombre. Si el nombre no está presente en la información adicional y se suministra una ``expression``, se evalua dicha ``expression`` y el resultado se asigna a la variable local. Si no existe ni un valor ni una expresión, la función asigna el texto vacío (``''``) a la variable local."
1492
1493 #: ../../../__w/calibre/calibre/manual/template_lang.rst:747
1494 msgid ""
1495 "A template can set a value in the ``globals`` dictionary using the template "
1496 "function::"
1497 msgstr "Una plantilla puede establecer un valor en el diccionario ``globals`` usando la función de plantilla::"
1498
1499 #: ../../../__w/calibre/calibre/manual/template_lang.rst:751
1500 msgid ""
1501 "This function sets the ``globals`` dictionary key:value pair ``id:value`` "
1502 "where ``value`` is the value of the template local variable ``id``. If that "
1503 "local variable doesn't exist then ``value`` is set to the result of "
1504 "evaluating ``expression``."
1505 msgstr "Esta función asigna la pareja ``id:valor`` del diccionario ``globals``, donde ``valor`` es el valor de la variable local de la plantilla ``id``. Si la variable no existe, ``valor`` se toma como el resultado de evaluar ``expresión``."
1506
1507 #: ../../../__w/calibre/calibre/manual/template_lang.rst:754
1508 msgid "Notes on the difference between modes"
1509 msgstr "Notas sobre las diferencias entre modos"
1510
1511 #: ../../../__w/calibre/calibre/manual/template_lang.rst:756
1512 msgid ""
1513 "The three program modes, :ref:`Single Function Mode <single_mode>` (SFM), "
1514 ":ref:`Template Program Mode <template_mode>` (`TPM`), and :ref:`General "
1515 "Program Mode <general_mode>` (`GPM`), work differently. SFM is intended to "
1516 "be 'simple' so it hides a lot of programming language bits."
1517 msgstr "Los tres modos de programación, el :ref:`modo de función única <single_mode>` (`MFU`), el :ref:`modo de programación de plantillas <template_mode>` (`MPP`) y el :ref:`modo de programación general <general_mode>` (`MPG`) funcionan de distinta manera. MFU pretende ser «sencillo» y oculta muchos elementos del lenguaje de programación."
1518
1519 #: ../../../__w/calibre/calibre/manual/template_lang.rst:758
1520 msgid "Differences:"
1521 msgstr "Diferencias:"
1522
1523 #: ../../../__w/calibre/calibre/manual/template_lang.rst:760
1524 msgid ""
1525 "In SFM the value of the column is always passed as an 'invisible' first "
1526 "argument to a function included in the template."
1527 msgstr "En el MFU el valor de la columna se pasa siempre como un primer argumento «invisible» a la función que se incluye en la plantilla."
1528
1529 #: ../../../__w/calibre/calibre/manual/template_lang.rst:761
1530 msgid ""
1531 "SFM doesn't support the difference between variables and strings; all values"
1532 " are strings."
1533 msgstr "El MFU no hace distinciones entre variables y textos; todos los valores son textos."
1534
1535 #: ../../../__w/calibre/calibre/manual/template_lang.rst:762
1536 msgid ""
1537 "The following SFM template returns either the series name or the string \"no"
1538 " series\"::"
1539 msgstr "La siguiente plantilla MFU devuelve el nombre de la serie o el texto ``'no series'``::"
1540
1541 #: ../../../__w/calibre/calibre/manual/template_lang.rst:766
1542 msgid "The equivalent template in `TPM` is ::"
1543 msgstr "La plantilla equivalente en `MPP` es::"
1544
1545 #: ../../../__w/calibre/calibre/manual/template_lang.rst:770
1546 msgid "The equivalent template in `GPM` is::"
1547 msgstr "La plantilla equivalente en `MPG` es::"
1548
1549 #: ../../../__w/calibre/calibre/manual/template_lang.rst:774
1550 msgid ""
1551 "The first argument to ``ifempty`` is the value of the field ``series``. The "
1552 "second argument is the string ``no series``. In SFM the first argument, the "
1553 "value of the field, is automatically passed (the invisible argument)."
1554 msgstr "El primer argumento de ``ifempty`` es el valor del campo ``series``. El segundo argumento es el texto ``no series``. En MFU el primer argumento, el valor, se pasa automáticamente (es el argumento invisible)."
1555
1556 #: ../../../__w/calibre/calibre/manual/template_lang.rst:775
1557 msgid ""
1558 "Several template functions, for example ``booksize()`` and "
1559 "``current_library_name()``, take no arguments. Because of the 'invisible "
1560 "argument' you cannot use these functions in SFM."
1561 msgstr "Varias funciones de plantilla, como ``booksize()`` y ``current_library_name()``, no admiten argumentos. Debido al «argumento invisible», no puede usar estas funciones en MFU."
1562
1563 #: ../../../__w/calibre/calibre/manual/template_lang.rst:776
1564 msgid ""
1565 "Nested functions, where a function calls another function to compute an "
1566 "argument, cannot be used in SFM. For example this template, intended to "
1567 "return the first 5 characters of the series value uppercased, won't work in "
1568 "SFM::"
1569 msgstr "Las funciones anidadas, en las que una función invoca a otra función para evaluar un argumento, no pueden usarse en MFU. Por ejemplo, esta plantilla, que pretende devolver los 5 primeros caracteres del valor de la serie convertidos en mayúsculas, no funcionará en MFU::"
1570
1571 #: ../../../__w/calibre/calibre/manual/template_lang.rst:780
1572 msgid ""
1573 "`TPM` and `GPM` support nested functions. The above template in `TPM` would "
1574 "be::"
1575 msgstr "`MPP` y `MPG` permiten usar funciones anidadas. La plantilla anterior en `MPP` sería::"
1576
1577 #: ../../../__w/calibre/calibre/manual/template_lang.rst:784
1578 msgid "In `GPM` it would be::"
1579 msgstr "En `MPG` sería::"
1580
1581 #: ../../../__w/calibre/calibre/manual/template_lang.rst:788
1582 msgid ""
1583 "As noted in the above :ref:`Template Program Mode <template_mode>` section, "
1584 "using ``{`` and ``}`` characters in `TPM` string literals can lead to errors"
1585 " or unexpected results because they confuse the template processor. It tries"
1586 " to treat them as template boundaries, not characters. In some but not all "
1587 "cases you can replace a ``{`` with ``[[`` and a ``}`` with `]]`. Generally, "
1588 "if your program contains ``{`` and ``}`` characters then you should use "
1589 "`General Program Mode`."
1590 msgstr "Como se mencionó ateriormente en la sección :ref:`modo de programación de plantillas`, en el `MPP`, usar los caracteres ``{`` y ``}`` en textos literales puede conducir a errores o resultados inesperados porque confunden al procesador de plantillas. Éste intenta interpretarlos como límites de plantilla y no como caracteres. En algunos casos, pero no todos, puede sustituir un ``{`` por ``[[`` y un ``}`` por ``]]``. En general, si un program contiene caracteres ``{`` y ``}``, debería usar el `modo de programación general`."
1591
1592 #: ../../../__w/calibre/calibre/manual/template_lang.rst:792
1593 msgid "User-defined Python template functions"
1594 msgstr "Funciones de plantilla Python definidas por el usuario"
1595
1596 #: ../../../__w/calibre/calibre/manual/template_lang.rst:794
1597 msgid ""
1598 "You can add your own Python functions to the template processor. Such "
1599 "functions can be used in any of the three template programming modes. The "
1600 "functions are added by going to :guilabel:`Preferences -> Advanced -> "
1601 "Template functions`. Instructions are shown in that dialog. Note that you "
1602 "can use `Python Templates` for a similar purpose. As calling user-defined "
1603 "functions is faster than calling a Python template, user-defined functions "
1604 "might be more efficient depending on the complexity of what the function or "
1605 "template does."
1606 msgstr "Puede añadir funciones propias al procesador de plantillas. Dichas funciones pueden usarse en cualquiera de los tres modos de programación de plantillas. Las funciones se añaden en :guilabel:`Preferencias > Avanzado > Funciones de plantilla`. Las instrucciones se muestran en el correspondiente cuadro de diálogo. Tenga en cuenta que puede usar `plantillas de Python` para lo mismo. Dado que es más rápido ejecutar funciones definidas por el usuario que una plantilla de Python, las funciones definidas por el usuario pueden ser más eficientes, dependiendo de la complejidad de lo que haga la función o plantilla."
1607
1608 #: ../../../__w/calibre/calibre/manual/template_lang.rst:797
1609 msgid "Special notes for using templates in different contexts"
1610 msgstr "Notas especiales para el uso de plantillas en diferentes contextos"
1611
1612 #: ../../../__w/calibre/calibre/manual/template_lang.rst:799
1613 msgid ""
1614 "In the GUI (:guilabel:`Columns made from other columns` and "
1615 ":guilabel:`Template searches`):"
1616 msgstr "En la interfaz gráfica (:guilabel:`Columnas generadas a partir de otras columnas` y :guilabel:`Búsquedas por plantillas`):"
1617
1618 #: ../../../__w/calibre/calibre/manual/template_lang.rst:801
1619 msgid "GPM templates work as before."
1620 msgstr "Las plantillas MPG funcionan como antes."
1621
1622 #: ../../../__w/calibre/calibre/manual/template_lang.rst:802
1623 msgid "Python templates have full access to the calibre database."
1624 msgstr "Las plantillas de Python tienen acceso completo a la base de datos de calibre."
1625
1626 #: ../../../__w/calibre/calibre/manual/template_lang.rst:804
1627 msgid "In icon rules:"
1628 msgstr "En las reglas de icono:"
1629
1630 #: ../../../__w/calibre/calibre/manual/template_lang.rst:806
1631 msgid ""
1632 "icon rule templates have no book data so field-based functions such as "
1633 ":ref:`ff_format_date_field`, :ref:`ff_list_count_field`, and "
1634 ":ref:`ff_check_yes_no` won't work."
1635 msgstr "Las plantillas de reglas de icono no tienen datos de libros, por lo que las funciones basadas en campos como :ref:`ff_format_date_field`, :ref:`ff_list_count_field` y :ref:`ff_check_yes_no` no funcionarán."
1636
1637 #: ../../../__w/calibre/calibre/manual/template_lang.rst:808
1638 msgid "In the Content server:"
1639 msgstr "En el servidor de contenidos:"
1640
1641 #: ../../../__w/calibre/calibre/manual/template_lang.rst:810
1642 msgid ""
1643 "Templates have access to the new API but not the old API (LibraryDatabase)."
1644 msgstr "Las plantillas tienen acceso a la nueva API pero no a la API antigua (LibraryDatabase)."
1645
1646 #: ../../../__w/calibre/calibre/manual/template_lang.rst:811
1647 msgid ""
1648 "Because of the above, the following formatter functions are not guaranteed "
1649 "to work in GPM templates (composite columns, icon rules, etc) and should be "
1650 "avoided if you use the content server:"
1651 msgstr "Debido a lo anterior, no se garantiza que las siguientes funciones de formato funcionen en plantillas MPG (columnas compuestas, reglas de icono, etc.) y se deben evitar si utiliza el servidor de contenidos:"
1652
1653 #: ../../../__w/calibre/calibre/manual/template_lang.rst:813
1654 msgid ":ref:`ff_connected_device_name`"
1655 msgstr " :ref:`ff_connected_device_name`"
1656
1657 #: ../../../__w/calibre/calibre/manual/template_lang.rst:814
1658 msgid ":ref:`ff_connected_device_uuid`"
1659 msgstr ":ref:`ff_connected_device_uuid`"
1660
1661 #: ../../../__w/calibre/calibre/manual/template_lang.rst:815
1662 msgid ":ref:`ff_current_virtual_library_name`"
1663 msgstr ":ref:`ff_current_virtual_library_name`"
1664
1665 #: ../../../__w/calibre/calibre/manual/template_lang.rst:816
1666 msgid ":ref:`ff_is_marked`"
1667 msgstr ":ref:`ff_is_marked`"
1668
1669 #: ../../../__w/calibre/calibre/manual/template_lang.rst:817
1670 msgid ":ref:`ff_virtual_libraries`"
1671 msgstr ":ref:`ff_virtual_libraries`"
1672
1673 #: ../../../__w/calibre/calibre/manual/template_lang.rst:820
1674 msgid "Special notes for save/send templates"
1675 msgstr "Notas especiales para plantillas de guardado o envío"
1676
1677 #: ../../../__w/calibre/calibre/manual/template_lang.rst:822
1678 msgid ""
1679 "Special processing is applied when a template is used in a :guilabel:`Save "
1680 "to disk` or :guilabel:`Send to device` template. The values of the fields "
1681 "are cleaned, replacing characters that are special to file systems with "
1682 "underscores, including slashes. This means that field text cannot be used to"
1683 " create folders. However, slashes are not changed in prefix or suffix "
1684 "strings, so slashes in these strings will cause folders to be created. "
1685 "Because of this, you can create variable-depth folder structure."
1686 msgstr "Cuando una plantilla se usa como plantilla para :guilabel:`Guardar en el disco` o :guilabel:`Enviar al dispositivo`, ocurre un procesado especial. Los valores de los campos se sanean, eliminando caracteres especiales para los sistemas operativos por guiones bajos, incluyendo barras. Esto significa que el texto de los campos no puede usarse para crear carpetas. Sin embargo, las barras no se modifican en los textos de prefijo o sufijo, por lo que las barras en estos textos harán que se creen carpetas. Gracias a esto, es posible crear estructuras de carpetas de profundidad variable."
1687
1688 #: ../../../__w/calibre/calibre/manual/template_lang.rst:824
1689 msgid ""
1690 "For example, assume we want the folder structure `series/series_index - "
1691 "title`, with the caveat that if series does not exist, then the title should"
1692 " be in the top folder. The template to do this is::"
1693 msgstr "Por ejemplo, supongamos que quiere una estructura de carpetas `serie/índice de serie - título`, con la salvedad de que si la serie no existe el título debe estar en la carpeta superior. La plantilla para conseguir esto es::"
1694
1695 #: ../../../__w/calibre/calibre/manual/template_lang.rst:828
1696 msgid "The slash and the hyphen appear only if series is not empty."
1697 msgstr "La barra y el guión sólo aparecen si la serie no está vacía."
1698
1699 #: ../../../__w/calibre/calibre/manual/template_lang.rst:830
1700 msgid ""
1701 "The lookup function lets us do even fancier processing. For example, assume "
1702 "that if a book has a series, then we want the folder structure "
1703 "`series/series index - title.fmt`. If the book does not have a series then "
1704 "we want the folder structure `genre/author_sort/title.fmt`. If the book has "
1705 "no genre then we want to use 'Unknown'. We want two completely different "
1706 "paths, depending on the value of series."
1707 msgstr "La función ``lookup()`` nos permite realizar un procesado aún más complejo. Por ejemplo, supongamos que si un libro tiene una serie, entonces queremos una estructura de carpetas `serie/índice de serie - título`. Si el libro no tiene una serie, entonces queremos la estructura `género/orden de autor/título`. Si el libro no tiene género, queremos que use «Desconocido». Queremos seguir dos caminos completamente distintos según el valor de la serie."
1708
1709 #: ../../../__w/calibre/calibre/manual/template_lang.rst:832
1710 msgid "To accomplish this, we:"
1711 msgstr "Para lograr esto:"
1712
1713 #: ../../../__w/calibre/calibre/manual/template_lang.rst:834
1714 msgid ""
1715 "Create a composite field (give it lookup name #aa) containing "
1716 "``{series}/{series_index} - {title}``. If the series is not empty, then this"
1717 " template will produce `series/series_index - title`."
1718 msgstr "Creamos un campo compuesto (démosle el nombre de consulta #aa) que contiene ``{series}/{series_index} - {title}``. Si la serie no está vacía, esta plantilla produce `serie/número_de_serie - título`."
1719
1720 #: ../../../__w/calibre/calibre/manual/template_lang.rst:835
1721 msgid ""
1722 "Create a composite field (give it lookup name #bb) containing "
1723 "``{#genre:ifempty(Unknown)}/{author_sort}/{title}``. This template produces "
1724 "`genre/author_sort/title`, where an empty genre is replaced with `Unknown`."
1725 msgstr "Creamos un campo compuesto (démosle el nombre de consulta #bb) que contenga ``{#genre:ifempty(Desconocido)}/{author_sort}/{title}``. Esta plantilla produce `género/orden de autor/título`, donde un género vacío se sustituye por `Desconocido`."
1726
1727 #: ../../../__w/calibre/calibre/manual/template_lang.rst:836
1728 msgid ""
1729 "Set the save template to ``{series:lookup(.,#aa,#bb)}``. This template "
1730 "chooses composite field ``#aa`` if series is not empty and composite field "
1731 "``#bb`` if series is empty. We therefore have two completely different save "
1732 "paths, depending on whether or not `series` is empty."
1733 msgstr "Establecemos la plantilla de guardado en ``{series:lookup(.,#aa,#bb)}``. Esta plantilla elige el campo compuesto ``#aa`` si la serie no está vacía y el campo compuesto ``#bb`` si la serie está vacía. Obtenemos por lo tanto dos rutas de guardado completamente diferentes según el campo `series` esté o no vacío."
1734
1735 #: ../../../__w/calibre/calibre/manual/template_lang.rst:839
1736 msgid "Tips"
1737 msgstr "Consejos"
1738
1739 #: ../../../__w/calibre/calibre/manual/template_lang.rst:841
1740 msgid ""
1741 "Use the Template Tester to test templates. Add the tester to the context "
1742 "menu for books in the library and/or give it a keyboard shortcut."
1743 msgstr "Use la prueba de plantillas para probar plantillas. Añada esta función al menú contextual para libros en lea biblioteca o asígnele un atajo de teclado."
1744
1745 #: ../../../__w/calibre/calibre/manual/template_lang.rst:842
1746 msgid ""
1747 "Templates can use other templates by referencing composite columns built "
1748 "with the desired template. Alternatively, you can use Stored Templates."
1749 msgstr "Las plantillas pueden usar otras plantillas haciendo referencia a columnas compuestas construidas con la plantilla deseada. También puede usar plantillas guardadas."
1750
1751 #: ../../../__w/calibre/calibre/manual/template_lang.rst:843
1752 msgid ""
1753 "In a plugboard, you can set a field to empty (or whatever is equivalent to "
1754 "empty) by using the special template ``{}``. This template will always "
1755 "evaluate to an empty string."
1756 msgstr "En un panel de conexiones, puede establecer un campo como vacío (o lo que sea equivalente a vacío) utilizando la plantilla especial ``{}``. Esta plantilla siempre producirá un texto vacío."
1757
1758 #: ../../../__w/calibre/calibre/manual/template_lang.rst:844
1759 msgid ""
1760 "The technique described above to show numbers even if they have a zero value"
1761 " works with the standard field series_index."
1762 msgstr "La técnica descrita anteriormente para mostrar los números incluso si son cero funciona con el campo estándar ``series_index``."
1763
1764 #: ../../../__w/calibre/calibre/manual/template_lang.rst:849
1765 msgid "Template function reference"
1766 msgstr "Referencia de las funciones de plantilla"