Debian Codegraph @

translations/manual/en_CA/creating_plugins.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 msgid ""
7 msgstr ""
8 "Project-Id-Version: calibre\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2026-02-17 16:44+0000\n"
11 "PO-Revision-Date: 2014-06-17 08:35+0000\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: English (Canada) (http://app.transifex.com/calibre/calibre/language/en_CA/)\n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17 "Language: en_CA\n"
18 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
20 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:4
21 msgid "Writing your own plugins to extend calibre's functionality"
22 msgstr "Writing your own plugins to extend calibre's functionality"
23
24 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:6
25 msgid ""
26 "calibre has a very modular design. Almost all functionality in calibre comes"
27 " in the form of plugins. Plugins are used for conversion, for downloading "
28 "news (though these are called recipes), for various components of the user "
29 "interface, to connect to different devices, to process files when adding "
30 "them to calibre and so on. You can get a complete list of all the built-in "
31 "plugins in calibre by going to :guilabel:`Preferences->Advanced->Plugins`."
32 msgstr ""
33
34 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:8
35 msgid ""
36 "Here, we will teach you how to create your own plugins to add new features "
37 "to calibre."
38 msgstr "Here, we will teach you how to create your own plugins to add new features to calibre."
39
40 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:13
41 msgid "Contents"
42 msgstr "Contents"
43
44 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:15
45 msgid "This only applies to calibre releases >= 0.8.60"
46 msgstr "This only applies to calibre releases >= 0.8.60"
47
48 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:18
49 msgid "Anatomy of a calibre plugin"
50 msgstr "Anatomy of a calibre plugin"
51
52 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:20
53 msgid ""
54 "A calibre plugin is very simple, it's just a ZIP file that contains some "
55 "Python code and any other resources like image files needed by the plugin. "
56 "Without further ado, let's see a basic example."
57 msgstr ""
58
59 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:24
60 msgid ""
61 "Suppose you have an installation of calibre that you are using to self "
62 "publish various e-documents in EPUB and MOBI formats. You would like all "
63 "files generated by calibre to have their publisher set as \"Hello world\", "
64 "here's how to do it. Create a file named :file:`__init__.py` (this is a "
65 "special name and must always be used for the main file of your plugin) and "
66 "enter the following Python code into it:"
67 msgstr "Suppose you have an installation of calibre that you are using to self publish various e-documents in EPUB and MOBI formats. You would like all files generated by calibre to have their publisher set as \"Hello world\", here's how to do it. Create a file named :file:`__init__.py` (this is a special name and must always be used for the main file of your plugin) and enter the following Python code into it:"
68
69 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:32
70 msgid ""
71 "That's all. To add this code to calibre as a plugin, simply run the "
72 "following in the folder in which you created :file:`__init__.py`::"
73 msgstr ""
74
75 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:38
76 msgid ""
77 "On macOS, the command line tools are inside the calibre bundle, for example,"
78 " if you installed calibre in :file:`/Applications` the command line tools "
79 "are in :file:`/Applications/calibre.app/Contents/MacOS/`."
80 msgstr ""
81
82 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:42
83 msgid ""
84 "You can download the Hello World plugin from "
85 ":download_file:`helloworld_plugin.zip`."
86 msgstr ""
87
88 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:45
89 msgid ""
90 "Every time you use calibre to convert a book, the plugin's :meth:`run` "
91 "method will be called and the converted book will have its publisher set to "
92 "\"Hello World\". This is a trivial plugin, let's move on to a more complex "
93 "example that actually adds a component to the user interface."
94 msgstr ""
95
96 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:50
97 msgid "A User Interface plugin"
98 msgstr "A User Interface plugin"
99
100 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:52
101 msgid ""
102 "This plugin will be spread over a few files (to keep the code clean). It "
103 "will show you how to get resources (images or data files) from the plugin "
104 "ZIP file, allow users to configure your plugin, how to create elements in "
105 "the calibre user interface and how to access and query the books database in"
106 " calibre."
107 msgstr ""
108
109 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:57
110 msgid ""
111 "You can download this plugin from :download_file:`interface_demo_plugin.zip`"
112 msgstr ""
113
114 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:61
115 msgid ""
116 "The first thing to note is that this ZIP file has a lot more files in it, "
117 "explained below, pay particular attention to ``plugin-import-name-"
118 "interface_demo.txt``."
119 msgstr ""
120
121 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:64
122 msgid "**plugin-import-name-interface_demo.txt**"
123 msgstr "**plugin-import-name-interface_demo.txt**"
124
125 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:65
126 msgid ""
127 "An empty text file used to enable the multi-file plugin magic. This file "
128 "must be present in all plugins that use more than one .py file. It should be"
129 " empty and its filename must be of the form: ``plugin-import-"
130 "name-**some_name**.txt``. The presence of this file allows you to import "
131 "code from the .py files present inside the ZIP file, using a statement "
132 "like::"
133 msgstr ""
134
135 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:71
136 msgid ""
137 "The prefix ``calibre_plugins`` must always be present. ``some_name`` comes "
138 "from the filename of the empty text file. ``some_module`` refers to "
139 ":file:`some_module.py` file inside the ZIP file. Note that this importing is"
140 " just as powerful as regular Python imports. You can create packages and "
141 "subpackages of .py modules inside the ZIP file, just like you would normally"
142 " (by defining __init__.py in each sub-folder), and everything should \"just "
143 "work\"."
144 msgstr ""
145
146 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:76
147 msgid ""
148 "The name you use for ``some_name`` enters a global namespace shared by all "
149 "plugins, **so make it as unique as possible**. But remember that it must be "
150 "a valid Python identifier (only alphabets, numbers and the underscore)."
151 msgstr ""
152
153 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:79
154 msgid "**__init__.py**"
155 msgstr "**__init__.py**"
156
157 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:80
158 msgid "As before, the file that defines the plugin class"
159 msgstr "As before, the file that defines the plugin class"
160
161 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:82
162 msgid "**main.py**"
163 msgstr "**main.py**"
164
165 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:83
166 msgid "This file contains the actual code that does something useful"
167 msgstr "This file contains the actual code that does something useful"
168
169 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:85
170 msgid "**ui.py**"
171 msgstr "**ui.py**"
172
173 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:86
174 msgid "This file defines the interface part of the plugin"
175 msgstr "This file defines the interface part of the plugin"
176
177 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:88
178 msgid "**images/icon.png**"
179 msgstr "**images/icon.png**"
180
181 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:89
182 msgid "The icon for this plugin"
183 msgstr "The icon for this plugin"
184
185 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:91
186 msgid "**about.txt**"
187 msgstr "**about.txt**"
188
189 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:92
190 msgid "A text file with information about the plugin"
191 msgstr "A text file with information about the plugin"
192
193 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:94
194 msgid "**translations**"
195 msgstr "**translations**"
196
197 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:95
198 msgid ""
199 "A folder containing .mo files with the translations of the user interface of"
200 " your plugin into different languages. See below for details."
201 msgstr "A folder containing .mo files with the translations of the user interface of your plugin into different languages. See below for details."
202
203 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:99
204 msgid "Now let's look at the code."
205 msgstr "Now let's look at the code."
206
207 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:102
208 msgid "__init__.py"
209 msgstr "__init__.py"
210
211 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:104
212 msgid "First, the obligatory ``__init__.py`` to define the plugin metadata:"
213 msgstr "First, the obligatory ``__init__.py`` to define the plugin metadata:"
214
215 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:109
216 msgid ""
217 "The only noteworthy feature is the field :attr:`actual_plugin`. Since "
218 "calibre has both command line and GUI interfaces, GUI plugins like this one "
219 "should not load any GUI libraries in __init__.py. The actual_plugin field "
220 "does this for you, by telling calibre that the actual plugin is to be found "
221 "in another file inside your ZIP archive, which will only be loaded in a GUI "
222 "context."
223 msgstr ""
224
225 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:114
226 msgid ""
227 "Remember that for this to work, you must have a plugin-import-name-"
228 "some_name.txt file in your plugin ZIP file, as discussed above."
229 msgstr ""
230
231 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:117
232 msgid ""
233 "Also there are a couple of methods for enabling user configuration of the "
234 "plugin. These are discussed below."
235 msgstr "Also there are a couple of methods for enabling user configuration of the plugin. These are discussed below."
236
237 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:120
238 msgid "ui.py"
239 msgstr "ui.py"
240
241 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:122
242 msgid ""
243 "Now let's look at ui.py which defines the actual GUI plugin. The source code"
244 " is heavily commented and should be self explanatory:"
245 msgstr "Now let's look at ui.py which defines the actual GUI plugin. The source code is heavily commented and should be self explanatory:"
246
247 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:128
248 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:220
249 msgid "main.py"
250 msgstr "main.py"
251
252 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:130
253 msgid "The actual logic to implement the Interface Plugin Demo dialog."
254 msgstr "The actual logic to implement the Interface Plugin Demo dialog."
255
256 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:136
257 msgid "Getting resources from the plugin ZIP file"
258 msgstr ""
259
260 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:138
261 msgid ""
262 "calibre's plugin loading system defines a couple of built-in functions that "
263 "allow you to conveniently get files from the plugin ZIP file."
264 msgstr ""
265
266 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:140
267 msgid "**get_resources(name_or_list_of_names)**"
268 msgstr "**get_resources(name_or_list_of_names)**"
269
270 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:141
271 msgid ""
272 "This function should be called with a list of paths to files inside the ZIP "
273 "file. For example to access the file :file:`icon.png` in the folder images "
274 "in the ZIP file, you would use: ``images/icon.png``. Always use a forward "
275 "slash as the path separator, even on Windows. When you pass in a single "
276 "name, the function will return the raw bytes of that file or None if the "
277 "name was not found in the ZIP file. If you pass in more than one name then "
278 "it returns a dictionary mapping the names to bytes. If a name is not found,"
279 " it will not be present in the returned dictionary."
280 msgstr ""
281
282 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:150
283 msgid "**get_icons(name_or_list_of_names, plugin_name='')**"
284 msgstr ""
285
286 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:151
287 msgid ""
288 "A wrapper for get_resources() that creates QIcon objects from the raw bytes "
289 "returned by get_resources. If a name is not found in the ZIP file the "
290 "corresponding QIcon will be null. In order to support icon theme-ing, pass "
291 "in the human friendly name of your plugin as ``plugin_name``. If the user is"
292 " using an icon theme with icons for your plugin, they will be loaded "
293 "preferentially."
294 msgstr ""
295
296 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:160
297 msgid "Enabling user configuration of your plugin"
298 msgstr "Enabling user configuration of your plugin"
299
300 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:162
301 msgid ""
302 "To allow users to configure your plugin, you must define three methods in "
303 "your base plugin class, **is_customizable**, **config_widget** and "
304 "**save_settings** as shown below:"
305 msgstr ""
306
307 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:173
308 msgid ""
309 "calibre has many different ways to store configuration data (a legacy of its"
310 " long history). The recommended way is to use the **JSONConfig** class, "
311 "which stores your configuration information in a .json file."
312 msgstr "calibre has many different ways to store configuration data (a legacy of its long history). The recommended way is to use the **JSONConfig** class, which stores your configuration information in a .json file."
313
314 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:175
315 msgid ""
316 "The code to manage configuration data in the demo plugin is in config.py:"
317 msgstr "The code to manage configuration data in the demo plugin is in config.py:"
318
319 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:180
320 msgid ""
321 "The ``prefs`` object is now available throughout the plugin code by a "
322 "simple::"
323 msgstr "The ``prefs`` object is now available throughout the plugin code by a simple::"
324
325 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:185
326 msgid "You can see the ``prefs`` object being used in main.py:"
327 msgstr "You can see the ``prefs`` object being used in main.py:"
328
329 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:192
330 msgid "Edit book plugins"
331 msgstr ""
332
333 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:194
334 msgid ""
335 "Now let's change gears for a bit and look at creating a plugin to add tools "
336 "to the calibre book editor. The plugin is available here: "
337 ":download_file:`editor_demo_plugin.zip`."
338 msgstr ""
339
340 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:198
341 msgid ""
342 "The first step, as for all plugins is to create the import name empty txt "
343 "file, as described :ref:`above <import_name_txt>`. We shall name the file "
344 "``plugin-import-name-editor_plugin_demo.txt``."
345 msgstr "The first step, as for all plugins is to create the import name empty txt file, as described :ref:`above <import_name_txt>`. We shall name the file ``plugin-import-name-editor_plugin_demo.txt``."
346
347 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:202
348 msgid ""
349 "Now we create the mandatory ``__init__.py`` file that contains metadata "
350 "about the plugin -- its name, author, version, etc."
351 msgstr "Now we create the mandatory ``__init__.py`` file that contains metadata about the plugin -- its name, author, version, etc."
352
353 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:208
354 msgid ""
355 "A single editor plugin can provide multiple tools each tool corresponds to a"
356 " single button in the toolbar and entry in the :guilabel:`Plugins` menu in "
357 "the editor. These can have sub-menus in case the tool has multiple related "
358 "actions."
359 msgstr "A single editor plugin can provide multiple tools each tool corresponds to a single button in the toolbar and entry in the :guilabel:`Plugins` menu in the editor. These can have sub-menus in case the tool has multiple related actions."
360
361 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:212
362 msgid ""
363 "The tools must all be defined in the file ``main.py`` in your plugin. Every "
364 "tool is a class that inherits from the "
365 ":class:`calibre.gui2.tweak_book.plugin.Tool` class. Let's look at "
366 "``main.py`` from the demo plugin, the source code is heavily commented and "
367 "should be self-explanatory. Read the API documents of the "
368 ":class:`calibre.gui2.tweak_book.plugin.Tool` class for more details."
369 msgstr "The tools must all be defined in the file ``main.py`` in your plugin. Every tool is a class that inherits from the :class:`calibre.gui2.tweak_book.plugin.Tool` class. Let's look at ``main.py`` from the demo plugin, the source code is heavily commented and should be self-explanatory. Read the API documents of the :class:`calibre.gui2.tweak_book.plugin.Tool` class for more details."
370
371 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:222
372 msgid ""
373 "Here we will see the definition of a single tool that will multiply all font"
374 " sizes in the book by a number provided by the user. This tool demonstrates "
375 "various important concepts that you will need in developing your own "
376 "plugins, so you should read the (heavily commented) source code carefully."
377 msgstr "Here we will see the definition of a single tool that will multiply all font sizes in the book by a number provided by the user. This tool demonstrates various important concepts that you will need in developing your own plugins, so you should read the (heavily commented) source code carefully."
378
379 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:230
380 msgid ""
381 "Let's break down ``main.py``. We see that it defines a single tool, named "
382 "*Magnify fonts*. This tool will ask the user for a number and multiply all "
383 "font sizes in the book by that number."
384 msgstr "Let's break down ``main.py``. We see that it defines a single tool, named *Magnify fonts*. This tool will ask the user for a number and multiply all font sizes in the book by that number."
385
386 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:234
387 msgid ""
388 "The first important thing is the tool name which you must set to some "
389 "relatively unique string as it will be used as the key for this tool."
390 msgstr "The first important thing is the tool name which you must set to some relatively unique string as it will be used as the key for this tool."
391
392 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:237
393 msgid ""
394 "The next important entry point is the "
395 ":meth:`calibre.gui2.tweak_book.plugin.Tool.create_action`. This method "
396 "creates the QAction objects that appear in the plugins toolbar and plugin "
397 "menu. It also, optionally, assigns a keyboard shortcut that the user can "
398 "customize. The triggered signal from the QAction is connected to the "
399 "ask_user() method that asks the user for the font size multiplier, and then "
400 "runs the magnification code."
401 msgstr "The next important entry point is the :meth:`calibre.gui2.tweak_book.plugin.Tool.create_action`. This method creates the QAction objects that appear in the plugins toolbar and plugin menu. It also, optionally, assigns a keyboard shortcut that the user can customize. The triggered signal from the QAction is connected to the ask_user() method that asks the user for the font size multiplier, and then runs the magnification code."
402
403 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:245
404 msgid ""
405 "The magnification code is well commented and fairly simple. The main things "
406 "to note are that you get a reference to the editor window as ``self.gui`` "
407 "and the editor *Boss* as ``self.boss``. The *Boss* is the object that "
408 "controls the editor user interface. It has many useful methods, that are "
409 "documented in the :class:`calibre.gui2.tweak_book.boss.Boss` class."
410 msgstr "The magnification code is well commented and fairly simple. The main things to note are that you get a reference to the editor window as ``self.gui`` and the editor *Boss* as ``self.boss``. The *Boss* is the object that controls the editor user interface. It has many useful methods, that are documented in the :class:`calibre.gui2.tweak_book.boss.Boss` class."
411
412 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:251
413 msgid ""
414 "Finally, there is ``self.current_container`` which is a reference to the "
415 "book being edited as a "
416 ":class:`calibre.ebooks.oeb.polish.container.Container` object. This "
417 "represents the book as a collection of its constituent HTML/CSS/image files "
418 "and has convenience methods for doing many useful things. The container "
419 "object and various useful utility functions that can be reused in your "
420 "plugin code are documented in :ref:`polish_api`."
421 msgstr "Finally, there is ``self.current_container`` which is a reference to the book being edited as a :class:`calibre.ebooks.oeb.polish.container.Container` object. This represents the book as a collection of its constituent HTML/CSS/image files and has convenience methods for doing many useful things. The container object and various useful utility functions that can be reused in your plugin code are documented in :ref:`polish_api`."
422
423 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:259
424 msgid "Adding translations to your plugin"
425 msgstr "Adding translations to your plugin"
426
427 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:261
428 msgid ""
429 "You can have all the user interface strings in your plugin translated and "
430 "displayed in whatever language is set for the main calibre user interface."
431 msgstr "You can have all the user interface strings in your plugin translated and displayed in whatever language is set for the main calibre user interface."
432
433 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:264
434 msgid ""
435 "The first step is to go through your plugin's source code and mark all user "
436 "visible strings as translatable, by surrounding them in _(). For example::"
437 msgstr "The first step is to go through your plugin's source code and mark all user visible strings as translatable, by surrounding them in _(). For example::"
438
439 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:269
440 msgid ""
441 "Then use some program to generate .po files from your plugin source code. "
442 "There should be one .po file for every language you want to translate into. "
443 "For example: de.po for German, fr.po for French and so on. You can use the "
444 "`Poedit <https://poedit.net/>`_ program for this."
445 msgstr ""
446
447 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:274
448 msgid ""
449 "Send these .po files to your translators. Once you get them back, compile "
450 "them into .mo files. You can again use Poedit for that, or just do::"
451 msgstr ""
452
453 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:279
454 msgid "Put the .mo files into the ``translations`` folder in your plugin."
455 msgstr "Put the .mo files into the ``translations`` folder in your plugin."
456
457 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:281
458 msgid ""
459 "The last step is to simply call the function `load_translations()` at the "
460 "top of your plugin's .py files. For performance reasons you should only call"
461 " this function in those .py files that actually have translatable strings. "
462 "So in a typical User Interface plugin you would call it at the top of "
463 "``ui.py`` but not ``__init__.py``."
464 msgstr "The last step is to simply call the function `load_translations()` at the top of your plugin's .py files. For performance reasons you should only call this function in those .py files that actually have translatable strings. So in a typical User Interface plugin you would call it at the top of ``ui.py`` but not ``__init__.py``."
465
466 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:287
467 msgid ""
468 "You can test the translations of your plugins by changing the user interface"
469 " language in calibre under :guilabel:`Preferences->Interface->Look & feel` "
470 "or by running calibre with the ``CALIBRE_OVERRIDE_LANG`` environment "
471 "variable set. For example::"
472 msgstr ""
473
474 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:293
475 msgid ""
476 "Replace ``de`` with the language code of the language you want to test."
477 msgstr "Replace ``de`` with the language code of the language you want to test."
478
479 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:295
480 msgid ""
481 "For translations with plurals, use the ``ngettext()`` function instead of "
482 "``_()``. For example::"
483 msgstr ""
484
485 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:301
486 msgid "The plugin API"
487 msgstr "The plugin API"
488
489 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:303
490 msgid ""
491 "As you may have noticed above, a plugin in calibre is a class. There are "
492 "different classes for the different types of plugins in calibre. Details on "
493 "each class, including the base class of all plugins can be found in "
494 ":ref:`plugins`."
495 msgstr "As you may have noticed above, a plugin in calibre is a class. There are different classes for the different types of plugins in calibre. Details on each class, including the base class of all plugins can be found in :ref:`plugins`."
496
497 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:306
498 msgid ""
499 "Your plugin is almost certainly going to use code from calibre. To learn how"
500 " to find various bits of functionality in the calibre code base, read the "
501 "section on the calibre :ref:`code_layout`."
502 msgstr "Your plugin is almost certainly going to use code from calibre. To learn how to find various bits of functionality in the calibre code base, read the section on the calibre :ref:`code_layout`."
503
504 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:311
505 msgid "Debugging plugins"
506 msgstr "Debugging plugins"
507
508 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:313
509 msgid ""
510 "The first, most important step is to run calibre in debug mode. You can do "
511 "this from the command line with::"
512 msgstr "The first, most important step is to run calibre in debug mode. You can do this from the command line with::"
513
514 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:317
515 msgid ""
516 "Or from within calibre by right-clicking the :guilabel:`Preferences` button "
517 "or using the :kbd:`Ctrl+Shift+R` keyboard shortcut."
518 msgstr ""
519
520 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:319
521 msgid ""
522 "When running from the command line, debug output will be printed to the "
523 "console, when running from within calibre the output will go to a txt file."
524 msgstr "When running from the command line, debug output will be printed to the console, when running from within calibre the output will go to a txt file."
525
526 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:321
527 msgid ""
528 "You can insert print statements anywhere in your plugin code, they will be "
529 "output in debug mode. Remember, this is Python, you really shouldn't need "
530 "anything more than print statements to debug ;) I developed all of calibre "
531 "using just this debugging technique."
532 msgstr ""
533
534 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:323
535 msgid ""
536 "You can quickly test changes to your plugin by using the following command "
537 "line::"
538 msgstr "You can quickly test changes to your plugin by using the following command line::"
539
540 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:328
541 msgid ""
542 "This will shutdown a running calibre, wait for the shutdown to complete, "
543 "then update your plugin in calibre and relaunch calibre."
544 msgstr "This will shutdown a running calibre, wait for the shutdown to complete, then update your plugin in calibre and relaunch calibre."
545
546 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:331
547 msgid "More plugin examples"
548 msgstr "More plugin examples"
549
550 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:333
551 msgid ""
552 "You can find a list of many sophisticated calibre plugins `here "
553 "<https://www.mobileread.com/forums/showthread.php?t=118764>`_."
554 msgstr ""
555
556 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:336
557 msgid "Sharing your plugins with others"
558 msgstr "Sharing your plugins with others"
559
560 #: ../../../__w/calibre/calibre/manual/creating_plugins.rst:338
561 msgid ""
562 "If you would like to share the plugins you have created with other users of "
563 "calibre, post your plugin in a new thread in the `calibre plugins forum "
564 "<https://www.mobileread.com/forums/forumdisplay.php?f=237>`_."
565 msgstr ""