String changes

This commit is contained in:
Kovid Goyal 2021-11-11 07:30:11 +05:30
parent 3dc50b41ca
commit 2cb3a3c637
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 2 deletions

View File

@ -129,7 +129,7 @@ def validate_rule(rule):
if err: if err:
return _('Invalid {}').format(m.placeholder), err return _('Invalid {}').format(m.placeholder), err
if not rule['actions']: if not rule['actions']:
return _('No actions'), _('The rules has no actions') return _('No actions'), _('The rule has no actions')
for action in rule['actions']: for action in rule['actions']:
err = validate_action(action) err = validate_action(action)
if err: if err:

View File

@ -24,6 +24,8 @@ from calibre.gui2.widgets2 import Dialog
from calibre.utils.config import JSONConfig from calibre.utils.config import JSONConfig
# Classes for rule edit widget {{{
class TagAction(QWidget): class TagAction(QWidget):
remove_action = pyqtSignal(object) remove_action = pyqtSignal(object)
@ -174,6 +176,7 @@ class CSSEdit(QWidget):
@value.setter @value.setter
def value(self, val): def value(self, val):
self.edit.value = val self.edit.value = val
# }}}
class RuleEdit(QWidget): # {{{ class RuleEdit(QWidget): # {{{
@ -347,7 +350,7 @@ class Tester(Dialog): # {{{
return self.html.toPlainText() return self.html.toPlainText()
def do_test(self): def do_test(self):
raise NotImplementedError('TODO: Implement this') pass # TODO: Implement this
def sizeHint(self): def sizeHint(self):
return QSize(800, 600) return QSize(800, 600)