Merge branch 'check.py_format_string' of https://github.com/siebenschlaefer/calibre

This commit is contained in:
Kovid Goyal 2018-09-14 09:37:38 +05:30
commit 96a6558749
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -195,10 +195,12 @@ class Check(QSplitter):
activate = '<div>%s</div>' % ('<br>'.join(activate)) activate = '<div>%s</div>' % ('<br>'.join(activate))
if many: if many:
activate += '<br>' activate += '<br>'
activate = activate.replace('%', '%%')
template = header + ((msg + activate) if many else (activate + msg)) + footer template = header + ((msg + activate) if many else (activate + msg)) + footer
else: else:
activate = '<div><a href="activate:item" title="%s">%s %s</a></div>' % ( activate = '<div><a href="activate:item" title="%s">%s %s</a></div>' % (
open_tt, err.name, loc) open_tt, err.name, loc)
activate = activate.replace('%', '%%')
template = header + activate + msg + footer template = header + activate + msg + footer
self.help.setText( self.help.setText(
template % (err.HELP, ifix, fix_tt, fix_msg, run_tt, run_msg)) template % (err.HELP, ifix, fix_tt, fix_msg, run_tt, run_msg))