required audio support #1351
This commit is contained in:
@@ -26,6 +26,8 @@ def export_entry(entry):
|
||||
headword_lemma.textContent = entry.headword
|
||||
if entry.headword_type is not None:
|
||||
headword_lemma.setAttribute("type", entry.headword_type)
|
||||
if entry.headword_audio is not None:
|
||||
headword_lemma.setAttribute("audio", entry.headword_audio)
|
||||
headword.appendChild(headword_lemma)
|
||||
head.appendChild(headword)
|
||||
|
||||
@@ -146,6 +148,9 @@ def export_translation(doc, translation):
|
||||
actual_t.textContent = translation.translation
|
||||
actual_t.setAttribute("targetLang", translation.targetLang)
|
||||
|
||||
if translation.audio:
|
||||
actual_t.setAttribute("audio", translation.audio)
|
||||
|
||||
if translation.source:
|
||||
actual_t.setAttribute("source", translation.source)
|
||||
translation_xml.appendChild(actual_t)
|
||||
|
||||
Reference in New Issue
Block a user