Add checking and updating DeepL usage information

This commit is contained in:
Thelonius Kort
2023-01-10 20:06:54 +01:00
parent 33ed533a1a
commit e16710664d
4 changed files with 21 additions and 8 deletions

View File

@ -68,7 +68,7 @@ defmodule OutlookWeb.TranslationLive.FormComponent do
def update(%{deepl_translation: translation}, socket) do
tunit_keys = Map.keys(socket.assigns.translation_content)
case Outlook.Translators.process_translation_result(translation, tunit_keys) do
case Outlook.Translators.process_translation_result(translation, tunit_keys, socket.assigns.current_user) do
{:ok, new_translation_content} ->
{:ok, socket
|> assign(translation_content: new_translation_content)