From 020cb2eeb87cfde5bee7de58a39bf45cc56ded32 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 11 Oct 2016 19:20:03 +0530 Subject: [PATCH] ... --- src/calibre/gui2/actions/delete.py | 18 ++++++++++-------- src/calibre/gui2/metadata/bulk_download.py | 11 +++++++---- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/calibre/gui2/actions/delete.py b/src/calibre/gui2/actions/delete.py index eb2965e4f1..1ba940b051 100644 --- a/src/calibre/gui2/actions/delete.py +++ b/src/calibre/gui2/actions/delete.py @@ -366,10 +366,12 @@ class DeleteAction(InterfaceAction): self.remove_matching_books_from_device() # The following will run if the selected books are not on a connected device. # The user has selected to delete from the library or the device and library. - if not confirm('

'+_('The %d selected book(s) will be ' - 'permanently deleted and the files ' - 'removed from your calibre library. Are you sure?')%len(to_delete_ids) + - '

', 'library_delete_books', self.gui): + if not confirm('

'+ngettext( + 'The selected book will be permanently deleted and the files ' + 'removed from your calibre library. Are you sure?', + 'The {} selected books will be permanently deleted and the files ' + 'removed from your calibre library. Are you sure?', len(to_delete_ids)).format(len(to_delete_ids)), + 'library_delete_books', self.gui): return if len(to_delete_ids) < 5: try: @@ -413,10 +415,10 @@ class DeleteAction(InterfaceAction): view = self.gui.card_b_view paths = view.model().paths(rows) ids = view.model().indices(rows) - if not confirm('

'+_('The %d selected book(s) will be ' - 'permanently deleted ' - 'from your device. Are you sure?')%len(paths) + - '

', 'device_delete_books', self.gui): + if not confirm('

'+ngettext( + 'The selected book will be permanently deleted from your device. Are you sure?', + 'The {} selected books will be permanently deleted from your device. Are you sure?', len(paths)).format(len(paths)), + 'device_delete_books', self.gui): return job = self.gui.remove_paths(paths) self.delete_memory[job] = (paths, view.model()) diff --git a/src/calibre/gui2/metadata/bulk_download.py b/src/calibre/gui2/metadata/bulk_download.py index 5693435134..ac1661b4e3 100644 --- a/src/calibre/gui2/metadata/bulk_download.py +++ b/src/calibre/gui2/metadata/bulk_download.py @@ -12,7 +12,7 @@ from functools import partial from threading import Thread from PyQt5.Qt import (QIcon, QDialog, - QDialogButtonBox, QLabel, QGridLayout, QPixmap, Qt) + QDialogButtonBox, QLabel, QGridLayout, Qt) from calibre.gui2.threaded_jobs import ThreadedJob from calibre.ebooks.metadata.opf2 import metadata_to_opf @@ -62,12 +62,15 @@ class ConfirmDialog(QDialog): self.setLayout(l) i = QLabel(self) - i.setPixmap(QPixmap(I('download-metadata.png'))) + i.setPixmap(QIcon(I('download-metadata.png')).pixmap(128, 128)) l.addWidget(i, 0, 0) + t = ngettext( + 'The download of metadata for the selected book will run in the background. Proceed?', + 'The download of metadata for the {} selected books will run in the background. Proceed?', + len(ids)).format(len(ids)) t = QLabel( - '

'+_('The download of metadata for the %d selected book(s) will' - ' run in the background. Proceed?')%len(ids) + + '

'+ t + '

'+_('You can monitor the progress of the download ' 'by clicking the rotating spinner in the bottom right ' 'corner.') +