diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 9907fdb9..f4b7fc73 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -8,7 +8,7 @@
},
"package": {
"productName": "RisuAI",
- "version": "1.88.0"
+ "version": "1.88.1"
},
"tauri": {
"allowlist": {
diff --git a/src/lib/Setting/Pages/LanguageSettings.svelte b/src/lib/Setting/Pages/LanguageSettings.svelte
index 04218c39..35a05c2d 100644
--- a/src/lib/Setting/Pages/LanguageSettings.svelte
+++ b/src/lib/Setting/Pages/LanguageSettings.svelte
@@ -74,7 +74,7 @@
{/if}
{#if $DataBase.translatorType === 'deeplX'}
- {language.deeplXUrl}
+ {language.deeplXUrl}
{language.deeplXToken}
diff --git a/src/ts/storage/database.ts b/src/ts/storage/database.ts
index edaf0681..f0a2b462 100644
--- a/src/ts/storage/database.ts
+++ b/src/ts/storage/database.ts
@@ -15,7 +15,7 @@ import type { OobaChatCompletionRequestParams } from '../model/ooba';
export const DataBase = writable({} as any as Database)
export const loadedStore = writable(false)
-export let appVer = "1.88.0"
+export let appVer = "1.88.1"
export let webAppSubVer = ''
export function setDatabase(data:Database){
diff --git a/src/ts/translator/translator.ts b/src/ts/translator/translator.ts
index 5113297c..ea0d2f1a 100644
--- a/src/ts/translator/translator.ts
+++ b/src/ts/translator/translator.ts
@@ -137,7 +137,7 @@ async function translateMain(text:string, arg:{from:string, to:string, host:stri
}
}
- let url = db.deeplXOptions.url;
+ let url = db.deeplXOptions.url ?? 'http://localhost:1188'
if(url.endsWith('/')){
url = url.slice(0, -1)
@@ -237,10 +237,13 @@ export async function translateHTML(html: string, reverse:boolean, charArg:simpl
async function translateTranslationChunks(force:boolean = false, additionalChunkLength = 0){
+ if(translationChunks.length === 0 || !needSuperChunkedTranslate()){
+ return
+ }
+
const currentChunk = translationChunks[translationChunks.length-1]
const text: string = currentChunk.chunks.join('\n■\n')
- console.log(text)
if(!force && text.length + additionalChunkLength < 5000){
return
}
@@ -250,6 +253,10 @@ export async function translateHTML(html: string, reverse:boolean, charArg:simpl
resolvers: []
})
+ if(!text){
+ return
+ }
+
const translated = await translate(text, reverse)
const split = translated.split('■')
diff --git a/version.json b/version.json
index 2f2683b3..5d4fdcfa 100644
--- a/version.json
+++ b/version.json
@@ -1 +1 @@
-{"version":"1.88.0"}
\ No newline at end of file
+{"version":"1.88.1"}
\ No newline at end of file