feat: move 'remote detect' from rule to setting

This commit is contained in:
Gabe
2025-09-30 01:38:07 +08:00
parent 20c4d6f6eb
commit b60b770ed6
8 changed files with 62 additions and 63 deletions

View File

@@ -740,12 +740,8 @@ export class Translator {
// 提前进行语言检测
let deLang = "";
const {
detectRemote,
fromLang = "auto",
toLang,
skipLangs = [],
} = this.#rule;
const { fromLang = "auto", toLang } = this.#rule;
const { detectRemote, skipLangs = [] } = this.#setting;
if (fromLang === "auto") {
const { langDetector } = this.#setting;
deLang = await tryDetectLang(