Able to remove empty translations
This commit is contained in:
@@ -38,3 +38,12 @@ class Translation(Editable):
|
||||
self.explanation = explanation.textContent if explanation else ""
|
||||
self.tags = import_label_list("labelList label", translation_xml)
|
||||
|
||||
def is_empty(self):
|
||||
result = True
|
||||
result = result and self.translation == ""
|
||||
# next two are not checked as the also can not be deleted via gui
|
||||
# result = result and self.source == ""
|
||||
# result = result and self.targetLang == ""
|
||||
result = result and self.explanation == ""
|
||||
result = result and len(self.tags) == 0
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user