fix: add legacy translation support in Auto Translate Cached Only option

This commit is contained in:
Bo26fhmC5M
2025-02-02 16:17:32 +09:00
parent 95c6fe2b22
commit 293b5ae264
2 changed files with 4 additions and 2 deletions

View File

@@ -143,7 +143,9 @@
if(DBState.db.autoTranslateCachedOnly && DBState.db.translatorType === 'llm'){
const cache = DBState.db.translateBeforeHTMLFormatting
? await getLLMCache(data)
: await getLLMCache(await ParseMarkdown(data, charArg, 'pretranslate', chatID, getCbsCondition()))
: !DBState.db.legacyTranslation
? await getLLMCache(await ParseMarkdown(data, charArg, 'pretranslate', chatID, getCbsCondition()))
: await getLLMCache(await ParseMarkdown(data, charArg, mode, chatID, getCbsCondition()))
translateText = cache !== null
}