fix: external server warning translation

oops

also updated magick worker timeouts
This commit is contained in:
Maya 2025-09-22 15:56:06 +03:00
parent d5205666ff
commit 0c08756490
No known key found for this signature in database
3 changed files with 15 additions and 13 deletions

View File

@ -47,6 +47,12 @@
}
},
"convert": {
"external_warning": {
"title": "External server warning",
"text": "If you choose to convert into a video format, those files will be uploaded to an external server to be converted. Do you want to continue?",
"yes": "Yes",
"no": "No"
},
"panel": {
"convert_all": "Convert all",
"download_all": "Download all as .zip",

View File

@ -156,10 +156,10 @@ export class MagickConverter extends Converter {
() =>
reject(
new Error(
"Worker ready timeout after 5 seconds",
"Magick worker ready timeout after 10 seconds",
),
),
5000,
10000,
),
),
]);
@ -178,7 +178,7 @@ export class MagickConverter extends Converter {
() =>
reject(
new Error(
"Worker initialization timeout after 30 seconds",
"Magick worker initialization timeout after 30 seconds",
),
),
30000,

View File

@ -7,6 +7,7 @@ import { writable } from "svelte/store";
import { addDialog } from "./DialogProvider";
import PQueue from "p-queue";
import { getLocale, setLocale } from "$lib/paraglide/runtime";
import { m } from "$lib/paraglide/messages";
class Files {
public files = $state<VertFile[]>([]);
@ -172,11 +173,11 @@ class Files {
localStorage.getItem("acceptedExternalWarning") === "true";
if (isVideo && !acceptedExternalWarning && !this._warningShown) {
this._warningShown = true;
const message =
"If you choose to convert into a video format, some of your files will be uploaded to an external server to be converted. Do you want to continue?";
const title = m["convert.external_warning.title"]();
const message = m["convert.external_warning.text"]();
const buttons = [
{
text: "No",
text: m["convert.external_warning.no"](),
action: () => {
this.files = [
...this.files.filter(
@ -190,7 +191,7 @@ class Files {
},
},
{
text: "Yes",
text: m["convert.external_warning.yes"](),
action: () => {
localStorage.setItem(
"acceptedExternalWarning",
@ -200,12 +201,7 @@ class Files {
},
},
];
addDialog(
"External server warning",
message,
buttons,
"warning",
);
addDialog(title, message, buttons, "warning");
}
}
}