diff --git a/src/calibre/gui2/preferences/coloring.py b/src/calibre/gui2/preferences/coloring.py index 695adabed8..0fca30695b 100644 --- a/src/calibre/gui2/preferences/coloring.py +++ b/src/calibre/gui2/preferences/coloring.py @@ -12,6 +12,7 @@ from PyQt4.Qt import (QWidget, QDialog, QLabel, QGridLayout, QComboBox, QSize, QScrollArea, QPushButton, QVBoxLayout, QDialogButtonBox, QToolButton, QListView, QAbstractListModel, pyqtSignal, QSizePolicy, QSpacerItem) +from calibre import prepare_string_for_xml from calibre.utils.icu import sort_key from calibre.gui2 import error_dialog from calibre.gui2.dialogs.template_dialog import TemplateDialog @@ -430,7 +431,7 @@ class RulesModel(QAbstractListModel): # {{{ return _('''
Advanced Rule for column %s:
%s- ''')%(col, rule) + ''')%(col, prepare_string_for_xml(rule)) conditions = [self.condition_to_html(c) for c in rule.conditions] return _('''\
Set the color of %s to %s if the following @@ -439,9 +440,10 @@ class RulesModel(QAbstractListModel): # {{{ ''') % (col, rule.color, ''.join(conditions)) def condition_to_html(self, condition): + c, a, v = condition return ( _('