mirror of
https://github.com/OwO-Network/DeepLX.git
synced 2026-12-01 14:57:52 +00:00
DeepL only accepts the generic "zh" as a source hint; zh-Hans and zh-Hant are target-only script variants and are silently ignored when sent as source_lang. Ambiguous mixed-script Chinese therefore fell back to auto-detection, was detected as English and echoed back untranslated. ZH, ZH-HANS and ZH-HANT now resolve to "zh" for source_lang while the target mapping is unchanged. /v2/translate also reads source_lang (JSON and form) instead of always auto-detecting. Adds resolveSourceLang and resolveTargetLang tests. Fixes #239