using and exporting source and explanation

This commit is contained in:
2019-11-15 22:22:03 +01:00
parent c5c4d9b10a
commit 78a80c03a7
2 changed files with 9 additions and 0 deletions

View File

@@ -10,6 +10,10 @@ class Translation:
def __init__(self, translation_xml):
translation = translation_xml.querySelector("translation")
self.translation = translation.textContent if translation else ""
self.source = translation.getAttribute("source") or ""
explanation = translation_xml.querySelector("explanation")
self.explanation = explanation.textContent if explanation else ""
self.tags = {}
for tag_xml in translation_xml.querySelectorAll("tagsContainer tag"):