first commit
This commit is contained in:
10
src/model/translation.py
Normal file
10
src/model/translation.py
Normal file
@@ -0,0 +1,10 @@
|
||||
class Translation:
|
||||
def __init__(self, translation_xml):
|
||||
translation = translation_xml.querySelector("translation")
|
||||
self.translation = translation.textContent if translation else ""
|
||||
|
||||
self.tags = {}
|
||||
for tag_xml in translation_xml.querySelectorAll("tagsContainer tag"):
|
||||
t_type = tag_xml.querySelector("type").textContent
|
||||
t_value = tag_xml.querySelector("value").textContent
|
||||
self.tags[t_type] = t_value
|
||||
Reference in New Issue
Block a user