mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix incorrect use of ngettext
This commit is contained in:
parent
a4e79a2a59
commit
6c0be97ad5
@ -483,9 +483,11 @@ class CopyToLibraryAction(InterfaceAction):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if delete_after:
|
if delete_after:
|
||||||
donemsg = ngettext('Moved the book to {loc}', 'Moved {num} books to {loc}', len(self.worker.processed))
|
donemsg = _('Moved the book to {loc}') if len(self.worker.processed) == 1 else _(
|
||||||
|
'Moved {num} books to {loc}')
|
||||||
else:
|
else:
|
||||||
donemsg = ngettext('Copied the book to {loc}', 'Copied {num} books to {loc}', len(self.worker.processed))
|
donemsg = _('Copied the book to {loc}') if len(self.worker.processed) == 1 else _(
|
||||||
|
'Copied {num} books to {loc}')
|
||||||
|
|
||||||
self.gui.status_bar.show_message(donemsg.format(num=len(self.worker.processed), loc=loc), 2000)
|
self.gui.status_bar.show_message(donemsg.format(num=len(self.worker.processed), loc=loc), 2000)
|
||||||
if self.worker.auto_merged_ids:
|
if self.worker.auto_merged_ids:
|
||||||
|
@ -36,8 +36,8 @@ class Formats(QAbstractListModel):
|
|||||||
if role == Qt.ToolTipRole:
|
if role == Qt.ToolTipRole:
|
||||||
fmt = self.fmts[row]
|
fmt = self.fmts[row]
|
||||||
count = self.counts[fmt]
|
count = self.counts[fmt]
|
||||||
return ngettext('There is one book with the {fmt} format',
|
return _('There is one book with the {} format').format(fmt.upper()) if count == 1 else _(
|
||||||
'There are {count} books with the {fmt} format', count).format(
|
'There are {count} books with the {fmt} format', count).format(
|
||||||
count=count, fmt=fmt.upper())
|
count=count, fmt=fmt.upper())
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user