From 54c56b9d0e95863e31ea4f51c8fd6d9941b29a8d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 8 Mar 2021 17:08:16 +0530 Subject: [PATCH] String changes --- manual/creating_plugins.rst | 10 +++++----- manual/customize.rst | 2 +- manual/drm.rst | 2 +- manual/template_lang.rst | 2 +- src/calibre/customize/conversion.py | 2 +- src/calibre/ebooks/oeb/polish/container.py | 2 +- src/calibre/gui2/actions/catalog.py | 2 +- src/calibre/gui2/device_drivers/configwidget.ui | 2 +- src/calibre/gui2/preferences/coloring.py | 2 +- src/calibre/gui2/preferences/look_feel.ui | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/manual/creating_plugins.rst b/manual/creating_plugins.rst index f1ec52fbdb..12775c277d 100644 --- a/manual/creating_plugins.rst +++ b/manual/creating_plugins.rst @@ -30,7 +30,7 @@ and enter the following Python code into it: :lines: 10- That's all. To add this code to calibre as a plugin, simply run the following in -the directory in which you created :file:`__init__.py`:: +the folder in which you created :file:`__init__.py`:: calibre-customize -b . @@ -71,7 +71,7 @@ The first thing to note is that this ZIP file has a lot more files in it, explai The prefix ``calibre_plugins`` must always be present. ``some_name`` comes from the filename of the empty text file. ``some_module`` refers to :file:`some_module.py` file inside the ZIP file. Note that this importing is just as powerful as regular Python imports. You can create packages and subpackages of .py modules inside the ZIP file, - just like you would normally (by defining __init__.py in each sub-directory), and everything should "just work". + just like you would normally (by defining __init__.py in each sub-folder), and everything should "just work". The name you use for ``some_name`` enters a global namespace shared by all plugins, **so make it as unique as possible**. But remember that it must be a valid Python identifier (only alphabets, numbers and the underscore). @@ -139,7 +139,7 @@ calibre's plugin loading system defines a couple of built-in functions that allo **get_resources(name_or_list_of_names)** This function should be called with a list of paths to files inside the ZIP file. For example to access the file icon.png in - the directory images in the ZIP file, you would use: ``images/icon.png``. Always use a forward slash as the path separator, + the folder images in the ZIP file, you would use: ``images/icon.png``. Always use a forward slash as the path separator, even on Windows. When you pass in a single name, the function will return the raw bytes of that file or None if the name was not found in the ZIP file. If you pass in more than one name then it returns a dict mapping the names to bytes. If a name is not found, it will not be present in the returned dict. @@ -254,7 +254,7 @@ Running User Interface plugins in a separate process If you are writing a user interface plugin that needs to make use of Qt WebEngine, it cannot be run in the main calibre process as it is not possible to use WebEngine there. Instead you can copy the data -your plugin needs to a temporary directory and run the plugin with that +your plugin needs to a temporary folder and run the plugin with that data in a separate process. A simple example plugin follows that shows how to do this. @@ -338,7 +338,7 @@ You can insert print statements anywhere in your plugin code, they will be outpu You can quickly test changes to your plugin by using the following command line:: - calibre-debug -s; calibre-customize -b /path/to/your/plugin/directory; calibre + calibre-debug -s; calibre-customize -b /path/to/your/plugin/folder; calibre This will shutdown a running calibre, wait for the shutdown to complete, then update your plugin in calibre and relaunch calibre. diff --git a/manual/customize.rst b/manual/customize.rst index c1767fd4b9..cd6ac6ca32 100644 --- a/manual/customize.rst +++ b/manual/customize.rst @@ -83,7 +83,7 @@ choose to install calibre. You should not change the files in this resources folder, as your changes will get overwritten the next time you update calibre. Instead, go to :guilabel:`Preferences->Advanced->Miscellaneous` and click -:guilabel:`Open calibre configuration directory`. In this configuration directory, create a +:guilabel:`Open calibre configuration folder`. In this configuration directory, create a sub-folder called resources and place the files you want to override in it. Place the files in the appropriate sub folders, for example place images in :file:`resources/images`, etc. calibre will automatically use your custom file diff --git a/manual/drm.rst b/manual/drm.rst index 67ecd13f7c..341394b4c2 100644 --- a/manual/drm.rst +++ b/manual/drm.rst @@ -103,5 +103,5 @@ that carry both DRMed as well as DRM-free books, not knowing if they carry DRM or not make it a point to leave a comment or review on the website informing future buyers of its DRM status. Many sellers do not think it important to clearly indicate to their buyers if an e-book carries DRM or not. `Here -` you will find a Guide to +` you will find a guide to DRM-free living. diff --git a/manual/template_lang.rst b/manual/template_lang.rst index f90da3ae47..d218c982e2 100644 --- a/manual/template_lang.rst +++ b/manual/template_lang.rst @@ -441,7 +441,7 @@ In General Program Mode the functions described in `Single Function Mode` requir * ``ondevice()`` -- return the string ``'Yes'`` if ``ondevice`` is set, otherwise return the empty string. * ``or(value, value, ...)`` -- returns the string ``"1"`` if any value is not empty, otherwise returns the empty string. You can have as many values as you want. This function can usually be replaced by the ``||`` operator. A reason it cannot be replaced is if short-circuiting will change the results because of side effects. * ``print(a, b, ...)`` -- prints the arguments to standard output. Unless you start calibre from the command line (``calibre-debug -g``), the output will go to a black hole. The ``print`` function always returns the empty string. - * ``raw_field(lookup_name [, optional_default]))`` -- returns the metadata field named by ``lookup_name`` without applying any formatting. It evaluates and returns the optional second argument ``optional_default`` if the field's value is undefined (``None``). + * ``raw_field(lookup_name [, optional_default])`` -- returns the metadata field named by ``lookup_name`` without applying any formatting. It evaluates and returns the optional second argument ``optional_default`` if the field's value is undefined (``None``). * ``raw_list(lookup_name, separator)`` -- returns the metadata list named by ``lookup_name`` without applying any formatting or sorting, with the items separated by separator. * ``re_group(value, pattern, template_for_group_1, for_group_2, ...)`` -- return a string made by applying the regular expression pattern to ``value`` and replacing each matched instance with the the value returned by the corresponding template. In Template Program Mode, like for the ``template`` and the ``eval`` functions, you use ``[[`` for ``{`` and ``]]`` for ``}``. diff --git a/src/calibre/customize/conversion.py b/src/calibre/customize/conversion.py index e38eaedc76..5da51a5c6d 100644 --- a/src/calibre/customize/conversion.py +++ b/src/calibre/customize/conversion.py @@ -327,7 +327,7 @@ class OutputFormatPlugin(Plugin): :class:`calibre.ebooks.oeb.OEBBook`) to the file specified by output. :param output: Either a file like object or a string. If it is a string - it is the path to a directory that may or may not exist. The output + it is the path to a folder that may or may not exist. The output plugin should write its output into that directory. If it is a file like object, the output plugin should write its output into the file. :param input_plugin: The input plugin that was used at the beginning of diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index 36a03914d2..83697475c7 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -225,7 +225,7 @@ class Container(ContainerBase): # {{{ A container represents an Open E-Book as a directory full of files and an opf file. There are two important concepts: - * The root directory. This is the base of the e-book. All the e-books + * The root folder. This is the base of the e-book. All the e-books files are inside this directory or in its sub-directories. * Names: These are paths to the books' files relative to the root diff --git a/src/calibre/gui2/actions/catalog.py b/src/calibre/gui2/actions/catalog.py index 5efb4088d3..fb34741926 100644 --- a/src/calibre/gui2/actions/catalog.py +++ b/src/calibre/gui2/actions/catalog.py @@ -92,7 +92,7 @@ class GenerateCatalogAction(InterfaceAction): self.gui.status_bar.show_message(_('Catalog generated.'), 3000) self.gui.sync_catalogs() if not dynamic.get('catalog_add_to_library', True) or job.fmt not in {'EPUB','MOBI', 'AZW3'}: - export_dir = choose_dir(self.gui, _('Export Catalog Directory'), + export_dir = choose_dir(self.gui, _('Export Catalog Folder'), _('Select destination for %(title)s.%(fmt)s') % dict( title=job.catalog_title, fmt=job.fmt.lower())) if export_dir: diff --git a/src/calibre/gui2/device_drivers/configwidget.ui b/src/calibre/gui2/device_drivers/configwidget.ui index 11fa4bf3d0..9ebb8aa050 100644 --- a/src/calibre/gui2/device_drivers/configwidget.ui +++ b/src/calibre/gui2/device_drivers/configwidget.ui @@ -86,7 +86,7 @@ - If checked, books are placed into sub-directories based on their metadata on the device. If unchecked, books are all put into the top level directory. + If checked, books are placed into sub-folders based on their metadata on the device. If unchecked, books are all put into the top level directory. Use sub-directories diff --git a/src/calibre/gui2/preferences/coloring.py b/src/calibre/gui2/preferences/coloring.py index ad84f6d4cd..ed66fe4308 100644 --- a/src/calibre/gui2/preferences/coloring.py +++ b/src/calibre/gui2/preferences/coloring.py @@ -964,7 +964,7 @@ class EditRules(QWidget): # {{{ hb.addWidget(b) hb.addStretch(10) self.open_icon_folder_button = b = QPushButton(QIcon(I('icon_choose.png')), - _('Open icon directory'), self) + _('Open icon folder'), self) connect_lambda(b.clicked, self, lambda _: open_local_file(os.path.join(config_dir, 'cc_icons'))) hb.addWidget(b) diff --git a/src/calibre/gui2/preferences/look_feel.ui b/src/calibre/gui2/preferences/look_feel.ui index 32008615f2..439440e6bf 100644 --- a/src/calibre/gui2/preferences/look_feel.ui +++ b/src/calibre/gui2/preferences/look_feel.ui @@ -623,7 +623,7 @@ A value of zero means calculate automatically. - &Open cache directory + &Open cache folder