Skip to content

Commit ff0bd4e

Browse files
authored
1.88.1 (#331)
# PR Checklist - [ ] Did you check if it works normally in all models? *ignore this when it dosen't uses models* - [ ] Did you check if it works normally in all of web, local and node hosted versions? if it dosen't, did you blocked it in those versions? - [ ] Did you added a type def? # Description
2 parents a047506 + 026e47c commit ff0bd4e

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

src-tauri/tauri.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"package": {
1010
"productName": "RisuAI",
11-
"version": "1.88.0"
11+
"version": "1.88.1"
1212
},
1313
"tauri": {
1414
"allowlist": {

src/lib/Setting/Pages/LanguageSettings.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
{/if}
7575

7676
{#if $DataBase.translatorType === 'deeplX'}
77-
<span class="text-textcolor mt-4">{language.deeplXUrl}</span>
77+
<span class="text-textcolor mt-4" placeholder="http://localhost:1188">{language.deeplXUrl}</span>
7878
<TextInput bind:value={$DataBase.deeplXOptions.url} />
7979

8080
<span class="text-textcolor mt-4">{language.deeplXToken}</span>

src/ts/storage/database.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type { OobaChatCompletionRequestParams } from '../model/ooba';
1515

1616
export const DataBase = writable({} as any as Database)
1717
export const loadedStore = writable(false)
18-
export let appVer = "1.88.0"
18+
export let appVer = "1.88.1"
1919
export let webAppSubVer = ''
2020

2121
export function setDatabase(data:Database){

src/ts/translator/translator.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async function translateMain(text:string, arg:{from:string, to:string, host:stri
137137
}
138138
}
139139

140-
let url = db.deeplXOptions.url;
140+
let url = db.deeplXOptions.url ?? 'http://localhost:1188'
141141

142142
if(url.endsWith('/')){
143143
url = url.slice(0, -1)
@@ -237,10 +237,13 @@ export async function translateHTML(html: string, reverse:boolean, charArg:simpl
237237

238238

239239
async function translateTranslationChunks(force:boolean = false, additionalChunkLength = 0){
240+
if(translationChunks.length === 0 || !needSuperChunkedTranslate()){
241+
return
242+
}
243+
240244
const currentChunk = translationChunks[translationChunks.length-1]
241245
const text: string = currentChunk.chunks.join('\n■\n')
242246

243-
console.log(text)
244247
if(!force && text.length + additionalChunkLength < 5000){
245248
return
246249
}
@@ -250,6 +253,10 @@ export async function translateHTML(html: string, reverse:boolean, charArg:simpl
250253
resolvers: []
251254
})
252255

256+
if(!text){
257+
return
258+
}
259+
253260
const translated = await translate(text, reverse)
254261

255262
const split = translated.split('■')

version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"1.88.0"}
1+
{"version":"1.88.1"}

0 commit comments

Comments
 (0)