Remove source lang from deepl requests for different language translations.

Signed-off-by: hashcoko <hashcoko@gmail.com>
This commit is contained in:
hashcoko
2023-11-28 16:38:38 +09:00
parent 712e000349
commit 308ff456f8

View File

@@ -107,7 +107,6 @@ async function translateMain(text:string, arg:{from:string, to:string, host:stri
if(db.translatorType === 'deepl'){
const body = {
text: [text],
source_lang: arg.from.toLocaleUpperCase(),
target_lang: arg.to.toLocaleUpperCase(),
}
let url = db.deeplOptions.freeApi ? "https://api-free.deepl.com/v2/translate" : "https://api.deepl.com/v2/translate"