Skip to content

Commit

Permalink
Update translation logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Alza committed Jul 19, 2024
1 parent 6d4cda4 commit c6189fc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions translation-app-assessment/backend/translation/src/deepl.js
Original file line number Diff line number Diff line change
@@ -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 = {
Expand All @@ -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
Expand Down

0 comments on commit c6189fc

Please sign in to comment.