| 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 |
# nin hum <[email protected]>, 2024-2026 |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: calibre\n" |
| 10 |
"Report-Msgid-Bugs-To: \n" |
| 11 |
"POT-Creation-Date: 2026-06-24 05:21+0000\n" |
| 12 |
"PO-Revision-Date: 2014-06-17 08:35+0000\n" |
| 13 |
"Last-Translator: nin hum <[email protected]>, 2024-2026\n" |
| 14 |
"Language-Team: Galician (http://app.transifex.com/calibre/calibre/language/gl/)\n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
"Language: gl\n" |
| 19 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
| 20 |
|
| 21 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:4 |
| 22 |
msgid "XPath tutorial" |
| 23 |
msgstr "Titorial de XPath" |
| 24 |
|
| 25 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:6 |
| 26 |
msgid "" |
| 27 |
"In this tutorial, you will be given a gentle introduction to `XPath " |
| 28 |
"<https://en.wikipedia.org/wiki/XPath>`_, a query language that can be used " |
| 29 |
"to select arbitrary parts of `HTML <https://en.wikipedia.org/wiki/HTML>`_ " |
| 30 |
"documents in calibre. XPath is a widely used standard, and googling it will " |
| 31 |
"yield a ton of information. This tutorial, however, focuses on using XPath " |
| 32 |
"for e-book related tasks like finding chapter headings in an unstructured " |
| 33 |
"HTML document." |
| 34 |
msgstr "Neste tutorial, darase unha introdución sinxela a `XPath <https://en.wikipedia.org/wiki/XPath>`_, unha linguaxe de consulta que se pode usar para seleccionar partes arbitrarias de documentos `HTML <https://en.wikipedia.org/wiki/HTML>`_ en Calibre. XPath é un estándar amplamente utilizado e buscalo en Google obterá moitísima información. Non obstante, este tutorial céntrase no uso de XPath para tarefas relacionadas con libros electrónicos, como atopar cabeceiras de capítulo nun documento HTML non estruturado." |
| 35 |
|
| 36 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:16 |
| 37 |
msgid "Contents" |
| 38 |
msgstr "Contidos" |
| 39 |
|
| 40 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:19 |
| 41 |
msgid "Selecting by tag name" |
| 42 |
msgstr "Selección polo nome da etiqueta" |
| 43 |
|
| 44 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:21 |
| 45 |
msgid "" |
| 46 |
"The simplest form of selection is to select tags by name. For example, " |
| 47 |
"suppose you want to select all the ``<h2>`` tags in a document. The XPath " |
| 48 |
"query for this is simply::" |
| 49 |
msgstr "A forma máis sinxela de selección é seleccionar etiquetas polo nome. Por exemplo, supoñamos que queres seleccionar todas as etiquetas ``<h2>`` dun documento. A consulta XPath para isto é simplemente::" |
| 50 |
|
| 51 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:27 |
| 52 |
msgid "" |
| 53 |
"The prefix `//` means *search at any level of the document*. Now suppose you" |
| 54 |
" want to search for ``<span>`` tags that are inside ``<a>`` tags. That can " |
| 55 |
"be achieved with::" |
| 56 |
msgstr "O prefixo `//` significa *buscar en calquera nivel do documento*. Agora supoñamos que queres buscar etiquetas ``<span>`` que estean dentro de etiquetas ``<a>``. Isto pódese conseguir con::" |
| 57 |
|
| 58 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:33 |
| 59 |
msgid "" |
| 60 |
"If you want to search for tags at a particular level in the document, change" |
| 61 |
" the prefix::" |
| 62 |
msgstr "Se queres buscar etiquetas nun nivel concreto do documento, cambia o prefixo::" |
| 63 |
|
| 64 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:39 |
| 65 |
msgid "" |
| 66 |
"This will match only ``<p>A very short e-book to demonstrate the use of " |
| 67 |
"XPath.</p>`` in the :ref:`sample_ebook` but not any of the other ``<p>`` " |
| 68 |
"tags. The ``h:`` prefix in the above examples is needed to match XHTML tags." |
| 69 |
" This is because internally, calibre represents all content as XHTML. In " |
| 70 |
"XHTML tags have a *namespace*, and ``h:`` is the namespace prefix for HTML " |
| 71 |
"tags." |
| 72 |
msgstr "Isto coincidirá só con \"<p>Un libro electrónico moi curto para demostrar o uso de XPath.</p>\" no :ref:`libro_electrónico_de_exemplo`, pero non con ningunha das outras etiquetas ``<p>``. O prefixo \"h:\" nos exemplos anteriores é necesario para coincidir coas etiquetas XHTML. Isto débese a que, internamente, calibre representa todo o contido como XHTML. En XHTML, as etiquetas teñen un *espazo de nomes* e \"h:\" é o prefixo do espazo de nomes para as etiquetas HTML. \n \n \n \n \n \n \n " |
| 73 |
|
| 74 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:45 |
| 75 |
msgid "" |
| 76 |
"Now suppose you want to select both ``<h1>`` and ``<h2>`` tags. To do that, " |
| 77 |
"we need an XPath construct called *predicate*. A :dfn:`predicate` is simply " |
| 78 |
"a test that is used to select tags. Tests can be arbitrarily powerful and as" |
| 79 |
" this tutorial progresses, you will see more powerful examples. A predicate " |
| 80 |
"is created by enclosing the test expression in square brackets::" |
| 81 |
msgstr "Agora supoñamos que queres seleccionar etiquetas ``<h1>`` e ``<h2>``. Para iso, precisamos unha construción XPath chamada *predicate*. Un :dfn:`predicate` é simplemente unha proba que se usa para seleccionar etiquetas. As probas poden ser arbitrariamente potentes e, a medida que avance este titorial, verás exemplos máis potentes. Un predicado créase encerrando a expresión de proba entre corchetes::" |
| 82 |
|
| 83 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:53 |
| 84 |
msgid "" |
| 85 |
"There are several new features in this XPath expression. The first is the " |
| 86 |
"use of the wildcard ``*``. It means *match any tag*. Now look at the test " |
| 87 |
"expression ``name()='h1' or name()='h2'``. :term:`name()` is an example of a" |
| 88 |
" *built-in function*. It simply evaluates to the name of the tag. So by " |
| 89 |
"using it, we can select tags whose names are either `h1` or `h2`. Note that " |
| 90 |
"the :term:`name()` function ignores namespaces so that there is no need for " |
| 91 |
"the ``h:`` prefix. XPath has several useful built-in functions. A few more " |
| 92 |
"will be introduced in this tutorial." |
| 93 |
msgstr "Hai varias características novas nesta expresión XPath. A primeira é o uso do comodín ``*``. Significa *coincide con calquera etiqueta*. Agora observa a expresión de proba ``name()='h1' ou name()='h2'``. :term:`name()` é un exemplo dunha *función integrada*. Simplemente avalía o nome da etiqueta. Polo tanto, usándoa, podemos seleccionar etiquetas cuxos nomes sexan `h1` ou `h2`. Ten en conta que a función :term:`name()` ignora os espazos de nomes, polo que non hai necesidade do prefixo ``h:``. XPath ten varias funcións integradas útiles. Neste tutorial presentarase unhas cantas máis." |
| 94 |
|
| 95 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:62 |
| 96 |
msgid "Selecting by attributes" |
| 97 |
msgstr "Selección por atributos" |
| 98 |
|
| 99 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:64 |
| 100 |
msgid "" |
| 101 |
"To select tags based on their attributes, the use of predicates is " |
| 102 |
"required::" |
| 103 |
msgstr "Para seleccionar etiquetas segundo os seus atributos, requírese o uso de predicados::" |
| 104 |
|
| 105 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:70 |
| 106 |
msgid "" |
| 107 |
"Here, the ``@`` operator refers to the attributes of the tag. You can use " |
| 108 |
"some of the `XPath built-in functions`_ to perform more sophisticated " |
| 109 |
"matching on attribute values." |
| 110 |
msgstr "Aquí, o operador ``@`` refírese aos atributos da etiqueta. Podes usar algunhas das `funcións integradas de XPath`_ para realizar coincidencias máis sofisticadas nos valores dos atributos." |
| 111 |
|
| 112 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:76 |
| 113 |
msgid "Selecting by tag content" |
| 114 |
msgstr "Selección por contido de etiqueta" |
| 115 |
|
| 116 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:78 |
| 117 |
msgid "" |
| 118 |
"Using XPath, you can even select tags based on the text they contain. The " |
| 119 |
"best way to do this is to use the power of *regular expressions* via the " |
| 120 |
"built-in function :term:`re:test()`::" |
| 121 |
msgstr "Usando XPath, podes incluso seleccionar etiquetas segundo o texto que conteñen. A mellor maneira de facelo é usar a potencia das *expresións regulares* mediante a función integrada :term:`re:test()`::" |
| 122 |
|
| 123 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:84 |
| 124 |
msgid "" |
| 125 |
"Here the ``.`` operator refers to the contents of the tag, just as the ``@``" |
| 126 |
" operator referred to its attributes." |
| 127 |
msgstr "Aquí, o operador ``.`` refírese ao contido da etiqueta, do mesmo xeito que o operador ``@`` se refería aos seus atributos." |
| 128 |
|
| 129 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:90 |
| 130 |
msgid "Sample e-book" |
| 131 |
msgstr "Exemplo de libro electrónico" |
| 132 |
|
| 133 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:96 |
| 134 |
msgid "XPath built-in functions" |
| 135 |
msgstr "Funcións integradas de XPath" |
| 136 |
|
| 137 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:99 |
| 138 |
msgid "name()" |
| 139 |
msgstr "nome()" |
| 140 |
|
| 141 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:101 |
| 142 |
msgid "The name of the current tag." |
| 143 |
msgstr "O nome da etiqueta actual." |
| 144 |
|
| 145 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:102 |
| 146 |
msgid "contains()" |
| 147 |
msgstr "contén()" |
| 148 |
|
| 149 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:104 |
| 150 |
msgid "``contains(s1, s2)`` returns `true` if s1 contains s2." |
| 151 |
msgstr "``contén(s1, s2)`` devolve `verdadeiro` se s1 contén s2." |
| 152 |
|
| 153 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:105 |
| 154 |
msgid "re:test()" |
| 155 |
msgstr "re:proba()" |
| 156 |
|
| 157 |
#: ../../../__w/calibre/calibre/manual/xpath.rst:107 |
| 158 |
msgid "" |
| 159 |
"``re:test(src, pattern, flags)`` returns `true` if the string `src` matches " |
| 160 |
"the regular expression `pattern`. A particularly useful flag is ``i``, it " |
| 161 |
"makes matching case insensitive. A good primer on the syntax for regular " |
| 162 |
"expressions can be found at `regexp syntax " |
| 163 |
"<https://docs.python.org/library/re.html>`_" |
| 164 |
msgstr "``re:test(src, pattern, flags)`` devolve `true` se a cadea `src` coincide coa expresión regular `pattern`. Un indicador particularmente útil é ``i``, xa que fai que a coincidencia non distinga entre maiúsculas e minúsculas. Unha boa introdución á sintaxe das expresións regulares pódese atopar en `regexp syntax <https://docs.python.org/library/re.html>`_" |