Debian Codegraph @

translations/manual/uk/xpath.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 # Zoriana Zaiats, 2014
7 # Yuri Chornoivan <[email protected]>, 2017,2020,2026
8 # Zoriana Zaiats, 2014
9 msgid ""
10 msgstr ""
11 "Project-Id-Version: calibre\n"
12 "Report-Msgid-Bugs-To: \n"
13 "POT-Creation-Date: 2026-09-16 15:05+0000\n"
14 "PO-Revision-Date: 2014-06-17 08:35+0000\n"
15 "Last-Translator: Yuri Chornoivan <[email protected]>, 2017,2020,2026\n"
16 "Language-Team: Ukrainian (http://app.transifex.com/calibre/calibre/language/uk/)\n"
17 "MIME-Version: 1.0\n"
18 "Content-Type: text/plain; charset=UTF-8\n"
19 "Content-Transfer-Encoding: 8bit\n"
20 "Language: uk\n"
21 "Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n"
22
23 #: ../../../__w/calibre/calibre/manual/xpath.rst:4
24 msgid "XPath tutorial"
25 msgstr "Підручник з 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 "У цій частині підручника ми наведемо вступні зауваження щодо `XPath <https://en.wikipedia.org/wiki/XPath>`_, мови запитів, якою можна скористатися для вибору довільних частин документів `HTML <https://en.wikipedia.org/wiki/HTML>`_ у calibre. XPath є широковживаним стандартом, отже, пошук у мережі надасть вам дуже багато інформації щодо неї. Втім, увагу у цій частині підручника зосереджено на використанні XPath для завдань, пов’язаних із електронними книгами, зокрема пошуку заголовків глав у неструктурованому документі HTML."
37
38 #: ../../../__w/calibre/calibre/manual/xpath.rst:16
39 msgid "Contents"
40 msgstr "Зміст"
41
42 #: ../../../__w/calibre/calibre/manual/xpath.rst:19
43 msgid "Selecting by tag name"
44 msgstr "Вибір за назвою теґу"
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 "Найпростішою формою вибору є вибір теґів за назвою. Наприклад, припустімо, що вам хочеться вибрати усі теґи ``<h2>`` у документі. Запит XPath для цього буде дуже простим::"
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 "Префікс «//» означає *шукати на усіх рівнях документа*. Тепер, припустімо, що ви хочете знайти теґи ``<span>``, які перебувають всередині теґів ``<a>``. Зробити це можна ось так::"
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 "Якщо ви хочете шукати теґи на певному рівні у документі, змініть префікс::"
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 "Буде знайдено лише ``<p>A very short ebook to demonstrate the use of XPath.</p>`` у :ref:`sample_ebook`, але не буде знайдено жодного іншого теґу ``<p>``. Префікс ``h:`` у наведених вище прикладах потрібен для встановлення відповідності теґам XHTML. Він потрібен, тому що на внутрішньому рівні calibre представляє усі дані як XHTML. У теґів XHTML є власний *простір назв*, і ``h:`` є префіксом простору назв для теґів 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 "Тепер, припустімо, вам потрібно вибрати одразу теґи ``<h1>`` і теґи ``<h2>``. Для виконання цього завдання нам знадобиться конструкція XPath, яка називається *предикатом*. :dfn:`предикат` є простою перевіркою, яка використовується для вибору теґів. Перевірки можуть мати довільну потужність. У межах цього розділу ми наведемо і потужніші приклади. Предикат створюється взяттям виразу перевірки у квадратні дужки::"
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 "У цьому виразі XPath є декілька нових особливостей. Першою є використання замінника ``*``. Цей замінник означає *знайти будь-який теґ*. Далі, зверніть увагу на вираз перевірки ``name()='h1' or name()='h2'``. :term:`name()` є прикладом *вбудованої функції*. Ця функція просто повертає назву теґу. Отже, за її допомогою ми можемо вибрати теґи, назвами яких є `h1` або `h2`. Зауважте, що функція :term:`name()` ігнорує простори назв, отже, у додаванні префікса ``h:`` немає потреби. У XPath є декілька корисних вбудованих функцій. Ще декілька буде представлено у цьому розділі."
96
97 #: ../../../__w/calibre/calibre/manual/xpath.rst:62
98 msgid "Selecting by attributes"
99 msgstr "Вибір за атрибутами"
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 "Для вибору тегу на основі його атрибутів слід користуватися предикатами::"
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 "Тут оператор ``@`` посилається на атрибути теґу. Ви можете скористатися деякими з `вбудованих функцій XPath`_ для встановлення складних відповідностей із значеннями атрибутів."
113
114 #: ../../../__w/calibre/calibre/manual/xpath.rst:75
115 msgid ""
116 "When XPath expressions are used for conversion options such as chapter "
117 "detection or the start reading at position, they are evaluated against the "
118 "*input* document, before calibre flattens the CSS. CSS flattening rewrites "
119 "class names, so the class names you see in the converted output (things like"
120 " ``calibre1``) do not exist yet when your expression runs. Copy class names "
121 "from the input document, not from the converted book. If in doubt, match on "
122 "tag names and text content instead, as these are not changed by the "
123 "conversion."
124 msgstr "Коли вирази XPath використовуються для таких параметрів перетворення, як визначення розділів або початкова позиція читання, вони застосовуються до *вхідного* документа — ще до того, як calibre виконає спрощення CSS. Процес спрощення CSS змінює назви класів, тому назви, які ви бачите у вже перетвореному файлі (наприклад, `calibre1`), на момент виконання вашого виразу ще не існують. Копіюйте назви класів із вхідного документа, а не з перетвореної книги. Якщо маєте сумніви, орієнтуйтеся на назви тегів і текстовий вміст, оскільки вони не змінюються під час перетворення."
125
126 #: ../../../__w/calibre/calibre/manual/xpath.rst:86
127 msgid "Selecting by tag content"
128 msgstr "Вибір за вмістом теґу"
129
130 #: ../../../__w/calibre/calibre/manual/xpath.rst:88
131 msgid ""
132 "Using XPath, you can even select tags based on the text they contain. The "
133 "best way to do this is to use the power of *regular expressions* via the "
134 "built-in function :term:`re:test()`::"
135 msgstr "За допомогою XPath ви навіть можете вибирати теґи на основі тексту, який у них міститься. Найкращим способом це зробити є використання потужності *формальних виразів*, тобто вбудованої функції :term:`re:test()`::"
136
137 #: ../../../__w/calibre/calibre/manual/xpath.rst:94
138 msgid ""
139 "Here the ``.`` operator refers to the contents of the tag, just as the ``@``"
140 " operator referred to its attributes."
141 msgstr "Тут оператор ``.`` посилається на вміст теґу, так само, як оператор ``@`` посилається на його атрибути."
142
143 #: ../../../__w/calibre/calibre/manual/xpath.rst:100
144 msgid "Sample e-book"
145 msgstr "Зразок книги"
146
147 #: ../../../__w/calibre/calibre/manual/xpath.rst:106
148 msgid "XPath built-in functions"
149 msgstr "Вбудовані функції XPath"
150
151 #: ../../../__w/calibre/calibre/manual/xpath.rst:109
152 msgid "name()"
153 msgstr "name()"
154
155 #: ../../../__w/calibre/calibre/manual/xpath.rst:111
156 msgid "The name of the current tag."
157 msgstr "Назва поточного теґу."
158
159 #: ../../../__w/calibre/calibre/manual/xpath.rst:112
160 msgid "contains()"
161 msgstr "contains()"
162
163 #: ../../../__w/calibre/calibre/manual/xpath.rst:114
164 msgid "``contains(s1, s2)`` returns `true` if s1 contains s2."
165 msgstr "``contains(s1, s2)`` повертає «true», якщо s1 містить s2."
166
167 #: ../../../__w/calibre/calibre/manual/xpath.rst:115
168 msgid "re:test()"
169 msgstr "re:test()"
170
171 #: ../../../__w/calibre/calibre/manual/xpath.rst:117
172 msgid ""
173 "``re:test(src, pattern, flags)`` returns `true` if the string `src` matches "
174 "the regular expression `pattern`. A particularly useful flag is ``i``, it "
175 "makes matching case insensitive. A good primer on the syntax for regular "
176 "expressions can be found at `regexp syntax "
177 "<https://docs.python.org/library/re.html>`_"
178 msgstr "``re:test(джерело, взірець, прапорці)`` повертає `true`, якщо рядок `джерело` відповідає формальному виразу `взірець`. Одним із особливо корисних прапорців є ``i``, прапорець, який вимикає врахування регістру символів під час порівняння. Чудовий підручник із синтаксису формальних виразів можна знайти на `сторінці синтаксису формальних виразів <https://docs.python.org/library/re.html>`_"