From 5aec47353082a60f50fb6b14b7bf5c3053bc5a77 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 9 Mar 2021 09:19:56 +0530 Subject: [PATCH] string changes --- Changelog.txt | 2 +- bypy/windows/portable-installer.cpp | 10 +++---- manual/develop.rst | 26 +++++++++---------- manual/gui.rst | 14 +++++----- src/calibre/db/cli/cmd_add.py | 12 ++++----- src/calibre/db/cli/cmd_export.py | 4 +-- src/calibre/db/cli/cmd_restore_database.py | 2 +- src/calibre/debug.py | 6 ++--- src/calibre/devices/kobo/kobotouch_config.py | 2 +- .../ebooks/conversion/plugins/docx_output.py | 2 +- .../ebooks/conversion/plugins/epub_output.py | 2 +- .../ebooks/conversion/plugins/html_output.py | 2 +- .../ebooks/conversion/plugins/mobi_output.py | 4 +-- src/calibre/ebooks/conversion/plumber.py | 14 +++++----- .../ebooks/oeb/transforms/filenames.py | 2 +- src/calibre/gui2/actions/add.py | 6 ++--- src/calibre/gui2/actions/catalog.py | 2 +- src/calibre/gui2/actions/save_to_disk.py | 8 +++--- .../gui2/device_drivers/configwidget.ui | 2 +- src/calibre/gui2/dialogs/exim.py | 8 +++--- src/calibre/library/catalogs/epub_mobi.py | 2 +- src/calibre/library/save_to_disk.py | 12 ++++----- src/calibre/utils/exim.py | 2 +- src/calibre/utils/formatter_functions.py | 3 +-- 24 files changed, 74 insertions(+), 75 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 16e0f1aba0..ae7033f38e 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1481,7 +1481,7 @@ If you turn on dark mode under the Windows Settings->Personalisation->Colors and - [1656573] Viewer: Fix hang when using --open-at with single instance viewer and the specified location is already open. -- [1853232] Viewer: Fix opening .txt files in the standalone viewer leaving behind a temporary index.html file in the directory of the txt file. +- [1853232] Viewer: Fix opening .txt files in the standalone viewer leaving behind a temporary index.html file in the folder of the txt file. - Linux: Make some cache removal code robust against un-decodeable filenames in the cache directories diff --git a/bypy/windows/portable-installer.cpp b/bypy/windows/portable-installer.cpp index 52fd996e61..b2009fef32 100644 --- a/bypy/windows/portable-installer.cpp +++ b/bypy/windows/portable-installer.cpp @@ -256,7 +256,7 @@ end: // }}} -// Find calibre portable directory and install/upgrade into it {{{ +// Find calibre portable folder and install/upgrade into it {{{ static BOOL directory_exists( LPCWSTR path ) { @@ -529,7 +529,7 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine hr = CoInitialize(NULL); if (FAILED(hr)) { show_error(L"Failed to initialize COM"); return ret; } - // Get the target directory for installation + // Get the target folder for installation argv = CommandLineToArgvW(GetCommandLine(), &argc); if (argv == NULL) { show_last_error(L"Failed to get command line"); return ret; } if (argc > 1) { @@ -549,7 +549,7 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine } if (!directory_exists(tgt)) { - show_detailed_error(L"The specified directory does not exist: ", + show_detailed_error(L"The specified folder does not exist: ", tgt, 1); goto end; } @@ -589,10 +589,10 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine } // Make a temp dir to unpack into - if (!SetCurrentDirectoryW(fdest)) { show_detailed_error(L"Failed to change to unzip directory: ", fdest, 0); goto end; } + if (!SetCurrentDirectoryW(fdest)) { show_detailed_error(L"Failed to change to unzip folder: ", fdest, 0); goto end; } if ( (unpack_dir = make_unpack_dir()) == NULL ) goto end; - if (!SetCurrentDirectoryW(unpack_dir)) { show_detailed_error(L"Failed to change to unpack directory: ", fdest, 0); goto end; } + if (!SetCurrentDirectoryW(unpack_dir)) { show_detailed_error(L"Failed to change to unpack folder: ", fdest, 0); goto end; } // Extract files if (!extract(cdata, csz)) goto end; diff --git a/manual/develop.rst b/manual/develop.rst index 2e7f5f25b0..d2878050a9 100644 --- a/manual/develop.rst +++ b/manual/develop.rst @@ -108,7 +108,7 @@ changes, then run:: git commit -am "Comment describing your changes" git format-patch origin/master --stdout > my-changes -This will create a :file:`my-changes` file in the current directory, +This will create a :file:`my-changes` file in the current folder, simply attach that to a ticket on the calibre `bug tracker `_. Note that this will include *all* the commits you have made. If you only want to send some commits, you have to change ``origin/master`` above. To send only @@ -158,13 +158,13 @@ Windows development environment .. note:: You must also get the calibre source code separately as described above. Install calibre normally, using the Windows installer. Then open a Command Prompt and change to -the previously checked out calibre code directory. For example:: +the previously checked out calibre code folder. For example:: cd C:\Users\kovid\work\calibre -calibre is the directory that contains the src and resources sub-directories. +calibre is the folder that contains the src and resources sub-folders. -The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src directory. +The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src folder. So, following the example above, it would be ``C:\Users\kovid\work\calibre\src``. `Here is a short guide `_ to setting environment variables on Windows. @@ -192,17 +192,17 @@ macOS development environment .. note:: You must also get the calibre source code separately as described above. Install calibre normally using the provided .dmg. Then open a Terminal and change to -the previously checked out calibre code directory, for example:: +the previously checked out calibre code folder, for example:: cd /Users/kovid/work/calibre -calibre is the directory that contains the src and resources sub-directories. +calibre is the folder that contains the src and resources sub-folders. The calibre command line tools are found inside the calibre app bundle, in :file:`/Applications/calibre.app/Contents/MacOS` -you should add this directory to your PATH environment variable, if you want to +you should add this folder to your PATH environment variable, if you want to run the command line tools easily. -The next step is to create a bash script that will set the environment variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src directory when running calibre in debug mode. +The next step is to create a bash script that will set the environment variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src folder when running calibre in debug mode. Create a plain text file:: @@ -233,13 +233,13 @@ used in Windows and macOS. Alternatively, you can install calibre from source. I environment from source are in the INSTALL file in the source tree. Here we will address using the binary as a runtime, which is the recommended method. -Install calibre using the binary installer. Then open a terminal and change to the previously checked out calibre code directory, for example:: +Install calibre using the binary installer. Then open a terminal and change to the previously checked out calibre code folder, for example:: cd /home/kovid/work/calibre -calibre is the directory that contains the src and resources sub-directories. +calibre is the folder that contains the src and resources sub-folders. -The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src directory. +The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src folder. So, following the example above, it would be ``/home/kovid/work/calibre/src``. How to set environment variables depends on your Linux distribution and what shell you are using. @@ -350,10 +350,10 @@ Using the debugger in your favorite Python IDE It is possible to use the builtin debugger in your favorite Python IDE, if it supports remote debugging. The first step is to add the calibre src checkout to -the ``PYTHONPATH`` in your IDE. In other words, the directory you set as +the ``PYTHONPATH`` in your IDE. In other words, the folder you set as ``CALIBRE_DEVELOP_FROM`` above, must also be in the ``PYTHONPATH`` of your IDE. -Then place the IDE's remote debugger module into the :file:`src` subdirectory +Then place the IDE's remote debugger module into the :file:`src` sub-folder of the calibre source code checkout. Add whatever code is needed to launch the remote debugger to calibre at the point of interest, for example in the main function. Then run calibre as normal. Your IDE should now be able to connect to diff --git a/manual/gui.rst b/manual/gui.rst index dd165a14dc..fd6d28e8dd 100644 --- a/manual/gui.rst +++ b/manual/gui.rst @@ -45,9 +45,9 @@ Add books |adbi| The :guilabel:`Add books` action has seven variations accessed by doing a right-click on the button. - 1. **Add books from a single directory**: Opens a file chooser dialog and allows you to specify which books in a directory should be added. This action is *context sensitive*, i.e. it depends on which :ref:`catalog ` you have selected. If you have selected the :guilabel:`Library`, books will be added to the library. If you have selected the e-book reader device, the books will be uploaded to the device, and so on. + 1. **Add books from a single folder**: Opens a file chooser dialog and allows you to specify which books in a folder should be added. This action is *context sensitive*, i.e. it depends on which :ref:`catalog ` you have selected. If you have selected the :guilabel:`Library`, books will be added to the library. If you have selected the e-book reader device, the books will be uploaded to the device, and so on. - 2. **Add books from directories and sub-directories**: Allows you to choose a directory. The directory and all its sub-directories are scanned recursively, and any e-books found are added to the library. You can choose whether to have calibre add all files present in a single directory to a single book record or multiple book records. calibre assumes that each directory contains a single book. All e-book files in a directory are assumed to be the same book in different formats. This action is the inverse of the :ref:`Save to disk ` action, i.e. you can :guilabel:`Save to disk`, delete the books and re-add them in single book per directory mode, with no lost information except for the date (this assumes you have not changed any of the setting for the Save to disk action). + 2. **Add books from folders and sub-folders**: Allows you to choose a folder. The folder and all its sub-folders are scanned recursively, and any e-books found are added to the library. You can choose whether to have calibre add all files present in a single folder to a single book record or multiple book records. calibre assumes that each folder contains a single book. All e-book files in a folder are assumed to be the same book in different formats. This action is the inverse of the :ref:`Save to disk ` action, i.e. you can :guilabel:`Save to disk`, delete the books and re-add them in single book per folder mode, with no lost information except for the date (this assumes you have not changed any of the setting for the Save to disk action). 3. **Add multiple books from archive (ZIP/RAR)**: Allows you to add multiple e-books that are stored inside the selected ZIP or RAR files. It is a convenient shortcut that avoids having to first unzip the archive and then add the books via one of the above two options. @@ -211,7 +211,7 @@ Save to disk .. _save_to_disk_multiple: - 1. **Save to disk**: Saves the selected books to disk organized in directories. The directory structure looks like:: + 1. **Save to disk**: Saves the selected books to disk organized in folders. The folder structure looks like:: Author_(sort) Title @@ -222,15 +222,15 @@ Save to disk .. _save_to_disk_single: - 2. **Save to disk in a single directory**: Saves the selected books to disk in a single directory. + 2. **Save to disk in a single folder**: Saves the selected books to disk in a single folder. For 1. and 2., all available formats, as well as metadata, are stored to disk for each selected book. Metadata is stored in an OPF file. Saved books can be re-imported to the library without any loss of information by using the :ref:`Add books ` action. - 3. **Save only ** format to disk**: Saves the selected books to disk in the directory structure as shown in (1.) but only in your preferred e-book format. You can set your preferred format in :guilabel:`Preferences->Interface->Behaviour->Preferred output format` + 3. **Save only ** format to disk**: Saves the selected books to disk in the folder structure as shown in (1.) but only in your preferred e-book format. You can set your preferred format in :guilabel:`Preferences->Interface->Behaviour->Preferred output format` - 4. **Save only ** format to disk in a single directory**: Saves the selected books to disk in a single directory but only in your preferred e-book format. You can set your preferred format in :guilabel:`Preferences->Interface->Behaviour->Preferred output format` + 4. **Save only ** format to disk in a single folder**: Saves the selected books to disk in a single folder but only in your preferred e-book format. You can set your preferred format in :guilabel:`Preferences->Interface->Behaviour->Preferred output format` - 5. **Save single format to disk...**: Saves the selected books to disk in the directory structure as shown in (1.) but only in the format you select from the pop-out list. + 5. **Save single format to disk...**: Saves the selected books to disk in the folder structure as shown in (1.) but only in the format you select from the pop-out list. .. _connect_share: diff --git a/src/calibre/db/cli/cmd_add.py b/src/calibre/db/cli/cmd_add.py index 33faf61bea..b37e561d70 100644 --- a/src/calibre/db/cli/cmd_add.py +++ b/src/calibre/db/cli/cmd_add.py @@ -307,8 +307,8 @@ def option_parser(get_parser, args): '''\ %prog add [options] file1 file2 file3 ... -Add the specified files as books to the database. You can also specify directories, see -the directory related options below. +Add the specified files as books to the database. You can also specify folders, see +the folder related options below. ''' ) ) @@ -413,7 +413,7 @@ the directory related options below. action='store_true', default=False, help=_( - 'Assume that each directory has only a single logical book and that all files in it are different e-book formats of that book' + 'Assume that each folder has only a single logical book and that all files in it are different e-book formats of that book' ) ) g.add_option( @@ -421,7 +421,7 @@ the directory related options below. '--recurse', action='store_true', default=False, - help=_('Process directories recursively') + help=_('Process folders recursively') ) def fadd(opt, action, help): @@ -441,14 +441,14 @@ the directory related options below. fadd( '--ignore', 'ignore', _( - 'A filename (glob) pattern, files matching this pattern will be ignored when scanning directories for files.' + 'A filename (glob) pattern, files matching this pattern will be ignored when scanning folders for files.' ' Can be specified multiple times for multiple patterns. For e.g.: *.pdf will ignore all pdf files' ) ) fadd( '--add', 'add', _( - 'A filename (glob) pattern, files matching this pattern will be added when scanning directories for files,' + 'A filename (glob) pattern, files matching this pattern will be added when scanning folders for files,' ' even if they are not of a known e-book file type. Can be specified multiple times for multiple patterns.' ) ) diff --git a/src/calibre/db/cli/cmd_export.py b/src/calibre/db/cli/cmd_export.py index 4630291fe5..bcf60f01ff 100644 --- a/src/calibre/db/cli/cmd_export.py +++ b/src/calibre/db/cli/cmd_export.py @@ -59,14 +59,14 @@ an opf file). You can get id numbers from the search command. '--to-dir', default='.', help=( - _('Export books to the specified directory. Default is') + ' %default' + _('Export books to the specified folder. Default is') + ' %default' ) ) parser.add_option( '--single-dir', default=False, action='store_true', - help=_('Export all books into a single directory') + help=_('Export all books into a single folder') ) parser.add_option( '--progress', diff --git a/src/calibre/db/cli/cmd_restore_database.py b/src/calibre/db/cli/cmd_restore_database.py index a07aa16222..1d8ad0a14f 100644 --- a/src/calibre/db/cli/cmd_restore_database.py +++ b/src/calibre/db/cli/cmd_restore_database.py @@ -22,7 +22,7 @@ def option_parser(get_parser, args): %prog restore_database [options] Restore this database from the metadata stored in OPF files in each -directory of the calibre library. This is useful if your metadata.db file +folder of the calibre library. This is useful if your metadata.db file has been corrupted. WARNING: This command completely regenerates your database. You will lose diff --git a/src/calibre/debug.py b/src/calibre/debug.py index ddc3fb7879..d4398162e8 100644 --- a/src/calibre/debug.py +++ b/src/calibre/debug.py @@ -73,7 +73,7 @@ Everything after the -- is passed to the script. parser.add_option('-t', '--edit-book', action='store_true', help=_('Launch the calibre "Edit book" tool in debug mode.')) parser.add_option('-x', '--explode-book', default=False, action='store_true', - help=_('Explode the book into the specified directory.\nUsage: ' + help=_('Explode the book into the specified folder.\nUsage: ' '-x file.epub output_dir\n' 'Exports the book as a collection of HTML ' 'files and metadata, which you can edit using standard HTML ' @@ -85,9 +85,9 @@ Everything after the -- is passed to the script. ' specify the same file type as was used when exploding.')) parser.add_option('--export-all-calibre-data', default=False, action='store_true', help=_('Export all calibre data (books/settings/plugins). Normally, you will' - ' be asked for the export dir and the libraries to export. You can also specify them' + ' be asked for the export folder and the libraries to export. You can also specify them' ' as command line arguments to skip the questions.' - ' Use absolute paths for the export directory and libraries.' + ' Use absolute paths for the export folder and libraries.' ' The special keyword "all" can be used to export all libraries.')) parser.add_option('--import-calibre-data', default=False, action='store_true', help=_('Import previously exported calibre data')) diff --git a/src/calibre/devices/kobo/kobotouch_config.py b/src/calibre/devices/kobo/kobotouch_config.py index 0c5b3b507b..046bb8afb5 100644 --- a/src/calibre/devices/kobo/kobotouch_config.py +++ b/src/calibre/devices/kobo/kobotouch_config.py @@ -199,7 +199,7 @@ class BookUploadsGroupBox(DeviceOptionsGroupBox): _("Modify CSS"), _('This allows addition of user CSS rules and removal of some CSS. ' 'When sending a book, the driver adds the contents of {0} to all stylesheets in the EPUB. ' - 'This file is searched for in the root directory of the main memory of the device. ' + 'This file is searched for in the root folder of the main memory of the device. ' 'As well as this, if the file contains settings for the "orphans" or "widows", ' 'these are removed for all styles in the original stylesheet.').format(device.KOBO_EXTRA_CSSFILE), device.get_pref('modify_css') diff --git a/src/calibre/ebooks/conversion/plugins/docx_output.py b/src/calibre/ebooks/conversion/plugins/docx_output.py index b8aa8002fb..5a22fc40f7 100644 --- a/src/calibre/ebooks/conversion/plugins/docx_output.py +++ b/src/calibre/ebooks/conversion/plugins/docx_output.py @@ -43,7 +43,7 @@ class DOCXOutput(OutputFormatPlugin): OptionRecommendation(name='extract_to', help=_('Extract the contents of the generated %s file to the ' - 'specified directory. The contents of the directory are first ' + 'specified folder. The contents of the folder are first ' 'deleted, so be careful.') % 'DOCX'), OptionRecommendation(name='docx_page_margin_left', recommended_value=72.0, diff --git a/src/calibre/ebooks/conversion/plugins/epub_output.py b/src/calibre/ebooks/conversion/plugins/epub_output.py index 1607d4fe42..ac107e32e3 100644 --- a/src/calibre/ebooks/conversion/plugins/epub_output.py +++ b/src/calibre/ebooks/conversion/plugins/epub_output.py @@ -54,7 +54,7 @@ class EPUBOutput(OutputFormatPlugin): options = { OptionRecommendation(name='extract_to', help=_('Extract the contents of the generated %s file to the ' - 'specified directory. The contents of the directory are first ' + 'specified folder. The contents of the folder are first ' 'deleted, so be careful.') % 'EPUB'), OptionRecommendation(name='dont_split_on_page_breaks', diff --git a/src/calibre/ebooks/conversion/plugins/html_output.py b/src/calibre/ebooks/conversion/plugins/html_output.py index 1aa29c86d5..9323d3c65e 100644 --- a/src/calibre/ebooks/conversion/plugins/html_output.py +++ b/src/calibre/ebooks/conversion/plugins/html_output.py @@ -36,7 +36,7 @@ class HTMLOutput(OutputFormatPlugin): OptionRecommendation(name='extract_to', help=_('Extract the contents of the generated ZIP file to the ' - 'specified directory. WARNING: The contents of the directory ' + 'specified folder. WARNING: The contents of the folder ' 'will be deleted.') ), } diff --git a/src/calibre/ebooks/conversion/plugins/mobi_output.py b/src/calibre/ebooks/conversion/plugins/mobi_output.py index 6151abfc68..e0501ca639 100644 --- a/src/calibre/ebooks/conversion/plugins/mobi_output.py +++ b/src/calibre/ebooks/conversion/plugins/mobi_output.py @@ -81,7 +81,7 @@ class MOBIOutput(OutputFormatPlugin): ), OptionRecommendation(name='extract_to', help=_('Extract the contents of the generated %s file to the ' - 'specified directory. The contents of the directory are first ' + 'specified folder. The contents of the folder are first ' 'deleted, so be careful.') % 'MOBI' ), OptionRecommendation(name='share_not_sync', recommended_value=False, @@ -298,7 +298,7 @@ class AZW3Output(OutputFormatPlugin): ), OptionRecommendation(name='extract_to', help=_('Extract the contents of the generated %s file to the ' - 'specified directory. The contents of the directory are first ' + 'specified folder. The contents of the folder are first ' 'deleted, so be careful.') % 'AZW3'), OptionRecommendation(name='share_not_sync', recommended_value=False, help=_('Enable sharing of book content via Facebook etc. ' diff --git a/src/calibre/ebooks/conversion/plumber.py b/src/calibre/ebooks/conversion/plumber.py index 2a7964e6ec..32e58e9b66 100644 --- a/src/calibre/ebooks/conversion/plumber.py +++ b/src/calibre/ebooks/conversion/plumber.py @@ -23,23 +23,23 @@ from calibre.constants import __version__ from polyglot.builtins import unicode_type, string_or_bytes, map DEBUG_README=b''' -This debug directory contains snapshots of the e-book as it passes through the +This debug folder contains snapshots of the e-book as it passes through the various stages of conversion. The stages are: 1. input - This is the result of running the input plugin on the source - file. Use this directory to debug the input plugin. + file. Use this folder to debug the input plugin. 2. parsed - This is the result of preprocessing and parsing the output of the input plugin. Note that for some input plugins this will be identical to - the input sub-directory. Use this directory to debug structure detection, + the input sub-folder. Use this folder to debug structure detection, etc. 3. structure - This corresponds to the stage in the pipeline when structure - detection has run, but before the CSS is flattened. Use this directory to + detection has run, but before the CSS is flattened. Use this folder to debug the CSS flattening, font size conversion, etc. 4. processed - This corresponds to the e-book as it is passed to the output - plugin. Use this directory to debug the output plugin. + plugin. Use this folder to debug the output plugin. ''' @@ -89,7 +89,7 @@ class Plumber(object): override_input_metadata=False, for_regex_wizard=False, view_kepub=False): ''' :param input: Path to input file. - :param output: Path to output file/directory + :param output: Path to output file/folder ''' if isbytestring(input): input = input.decode(filesystem_encoding) @@ -123,7 +123,7 @@ OptionRecommendation(name='debug_pipeline', short_switch='d', help=_('Save the output from different stages of the conversion ' 'pipeline to the specified ' - 'directory. Useful if you are unsure at which stage ' + 'folder. Useful if you are unsure at which stage ' 'of the conversion process a bug is occurring.') ), diff --git a/src/calibre/ebooks/oeb/transforms/filenames.py b/src/calibre/ebooks/oeb/transforms/filenames.py index 7cb6550370..cc4b4ede0b 100644 --- a/src/calibre/ebooks/oeb/transforms/filenames.py +++ b/src/calibre/ebooks/oeb/transforms/filenames.py @@ -142,7 +142,7 @@ class UniqueFilenames(object): # {{{ class FlatFilenames(object): # {{{ - 'Ensure that every item in the manifest has a unique filename without subdirectories.' + 'Ensure that every item in the manifest has a unique filename without subfolders.' def __call__(self, oeb, opts): self.log = oeb.logger diff --git a/src/calibre/gui2/actions/add.py b/src/calibre/gui2/actions/add.py index 778b23e56c..fed6e7c1a5 100644 --- a/src/calibre/gui2/actions/add.py +++ b/src/calibre/gui2/actions/add.py @@ -53,7 +53,7 @@ class AddAction(InterfaceAction): , _('A')) action_type = 'current' action_add_menu = True - action_menu_clone_qaction = _('Add books from a single directory') + action_menu_clone_qaction = _('Add books from a single folder') def genesis(self): self._add_filesystem_book = self.Dispatcher(self.__add_filesystem_book) @@ -262,7 +262,7 @@ class AddAction(InterfaceAction): def add_from_archive(self): single = question_dialog(self.gui, _('Type of archive'), _( - 'Will the archive have a single book per internal directory?')) + 'Will the archive have a single book per internal folder?')) paths = choose_files( self.gui, 'recursive-archive-add', _('Choose archive file'), filters=[(_('Archives'), ('zip', 'rar'))], all_files=False, select_only_single_file=False) @@ -301,7 +301,7 @@ class AddAction(InterfaceAction): def add_recursive_question(self): single = question_dialog(self.gui, _('Multi-file books?'), _( - 'Assume all e-book files in a single directory are the same book in different formats?')) + 'Assume all e-book files in a single folder are the same book in different formats?')) self.add_recursive(single) def add_empty(self, *args): diff --git a/src/calibre/gui2/actions/catalog.py b/src/calibre/gui2/actions/catalog.py index fb34741926..cdb998954d 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 Folder'), + 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/actions/save_to_disk.py b/src/calibre/gui2/actions/save_to_disk.py index 18ad774ae0..780fbe7314 100644 --- a/src/calibre/gui2/actions/save_to_disk.py +++ b/src/calibre/gui2/actions/save_to_disk.py @@ -28,13 +28,13 @@ class SaveToDiskAction(InterfaceAction): self.qaction.triggered.connect(self.save_to_disk) self.save_menu = self.qaction.menu() cm = partial(self.create_menu_action, self.save_menu) - cm('single dir', _('Save to disk in a single directory'), + cm('single dir', _('Save to disk in a single folder'), triggered=partial(self.save_to_single_dir, False)) cm('single format', _('Save only %s format to disk')% prefs['output_format'].upper(), triggered=partial(self.save_single_format_to_disk, False)) cm('single dir and format', - _('Save only %s format to disk in a single directory')% + _('Save only %s format to disk in a single folder')% prefs['output_format'].upper(), triggered=partial(self.save_single_fmt_to_single_dir, False)) cm('specific format', _('Save single format to disk...'), @@ -50,7 +50,7 @@ class SaveToDiskAction(InterfaceAction): _('Save only %s format to disk')% prefs['output_format'].upper()) self.save_menu.actions()[3].setText( - _('Save only %s format to disk in a single directory')% + _('Save only %s format to disk in a single folder')% prefs['output_format'].upper()) def save_single_format_to_disk(self, checked): @@ -83,7 +83,7 @@ class SaveToDiskAction(InterfaceAction): return error_dialog(self.gui, _('Cannot save to disk'), _('No books selected'), show=True) path = choose_dir(self.gui, 'save to disk dialog', - _('Choose destination directory')) + _('Choose destination folder')) if not path: return dpath = os.path.abspath(path).replace('/', os.sep)+os.sep diff --git a/src/calibre/gui2/device_drivers/configwidget.ui b/src/calibre/gui2/device_drivers/configwidget.ui index 9ebb8aa050..cdd393badc 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-folders 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 folder. Use sub-directories diff --git a/src/calibre/gui2/dialogs/exim.py b/src/calibre/gui2/dialogs/exim.py index 8142e34b94..03b4448362 100644 --- a/src/calibre/gui2/dialogs/exim.py +++ b/src/calibre/gui2/dialogs/exim.py @@ -167,7 +167,7 @@ class EximDialog(Dialog): w.l = l = QVBoxLayout(w) w.la = la = QLabel('

' + _( 'You can export all calibre data, including your books, settings and plugins' - ' into a single directory. Then, you can use this tool to re-import all that' + ' into a single folder. Then, you can use this tool to re-import all that' ' data into a different calibre install, for example, on another computer.') + '

' + _( 'This is a simple way to move your calibre installation with all its data to' @@ -342,12 +342,12 @@ class EximDialog(Dialog): self.stack.setCurrentIndex({'export':1, 'import':2}.get(which, 0)) def validate_export(self): - path = choose_dir(self, 'export-calibre-dir', _('Choose a directory to export to')) + path = choose_dir(self, 'export-calibre-dir', _('Choose a folder to export to')) if not path: return False if os.listdir(path): - error_dialog(self, _('Export dir not empty'), _( - 'The directory you choose to export the data to must be empty.'), show=True) + error_dialog(self, _('Export folder not empty'), _( + 'The folder you choose to export the data to must be empty.'), show=True) return False self.export_dir = path return True diff --git a/src/calibre/library/catalogs/epub_mobi.py b/src/calibre/library/catalogs/epub_mobi.py index b47380b0b6..ff259eac4a 100644 --- a/src/calibre/library/catalogs/epub_mobi.py +++ b/src/calibre/library/catalogs/epub_mobi.py @@ -56,7 +56,7 @@ class EPUB_MOBI(CatalogPlugin): action=None, help=_("Save the output from different stages of the conversion " "pipeline to the specified " - "directory. Useful if you are unsure at which stage " + "folder. Useful if you are unsure at which stage " "of the conversion process a bug is occurring.\n" "Default: '%default'\n" "Applies to: AZW3, EPUB, MOBI output formats")), diff --git a/src/calibre/library/save_to_disk.py b/src/calibre/library/save_to_disk.py index 6bd30896b8..6872a3672f 100644 --- a/src/calibre/library/save_to_disk.py +++ b/src/calibre/library/save_to_disk.py @@ -94,16 +94,16 @@ def config(defaults=None): help=_('Comma separated list of formats to save for each book.' ' By default all available formats are saved.')) x('template', default=DEFAULT_TEMPLATE, - help=_('The template to control the filename and directory structure of the saved files. ' + help=_('The template to control the filename and folder structure of the saved files. ' 'Default is "%(templ)s" which will save books into a per-author ' - 'subdirectory with filenames containing title and author. ' + 'subfolder with filenames containing title and author. ' 'Available controls are: {%(controls)s}')%dict( templ=DEFAULT_TEMPLATE, controls=', '.join(sorted(FORMAT_ARGS)))) x('send_template', default=DEFAULT_SEND_TEMPLATE, - help=_('The template to control the filename and directory structure of files ' + help=_('The template to control the filename and folder structure of files ' 'sent to the device. ' 'Default is "%(templ)s" which will save books into a per-author ' - 'directory with filenames containing title and author. ' + 'folder with filenames containing title and author. ' 'Available controls are: {%(controls)s}')%dict( templ=DEFAULT_SEND_TEMPLATE, controls=', '.join(FORMAT_ARGS))) x('asciiize', default=False, @@ -123,8 +123,8 @@ def config(defaults=None): x('replace_whitespace', default=False, help=_('Replace whitespace with underscores.')) x('single_dir', default=False, - help=_('Save into a single directory, ignoring the template' - ' directory structure')) + help=_('Save into a single folder, ignoring the template' + ' folder structure')) return c diff --git a/src/calibre/utils/exim.py b/src/calibre/utils/exim.py index 0e6749c2d6..014f629fcf 100644 --- a/src/calibre/utils/exim.py +++ b/src/calibre/utils/exim.py @@ -398,7 +398,7 @@ def input_unicode(prompt): def run_exporter(export_dir=None, args=None): if args: if len(args) < 2: - raise SystemExit('You must specify the export dir and libraries to export') + raise SystemExit('You must specify the export folder and libraries to export') export_dir = args[0] if not os.path.exists(export_dir): os.makedirs(export_dir) diff --git a/src/calibre/utils/formatter_functions.py b/src/calibre/utils/formatter_functions.py index 9e37e95ae7..093322e792 100644 --- a/src/calibre/utils/formatter_functions.py +++ b/src/calibre/utils/formatter_functions.py @@ -412,8 +412,7 @@ class BuiltinAssign(BuiltinFormatterFunction): arg_count = 2 category = 'Other' __doc__ = doc = _('assign(id, val) -- assigns val to id, then returns val. ' - 'id must be an identifier, not an expression. In most cases you can ' - 'use the ``=`` operator instead of this function. ' + 'id must be an identifier, not an expression. ' 'This function can often be replaced with the = operator.') def evaluate(self, formatter, kwargs, mi, locals, target, value):