| 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 |
# Jellby <[email protected]>, 2014-2015,2017,2020,2024 |
| 8 |
# Walter Paterno <[email protected]>, 2024,2026 |
| 9 |
msgid "" |
| 10 |
msgstr "" |
| 11 |
"Project-Id-Version: calibre\n" |
| 12 |
"Report-Msgid-Bugs-To: \n" |
| 13 |
"POT-Creation-Date: 2026-03-12 02:31+0000\n" |
| 14 |
"PO-Revision-Date: 2014-06-17 08:35+0000\n" |
| 15 |
"Last-Translator: Walter Paterno <[email protected]>, 2024,2026\n" |
| 16 |
"Language-Team: Spanish (http://app.transifex.com/calibre/calibre/language/es/)\n" |
| 17 |
"MIME-Version: 1.0\n" |
| 18 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 19 |
"Content-Transfer-Encoding: 8bit\n" |
| 20 |
"Language: es\n" |
| 21 |
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" |
| 22 |
|
| 23 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:4 |
| 24 |
msgid "XPath tutorial" |
| 25 |
msgstr "Cursillo de XPath" |
| 26 |
|
| 27 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:6 |
| 28 |
msgid "" |
| 29 |
"In this tutorial, you will be given a gentle introduction to `XPath " |
| 30 |
"<https://en.wikipedia.org/wiki/XPath>`_, a query language that can be used " |
| 31 |
"to select arbitrary parts of `HTML <https://en.wikipedia.org/wiki/HTML>`_ " |
| 32 |
"documents in calibre. XPath is a widely used standard, and googling it will " |
| 33 |
"yield a ton of information. This tutorial, however, focuses on using XPath " |
| 34 |
"for e-book related tasks like finding chapter headings in an unstructured " |
| 35 |
"HTML document." |
| 36 |
msgstr "En este cursillo, se presentará una breve introducción a `XPath <https://es.wikipedia.org/wiki/XPath>`_, un lenguaje de consulta que se puede utilizar para seleccionar partes arbitrarias de documentos `HTML <https://es.wikipedia.org/wiki/HTML>`_ en calibre. XPath es un estándar ampliamente utilizado, y una búsqueda a través de Google proporcionará gran cantidad de información. Este cursillo, sin embargo, se centra en el uso de XPath para tareas relacionadas con libros electrónicos, como la búsqueda de títulos de capítulo en un documento HTML sin estructura." |
| 37 |
|
| 38 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:16 |
| 39 |
msgid "Contents" |
| 40 |
msgstr "Índice" |
| 41 |
|
| 42 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:19 |
| 43 |
msgid "Selecting by tag name" |
| 44 |
msgstr "Seleccionar por nombre de etiqueta" |
| 45 |
|
| 46 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:21 |
| 47 |
msgid "" |
| 48 |
"The simplest form of selection is to select tags by name. For example, " |
| 49 |
"suppose you want to select all the ``<h2>`` tags in a document. The XPath " |
| 50 |
"query for this is simply::" |
| 51 |
msgstr "La forma más simple de selección es seleccionar las etiquetas por su nombre. Por ejemplo, suponga que desea seleccionar todas las etiquetas ``<h2>`` en un documento. La consulta XPath para esto es simplemente::" |
| 52 |
|
| 53 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:27 |
| 54 |
msgid "" |
| 55 |
"The prefix `//` means *search at any level of the document*. Now suppose you" |
| 56 |
" want to search for ``<span>`` tags that are inside ``<a>`` tags. That can " |
| 57 |
"be achieved with::" |
| 58 |
msgstr "El prefijo `//` significa *buscar en cualquier nivel del documento*. Supongamos que desea encontarar las etiquetas ``<span>`` que están dentro de etiquetas ``<a>``. Esto se puede lograr con::" |
| 59 |
|
| 60 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:33 |
| 61 |
msgid "" |
| 62 |
"If you want to search for tags at a particular level in the document, change" |
| 63 |
" the prefix::" |
| 64 |
msgstr "Si quiere buscar etiquetas en un nivel particular del documento, cambie el prefijo::" |
| 65 |
|
| 66 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:39 |
| 67 |
msgid "" |
| 68 |
"This will match only ``<p>A very short e-book to demonstrate the use of " |
| 69 |
"XPath.</p>`` in the :ref:`sample_ebook` but not any of the other ``<p>`` " |
| 70 |
"tags. The ``h:`` prefix in the above examples is needed to match XHTML tags." |
| 71 |
" This is because internally, calibre represents all content as XHTML. In " |
| 72 |
"XHTML tags have a *namespace*, and ``h:`` is the namespace prefix for HTML " |
| 73 |
"tags." |
| 74 |
msgstr "Esto coincidirá sólo con ``<p>A very short ebook to demonstrate the use of XPath.</p>`` en :ref:`sample_ebook`, pero no con ninguna de las otras etiquetas ``<p>``. El prefijo ``h:`` en los ejemplos anteriores se necesita para encontrar las etiquetas XHTML. Esto se debe a que internamente calibre representa todo el contenido como XHTML. En XHTML las etiquetas tienen un *espacio de nombres*, y ``h:`` es el prefijo de espacio de nombrs para las etiquetas HTML." |
| 75 |
|
| 76 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:45 |
| 77 |
msgid "" |
| 78 |
"Now suppose you want to select both ``<h1>`` and ``<h2>`` tags. To do that, " |
| 79 |
"we need an XPath construct called *predicate*. A :dfn:`predicate` is simply " |
| 80 |
"a test that is used to select tags. Tests can be arbitrarily powerful and as" |
| 81 |
" this tutorial progresses, you will see more powerful examples. A predicate " |
| 82 |
"is created by enclosing the test expression in square brackets::" |
| 83 |
msgstr "Ahora supongamos que desea seleccionar las etiquetas ``<h1>`` y ``<h2>``. Para ello, necesitamos una construcción XPath llamada *predicate*. Un :dfn:`predicate` es simplemente una prueba que se utiliza para seleccionar etiquetas. Las pruebas pueden ser tan potentes como se desee y, a medida que avance este tutorial, verá ejemplos más potentes. Un predicado se crea encerrando la expresión de prueba entre corchetes::" |
| 84 |
|
| 85 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:53 |
| 86 |
msgid "" |
| 87 |
"There are several new features in this XPath expression. The first is the " |
| 88 |
"use of the wildcard ``*``. It means *match any tag*. Now look at the test " |
| 89 |
"expression ``name()='h1' or name()='h2'``. :term:`name()` is an example of a" |
| 90 |
" *built-in function*. It simply evaluates to the name of the tag. So by " |
| 91 |
"using it, we can select tags whose names are either `h1` or `h2`. Note that " |
| 92 |
"the :term:`name()` function ignores namespaces so that there is no need for " |
| 93 |
"the ``h:`` prefix. XPath has several useful built-in functions. A few more " |
| 94 |
"will be introduced in this tutorial." |
| 95 |
msgstr "Hay varias características nuevas en esta expresión XPath. La primera es el uso del comodín ``*``. Significa *cualquier etiqueta*. Ahora observe la expresión de comprobación ``name()='h1' or name()='h2'``. :term:`name()` es un ejemplo de *función predefinida*. Simplemente evalúa el nombre de la etiqueta. Por lo tanto, mediante su uso, podemos seleccionar etiquetas cuyo nombre sea `h1` o `h2`. Tenga en cuenta que la función :term:`name()` ignora los espacios de nombres de modo que no hay necesidad del prefijo ``h:``. XPath tiene varias funciones predefinidas. Se presentarán algunas más en este cursillo." |
| 96 |
|
| 97 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:62 |
| 98 |
msgid "Selecting by attributes" |
| 99 |
msgstr "Seleccionar por atributos" |
| 100 |
|
| 101 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:64 |
| 102 |
msgid "" |
| 103 |
"To select tags based on their attributes, the use of predicates is " |
| 104 |
"required::" |
| 105 |
msgstr "Para seleccionar etiquetas según sus atributos, es necesario usar predicados::" |
| 106 |
|
| 107 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:70 |
| 108 |
msgid "" |
| 109 |
"Here, the ``@`` operator refers to the attributes of the tag. You can use " |
| 110 |
"some of the `XPath built-in functions`_ to perform more sophisticated " |
| 111 |
"matching on attribute values." |
| 112 |
msgstr "Aquí, el operador ``@`` se refiere a los atributos de la etiqueta. Puede utilizar algunas de las `XPath built-in functions`_ para realizar búsquedas más sofisticadas en los valores de los atributos." |
| 113 |
|
| 114 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:76 |
| 115 |
msgid "Selecting by tag content" |
| 116 |
msgstr "Seleccionar por contenido de etiqueta" |
| 117 |
|
| 118 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:78 |
| 119 |
msgid "" |
| 120 |
"Using XPath, you can even select tags based on the text they contain. The " |
| 121 |
"best way to do this is to use the power of *regular expressions* via the " |
| 122 |
"built-in function :term:`re:test()`::" |
| 123 |
msgstr "Utilizando XPath, puede incluso seleccionar etiquetas basadas en el texto que contienen. La mejor manera para para hacer esto es usar el poder de las *expresiones regulares* a través la función predefinida :term:`re:test()`::" |
| 124 |
|
| 125 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:84 |
| 126 |
msgid "" |
| 127 |
"Here the ``.`` operator refers to the contents of the tag, just as the ``@``" |
| 128 |
" operator referred to its attributes." |
| 129 |
msgstr "Aquí el operador ``.`` se refiere a los contenidos de la etiqueta, igual que el operador ``@`` se refiere a sus atributos." |
| 130 |
|
| 131 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:90 |
| 132 |
msgid "Sample e-book" |
| 133 |
msgstr "Libro de muestra" |
| 134 |
|
| 135 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:96 |
| 136 |
msgid "XPath built-in functions" |
| 137 |
msgstr "Funciones XPath predefinidas" |
| 138 |
|
| 139 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:99 |
| 140 |
msgid "name()" |
| 141 |
msgstr "name()" |
| 142 |
|
| 143 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:101 |
| 144 |
msgid "The name of the current tag." |
| 145 |
msgstr "El nombre de la etiqueta actual." |
| 146 |
|
| 147 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:102 |
| 148 |
msgid "contains()" |
| 149 |
msgstr "contains()" |
| 150 |
|
| 151 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:104 |
| 152 |
msgid "``contains(s1, s2)`` returns `true` if s1 contains s2." |
| 153 |
msgstr "``contains(s1, s2)`` devuelve `true` si s1 contiene s2." |
| 154 |
|
| 155 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:105 |
| 156 |
msgid "re:test()" |
| 157 |
msgstr "re:test()" |
| 158 |
|
| 159 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:107 |
| 160 |
msgid "" |
| 161 |
"``re:test(src, pattern, flags)`` returns `true` if the string `src` matches " |
| 162 |
"the regular expression `pattern`. A particularly useful flag is ``i``, it " |
| 163 |
"makes matching case insensitive. A good primer on the syntax for regular " |
| 164 |
"expressions can be found at `regexp syntax " |
| 165 |
"<https://docs.python.org/library/re.html>`_" |
| 166 |
msgstr "``re:test(fuente, patrón, opciones)`` devuelve `true` si el texto `fuente` coincide con la expresión regular `patrón`. Una opción particularmente útil es ``i``, que hace que no se distinga entre mayúsculas y minúsculas. Una buena introducción a la sintaxis de las expresiones regulares se puede encontrar en `sintaxis de expresiones regulares <https://docs.python.org/es/3/library/re.html>`_" |