Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

fix: external server warning translation

Maya0c0875649056
diff --git a/messages/en.json b/messages/en.json
index a3020e8..6d30dd2 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -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",
diff --git a/src/lib/converters/magick.svelte.ts b/src/lib/converters/magick.svelte.ts
index 39cd925..b460940 100644
--- a/src/lib/converters/magick.svelte.ts
+++ b/src/lib/converters/magick.svelte.ts
@@ -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,
diff --git a/src/lib/store/index.svelte.ts b/src/lib/store/index.svelte.ts
index f2379e0..dffbca1 100644
--- a/src/lib/store/index.svelte.ts
+++ b/src/lib/store/index.svelte.ts
@@ -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");
}
}
}