From 73c7276cde06126703cffcc1e0412feedcd3616c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Fri, 10 Jan 2025 00:48:27 +0800 Subject: [PATCH] . --- py/LunaTranslator/translator/huoshan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/LunaTranslator/translator/huoshan.py b/py/LunaTranslator/translator/huoshan.py index 3829a20f..902b4949 100644 --- a/py/LunaTranslator/translator/huoshan.py +++ b/py/LunaTranslator/translator/huoshan.py @@ -1,4 +1,3 @@ - from language import Languages from translator.basetranslator import basetrans @@ -23,12 +22,13 @@ class TS(basetrans): json_data = { "text": content, - "source_language": self.srclang, "target_language": self.tgtlang, "enable_user_glossary": False, "glossary_list": [], "category": "", } + if self.srclang != Languages.Auto: + json_data["source_language"] = self.srclang response = self.proxysession.post( "https://translate.volcengine.com/crx/translate/v1/", headers=headers,