From 5b6e3c51768e00a7fa88f4b47a415ec000c229ca Mon Sep 17 00:00:00 2001 From: Thelonius Kort Date: Thu, 19 Jan 2023 13:58:49 +0100 Subject: [PATCH] Add legacy_export function for export to the old outlook --- lib/outlook/internal_tree.ex | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/outlook/internal_tree.ex b/lib/outlook/internal_tree.ex index 321eef5..a182dba 100644 --- a/lib/outlook/internal_tree.ex +++ b/lib/outlook/internal_tree.ex @@ -54,4 +54,10 @@ defmodule Outlook.InternalTree do def render_translation(tree, translation) do Translation.render_translation(tree, translation) end + + def legacy_export(tree, translation) do + Translation.render_translation(tree, translation) + |> garnish(%{tunits: %{class: "ttrans", "data-ttrans-status": fn n -> Map.get(n, :status) end}}) + |> Html.render_doc + end end