Fix mistake with taking properties from article instead translation
This commit is contained in:
@ -3,10 +3,9 @@ defmodule Outlook.InternalTree.Translation do
|
|||||||
alias Outlook.InternalTree.{InternalNode,TranslationUnit}
|
alias Outlook.InternalTree.{InternalNode,TranslationUnit}
|
||||||
|
|
||||||
def render_translation([%TranslationUnit{} = tunit | rest], translation) do
|
def render_translation([%TranslationUnit{} = tunit | rest], translation) do
|
||||||
[ %TranslationUnit{tunit |
|
tl_tunit = Map.get(translation, tunit.nid)
|
||||||
eph: add_title_attribute(tunit.eph, tunit.content),
|
[ %TranslationUnit{tl_tunit |
|
||||||
content: Map.get(translation, tunit.nid, %{content: "ERROR!!! Missing Tunit in translation!"})
|
eph: add_title_attribute(tunit.eph, tunit.content)
|
||||||
|> Map.get(:content)
|
|
||||||
} | render_translation(rest, translation) ]
|
} | render_translation(rest, translation) ]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user