This commit is contained in:
Kovid Goyal 2014-07-24 13:04:44 +05:30
parent 422c104a88
commit 4584ffe8f3
2 changed files with 3 additions and 2 deletions

View File

@ -330,7 +330,7 @@ class MetadataUpdater(object):
if self.type != "BOOKMOBI":
raise MobiError("Setting metadata only supported for MOBI files of type 'BOOK'.\n"
"\tThis is a '%s' file of type '%s'" % (self.type[0:4], self.type[4:8]))
"\tThis is a %r file of type %r" % (self.type[0:4], self.type[4:8]))
recs = []
added_501 = False

View File

@ -10,6 +10,7 @@ from functools import partial
from PyQt4.Qt import QTimer, QProgressDialog, Qt
from calibre import force_unicode
from calibre.gui2 import warning_dialog
from calibre.gui2.actions import InterfaceAction
@ -95,7 +96,7 @@ class EmbedAction(InterfaceAction):
self.job_data = None
self.gui.library_view.model().refresh_ids(book_ids)
if errors:
det_msg = [_('The {0} format of {1}:\n{2}').format((fmt or '').upper(), mi.title, tb) for mi, fmt, tb in errors]
det_msg = [_('The {0} format of {1}:\n{2}').format((fmt or '').upper(), force_unicode(mi.title), force_unicode(tb)) for mi, fmt, tb in errors]
warning_dialog(
self.gui, _('Failed for some files'), _(
'Failed to embed metadata into some book files. Click "Show details" for details.'),