Add plenty of features

This commit is contained in:
Kwaroran
2024-11-27 06:01:42 +09:00
parent 73b7fd9156
commit 981ec3921e
13 changed files with 285 additions and 133 deletions

View File

@@ -148,7 +148,16 @@
}
}
if(translateText){
if(!DBState.db.legacyTranslation){
if(DBState.db.translator === 'llm' && DBState.db.translateBeforeHTMLFormatting){
translating = true
data = await translateHTML(data, false, charArg, chatID)
translating = false
const marked = await ParseMarkdown(data, charArg, mode, chatID, getCbsCondition())
lastParsedQueue = marked
lastCharArg = charArg
return marked
}
else if(!DBState.db.legacyTranslation){
const marked = await ParseMarkdown(data, charArg, 'pretranslate', chatID, getCbsCondition())
translating = true
const translated = await postTranslationParse(await translateHTML(marked, false, charArg, chatID))