Fixed display for explanation

mt-definition-list-ui
matic_t 4 years ago
parent d93d42bf4d
commit 9accecc554

@ -45,19 +45,13 @@ class Sense(Data):
if explanation is None and x["type"] == "explanation":
explanation = x.value
if indicator:
definition = indicator
if explanation:
definition += ", " + explanation
else:
definition = explanation
result = h("div.elm-div", {}, [
h("div.sense-num", {"on": {"click": M.msg(M.ShowSenseMenu, self)}}, str(sense_num + 1)),
h("div.sense", {}, [
h("span.sense-label-list", { "on": { "click": M.msg(M.ShowSenseLabelEdit, self) }}, [
h("span.sense-label", {}, clean_label(slabel)) for _, slabel in self.labels ]),
h("span.sense-definition", { "on": { "click": M.msg(M.ShowSenseDefinitionEdit, self) }}, definition),
h("span.sense-definition", { "on": { "click": M.msg(M.ShowSenseDefinitionEdit, self) }}, indicator),
h("div", {}, "Razlaga: " + explanation) if explanation else None,
h("div", {}, View.view_translations(self.translations, self, model)),
h("div", {}, examples)])])
return result

Loading…
Cancel
Save