Example translation editing

This commit is contained in:
2019-11-16 14:18:37 +01:00
parent 4a80ba878a
commit e287e2414a
8 changed files with 62 additions and 9 deletions

View File

@@ -51,6 +51,7 @@ class ShowSenseAdd(GenericShowModal):
model.modal = lambda: modals.add_sense(NewSense())
# I don't need GenericShowModal since there is only one comment
class ShowCommentEdit(ClickMessage):
def update_model(self, model):
model.modal_shown = True
@@ -63,6 +64,14 @@ class ShowExampleEdit(GenericShowModal):
model.modal = lambda: modals.edit_example(self.arg)
class ShowExampleTranslationEdit(GenericShowModal):
def update_model(self, model):
super().update_model(model)
example = self.arg
example.make_copy()
model.modal = lambda: modals.edit_example_translation(example)
class ShowEditTranslation(GenericShowModal):
def update_model(self, model):
model.modal_shown = True