diff --git a/manual/gui.rst b/manual/gui.rst index f4eeedf4b4..c22c3b7dca 100644 --- a/manual/gui.rst +++ b/manual/gui.rst @@ -271,7 +271,7 @@ Remove books 6. **Remove matching books from device**: Allows you to remove e-book files from a connected device that match the books that are selected in the book list. .. note:: - Note that when you use :guilabel:`Remove books` to delete books from your calibre library, the book record is permanently deleted, but on Windows and macOS the files are placed into the recycle bin. This allows you to recover them if you change your mind. + Note that when you use :guilabel:`Remove books` to delete books from your calibre library, the book record is permanently deleted, but the files are placed into the :guilabel:`Recycle Bin/Trash`. This allows you to recover the files if you change your mind. .. _configuration: diff --git a/src/calibre/constants.py b/src/calibre/constants.py index dfb314ae44..943f89584d 100644 --- a/src/calibre/constants.py +++ b/src/calibre/constants.py @@ -442,3 +442,7 @@ def get_windows_number_formats(): thousands_sep, decimal_point = d['thousands_sep'], d['decimal_point'] ans = get_windows_number_formats.ans = thousands_sep, decimal_point return ans + + +def trash_name(): + return _('Trash') if ismacos else _('Recycle Bin') diff --git a/src/calibre/db/cli/cmd_remove.py b/src/calibre/db/cli/cmd_remove.py index f60e8ee031..768e7962d0 100644 --- a/src/calibre/db/cli/cmd_remove.py +++ b/src/calibre/db/cli/cmd_remove.py @@ -3,6 +3,7 @@ # License: GPLv3 Copyright: 2017, Kovid Goyal +from calibre.constants import trash_name from calibre.db.cli import integers_from_string from calibre.db.delete_service import delete_service from calibre.srv.changes import books_deleted @@ -35,7 +36,7 @@ list of id numbers (you can get id numbers by using the search command). For exa '--permanent', default=False, action='store_true', - help=_('Do not use the recycle bin') + help=_('Do not use the {}').format(trash_name()) ) return p diff --git a/src/calibre/gui2/actions/delete.py b/src/calibre/gui2/actions/delete.py index 0159448023..859e2d9400 100644 --- a/src/calibre/gui2/actions/delete.py +++ b/src/calibre/gui2/actions/delete.py @@ -12,7 +12,7 @@ from collections import Counter from functools import partial from qt.core import QDialog, QModelIndex, QObject, QTimer -from calibre.constants import ismacos +from calibre.constants import ismacos, trash_name from calibre.gui2 import Aborted, error_dialog, question_dialog from calibre.gui2.actions import InterfaceAction from calibre.gui2.dialogs.confirm_delete import confirm @@ -35,11 +35,11 @@ class MultiDeleter(QObject): # {{{ self.permanent = False if can_recycle and len(ids) > 100: if question_dialog(gui, _('Are you sure?'), '

'+ - _('You are trying to delete %d books. ' - 'Sending so many files to the Recycle' - ' Bin can be slow. Should calibre skip the' - ' recycle bin? If you click Yes the files' - ' will be permanently deleted.')%len(ids), + _('You are trying to delete {0} books. ' + 'Sending so many files to the {1}' + ' can be slow. Should calibre skip the' + ' {1}? If you click Yes the files' + ' will be permanently deleted.').format(len(ids), trash_name()), add_abort_button=True ): self.permanent = True