Debian Codegraph @

translations/manual/uk/develop.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 # Yuri Chornoivan <[email protected]>, 2014,2017-2023,2025-2026
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: calibre\n"
10 "Report-Msgid-Bugs-To: \n"
11 "POT-Creation-Date: 2026-07-30 18:07+0000\n"
12 "PO-Revision-Date: 2014-06-17 08:34+0000\n"
13 "Last-Translator: Yuri Chornoivan <[email protected]>, 2014,2017-2023,2025-2026\n"
14 "Language-Team: Ukrainian (http://app.transifex.com/calibre/calibre/language/uk/)\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Language: uk\n"
19 "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"
20
21 #: ../../../__w/calibre/calibre/manual/develop.rst:4
22 msgid "Setting up a calibre development environment"
23 msgstr "Налаштовування середовища для розробки calibre"
24
25 #: ../../../__w/calibre/calibre/manual/develop.rst:6
26 msgid ""
27 "calibre is completely open source, licensed under the `GNU GPL v3 "
28 "<https://www.gnu.org/licenses/gpl.html>`_. This means that you are free to "
29 "download and modify the program to your heart's content. In this section, "
30 "you will learn how to get a calibre development environment set up on the "
31 "operating system of your choice. calibre is written primarily in `Python "
32 "<https://www.python.org>`_ with some C/C++ code for speed and system "
33 "interfacing. Note that calibre requires at least Python 3.8."
34 msgstr "Увесь початковий код calibre відкрито і ліцензовано відповідно до `GNU GPL v3 <https://www.gnu.org/licenses/gpl.html>`_. Це означає, що ви можете безкоштовно отримувати код програми і вносити до нього будь-які потрібні вам зміни. За допомогою цього розділу ви зможете ознайомитися із тим, як створити середовище для розробки calibre у вашій операційній системі. calibre, в основному, написано мовою програмування `Python <https://www.python.org>`_ із вставками мовою програмування C/C++ для підвищення швидкодії та роботи із системою. Зауважте, що програма calibre є потребує для роботи принаймні Python 3.8."
35
36 #: ../../../__w/calibre/calibre/manual/develop.rst:14
37 msgid "Contents"
38 msgstr "Зміст"
39
40 #: ../../../__w/calibre/calibre/manual/develop.rst:17
41 msgid "Design philosophy"
42 msgstr "Засади структури програми"
43
44 #: ../../../__w/calibre/calibre/manual/develop.rst:19
45 msgid ""
46 "calibre has its roots in the Unix world, which means that its design is "
47 "highly modular. The modules interact with each other via well defined "
48 "interfaces. This makes adding new features and fixing bugs in calibre very "
49 "easy, resulting in a frenetic pace of development. Because of its roots, "
50 "calibre has a comprehensive command line interface for all its functions, "
51 "documented in :doc:`generated/en/cli-index`."
52 msgstr "calibre походить зі світу Unix, і це означає, що значна частина можливостей програми винесена у модулі. Ці модулі взаємодіють між собою за допомогою добре визначених інтерфейсів. Це робить додавання нових можливостей та виправлення вад у calibre дуже простим і надає розвитку програми шаленого темпу. Через своє походження calibre має всеосяжний інтерфейс командного рядка для усіх свої функціональних можливостей. Документацію з нього можна знайти у розділі :doc:`generated/uk/cli-index`."
53
54 #: ../../../__w/calibre/calibre/manual/develop.rst:24
55 msgid ""
56 "The modular design of calibre is expressed via ``Plugins``. There is a "
57 ":ref:`tutorial <customize>` on writing calibre plugins. For example, adding "
58 "support for a new device to calibre typically involves writing fewer than "
59 "100 lines of code in the form of a device driver plugin. You can browse the "
60 "`built-in drivers "
61 "<https://github.com/kovidgoyal/calibre/tree/master/src/calibre/devices>`_. "
62 "Similarly, adding support for new conversion formats involves writing "
63 "input/output format plugins. Another example of the modular design is the "
64 ":ref:`recipe system <news>` for fetching news. For more examples of plugins "
65 "designed to add features to calibre, see the `Index of plugins "
66 "<https://www.mobileread.com/forums/showthread.php?p=1362767#post1362767>`_."
67 msgstr "Модульність calibre реалізується ``додатками``. У нашому підручнику є :ref:`розділ <customize>` щодо написання додатків до calibre. Наприклад, додавання підтримки нового пристрою у calibre типово полягає у написанні менш ніж 100 рядків коду у формі додатка драйвера пристрою. Ви можете ознайомитися зі списком `вбудованих драйверів <https://github.com/kovidgoyal/calibre/tree/master/src/calibre/devices>`_. Так само, додавання підтримки нових форматів перетворення полягає у написанні додатків форматів введення і виведення даних. Іншим прикладом модульної побудови є :ref:`система рецептів <news>` для отримання новин. З іншими прикладами додатків, розроблених для розширення можливостей calibre, можна ознайомитися `тут <https://www.mobileread.com/forums/showthread.php?p=1362767#post1362767>`_."
68
69 #: ../../../__w/calibre/calibre/manual/develop.rst:34
70 msgid "Code layout"
71 msgstr "Структура коду"
72
73 #: ../../../__w/calibre/calibre/manual/develop.rst:36
74 msgid ""
75 "All the calibre Python code is in the ``calibre`` package. This package "
76 "contains the following main sub-packages"
77 msgstr "Увесь код мовою Python calibre є частиною пакунка «calibre». У цьому пакунку містяться вказані нижче підпакунки"
78
79 #: ../../../__w/calibre/calibre/manual/develop.rst:38
80 msgid ""
81 "devices - All the device drivers. Just look through some of the built-in "
82 "drivers to get an idea for how they work."
83 msgstr "devices — усі драйвери до пристроїв. Достатньо ознайомитися з кодом вбудованих до програми драйверів, щоб зрозуміти основні принципи роботи драйверів."
84
85 #: ../../../__w/calibre/calibre/manual/develop.rst:40
86 msgid ""
87 "For details, see: ``devices.interface`` which defines the interface "
88 "supported by device drivers and ``devices.usbms`` which defines a generic "
89 "driver that connects to a USBMS device. All USBMS based drivers in calibre "
90 "inherit from it."
91 msgstr "Докладніший опис можна знайти у ``devices.interface``, визначенні інтерфейсу підтримки драйверів пристроїв, та у ``devices.usbms``, визначенні типового драйвера, який встановлює з’єднання із пристроєм USBMS. Усі драйвери на основі USBMS у calibre успадковуються від цього драйвера."
92
93 #: ../../../__w/calibre/calibre/manual/develop.rst:43
94 msgid ""
95 "e-books - All the e-book conversion/metadata code. A good starting point is"
96 " ``calibre.ebooks.conversion.cli`` which is the module powering the "
97 ":command:`ebook-convert` command. The conversion process is controlled via "
98 "``conversion.plumber``. The format independent code is all in ``ebooks.oeb``"
99 " and the format dependent code is in ``ebooks.format_name``."
100 msgstr "ebooks — увесь код, який пов’язано із перетворенням та метаданими електронних книг. Варто розпочати з ``calibre.ebooks.conversion.cli``, модуля, який забезпечує роботу програми :command:`ebook-convert`. Процесом перетворення керує ``conversion.plumber``. Незалежний від форматів код зберігається у ``ebooks.oeb``, а залежний від форматів — у ``ebooks.format_name``."
101
102 #: ../../../__w/calibre/calibre/manual/develop.rst:47
103 msgid ""
104 "Metadata reading, writing, and downloading is all in ``ebooks.metadata``"
105 msgstr "Засоби читання, записування та отримання метаданих зосереджено у ``ebooks.metadata``"
106
107 #: ../../../__w/calibre/calibre/manual/develop.rst:48
108 msgid ""
109 "Conversion happens in a pipeline, for the structure of the pipeline, see "
110 ":ref:`conversion-introduction`. The pipeline consists of an input plugin, "
111 "various transforms and an output plugin. The code that constructs and drives"
112 " the pipeline is in :file:`plumber.py`. The pipeline works on a "
113 "representation of an e-book that is like an unzipped epub, with manifest, "
114 "spine, toc, guide, html content, etc. The class that manages this "
115 "representation is OEBBook in ``ebooks.oeb.base``. The various "
116 "transformations that are applied to the book during conversions live in "
117 ":file:`oeb/transforms/*.py`. And the input and output plugins live in "
118 ":file:`conversion/plugins/*.py`."
119 msgstr "Перетворення виконується у конвеєрі. Зі структурою конвеєра можна ознайомитися у розділі :ref:`conversion-introduction`. Конвеєр складається із додатка вхідних даних, різноманітних перетворено та додатка вихідних даних. Код, який будує конвеєр і керує ним, зберігається у :file:`plumber.py`. Конвеєр працює над створенням представлення книги у формі розпакованого файла epub, із маніфестом manifest, вмістом, змістом, путівником, даними html тощо. Класом, який керує цим представленням, є клас OEBBook у ``ebooks.oeb.base``. Різноманітні перетворення, які застосовуються до книги під час обробки, зберігаються у :file:`oeb/transforms/*.py`. Код додатків вхідних і вихідних даних зберігається у :file:`conversion/plugins/*.py`."
120
121 #: ../../../__w/calibre/calibre/manual/develop.rst:58
122 msgid ""
123 "E-book editing happens using a different container object. It is documented "
124 "in :ref:`polish_api`."
125 msgstr "Редагування електронних книг відбувається за допомогою іншого об’єкта-контейнера. Його документовано у розділі :ref:`polish_api`."
126
127 #: ../../../__w/calibre/calibre/manual/develop.rst:61
128 msgid ""
129 "db - The database back-end. See :ref:`db_api` for the interface to the "
130 "calibre library."
131 msgstr "db — модуль бази даних. Див. розділ :ref:`db_api`, щоб дізнатися більше про інтерфейс бібліотеки calibre."
132
133 #: ../../../__w/calibre/calibre/manual/develop.rst:63
134 msgid "Content server: ``srv`` is the calibre Content server."
135 msgstr "Сервер даних: «srv» — це сервер даних calibre."
136
137 #: ../../../__w/calibre/calibre/manual/develop.rst:65
138 msgid ""
139 "gui2 - The Graphical User Interface. GUI initialization happens in "
140 "``gui2.main`` and ``gui2.ui``. The e-book-viewer is in ``gui2.viewer``. The "
141 "e-book editor is in ``gui2.tweak_book``."
142 msgstr "gui2 — графічний інтерфейс користувача. Ініціалізація інтерфейсу виконується у ``gui2.main`` і ``gui2.ui``. Сам засіб перегляду електронних книг міститься у ``gui2.viewer``. За редагування електронних книг відповідає ``gui2.tweak_book``."
143
144 #: ../../../__w/calibre/calibre/manual/develop.rst:67
145 msgid ""
146 "If you want to locate the entry points for all the various calibre "
147 "executables, look at the ``entry_points`` structure in `linux.py "
148 "<https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py>`_."
149 msgstr "Якщо вам потрібен доступ до усіх виконуваних файлів calibre, ознайомтеся зі структурою ``entry_points`` у `linux.py <https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py>`_."
150
151 #: ../../../__w/calibre/calibre/manual/develop.rst:71
152 msgid ""
153 "If you need help understanding the code, post in the `development forum "
154 "<https://www.mobileread.com/forums/forumdisplay.php?f=240>`_ and you will "
155 "most likely get help from one of calibre's many developers."
156 msgstr "Якщо хочете краще зрозуміти код, створіть тему із вашим питанням на `форумі розробників <https://www.mobileread.com/forums/forumdisplay.php?f=240>`_. Найімовірніше, там ви отримаєте кваліфіковану відповідь від одного з багатьох розробників calibre."
157
158 #: ../../../__w/calibre/calibre/manual/develop.rst:75
159 msgid "Getting the code"
160 msgstr "Отримання коду"
161
162 #: ../../../__w/calibre/calibre/manual/develop.rst:77
163 msgid ""
164 "You can get the calibre source code in two ways, using a version control "
165 "system or directly downloading a :website_base:`tarball <dist/src>`."
166 msgstr "Отримати початковий код calibre можна у два способи: за допомогою системи керування версіями та безпосереднього отримання :website_base:`архіву з кодом програми <dist/src>`."
167
168 #: ../../../__w/calibre/calibre/manual/develop.rst:80
169 msgid ""
170 "calibre uses `Git <https://www.git-scm.com/>`_, a distributed version "
171 "control system. Git is available on all the platforms calibre supports. "
172 "After installing Git, you can get the calibre source code with the command::"
173 msgstr "Для керування версіями у calibre використовують `Git <https://www.git-scm.com/>`_, розподілену систему керування версіями. Git можна користуватися на усіх платформах, на яких працює calibre. Після встановлення Git ви зможете отримати початковий код calibre за допомогою такої команди::"
174
175 #: ../../../__w/calibre/calibre/manual/develop.rst:86
176 msgid ""
177 "On Windows you will need the complete path name, that will be something like"
178 " :file:`C:\\\\Program Files\\\\Git\\\\git.exe`."
179 msgstr "У Windows вам знадобиться шлях повністю, щось схоже на :file:`C:\\\\Program Files\\\\Git\\\\git.exe`."
180
181 #: ../../../__w/calibre/calibre/manual/develop.rst:88
182 msgid ""
183 "calibre is a very large project with a very long source control history, so "
184 "the above can take a while (10 mins to an hour depending on your internet "
185 "speed)."
186 msgstr "calibre є дуже великим проектом із дуже довгою історією, отже виконання вказаної вище команди може бути доволі тривалим (від 10 хвилин до години, залежно від пропускної здатності вашого каналу з’єднання)."
187
188 #: ../../../__w/calibre/calibre/manual/develop.rst:91
189 msgid ""
190 "If you want to get the code faster, the source code for the latest release "
191 "is always available as an :website_base:`archive <dist/src>`."
192 msgstr "Якщо ви хочете отримати код швидше, початковий код найсвіжішого випуску завжди можна отримати у форматі :website_base:`архіву <dist/src>`."
193
194 #: ../../../__w/calibre/calibre/manual/develop.rst:94
195 msgid "To update a branch to the latest code, use the command::"
196 msgstr "Щоб оновити гілку до актуального стану, скористайтеся такою командою:"
197
198 #: ../../../__w/calibre/calibre/manual/develop.rst:98
199 msgid ""
200 "You can also browse the code at `GitHub "
201 "<https://github.com/kovidgoyal/calibre>`_."
202 msgstr "Ви також можете переглядати код на `GitHub <https://github.com/kovidgoyal/calibre>`_."
203
204 #: ../../../__w/calibre/calibre/manual/develop.rst:101
205 msgid "Submitting your changes to be included"
206 msgstr "Надсилання ваших змін для включення до програми"
207
208 #: ../../../__w/calibre/calibre/manual/develop.rst:103
209 msgid ""
210 "If you only plan to make a few small changes, you can make your changes and "
211 "create a \"merge directive\" which you can then attach to a ticket in the "
212 "calibre `bug tracker <https://bugs.launchpad.net/calibre>`_. To do this, "
213 "make your changes, then run::"
214 msgstr "Якщо ви плануєте внести лише незначні зміни, ви можете створити з них «інструкцію об’єднання», а потім долучити її до квитка у `системі стеження за вадами <https://bugs.launchpad.net/calibre>`_ calibre. Процедура така: вносимо зміни, а потім віддаємо такі команди::"
215
216 #: ../../../__w/calibre/calibre/manual/develop.rst:111
217 msgid ""
218 "This will create a :file:`my-changes` file in the current folder, simply "
219 "attach that to a ticket on the calibre `bug tracker "
220 "<https://bugs.launchpad.net/calibre>`_. Note that this will include *all* "
221 "the commits you have made. If you only want to send some commits, you have "
222 "to change ``origin/master`` above. To send only the last commit, use::"
223 msgstr "У результаті у поточній теці буде створено файл :file:`my-changes`, який слід просто долучити до квитка у `системі стеження за вадами <https://bugs.launchpad.net/calibre>`_ calibre. Зауважте, що до латки буде включено *усі* внесені вами зміни. Якщо ви хочете надіслати лише частину змін, вам слід замінити ``origin/master`` у наведених вище командах. Щоб надіслати лише останню зміну, скористайтеся такою командою::"
224
225 #: ../../../__w/calibre/calibre/manual/develop.rst:119
226 msgid ""
227 "To send the last *n* commits, replace *1* with *n*, for example, for the "
228 "last 3 commits::"
229 msgstr "Щоб надіслати останні *n* внесків, замініть *1* на *n*. Наприклад, для 3 внесків, ось так::"
230
231 #: ../../../__w/calibre/calibre/manual/develop.rst:124
232 msgid "Be careful to not include merges when using ``HEAD~n``."
233 msgstr "Будьте обережні: не включайте об’єднання, якщо користуєтеся ``HEAD~n``."
234
235 #: ../../../__w/calibre/calibre/manual/develop.rst:126
236 msgid ""
237 "If you plan to do a lot of development on calibre, then the best method is "
238 "to create a `GitHub <https://github.com>`__ account. Below is a basic guide "
239 "to setting up your own fork of calibre in a way that will allow you to "
240 "submit pull requests for inclusion into the main calibre repository:"
241 msgstr "Якщо ви плануєте значний розвиток коду calibre, вам варто створити обліковий запис на `GitHub <https://github.com>`__. Нижче наведено базові настанови щодо створення власної копії коду calibre у спосіб, який надасть вам змогу надсилати запити щодо об’єднання (pull requests) для включення вашого коду до основного сховища коду calibre:"
242
243 #: ../../../__w/calibre/calibre/manual/develop.rst:131
244 msgid ""
245 "Setup git on your machine as described in this article: `Setup Git "
246 "<https://help.github.com/articles/set-up-git>`_"
247 msgstr "Налаштуйте git на вашому комп’ютері так, як це описано у цій статті: `Setup Git <https://help.github.com/articles/set-up-git>`_"
248
249 #: ../../../__w/calibre/calibre/manual/develop.rst:132
250 msgid ""
251 "Setup ssh keys for authentication to GitHub, as described here: `Generating "
252 "SSH keys <https://help.github.com/articles/generating-ssh-keys>`_"
253 msgstr "Налаштуйте ключі ssh для розпізнавання на GitHub, як це описано тут: `Generating SSH keys <https://help.github.com/articles/generating-ssh-keys>`_"
254
255 #: ../../../__w/calibre/calibre/manual/develop.rst:133
256 msgid ""
257 "Go to https://github.com/kovidgoyal/calibre and click the :guilabel:`Fork` "
258 "button."
259 msgstr "Перейдіть на сторінку https://github.com/kovidgoyal/calibre і натисніть кнопку :guilabel:`Fork`."
260
261 #: ../../../__w/calibre/calibre/manual/develop.rst:134
262 msgid "In a Terminal do::"
263 msgstr "У терміналі віддайте команди::"
264
265 #: ../../../__w/calibre/calibre/manual/develop.rst:139
266 msgid ""
267 "Replace <username> above with your GitHub username. That will get your fork "
268 "checked out locally."
269 msgstr "Замініть <ім’я_користувача> у наведеній вище команді на ваше ім’я користувача GitHub. Таким чином, ви отримаєте копію клонованого сховища на вашому комп’ютері."
270
271 #: ../../../__w/calibre/calibre/manual/develop.rst:140
272 msgid ""
273 "You can make changes and commit them whenever you like. When you are ready "
274 "to have your work merged, do a::"
275 msgstr "Ви можете внести зміни і надіслати їх будь-коли. Коли ви будете готові до внесення вашої роботи, зробіть от що::"
276
277 #: ../../../__w/calibre/calibre/manual/develop.rst:144
278 msgid ""
279 "and go to ``https://github.com/<username>/calibre`` and click the "
280 ":guilabel:`Pull Request` button to generate a pull request that can be "
281 "merged."
282 msgstr "перейдіть на сторінку ``https://github.com/<ім’я користувача>/calibre`` і натисніть кнопку :guilabel:`Pull Request`, щоб створити запит на об’єднання."
283
284 #: ../../../__w/calibre/calibre/manual/develop.rst:145
285 msgid ""
286 "You can update your local copy with code from the main repo at any time by "
287 "doing::"
288 msgstr "Ви будь-коли можете оновити вашу локальну копію кодом із основного сховища такою командою::"
289
290 #: ../../../__w/calibre/calibre/manual/develop.rst:150
291 msgid ""
292 "You should also keep an eye on the calibre `development forum "
293 "<https://www.mobileread.com/forums/forumdisplay.php?f=240>`_. Before making "
294 "major changes, you should discuss them in the forum or contact Kovid "
295 "directly (his email address is all over the source code)."
296 msgstr "Вам також варто слідкувати за `форумом розробників <https://www.mobileread.com/forums/forumdisplay.php?f=240>`_ calibre. Перш ніж вносити значні зміни, вам слід обговорити їх на форумі або безпосередньо зв’язатися з Ковідом (його адреса електронної пошти є у багатьох файлах початкового коду програми)."
297
298 #: ../../../__w/calibre/calibre/manual/develop.rst:156
299 msgid "Windows development environment"
300 msgstr "Середовище для розробки у Windows"
301
302 #: ../../../__w/calibre/calibre/manual/develop.rst:158
303 #: ../../../__w/calibre/calibre/manual/develop.rst:192
304 #: ../../../__w/calibre/calibre/manual/develop.rst:229
305 msgid ""
306 "You must also get the calibre source code separately as described above."
307 msgstr "Вам слід також окремо отримати початковий код calibre, як це було описано вище."
308
309 #: ../../../__w/calibre/calibre/manual/develop.rst:160
310 msgid ""
311 "Install calibre normally, using the `Windows installer <https://calibre-"
312 "ebook.com/download_windows>`__. Then open a Command Prompt and change to the"
313 " previously checked out calibre code folder. For example::"
314 msgstr "Встановіть calibre у звичний спосіб, за допомогою `пакунка для встановлення у Windows <https://calibre-ebook.com/download_windows>`__. Далі, відкрийте вікно командного рядка і перейдіть до отриманої теки з кодом calibre. Приклад::"
315
316 #: ../../../__w/calibre/calibre/manual/develop.rst:165
317 #: ../../../__w/calibre/calibre/manual/develop.rst:241
318 msgid "calibre is the folder that contains the src and resources sub-folders."
319 msgstr "calibre — тека, що містить підкаталоги src і resources."
320
321 #: ../../../__w/calibre/calibre/manual/develop.rst:167
322 msgid ""
323 "The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to"
324 " the absolute path of the src folder. So, following the example above, it "
325 "would be ``C:\\Users\\kovid\\work\\calibre\\src``. `Here is a short guide "
326 "<https://docs.python.org/using/windows.html#excursus-setting-environment-"
327 "variables>`_ to setting environment variables on Windows."
328 msgstr "Наступним кроком буде встановлення для змінної середовища ``CALIBRE_DEVELOP_FROM`` значення, яке буде абсолютним шляхом до теки src. Отже, якщо продовжувати наведений вище приклад, слід вказати шлях ``C:\\Users\\kovid\\work\\calibre\\src``. `Тут <https://docs.python.org/using/windows.html#excursus-setting-environment-variables>`_ наведено короткі настанови щодо налаштовування змінних середовища у Windows."
329
330 #: ../../../__w/calibre/calibre/manual/develop.rst:172
331 msgid ""
332 "Once you have set the environment variable, open a new command prompt and "
333 "check that it was correctly set by using the command::"
334 msgstr "Після встановлення змінної середовища відкрийте нове вікно командного рядка і перевірте, чи все працює, за допомогою такої команди::"
335
336 #: ../../../__w/calibre/calibre/manual/develop.rst:177
337 #: ../../../__w/calibre/calibre/manual/develop.rst:260
338 msgid ""
339 "Setting this environment variable means that calibre will now load all its "
340 "Python code from the specified location."
341 msgstr "Встановлення цієї змінної середовища означає, що calibre тепер буде завантажувати увесь свій код Python із вказаного місця."
342
343 #: ../../../__w/calibre/calibre/manual/develop.rst:179
344 msgid ""
345 "That's it! You are now ready to start hacking on the calibre code. For "
346 "example, open the file :file:`src\\\\calibre\\\\__init__.py` in your "
347 "favorite editor and add the line::"
348 msgstr "Ось і все! Тепер ви готові до роботи з кодом calibre. Наприклад, відкрийте файл :file:`src\\\\calibre\\\\__init__.py` у вашому улюбленому редакторі і додайте такий рядок::"
349
350 #: ../../../__w/calibre/calibre/manual/develop.rst:184
351 #: ../../../__w/calibre/calibre/manual/develop.rst:267
352 msgid ""
353 "near the top of the file. Now run the command :command:`calibredb`. The very"
354 " first line of output should be ``Hello, world!``."
355 msgstr "на початку файла. Тепер віддайте команду :command:`calibredb`. Найпершим рядком у виведених даних має бути ``Hello, world!``."
356
357 #: ../../../__w/calibre/calibre/manual/develop.rst:186
358 msgid ""
359 "You can also setup a calibre development environment inside the free "
360 "Microsoft Visual Studio, if you like, following the instructions `here "
361 "<https://www.mobileread.com/forums/showthread.php?t=251201>`_."
362 msgstr "Ви також можете налаштувати середовище розробки calibre у вільній версії Microsoft Visual Studio, якщо хочете, виконавши настанови, викладені `тут <https://www.mobileread.com/forums/showthread.php?t=251201>`_."
363
364 #: ../../../__w/calibre/calibre/manual/develop.rst:190
365 msgid "macOS development environment"
366 msgstr "Середовище розробки у macOS"
367
368 #: ../../../__w/calibre/calibre/manual/develop.rst:194
369 msgid ""
370 "Install calibre normally using the `provided .dmg <https://calibre-"
371 "ebook.com/download_osx>`__. Then open a Terminal and change to the "
372 "previously checked out calibre code folder, for example::"
373 msgstr "Встановіть calibre у звичний спосіб, за допомогою `пакунка для встановлення .dmg <https://calibre-ebook.com/download_osx>`__. Далі, відкрийте вікно термінала і перейдіть до отриманої теки з кодом calibre Приклад::"
374
375 #: ../../../__w/calibre/calibre/manual/develop.rst:199
376 msgid ""
377 "calibre is the folder that contains the src and resources sub-folders. The "
378 "calibre command line tools are found inside the calibre app bundle, in "
379 ":file:`/Applications/calibre.app/Contents/MacOS` you should add this folder "
380 "to your PATH environment variable, if you want to run the command line tools"
381 " easily."
382 msgstr "calibre — тека, у якій містяться підкаталоги src та resources. Засоби командного рядка calibre зберігаються у пакунку програми calibre, а саме, у :file:`/Applications/calibre.app/Contents/MacOS`. Вам слід додати цю теку до вашої змінної середовища PATH, якщо ви маєте намір часто користуватися цими засобами командного рядка."
383
384 #: ../../../__w/calibre/calibre/manual/develop.rst:205
385 msgid ""
386 "The next step is to create a bash script that will set the environment "
387 "variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src folder "
388 "when running calibre in debug mode."
389 msgstr "Наступним кроком є створення скрипту bash, який визначити для змінної середовища ``CALIBRE_DEVELOP_FROM`` значення абсолютного шляху до теки src під час запуску calibre у режимі діагностики."
390
391 #: ../../../__w/calibre/calibre/manual/develop.rst:208
392 msgid "Create a plain text file::"
393 msgstr "Створіть звичайний текстовий файл::"
394
395 #: ../../../__w/calibre/calibre/manual/develop.rst:214
396 msgid ""
397 "Save this file as :file:`/usr/local/bin/calibre-develop`, then set its "
398 "permissions so that it can be executed::"
399 msgstr "Збережіть цей файл як :file`/usr/bin/calibre-develop`. Далі, встановіть права доступу так, щоб його можна було виконувати::"
400
401 #: ../../../__w/calibre/calibre/manual/develop.rst:218
402 msgid "Once you have done this, run::"
403 msgstr "Щойно ви це зробите, віддайте команду::"
404
405 #: ../../../__w/calibre/calibre/manual/develop.rst:222
406 msgid ""
407 "You should see some diagnostic information in the Terminal window as calibre"
408 " starts up, and you should see an asterisk after the version number in the "
409 "GUI window, indicating that you are running from source."
410 msgstr "Ви маєте побачити певну діагностичну інформацію у вікні термінала під час запуску calibre, і ви маєте побачити зірочку після номеру версії у вікні графічного інтерфейсу, що означає, що програму запущено із початкових кодів."
411
412 #: ../../../__w/calibre/calibre/manual/develop.rst:227
413 msgid "Linux development environment"
414 msgstr "Середовище розробки у Linux"
415
416 #: ../../../__w/calibre/calibre/manual/develop.rst:231
417 msgid ""
418 "calibre is primarily developed on Linux. You have two choices in setting up "
419 "the development environment. You can install the calibre binary as normal "
420 "and use that as a runtime environment to do your development. This approach "
421 "is similar to that used in Windows and macOS. Alternatively, you can install"
422 " calibre from source. Instructions for setting up a development environment "
423 "from source are in the INSTALL file in the source tree. Here we will address"
424 " using the binary as a runtime, which is the recommended method."
425 msgstr "Основним середовищем розробки calibre є Linux. У вас є два варіанти налаштовування середовища для розробки. Ви можете встановити виконуваний файл calibre у звичний спосіб і скористатися цим інтерактивним середовищем для розробки. Цей підхід подібний до використаного у Windows і macOS. Крім того, ви можете встановити calibre з початкових кодів. Настанови щодо налаштовування середовища для розробки з початкових кодів наведено у файлі INSTALL дерева початкових кодів програми. Тут ми обговоримо використання середовища з бінарними файлами, тобто рекомендованого методу."
426
427 #: ../../../__w/calibre/calibre/manual/develop.rst:237
428 msgid ""
429 "Install calibre using the `binary installer <https://calibre-"
430 "ebook.com/download_linux>`_. Then open a terminal and change to the "
431 "previously checked out calibre code folder, for example::"
432 msgstr "Встановіть calibre за допомогою `бінарного пакунка для встановлення <https://calibre-ebook.com/download_linux>`_. Далі, відкрийте вікно термінала і перейдіть до отриманої теки з кодом calibre Приклад::"
433
434 #: ../../../__w/calibre/calibre/manual/develop.rst:243
435 msgid ""
436 "The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to"
437 " the absolute path of the src folder. So, following the example above, it "
438 "would be ``/home/kovid/work/calibre/src``. How to set environment variables "
439 "depends on your Linux distribution and what shell you are using."
440 msgstr "Наступним кроком є встановлення для змінної середовища ``CALIBRE_DEVELOP_FROM`` значення абсолютного шляху до теки src. Отже, продовжуючи наведений вище приклад, маємо встановити значення ``/home/kovid/work/calibre/src``. Спосіб встановлення значення для змінної середовища залежить від вашого дистрибутива Linux та використаної вами командної оболонки."
441
442 #: ../../../__w/calibre/calibre/manual/develop.rst:248
443 msgid ""
444 "It is recommended to use the binary installer provided from upstream. Should"
445 " you insist on using a package provided by your distribution, use the "
446 "``CALIBRE_PYTHON_PATH`` and ``CALIBRE_RESOURCES_PATH`` variables instead. "
447 "You can get these by running ``calibre-debug --paths``. But note that "
448 "distribution calibre packages are often terminally broken and are completely"
449 " unsupported."
450 msgstr "Рекомендуємо скористатися двійковим пакунком для встановлення, який надають розробники програми. Якщо все ж хочете скористатися пакунком з вашого дистрибутиву, скористайтеся змінними ``CALIBRE_PYTHON_PATH`` та ``CALIBRE_RESOURCES_PATH``. Ознайомитися із поточними значеннями змінних можна за допомогою команди ``calibre-debug --paths``. Але, слід зауважити, пакунки calibre для такого дистрибутива часто є повністю непрацездатними і непідтримуваними."
451
452 #: ../../../__w/calibre/calibre/manual/develop.rst:255
453 msgid ""
454 "Once you have set the environment variable, open a new terminal and check "
455 "that it was correctly set by using the command::"
456 msgstr "Після встановлення змінної середовища відкрийте новий термінал і перевірте, чи все працює, за допомогою такої команди::"
457
458 #: ../../../__w/calibre/calibre/manual/develop.rst:262
459 msgid ""
460 "That's it! You are now ready to start hacking on the calibre code. For "
461 "example, open the file :file:`src/calibre/__init__.py` in your favorite "
462 "editor and add the line::"
463 msgstr "Ось і все! Тепер ви готові до роботи з кодом calibre. Наприклад, відкрийте файл :file:`src/calibre/__init__.py` у вашому улюбленому редакторі і додайте такий рядок::"
464
465 #: ../../../__w/calibre/calibre/manual/develop.rst:270
466 msgid ""
467 "Having separate \"normal\" and \"development\" calibre installs on the same "
468 "computer"
469 msgstr "Використання окремих «звичайного» і «розробницького» встановлень calibre на одному комп’ютері"
470
471 #: ../../../__w/calibre/calibre/manual/develop.rst:272
472 msgid ""
473 "The calibre source tree is very stable and rarely breaks, but if you feel "
474 "the need to run from source on a separate test library and run the released "
475 "calibre version with your everyday library, you can achieve this easily "
476 "using .bat files or shell scripts to launch calibre. The example below shows"
477 " how to do this on Windows using .bat files (the instructions for other "
478 "platforms are the same, just use a shell script instead of a .bat file)"
479 msgstr "Початкові коди calibre є доволі стабільними, критичні помилки у них є дуже рідкісним явищем, але якщо ви хочете запустити програму з початкових кодів на окремій тестовій бібліотеці і користуватися стабільною версією calibre для вашої справжньої бібліотеки, досягти цього можна за допомогою запуску calibre з файлів .bat або скриптів оболонки. У наведеному нижче прикладі показано, як досягти цього у Windows за допомогою файлів .bat (настанови для інших платформ дуже подібні, але у них використовуватиметься скрипт командної оболонки, а не файл .bat)"
480
481 #: ../../../__w/calibre/calibre/manual/develop.rst:277
482 msgid "To launch the release version of calibre with your everyday library:"
483 msgstr "Щоб запустити версію для випуску calibre з вашою щоденною бібліотекою, зробіть так:"
484
485 #: ../../../__w/calibre/calibre/manual/develop.rst:279
486 msgid "calibre-normal.bat::"
487 msgstr "calibre-normal.bat::"
488
489 #: ../../../__w/calibre/calibre/manual/develop.rst:283
490 msgid "calibre-dev.bat::"
491 msgstr "calibre-dev.bat::"
492
493 #: ../../../__w/calibre/calibre/manual/develop.rst:290
494 msgid "Debugging tips"
495 msgstr "Підказки щодо діагностики"
496
497 #: ../../../__w/calibre/calibre/manual/develop.rst:292
498 msgid ""
499 "Python is a dynamically typed language with excellent facilities for "
500 "introspection. Kovid wrote the core calibre code without once using a "
501 "debugger. There are many strategies to debug calibre code:"
502 msgstr "Python — мова з динамічною типізацією та чудовими можливостями з інтроспекції. Ковід створив код основних бібліотек calibre без жодного застосування засобів діагностики. Втім, існує багато стратегій діагностування коду calibre:"
503
504 #: ../../../__w/calibre/calibre/manual/develop.rst:297
505 msgid "Using print statements"
506 msgstr "Використання інструкцій print"
507
508 #: ../../../__w/calibre/calibre/manual/develop.rst:299
509 msgid ""
510 "This is Kovid's favorite way to debug. Simply insert print statements at "
511 "points of interest and run your program in the terminal. For example, you "
512 "can start the GUI from the terminal as::"
513 msgstr "Цей улюблений спосіб діагностування Ковіда. Просто вставте інструкції print у потрібні вам місця у коді і запустіть програму з термінала. Наприклад, ви можете запустити графічний інтерфейс програми з термінала ось так::"
514
515 #: ../../../__w/calibre/calibre/manual/develop.rst:304
516 msgid "Similarly, you can start the E-book viewer as::"
517 msgstr "Так само, ви можете запустити засіб для перегляду електронних книг ось так::"
518
519 #: ../../../__w/calibre/calibre/manual/develop.rst:308
520 msgid "The e-book editor can be started as::"
521 msgstr "Редактор електронних книг можна запустити ось так::"
522
523 #: ../../../__w/calibre/calibre/manual/develop.rst:313
524 msgid "Using an interactive Python interpreter"
525 msgstr "Використання інтерактивного інтерпретатора Python"
526
527 #: ../../../__w/calibre/calibre/manual/develop.rst:315
528 msgid ""
529 "You can insert the following two lines of code to start an interactive "
530 "Python session at that point::"
531 msgstr "Ви можете вставити такі два рядки коду, щоб запустити інтерактивний сеанс Python на цьому кроці::"
532
533 #: ../../../__w/calibre/calibre/manual/develop.rst:320
534 msgid ""
535 "When running from the command line, this will start an interactive Python "
536 "interpreter with access to all locally defined variables (variables in the "
537 "local scope). The interactive prompt even has :kbd:`Tab` completion for "
538 "object properties and you can use the various Python facilities for "
539 "introspection, such as :func:`dir`, :func:`type`, :func:`repr`, etc."
540 msgstr "Якщо програму запущено з командного рядка, цей код запустити інтерактивний інтерпретатор Python із доступом до усіх локально визначених змінних (змінних у області local). У інтерактивному командному рядку передбачено навіть автоматичне доповнення за натисканням клавіші :kbd:`Tab` властивостей об’єктів. Ви також можете скористатися різноманітними можливостями Python для інтроспекції, зокрема :func:`dir`, :func:`type`, :func:`repr` тощо."
541
542 #: ../../../__w/calibre/calibre/manual/develop.rst:326
543 msgid "Using the Python debugger as a remote debugger"
544 msgstr "Використання засобу діагностики Python як віддалений засіб діагностики"
545
546 #: ../../../__w/calibre/calibre/manual/develop.rst:328
547 msgid ""
548 "You can use the builtin Python debugger (pdb) as a remote debugger from the "
549 "command line. First, start the remote debugger at the point in the calibre "
550 "code you are interested in, like this::"
551 msgstr "Ви можете скористатися вбудованим засобом діагностики Python (pdb) як віддаленим засобом діагностики з командного рядка. Спочатку, запустіть віддалений засіб діагностики у точці коду calibre, яка вам потрібна, ось так::"
552
553 #: ../../../__w/calibre/calibre/manual/develop.rst:335
554 msgid ""
555 "Then run calibre, either as normal, or using one of the calibre-debug "
556 "commands described in the previous section. Once the above point in the code"
557 " is reached, calibre will freeze, waiting for the debugger to connect."
558 msgstr "Далі, запустіть calibre у звичний спосіб або за допомогою команд calibre-debug, які описано у попередньому розділі. Щойно буде досягнуто визначеної вище точки у коді, роботу calibre буде призупинено, вона очікуватиме на з’єднання із засобом діагностики."
559
560 #: ../../../__w/calibre/calibre/manual/develop.rst:339
561 msgid ""
562 "Now open a terminal or command prompt and use the following command to start"
563 " the debugging session::"
564 msgstr "Тепер відкрийте вікно термінала або командний рядок і віддайте таку команду, щоб розпочати сеанс діагностики::"
565
566 #: ../../../__w/calibre/calibre/manual/develop.rst:344
567 msgid ""
568 "You can read about how to use the Python debugger in the `Python stdlib docs"
569 " for the pdb module <https://docs.python.org/library/pdb.html#debugger-"
570 "commands>`_."
571 msgstr "Дізнатися більше про те, як користуватися засобом діагностики python, можна за допомогою `документації щодо стандартної бібліотеки Python, модуль pdb <https://docs.python.org/library/pdb.html#debugger-commands>`_."
572
573 #: ../../../__w/calibre/calibre/manual/develop.rst:348
574 msgid ""
575 "By default, the remote debugger will try to connect on port 4444. You can "
576 "change it, by passing the port parameter to both the set_trace() and the "
577 "cli() functions above, like this: ``set_trace(port=1234)`` and "
578 "``cli(port=1234)``."
579 msgstr "Типово, засіб віддаленої діагностики намагатиметься встановити з’єднання на порту 4444. Ви можете змінити порт, передавши параметр порту до функцій set_trace() і cli(), ось так: ``set_trace(port=1234)`` і ``cli(port=1234)``."
580
581 #: ../../../__w/calibre/calibre/manual/develop.rst:354
582 msgid ""
583 "The Python debugger cannot handle multiple threads, so you have to call "
584 "set_trace once per thread, each time with a different port number."
585 msgstr "Засіб діагностики Python не може працювати одночасно з декількома потоками виконання, тому вам слід викликати set_trace для кожного потоку, кожного разу на портах із різними номерами."
586
587 #: ../../../__w/calibre/calibre/manual/develop.rst:358
588 msgid "Using the debugger in your favorite Python IDE"
589 msgstr "Використання засобу діагностики у вашому улюбленому комплексному середовищі розробки Python"
590
591 #: ../../../__w/calibre/calibre/manual/develop.rst:360
592 msgid ""
593 "It is possible to use the builtin debugger in your favorite Python IDE, if "
594 "it supports remote debugging. The first step is to add the calibre src "
595 "checkout to the ``PYTHONPATH`` in your IDE. In other words, the folder you "
596 "set as ``CALIBRE_DEVELOP_FROM`` above, must also be in the ``PYTHONPATH`` of"
597 " your IDE."
598 msgstr "Можна скористатися вбудованим засобом діагностики у вашому улюбленому комплексному середовищі для розробки, якщо там передбачено віддалену діагностику. Першим кроком є додавання адреси клону src calibre до змінної ``PYTHONPATH`` у вашому комплексному середовищі для розробки. Іншими словами, тека, яку ви визначили для змінної ``CALIBRE_DEVELOP_FROM`` вище, має також бути серед тек у змінній ``PYTHONPATH`` вашого комплексного середовища для розробки."
599
600 #: ../../../__w/calibre/calibre/manual/develop.rst:365
601 msgid ""
602 "Then place the IDE's remote debugger module into the :file:`src` sub-folder "
603 "of the calibre source code checkout. Add whatever code is needed to launch "
604 "the remote debugger to calibre at the point of interest, for example in the "
605 "main function. Then run calibre as normal. Your IDE should now be able to "
606 "connect to the remote debugger running inside calibre."
607 msgstr "Далі, розташуйте модуль віддаленого засобу діагностики комплексного середовища розробки у підтеці :file:`src` клону початкового коду calibre. Додайте код, який потрібен для запуску віддаленого засобу діагностики у код calibre у потрібному вам місці, наприклад у функції main. Далі, запустіть calibre у звичний спосіб. Після цього ваше комплексне середовище розробки має з’єднатися із засобом віддаленої діагностики, запущеним у calibre."
608
609 #: ../../../__w/calibre/calibre/manual/develop.rst:372
610 msgid "Executing arbitrary scripts in the calibre Python environment"
611 msgstr "Виконання довільних скриптів у середовищі Python calibre"
612
613 #: ../../../__w/calibre/calibre/manual/develop.rst:374
614 msgid ""
615 "The :command:`calibre-debug` command provides a couple of handy switches to "
616 "execute your own code, with access to the calibre modules::"
617 msgstr "У програмі :command:`calibre-debug` передбачено декілька зручних перемикачів для виконання вашого власного коду із доступом до модулів calibre::"
618
619 #: ../../../__w/calibre/calibre/manual/develop.rst:379
620 msgid ""
621 "is great for testing a little snippet of code on the command line. It works "
622 "in the same way as the -c switch to the Python interpreter::"
623 msgstr "чудово пасує для тестування невеличкого фрагмента коду у командному рядку. Працює так само, як перемикач -c самого інтерпретатора Python::"
624
625 #: ../../../__w/calibre/calibre/manual/develop.rst:383
626 msgid ""
627 "can be used to execute your own Python script. It works in the same way as "
628 "passing the script to the Python interpreter, except that the calibre "
629 "environment is fully initialized, so you can use all the calibre code in "
630 "your script. To use command line arguments with your script, use the form::"
631 msgstr "може бути використано для запуску вашого власного скрипту мовою Python. Працює так само, як передавання скрипту інтерпретатору Python, але із повністю ініціалізованим середовищем calibre. Отже, ви зможете скористатися усім кодом calibre у вашому скрипті. Щоб передати скрипту параметри командного рядка, скористайтеся таким форматом::"
632
633 #: ../../../__w/calibre/calibre/manual/develop.rst:388
634 msgid ""
635 "The ``--`` causes all subsequent arguments to be passed to your script."
636 msgstr "Додавання ``--`` спричинить передавання усіх наступних аргументів до вашого скрипту."
637
638 #: ../../../__w/calibre/calibre/manual/develop.rst:392
639 msgid "Running the calibre test suite"
640 msgstr "Запуск комплексу для тестування calibre"
641
642 #: ../../../__w/calibre/calibre/manual/develop.rst:394
643 msgid "The calibre test suite can be run by::"
644 msgstr "Комплект засобів тестування calibre можна запустити такою командою::"
645
646 #: ../../../__w/calibre/calibre/manual/develop.rst:400
647 msgid "Using calibre in your projects"
648 msgstr "Використання calibre у ваших проектах"
649
650 #: ../../../__w/calibre/calibre/manual/develop.rst:402
651 msgid ""
652 "It is possible to directly use calibre functions/code in your Python "
653 "project. Two ways exist to do this:"
654 msgstr "Ви можете безпосередньо скористатися функціями або кодом calibre у вашому проекті мовою Python. Передбачено два способи зробити це:"
655
656 #: ../../../__w/calibre/calibre/manual/develop.rst:405
657 msgid "Binary install of calibre"
658 msgstr "Зі встановленого бінарного пакунка calibre"
659
660 #: ../../../__w/calibre/calibre/manual/develop.rst:407
661 msgid ""
662 "If you have a binary install of calibre, you can use the Python interpreter "
663 "bundled with calibre, like this::"
664 msgstr "Якщо вами встановлено бінарний пакунок calibre, ви можете скористатися інтерпретатором Python, який міститься у ньому. Ось так::"
665
666 #: ../../../__w/calibre/calibre/manual/develop.rst:412
667 msgid "Source install on Linux"
668 msgstr "Зі встановлених початкових кодів у Linux"
669
670 #: ../../../__w/calibre/calibre/manual/develop.rst:414
671 msgid ""
672 "In addition to using the above technique, if you do a source install on "
673 "Linux, you can also directly import calibre, as follows::"
674 msgstr "Окрім використання описаної вище методики, якщо ви встановили програму з початкових кодів у Linux, ви також можете безпосередньо імпортувати модуль calibre, ось так::"
675
676 #: ../../../__w/calibre/calibre/manual/develop.rst:422
677 msgid ""
678 "It is essential that you import the init_calibre module before any other "
679 "calibre modules/packages as it sets up the interpreter to run calibre code."
680 msgstr "Дуже важливо імпортувати модуль init_calibre до будь-яких інших модулів або пакунків calibre, оскільки цей модуль налаштовує інтерпретатор на виконання коду calibre."
681
682 #: ../../../__w/calibre/calibre/manual/develop.rst:426
683 msgid "API documentation for various parts of calibre"
684 msgstr "Документація з програмного інтерфейсу до різноманітних частин calibre"