Fix mistake with taking properties from article instead translation

This commit is contained in:
Thelonius Kort
2023-01-19 11:35:56 +01:00
parent 8220b112bf
commit 170883490f

View File

@ -3,10 +3,9 @@ defmodule Outlook.InternalTree.Translation do
alias Outlook.InternalTree.{InternalNode,TranslationUnit}
def render_translation([%TranslationUnit{} = tunit | rest], translation) do
[ %TranslationUnit{tunit |
eph: add_title_attribute(tunit.eph, tunit.content),
content: Map.get(translation, tunit.nid, %{content: "ERROR!!! Missing Tunit in translation!"})
|> Map.get(:content)
tl_tunit = Map.get(translation, tunit.nid)
[ %TranslationUnit{tl_tunit |
eph: add_title_attribute(tunit.eph, tunit.content)
} | render_translation(rest, translation) ]
end