Example translation editing
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
class Example:
|
||||
from model.editable import Editable
|
||||
|
||||
class Example(Editable):
|
||||
def __init__(self, example_xml):
|
||||
example = example_xml.querySelector("example")
|
||||
translation = example_xml.querySelector("translationContainer translation")
|
||||
|
||||
self.example = example.textContent if example else ""
|
||||
self.translation = translation.textContent if translation else ""
|
||||
|
||||
self.translations = []
|
||||
for translation in example_xml.querySelectorAll("translationContainer translation"):
|
||||
self.translations.append(translation.textContent)
|
||||
|
||||
Reference in New Issue
Block a user