Debian Codegraph @

translations/manual/ru/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 # Alexander Filev, 2015
7 # Andrei Stepanov, 2026
8 # Anton Bershanskiy <[email protected]>, 2016
9 # ashed <[email protected]>, 2020,2026
10 # AlexanderFilev, 2015
11 # Vlad Loktionov, 2015
12 # Александр, 2015
13 # Родион Р., 2020
14 msgid ""
15 msgstr ""
16 "Project-Id-Version: calibre\n"
17 "Report-Msgid-Bugs-To: \n"
18 "POT-Creation-Date: 2026-08-26 16:50+0000\n"
19 "PO-Revision-Date: 2014-06-17 08:35+0000\n"
20 "Last-Translator: Andrei Stepanov, 2026\n"
21 "Language-Team: Russian (http://app.transifex.com/calibre/calibre/language/ru/)\n"
22 "MIME-Version: 1.0\n"
23 "Content-Type: text/plain; charset=UTF-8\n"
24 "Content-Transfer-Encoding: 8bit\n"
25 "Language: ru\n"
26 "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
27
28 #: ../../../__w/calibre/calibre/manual/xpath.rst:4
29 msgid "XPath tutorial"
30 msgstr "Учебник по XPath"
31
32 #: ../../../__w/calibre/calibre/manual/xpath.rst:6
33 msgid ""
34 "In this tutorial, you will be given a gentle introduction to `XPath "
35 "<https://en.wikipedia.org/wiki/XPath>`_, a query language that can be used "
36 "to select arbitrary parts of `HTML <https://en.wikipedia.org/wiki/HTML>`_ "
37 "documents in calibre. XPath is a widely used standard, and googling it will "
38 "yield a ton of information. This tutorial, however, focuses on using XPath "
39 "for e-book related tasks like finding chapter headings in an unstructured "
40 "HTML document."
41 msgstr "Этот учебник — введение в `XPath <https://en.wikipedia.org/wiki/XPath>`_, язык запросов, который можно использовать для выбора произвольных частей `HTML <https://en.wikipedia.org/wiki/HTML>`_ в calibre. XPath — широко используемый стандарт, и поиск Google выдаст тонну информации. Однако этот учебник сосредотачивается на решении с помощью XPath задач, связанных с электронными книгами, напр. поиске заголовков разделов в неструктурированном HTML-документе."
42
43 #: ../../../__w/calibre/calibre/manual/xpath.rst:16
44 msgid "Contents"
45 msgstr "Содержание"
46
47 #: ../../../__w/calibre/calibre/manual/xpath.rst:19
48 msgid "Selecting by tag name"
49 msgstr "Выбор по имени тега"
50
51 #: ../../../__w/calibre/calibre/manual/xpath.rst:21
52 msgid ""
53 "The simplest form of selection is to select tags by name. For example, "
54 "suppose you want to select all the ``<h2>`` tags in a document. The XPath "
55 "query for this is simply::"
56 msgstr "Простейшая форма выбора — выбор тегов по имени. Предположим, что вы хотите выбрать все теги ``<h2>`` в документе. Запрос XPath для этого прост::"
57
58 #: ../../../__w/calibre/calibre/manual/xpath.rst:27
59 msgid ""
60 "The prefix `//` means *search at any level of the document*. Now suppose you"
61 " want to search for ``<span>`` tags that are inside ``<a>`` tags. That can "
62 "be achieved with::"
63 msgstr "Префикс `//` означает *поиск на любом уровне документа*. Теперь предположим, что вы хотите искать теги ``<span>``, которые находятся внутри тегов ``<a>``. Этого можно достичь с помощью::"
64
65 #: ../../../__w/calibre/calibre/manual/xpath.rst:33
66 msgid ""
67 "If you want to search for tags at a particular level in the document, change"
68 " the prefix::"
69 msgstr "Если вы хотите искать теги на определённом уровне в документе, измените префикс::"
70
71 #: ../../../__w/calibre/calibre/manual/xpath.rst:39
72 msgid ""
73 "This will match only ``<p>A very short e-book to demonstrate the use of "
74 "XPath.</p>`` in the :ref:`sample_ebook` but not any of the other ``<p>`` "
75 "tags. The ``h:`` prefix in the above examples is needed to match XHTML tags."
76 " This is because internally, calibre represents all content as XHTML. In "
77 "XHTML tags have a *namespace*, and ``h:`` is the namespace prefix for HTML "
78 "tags."
79 msgstr "Это будет соответствовать только ``<p>A very short e-book to demonstrate the use of XPath.</p>`` в разделе «:ref:`sample_ebook`», а не каким-либо другим тегам ``<p>``. Префикс ``h:`` в вышеприведённых примерах необходим для соответствия тегам XHTML. Потому что внутри calibre всё содержимое представлено как XHTML. В тегах XHTML есть *пространство имён*, а ``h:`` — префикс пространства имён для HTML-тегов."
80
81 #: ../../../__w/calibre/calibre/manual/xpath.rst:45
82 msgid ""
83 "Now suppose you want to select both ``<h1>`` and ``<h2>`` tags. To do that, "
84 "we need an XPath construct called *predicate*. A :dfn:`predicate` is simply "
85 "a test that is used to select tags. Tests can be arbitrarily powerful and as"
86 " this tutorial progresses, you will see more powerful examples. A predicate "
87 "is created by enclosing the test expression in square brackets::"
88 msgstr "Теперь предположим, что вы хотите выбрать теги ``<h1>`` и ``<h2>``. Для этого нам нужна конструкция XPath, называемая *предикат*. A :dfn:`predicate` — это просто тест, который используется для выбора тегов. Тесты могут быть сколь угодно мощными, и по мере продвижения по этому учебнику вы увидите более мощные примеры. Предикат создаётся путём заключения тестового выражения в квадратные скобки::"
89
90 #: ../../../__w/calibre/calibre/manual/xpath.rst:53
91 msgid ""
92 "There are several new features in this XPath expression. The first is the "
93 "use of the wildcard ``*``. It means *match any tag*. Now look at the test "
94 "expression ``name()='h1' or name()='h2'``. :term:`name()` is an example of a"
95 " *built-in function*. It simply evaluates to the name of the tag. So by "
96 "using it, we can select tags whose names are either `h1` or `h2`. Note that "
97 "the :term:`name()` function ignores namespaces so that there is no need for "
98 "the ``h:`` prefix. XPath has several useful built-in functions. A few more "
99 "will be introduced in this tutorial."
100 msgstr "В этом выражении XPath имеется несколько новых функций. Во-первых, это использование подстановочного символа ``*``. Это означает *соответствие любому тегу*. Теперь посмотрим на тестовое выражение ``name()='h1' or name()='h2'``. :term:`name()` — пример *встроенной функции*. Она просто вычисляет имя тега. Таким образом, с её помощью мы можем выбрать теги, имена которых либо `h1`, либо `h2`. Обратите внимание, что функция :term:`name ()` игнорирует пространства имён, поэтому нет необходимости в префиксе ``h:``. XPath имеет несколько полезных встроенных функций. Некоторые из них будут показаны в этом учебнике."
101
102 #: ../../../__w/calibre/calibre/manual/xpath.rst:62
103 msgid "Selecting by attributes"
104 msgstr "Выбор по атрибутам"
105
106 #: ../../../__w/calibre/calibre/manual/xpath.rst:64
107 msgid ""
108 "To select tags based on their attributes, the use of predicates is "
109 "required::"
110 msgstr "Чтобы выбрать теги на основе их атрибутов, необходимо использовать предикаты::"
111
112 #: ../../../__w/calibre/calibre/manual/xpath.rst:70
113 msgid ""
114 "Here, the ``@`` operator refers to the attributes of the tag. You can use "
115 "some of the `XPath built-in functions`_ to perform more sophisticated "
116 "matching on attribute values."
117 msgstr "Здесь оператор ``@`` ссылается на атрибуты тега. Вы можете использовать некоторые из `XPath built-in functions`_ (встроенных функций XPath) для выполнения более сложных сопоставлений значений атрибутов."
118
119 #: ../../../__w/calibre/calibre/manual/xpath.rst:76
120 msgid "Selecting by tag content"
121 msgstr "Выбор по содержимому тега"
122
123 #: ../../../__w/calibre/calibre/manual/xpath.rst:78
124 msgid ""
125 "Using XPath, you can even select tags based on the text they contain. The "
126 "best way to do this is to use the power of *regular expressions* via the "
127 "built-in function :term:`re:test()`::"
128 msgstr "Используя XPath, вы можете выбирать теги даже на основе содержащегося в них текста. Лучший способ сделать это — призвать силу *регулярных выражений* с помощью встроенной функции :term:`re:test ()`::"
129
130 #: ../../../__w/calibre/calibre/manual/xpath.rst:84
131 msgid ""
132 "Here the ``.`` operator refers to the contents of the tag, just as the ``@``"
133 " operator referred to its attributes."
134 msgstr "Здесь оператор ``.`` ссылается на содержимое тега, так же как оператор ``@`` ссылается на его атрибуты."
135
136 #: ../../../__w/calibre/calibre/manual/xpath.rst:90
137 msgid "Sample e-book"
138 msgstr "Образец электронной книги"
139
140 #: ../../../__w/calibre/calibre/manual/xpath.rst:96
141 msgid "XPath built-in functions"
142 msgstr "Встроенные функции XPath"
143
144 #: ../../../__w/calibre/calibre/manual/xpath.rst:99
145 msgid "name()"
146 msgstr "name()"
147
148 #: ../../../__w/calibre/calibre/manual/xpath.rst:101
149 msgid "The name of the current tag."
150 msgstr "Имя текущего тега."
151
152 #: ../../../__w/calibre/calibre/manual/xpath.rst:102
153 msgid "contains()"
154 msgstr "contains()"
155
156 #: ../../../__w/calibre/calibre/manual/xpath.rst:104
157 msgid "``contains(s1, s2)`` returns `true` if s1 contains s2."
158 msgstr "``contains(s1, s2)`` возвращает `true`, если s1 содержит s2."
159
160 #: ../../../__w/calibre/calibre/manual/xpath.rst:105
161 msgid "re:test()"
162 msgstr "re:test()"
163
164 #: ../../../__w/calibre/calibre/manual/xpath.rst:107
165 msgid ""
166 "``re:test(src, pattern, flags)`` returns `true` if the string `src` matches "
167 "the regular expression `pattern`. A particularly useful flag is ``i``, it "
168 "makes matching case insensitive. A good primer on the syntax for regular "
169 "expressions can be found at `regexp syntax "
170 "<https://docs.python.org/library/re.html>`_"
171 msgstr "``re:test(src, pattern, flags)`` возвращает `true`, если строка `src` соответствует регулярному выражению `pattern`. Особенно полезен флаг ``i``: он отвечает за нечувствительность к регистру. Хороший учебник синтаксиса регулярных выражений для начинающих можно найти по ссылке `regexp syntax <https://docs.python.org/library/re.html>`_."