parent
4a80ba878a
commit
e287e2414a
@ -1,7 +1,8 @@
|
||||
from message.simple_messages import NoReset, Reset, ModalNotOkClose
|
||||
from message.translation_edit import EditTranslation, MoveRight, MoveLeft, BinTranslation
|
||||
from message.show_messages import ShowMenu, ShowEditTranslation, ShowSenseLabelEdit, ShowSenseDefinitionEdit, ShowCommentEdit, ShowAddTranslation, ShowSenseAdd, ShowExampleEdit
|
||||
from message.simple_edits import EditSenseLabel, EditSenseDefinition, EditComment, AddSenseLabel, AddSense, EditExample
|
||||
from message.show_messages import ShowMenu, ShowEditTranslation, ShowSenseLabelEdit, ShowSenseDefinitionEdit, ShowCommentEdit, ShowAddTranslation, ShowSenseAdd, ShowExampleEdit, ShowExampleTranslationEdit
|
||||
from message.simple_edits import EditSenseLabel, EditSenseDefinition, EditComment, AddSenseLabel, AddSense, EditExample, AddExampleTranslation, EditExampleTranslation
|
||||
|
||||
from message.message import msg
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in new issue