Some more incorrect uses of ngettext

This commit is contained in:
Kovid Goyal 2019-03-07 10:59:36 +05:30
parent 0adddea81b
commit 0161d6ce08
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 5 deletions

View File

@ -316,7 +316,7 @@ class AutoAdder(QObject):
if count > 0:
m.books_added(count)
gui.status_bar.show_message(
ngettext('Added a book automatically from {src}', 'Added {num} books automatically from {src}', count).format(
(_('Added a book automatically from {src}') if count == 1 else _('Added {num} books automatically from {src}')).format(
num=count, src=self.worker.path), 2000)
gui.refresh_cover_browser()

View File

@ -118,10 +118,11 @@ def convert_single_ebook(parent, db, book_ids, auto_conversion=False, # {{{
msg = '%s' % '\n'.join(res)
warning_dialog(parent, _('Could not convert some books'),
ngettext(
'Could not convert the book because no supported source format was found',
'Could not convert {num} of {tot} books, because no supported source formats were found.',
len(res)).format(num=len(res), tot=total),
(
_('Could not convert the book because no supported source format was found')
if len(res) == 1 else
_('Could not convert {num} of {tot} books, because no supported source formats were found.'),
).format(num=len(res), tot=total),
msg).exec_()
return jobs, changed, bad