From c6189fc93044160f954a28ef9d397309238c8da8 Mon Sep 17 00:00:00 2001 From: Maxime Alza Date: Fri, 19 Jul 2024 16:42:10 +0200 Subject: [PATCH] Update translation logs --- translation-app-assessment/backend/translation/src/deepl.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/translation-app-assessment/backend/translation/src/deepl.js b/translation-app-assessment/backend/translation/src/deepl.js index 457576c..ef2d2c9 100644 --- a/translation-app-assessment/backend/translation/src/deepl.js +++ b/translation-app-assessment/backend/translation/src/deepl.js @@ -1,7 +1,7 @@ const axios = require("axios") require("dotenv").config() -const translateWithDeepl = (text, targetLang, sourceLang, type, currentUserDomain, isTradTonDoc) => { +const translateWithDeepl = (text, targetLang, sourceLang, currentUserDomain, isTradTonDoc) => { console.log(`Use DeepL cloud translation from ${sourceLang} to ${targetLang} by ${currentUserDomain} for ${isTradTonDoc ? 'TradTonDoc' : 'Chat'}`) let glossaryParameter = getGlossaryParameter(sourceLang, targetLang); const config = { @@ -11,11 +11,9 @@ const translateWithDeepl = (text, targetLang, sourceLang, type, currentUserDomai } } - type = type === 'plaintext' ? '' : type; - const data = { 'text': [text], - 'tag_handling': type, + 'tag_handling': '', 'source_lang': sourceLang, 'target_lang': targetLang, 'glossary_id': glossaryParameter