You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
479 B
11 lines
479 B
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
|