|
|
@ -76,6 +76,12 @@ class patch(_error):
|
|
|
|
if node.tagName == "reg":
|
|
|
|
if node.tagName == "reg":
|
|
|
|
if node.firstChild:
|
|
|
|
if node.firstChild:
|
|
|
|
reText = node.firstChild.nodeValue
|
|
|
|
reText = node.firstChild.nodeValue
|
|
|
|
|
|
|
|
if reText is None:
|
|
|
|
|
|
|
|
textNode = node.toxml().encode("UTF8")
|
|
|
|
|
|
|
|
self.setError(\
|
|
|
|
|
|
|
|
_("Incorrect text template")+ ": \n" +\
|
|
|
|
|
|
|
|
"%s" %textNode)
|
|
|
|
|
|
|
|
return False
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
self.setError(\
|
|
|
|
self.setError(\
|
|
|
|
_("Incorrect text template '<reg></reg>'"))
|
|
|
|
_("Incorrect text template '<reg></reg>'"))
|
|
|
@ -91,11 +97,16 @@ class patch(_error):
|
|
|
|
self.setError(\
|
|
|
|
self.setError(\
|
|
|
|
_("Incorrect text template '<reg>%s</reg>'")\
|
|
|
|
_("Incorrect text template '<reg>%s</reg>'")\
|
|
|
|
%reText)
|
|
|
|
%reText)
|
|
|
|
|
|
|
|
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
elif node.tagName == "text" and regex:
|
|
|
|
elif node.tagName == "text" and regex:
|
|
|
|
if node.firstChild:
|
|
|
|
if node.firstChild:
|
|
|
|
text = node.firstChild.nodeValue
|
|
|
|
text = node.firstChild.nodeValue
|
|
|
|
|
|
|
|
if text is None:
|
|
|
|
|
|
|
|
textNode = node.toxml().encode("UTF8")
|
|
|
|
|
|
|
|
self.setError(\
|
|
|
|
|
|
|
|
_("Incorrect text template")+ ": \n" +\
|
|
|
|
|
|
|
|
"%s" %textNode)
|
|
|
|
|
|
|
|
return False
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
text = ""
|
|
|
|
text = ""
|
|
|
|
dataList.append((regex, text))
|
|
|
|
dataList.append((regex, text))
|
|
|
|