Editing explanation and examples, adding senses

This commit is contained in:
2019-11-15 22:24:32 +01:00
parent 78a80c03a7
commit f0f95b16c0
8 changed files with 70 additions and 13 deletions
+5 -4
View File
@@ -22,10 +22,11 @@ class EditTranslation(TranslationActionMessage):
self.translation, self.old_cluster_idx = prop
def update_model(self, model):
self.translation.translation = document.getElementById("etv").value;
self.translation.translation = document.getElementById("etv").value
self.translation.explanation = document.getElementById("ete").value
for tag in TAGS.keys():
select = document.getElementById("{}-s".format(tag));
other = document.getElementById("{}-o".format(tag));
select = document.getElementById("{}-s".format(tag))
other = document.getElementById("{}-o".format(tag))
if other.value:
self.translation.tags[tag] = other.value
@@ -35,7 +36,7 @@ class EditTranslation(TranslationActionMessage):
if tag in self.translation.tags:
del self.translation.tags[tag]
new_cluster_idx = int(document.getElementById("cluster-num").value) - 1;
new_cluster_idx = int(document.getElementById("cluster-num").value) - 1
self.handle_cluster_change(new_cluster_idx, model)
def handle_cluster_change(self, new_cluster_idx, model):