mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Small improvement on template tester messages.
This commit is contained in:
parent
03f19243bb
commit
fdbaf04456
@ -30,7 +30,7 @@ class ShowTemplateTesterAction(InterfaceAction):
|
|||||||
rows = view.selectionModel().selectedRows()
|
rows = view.selectionModel().selectedRows()
|
||||||
if not rows:
|
if not rows:
|
||||||
return error_dialog(self.gui, _('No books selected'),
|
return error_dialog(self.gui, _('No books selected'),
|
||||||
_('A book must be selected'), show=True)
|
_('One book must be selected'), show=True)
|
||||||
if len(rows) > 1:
|
if len(rows) > 1:
|
||||||
return error_dialog(self.gui, _('Selected multiple books'),
|
return error_dialog(self.gui, _('Selected multiple books'),
|
||||||
_('Only one book can be selected'), show=True)
|
_('Only one book can be selected'), show=True)
|
||||||
@ -38,8 +38,8 @@ class ShowTemplateTesterAction(InterfaceAction):
|
|||||||
index = rows[0]
|
index = rows[0]
|
||||||
if index.isValid():
|
if index.isValid():
|
||||||
db = view.model().db
|
db = view.model().db
|
||||||
t = TemplateDialog(self.gui, _('Enter a template to test'),
|
t = TemplateDialog(self.gui,
|
||||||
mi=db.get_metadata(index.row(), index_is_id=False,
|
_('Enter a template to test using data from the selected book'),
|
||||||
get_cover=False))
|
mi=db.get_metadata(index.row(), index_is_id=False, get_cover=False))
|
||||||
t.setWindowTitle(_('Template tester'))
|
t.setWindowTitle(_('Template tester'))
|
||||||
t.exec_()
|
t.exec_()
|
Loading…
x
Reference in New Issue
Block a user