From 8c8d520ff62fcab83441c5e104971cb69934a492 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 18 Jan 2019 20:00:51 +0530 Subject: [PATCH] Fix #1812388 [problem with polish fonction - version 3.38](https://bugs.launchpad.net/calibre/+bug/1812388) --- src/calibre/gui2/actions/polish.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/actions/polish.py b/src/calibre/gui2/actions/polish.py index d4eddd1c70..fc089bae4d 100644 --- a/src/calibre/gui2/actions/polish.py +++ b/src/calibre/gui2/actions/polish.py @@ -289,9 +289,13 @@ class Polish(QDialog): # {{{ db.copy_format_to(book_id, fmt, f, index_is_id=True) data['files'].append(f.name) + nums = num + if hasattr(self, 'pd'): + nums = self.pd.max - num + desc = ngettext(_('Polish %s')%mi.title, _('Polish book %(nums)s of %(tot)s (%(title)s)')%dict( - nums=self.pd.max - num, tot=len(self.book_id_map), + nums=nums, tot=len(self.book_id_map), title=mi.title), len(self.book_id_map)) if hasattr(self, 'pd'): self.pd.set_msg(_('Queueing book %(nums)s of %(tot)s (%(title)s)')%dict(