fix: targetLang is xx-yy
or xx_yy
This commit is contained in:
parent
6f30da1454
commit
27d7e456cd
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user