From 53c5ff5daafca7079eb9cf0d84e7cf2262f345b8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 13 Oct 2016 22:34:59 +0530 Subject: [PATCH] ... --- src/calibre/gui2/actions/edit_metadata.py | 13 ++++++++----- src/calibre/gui2/metadata/bulk_download.py | 6 +++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/calibre/gui2/actions/edit_metadata.py b/src/calibre/gui2/actions/edit_metadata.py index 7d24fa4e0b..a8bb6b66b8 100644 --- a/src/calibre/gui2/actions/edit_metadata.py +++ b/src/calibre/gui2/actions/edit_metadata.py @@ -132,14 +132,17 @@ class EditMetadataAction(InterfaceAction): if all_failed: num = len(failed_ids | failed_covers) self.cleanup_bulk_download(tdir) - return error_dialog(self.gui, _('Download failed'), - _('Failed to download metadata or covers for any of the %d' - ' book(s).') % num, det_msg=det_msg, show=True) + return error_dialog(self.gui, _('Download failed'), ngettext( + 'Failed to download metadata or cover for the selected book', + 'Failed to download metadata or covers for any of the {} books.', num + ).format(num), det_msg=det_msg, show=True) self.gui.status_bar.show_message(_('Metadata download completed'), 3000) - msg = '

' + _('Finished downloading metadata for %d book(s). ' - 'Proceed with updating the metadata in your library?')%len(id_map) + msg = '

' + ngettext( + 'Finished downloading metadata for the selected book.', + 'Finished downloading metadata for {} books.', len(id_map)).format(len(id_map)) + ' ' + \ + _('Proceed with updating the metadata in your library?') show_copy_button = False checkbox_msg = None diff --git a/src/calibre/gui2/metadata/bulk_download.py b/src/calibre/gui2/metadata/bulk_download.py index ac1661b4e3..94df9ac9d1 100644 --- a/src/calibre/gui2/metadata/bulk_download.py +++ b/src/calibre/gui2/metadata/bulk_download.py @@ -136,7 +136,9 @@ def start_download(gui, ids, callback, ensure_fields=None): tf.close() job = Job('metadata bulk download', - _('Download metadata for %d books')%len(ids), + ngettext( + 'Download metadata for one book', + 'Download metadata for {} books', len(ids)).format(len(ids)), download, (ids, tf.name, gui.current_db, d.identify, d.covers, ensure_fields), {}, callback) job.metadata_and_covers = (d.identify, d.covers) @@ -275,5 +277,3 @@ def download(all_ids, tf, db, do_identify, covers, ensure_fields, lm_map, all_failed) finally: notifier.keep_going = False - -