fix: targetLang is `xx-yy` or `xx_yy`

This commit is contained in:
naskya 2023-10-26 03:03:38 +00:00
parent 6f30da1454
commit 27d7e456cd
1 changed files with 1 additions and 0 deletions

View File

@ -64,6 +64,7 @@ export default define(meta, paramDef, async (ps, user) => {
let targetLang = ps.targetLang;
if (targetLang.includes("-")) targetLang = targetLang.split("-")[0];
if (targetLang.includes("_")) targetLang = targetLang.split("_")[0];
if (instance.libreTranslateApiUrl != null) {
const jsonBody = {