From 876d5c78eaf8244ee13b8ae625c791ec6dcafcc5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Nov 2016 10:51:49 +0530 Subject: [PATCH] ... --- src/calibre/gui2/tweak_book/preferences.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/tweak_book/preferences.py b/src/calibre/gui2/tweak_book/preferences.py index 3125dc2cf8..f8fd1b8c92 100644 --- a/src/calibre/gui2/tweak_book/preferences.py +++ b/src/calibre/gui2/tweak_book/preferences.py @@ -751,8 +751,11 @@ class Preferences(QDialog): if key.endswith('_again') and tprefs.get(key) is False: del tprefs[key] changed += 1 - info_dialog(self, _('Disabled confirmations restored'), _( - '%d disabled confirmation prompts were restored') % changed, show=True) + msg = _('There are no disabled confirmation prompts') + if changed: + msg = ngettext( + 'One disabled confirmation prompt was restored', '{} disabled confirmation prompts were restored', changed).format(changed) + info_dialog(self, _('Disabled confirmations restored'), msg, show=True) def accept(self): tprefs.set('preferences_geom', bytearray(self.saveGeometry()))