diff --git a/src/calibre/customize/conversion.py b/src/calibre/customize/conversion.py index 5da51a5c6d..4b4468f487 100644 --- a/src/calibre/customize/conversion.py +++ b/src/calibre/customize/conversion.py @@ -202,9 +202,9 @@ class InputFormatPlugin(Plugin): ''' This method must be implemented in sub-classes. It must return the path to the created OPF file or an :class:`OEBBook` instance. - All output should be contained in the current directory. + All output should be contained in the current folder. If this plugin creates files outside the current - directory they must be deleted/marked for deletion before this method + folder they must be deleted/marked for deletion before this method returns. :param stream: A file like object that contains the input file. @@ -328,7 +328,7 @@ class OutputFormatPlugin(Plugin): :param output: Either a file like object or a string. If it is a string 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 + plugin should write its output into that folder. 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 the conversion pipeline. diff --git a/src/calibre/db/cli/cmd_backup_metadata.py b/src/calibre/db/cli/cmd_backup_metadata.py index 2edbbd55b4..83b00cdb17 100644 --- a/src/calibre/db/cli/cmd_backup_metadata.py +++ b/src/calibre/db/cli/cmd_backup_metadata.py @@ -21,7 +21,7 @@ def option_parser(get_parser, args): %prog backup_metadata [options] Backup the metadata stored in the database into individual OPF files in each -books directory. This normally happens automatically, but you can run this +books folder. This normally happens automatically, but you can run this command to force re-generation of the OPF files, with the --all option. Note that there is normally no need to do this, as the OPF files are backed up diff --git a/src/calibre/db/cli/cmd_clone.py b/src/calibre/db/cli/cmd_clone.py index f6f5c7c9bd..5e97c0859b 100644 --- a/src/calibre/db/cli/cmd_clone.py +++ b/src/calibre/db/cli/cmd_clone.py @@ -49,7 +49,7 @@ def main(opts, args, dbctx): if not empty: raise SystemExit( _( - '%s is not empty. You must choose an empty directory for the new library.' + '%s is not empty. You must choose an empty folder for the new library.' ) % loc ) if iswindows and len(loc) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT: diff --git a/src/calibre/devices/cli.py b/src/calibre/devices/cli.py index 722ee0ce50..1a3a3df200 100755 --- a/src/calibre/devices/cli.py +++ b/src/calibre/devices/cli.py @@ -258,7 +258,7 @@ def main(): for book in dev.books(oncard='cardb'): print(book) elif command == "mkdir": - parser = OptionParser(usage="usage: %prog mkdir [options] path\nCreate a directory on the device\n\npath must begin with / or card:/") + parser = OptionParser(usage="usage: %prog mkdir [options] path\nCreate a folder on the device\n\npath must begin with / or card:/") if len(args) != 1: parser.print_help() sys.exit(1) @@ -268,7 +268,7 @@ def main(): parser.add_option( "-l", help="In addition to the name of each file, print the file type, permissions, and timestamp (the modification time, in the local timezone). Times are local.", # noqa dest="ll", action="store_true", default=False) - parser.add_option("-R", help="Recursively list subdirectories encountered. /dev and /proc are omitted", + parser.add_option("-R", help="Recursively list subfolders encountered. /dev and /proc are omitted", dest="recurse", action="store_true", default=False) parser.remove_option("-h") parser.add_option("-h", "--human-readable", help="show sizes in human readable format", dest="hrs", action="store_true", default=False) @@ -285,7 +285,7 @@ def main(): "dev:mountpoint/my/path\n"+\ "where mountpoint is one of / or carda: or cardb:/\n\n"+\ "source must point to a file for which you have read permissions\n"+\ - "destination must point to a file or directory for which you have write permissions" + "destination must point to a file or folder for which you have write permissions" parser = OptionParser(usage=usage) parser.add_option('-f', '--force', dest='force', action='store_true', default=False, help='Overwrite the destination file if it exists already.') @@ -336,7 +336,7 @@ def main(): outfile = sys.stdout dev.get_file(path, outfile) elif command == "rm": - parser = OptionParser(usage="usage: %prog rm path\nDelete files from the device\n\npath should point to a file or empty directory on the device "+ + parser = OptionParser(usage="usage: %prog rm path\nDelete files from the device\n\npath should point to a file or empty folder on the device "+ "and must begin with / or card:/\n\n"+ "rm will DELETE the file. Be very CAREFUL") options, args = parser.parse_args(args) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index daea5972f3..4e4ced6088 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -986,7 +986,7 @@ class KOBO(USBMS): ''' Upload book cover to the device. Default implementation does nothing. - :param path: The full path to the directory where the associated book is located. + :param path: The full path to the folder where the associated book is located. :param filename: The name of the book file without the extension. :param metadata: metadata belonging to the book. Use metadata.thumbnail for cover @@ -2585,7 +2585,7 @@ class KOBOTOUCH(KOBO): ''' Upload book cover to the device. Default implementation does nothing. - :param path: The full path to the directory where the associated book is located. + :param path: The full path to the folder where the associated book is located. :param filename: The name of the book file without the extension. :param metadata: metadata belonging to the book. Use metadata.thumbnail for cover @@ -2747,7 +2747,7 @@ class KOBOTOUCH(KOBO): image_dir = os.path.dirname(os.path.abspath(path)) if not os.path.exists(image_dir): - debug_print("KoboTouch:_upload_cover - Image directory does not exist. Creating path='%s'" % (image_dir)) + debug_print("KoboTouch:_upload_cover - Image folder does not exist. Creating path='%s'" % (image_dir)) os.makedirs(image_dir) with lopen(cover, 'rb') as f: diff --git a/src/calibre/ebooks/conversion/cli.py b/src/calibre/ebooks/conversion/cli.py index 9bdb34ee6d..858e872068 100644 --- a/src/calibre/ebooks/conversion/cli.py +++ b/src/calibre/ebooks/conversion/cli.py @@ -33,8 +33,8 @@ output_file. output_file can also be of the special format .EXT where \ EXT is the output file extension. In this case, the name of the output \ file is derived from the name of the input file. Note that the filenames must \ not start with a hyphen. Finally, if output_file has no extension, then \ -it is treated as a directory and an "open e-book" (OEB) consisting of HTML \ -files is written to that directory. These files are the files that would \ +it is treated as a folder and an "open e-book" (OEB) consisting of HTML \ +files is written to that folder. These files are the files that would \ normally have been passed to the output plugin. After specifying the input \ diff --git a/src/calibre/ebooks/html/input.py b/src/calibre/ebooks/html/input.py index ae9511b81f..73c2cf2c1e 100644 --- a/src/calibre/ebooks/html/input.py +++ b/src/calibre/ebooks/html/input.py @@ -43,7 +43,7 @@ class Link(object): def __init__(self, url, base): ''' :param url: The url this link points to. Must be an unquoted unicode string. - :param base: The base directory that relative URLs are with respect to. + :param base: The base folder that relative URLs are with respect to. Must be a unicode string. ''' assert isinstance(url, unicode_type) and isinstance(base, unicode_type) diff --git a/src/calibre/ebooks/htmlz/oeb2html.py b/src/calibre/ebooks/htmlz/oeb2html.py index 0470109d6d..0ba8ce358f 100644 --- a/src/calibre/ebooks/htmlz/oeb2html.py +++ b/src/calibre/ebooks/htmlz/oeb2html.py @@ -32,7 +32,7 @@ class OEB2HTML(object): content. Also, callers should use oeb2html to get the transformed html. links and images can be retrieved after calling oeb2html to get the mapping of OEB links and images to the new names used in the html returned by oeb2html. - Images will always be referenced as if they are in an images directory. + Images will always be referenced as if they are in an images folder. Use get_css to get the CSS classes for the OEB document as a string. ''' diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index 53e037f4fe..0284dd7f4b 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -68,7 +68,7 @@ class CSSPreProcessor(cssp): def clone_dir(src, dest): - ' Clone a directory using hard links for the files, dest must already exist ' + ' Clone a folder using hard links for the files, dest must already exist ' for x in os.listdir(src): dpath = os.path.join(dest, x) spath = os.path.join(src, x) @@ -222,17 +222,17 @@ class ContainerBase(object): # {{{ class Container(ContainerBase): # {{{ ''' - A container represents an Open E-Book as a directory full of files and an + A container represents an Open E-Book as a folder full of files and an opf file. There are two important concepts: * The root folder. This is the base of the e-book. All the e-books files are inside this folder or in its sub-folders. * Names: These are paths to the books' files relative to the root - directory. They always contain POSIX separators and are unquoted. They + folder. They always contain POSIX separators and are unquoted. They can be thought of as canonical identifiers for files in the book. Most methods on the container object work with names. Names are always - in the NFC unicode normal form. + in the NFC Unicode normal form. * Clones: the container object supports efficient on-disk cloning, which is used to implement checkpoints in the e-book editor. In order to make this work, you should @@ -507,7 +507,7 @@ class Container(ContainerBase): # {{{ ''' Convert an absolute path to a canonical name relative to :attr:`root` - :param root: The base directory. By default the root for this container object is used. + :param root: The base folder. By default the root for this container object is used. ''' # OS X silently changes all file names to NFD form. The EPUB # spec requires all text including filenames to be in NFC form. @@ -524,7 +524,7 @@ class Container(ContainerBase): # {{{ return name_to_abspath(name, self.root) def exists(self, name): - ''' True iff a file/directory corresponding to the canonical name exists. Note + ''' True iff a file/folder corresponding to the canonical name exists. Note that this function suffers from the limitations of the underlying OS filesystem, in particular case (in)sensitivity. So on a case insensitive filesystem this will return True even if the case of name diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index a3c006b717..f97fc226be 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -804,8 +804,8 @@ def show_temp_dir_error(err): extra = _('Click "Show details" for more information.') if 'CALIBRE_TEMP_DIR' in os.environ: extra = _('The %s environment variable is set. Try unsetting it.') % 'CALIBRE_TEMP_DIR' - error_dialog(None, _('Could not create temporary directory'), _( - 'Could not create temporary directory, calibre cannot start.') + ' ' + extra, det_msg=traceback.format_exc(), show=True) + error_dialog(None, _('Could not create temporary folder'), _( + 'Could not create temporary folder, calibre cannot start.') + ' ' + extra, det_msg=traceback.format_exc(), show=True) def setup_hidpi(): @@ -908,7 +908,7 @@ class Application(QApplication): except EnvironmentError as err: if not headless: show_temp_dir_error(err) - raise SystemExit('Failed to create temporary directory') + raise SystemExit('Failed to create temporary folder') if DEBUG and not headless: prints('devicePixelRatio:', self.devicePixelRatio()) s = self.primaryScreen() diff --git a/src/calibre/gui2/actions/__init__.py b/src/calibre/gui2/actions/__init__.py index 88626ad158..6862c9eac2 100644 --- a/src/calibre/gui2/actions/__init__.py +++ b/src/calibre/gui2/actions/__init__.py @@ -231,7 +231,7 @@ class InterfaceAction(QObject): :param text: The text of the action. :param icon: Either a QIcon or a file name. The file name is passed to the I() builtin, so you do not need to pass the full path to the images - directory. + folder. :param shortcut: A string, a list of strings, None or False. If False, no keyboard shortcut is registered for this action. If None, a keyboard shortcut with no default keybinding is registered. String and list of diff --git a/src/calibre/gui2/convert/debug.py b/src/calibre/gui2/convert/debug.py index e4ef2ba72d..35be0ab653 100644 --- a/src/calibre/gui2/convert/debug.py +++ b/src/calibre/gui2/convert/debug.py @@ -49,7 +49,7 @@ class DebugWidget(Widget, Ui_Form): import traceback det_msg = traceback.format_exc() error_dialog(self, _('Invalid debug folder'), - _('Failed to create debug directory')+': '+ unicode_type(self.opt_debug_pipeline.text()), + _('Failed to create debug folder')+': '+ unicode_type(self.opt_debug_pipeline.text()), det_msg=det_msg, show=True) return False return True diff --git a/src/calibre/gui2/dialogs/trim_image.py b/src/calibre/gui2/dialogs/trim_image.py index ac60adac18..c5d03eb68b 100644 --- a/src/calibre/gui2/dialogs/trim_image.py +++ b/src/calibre/gui2/dialogs/trim_image.py @@ -87,13 +87,13 @@ class TrimImage(QDialog): w = rect.width() h = rect.height() text = f'{int(w)}x{int(h)}' - text = _('Size: {0} Aspect ratio: {1:.2g}').format(text, w / h) + text = _('Size: {0}px Aspect ratio: {1:.2g}').format(text, w / h) else: text = '' self.tr_sz.setText(text) def image_changed(self, qimage): - self.sz.setText('\xa0' + _('Size:') + ' ' + '%dx%d' % (qimage.width(), qimage.height())) + self.sz.setText('\xa0' + _('Size: {0}x{1}px').format(qimage.width(), qimage.height())) def cleanup(self): self.canvas.break_cycles() diff --git a/src/calibre/gui2/preferences/misc.ui b/src/calibre/gui2/preferences/misc.ui index 56bd1c4b6b..fe07e90b15 100644 --- a/src/calibre/gui2/preferences/misc.ui +++ b/src/calibre/gui2/preferences/misc.ui @@ -107,7 +107,7 @@ - Open calibre &configuration directory + Open calibre &configuration folder diff --git a/src/calibre/gui2/tweak_book/diff/main.py b/src/calibre/gui2/tweak_book/diff/main.py index 55b2e440f5..f6cecd92b6 100644 --- a/src/calibre/gui2/tweak_book/diff/main.py +++ b/src/calibre/gui2/tweak_book/diff/main.py @@ -400,7 +400,7 @@ class Diff(Dialog): def dir_diff(self, left, right, identical_msg=None): with self: - identical = self.apply_diff(identical_msg or _('The directories are identical'), *dir_diff(left, right)) + identical = self.apply_diff(identical_msg or _('The folders are identical'), *dir_diff(left, right)) self.view.finalize() if identical: self.reject() diff --git a/src/calibre/srv/opts.py b/src/calibre/srv/opts.py index 68f4a131aa..841dcea8d3 100644 --- a/src/calibre/srv/opts.py +++ b/src/calibre/srv/opts.py @@ -166,7 +166,7 @@ raw_options = ( _('Path to user database'), 'userdb', None, _('Path to a file in which to store the user and password information. Normally a' - ' file in the calibre configuration directory is used.'), + ' file in the calibre configuration folder is used.'), _('Choose the type of authentication used'), 'auth_mode', Choices('auto', 'basic', 'digest'), _('Set the HTTP authentication mode used by the server. Set to "basic" if you are' diff --git a/src/calibre/utils/config_base.py b/src/calibre/utils/config_base.py index e2a35cb4cb..33d312a136 100644 --- a/src/calibre/utils/config_base.py +++ b/src/calibre/utils/config_base.py @@ -484,7 +484,7 @@ def create_global_prefs(conf_obj=None): c.add_opt('network_timeout', default=5, help=_('Default timeout for network operations (seconds)')) c.add_opt('library_path', default=None, - help=_('Path to directory in which your library of books is stored')) + help=_('Path to folder in which your library of books is stored')) c.add_opt('language', default=None, help=_('The language in which to display the user interface')) c.add_opt('output_format', default='EPUB', diff --git a/src/calibre/web/fetch/simple.py b/src/calibre/web/fetch/simple.py index 8e3f351c7f..03c66c408c 100644 --- a/src/calibre/web/fetch/simple.py +++ b/src/calibre/web/fetch/simple.py @@ -597,7 +597,7 @@ class RecursiveFetcher(object): def option_parser(usage=_('%prog URL\n\nWhere URL is for example https://google.com')): parser = OptionParser(usage=usage) parser.add_option('-d', '--base-dir', - help=_('Base directory into which URL is saved. Default is %default'), + help=_('Base folder into which URL is saved. Default is %default'), default='.', type='string', dest='dir') parser.add_option('-t', '--timeout', help=_('Timeout in seconds to wait for a response from the server. Default: %default s'),