fix: 自定义翻译简体中文统一使用 zh-hans

This commit is contained in:
guoqingshan
2026-08-02 09:02:58 +08:00
parent 3eabdc9f32
commit ffdeb79c0b
4 changed files with 20 additions and 9 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ def translate_text(user):
text = (data.get("text") or "").strip()
if not text:
return jsonify({"error": "翻译内容不能为空"}), 400
source = (data.get("source") or "zh").strip()
source = (data.get("source") or "zh-hans").strip()
target = (data.get("target") or "es").strip()
settings = get_user_settings(user["id"])
result = perform_translate(text, settings, source, target)