diff --git a/messages/en.json b/messages/en.json
index c78da32..1ff69d3 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -3,17 +3,21 @@
"upload": {
"title": "The file converter you'll love.",
"subtitle": "All image, audio, and document processing is done on your device. Videos are converted on our lightning-fast servers. No file size limit, no ads, and completely open source.",
- "supports_title": "VERT supports...",
- "images": "Images",
- "audio": "Audio",
- "documents": "Documents",
- "video": "Video",
- "video_server_processing": "Video uploads to a server for processing by default, learn how to set it up locally [wiki_link]here[/wiki_link].",
- "local_supported": "Local fully supported",
- "status": "Status:",
- "ready": "ready",
- "not_ready": "not ready",
- "supported_formats": "Supported formats:",
+ "cards": {
+ "title": "VERT supports...",
+ "images": "Images",
+ "audio": "Audio",
+ "documents": "Documents",
+ "video": "Video",
+ "video_server_processing": "Video uploads to a server for processing by default, learn how to set it up locally [wiki_link]here[/wiki_link].",
+ "local_supported": "Local fully supported",
+ "status": {
+ "text": "Status: {status}",
+ "ready": "ready",
+ "not_ready": "not ready"
+ },
+ "supported_formats": "Supported formats:"
+ },
"tooltip": {
"partial_support": "This format can only be converted as {direction}.",
"direction_input": "input (from)",
@@ -99,7 +103,7 @@
"title": "About",
"why": {
"title": "Why VERT?",
- "description": "File converters have always disappointed us. They're ugly, riddled with ads, and most importantly; slow. We decided to solve this problem once and for all by making an alternative that solves all those problems, and more.
All non-video files are converted completely on-device; this means that there's no delay between sending and receiving the files from a server, and we never get to snoop on the files you convert. Video files get uploaded to our lightning-fast RTX 4000 Ada server.
Your videos stay on there for an hour if you do not convert them. If you do convert the file, the video will stay on the server for an hour, or until it is downloaded. The file will then be deleted from our server."
+ "description": "File converters have always disappointed us. They're ugly, riddled with ads, and most importantly; slow. We decided to solve this problem once and for all by making an alternative that solves all those problems, and more.
All non-video files are converted completely on-device; this means that there's no delay between sending and receiving the files from a server, and we never get to snoop on the files you convert.
Video files get uploaded to our lightning-fast RTX 4000 Ada server. Your videos stay on there for an hour if you do not convert them. If you do convert the file, the video will stay on the server for an hour, or until it is downloaded. The file will then be deleted from our server."
},
"sponsors": {
"title": "Sponsors",
@@ -147,7 +151,11 @@
"github_contributors": "Error fetching GitHub contributors"
}
},
- "toasts": {
- "hello": "world"
+ "workers": {
+ "errors": {
+ "general": "Error converting file {file}: {message}",
+ "magick": "Error in Magick worker, image conversion may not work as expected.`",
+ "ffmpeg": "Error loading ffmpeg, some features may not work."
+ }
}
}
diff --git a/src/lib/converters/ffmpeg.svelte.ts b/src/lib/converters/ffmpeg.svelte.ts
index 7272a07..f7e9a61 100644
--- a/src/lib/converters/ffmpeg.svelte.ts
+++ b/src/lib/converters/ffmpeg.svelte.ts
@@ -4,6 +4,7 @@ import { FFmpeg } from "@ffmpeg/ffmpeg";
import { browser } from "$app/environment";
import { error, log } from "$lib/logger";
import { addToast } from "$lib/store/ToastProvider";
+import { m } from "$lib/paraglide/messages";
export class FFmpegConverter extends Converter {
private ffmpeg: FFmpeg = null!;
@@ -49,7 +50,7 @@ export class FFmpegConverter extends Converter {
error(["converters", this.name], `error loading ffmpeg: ${err}`);
addToast(
"error",
- `Error loading ffmpeg, some features may not work.`,
+ m["workers.errors.ffmpeg"](),
);
}
}
diff --git a/src/lib/converters/magick.svelte.ts b/src/lib/converters/magick.svelte.ts
index 056c8a3..4a4ea35 100644
--- a/src/lib/converters/magick.svelte.ts
+++ b/src/lib/converters/magick.svelte.ts
@@ -1,5 +1,6 @@
import { browser } from "$app/environment";
import { error, log } from "$lib/logger";
+import { m } from "$lib/paraglide/messages";
import { addToast } from "$lib/store/ToastProvider";
import type { OmitBetterStrict, WorkerMessage } from "$lib/types";
import { VertFile } from "$lib/types";
@@ -65,7 +66,7 @@ export class MagickConverter extends Converter {
);
addToast(
"error",
- `Error in Magick worker, image conversion may not work as expected.`,
+ m["workers.errors.magick"](),
);
throw new Error(message.error);
}
diff --git a/src/lib/types/file.svelte.ts b/src/lib/types/file.svelte.ts
index 8fc0d61..345d289 100644
--- a/src/lib/types/file.svelte.ts
+++ b/src/lib/types/file.svelte.ts
@@ -1,6 +1,7 @@
import { converters } from "$lib/converters";
import type { Converter } from "$lib/converters/converter.svelte";
import { error } from "$lib/logger";
+import { m } from "$lib/paraglide/messages";
import { addToast } from "$lib/store/ToastProvider";
export class VertFile {
@@ -75,7 +76,10 @@ export class VertFile {
error(["files"], castedErr.message);
addToast(
"error",
- `Error converting file ${this.file.name}: ${castedErr.message || castedErr}`,
+ m["workers.errors.general"]({
+ file: this.file.name,
+ message: castedErr.message || castedErr,
+ }),
);
this.result = null;
}
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index f45a8ff..d0e5d96 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -31,19 +31,19 @@
false,
formats: getSupportedFormats("imagemagick"),
icon: Image,
- title: m["upload.images"](),
+ title: m["upload.cards.images"](),
},
Audio: {
ready: converters.find((c) => c.name === "ffmpeg")?.ready || false,
formats: getSupportedFormats("ffmpeg"),
icon: AudioLines,
- title: m["upload.audio"](),
+ title: m["upload.cards.audio"](),
},
Documents: {
ready: converters.find((c) => c.name === "pandoc")?.ready || false,
formats: getSupportedFormats("pandoc"),
icon: BookText,
- title: m["upload.documents"](),
+ title: m["upload.cards.documents"](),
},
Video: {
ready:
@@ -51,7 +51,7 @@
(false && $vertdLoaded),
formats: getSupportedFormats("vertd"),
icon: Film,
- title: m["upload.video"](),
+ title: m["upload.cards.video"](),
},
});
@@ -100,7 +100,7 @@
{@html link( "wiki_link", - m["upload.video_server_processing"](), + m["upload.cards.video_server_processing"](), "https://github.com/VERT-sh/VERT/wiki/How-to-convert-video-with-VERT", )}
{:else}
- {m["upload.status"]()} - {s.ready - ? m["upload.ready"]() - : m["upload.not_ready"]()} + {@html m["upload.cards.status.text"]({ + status: s.ready + ? m["upload.cards.status.ready"]() + : m["upload.cards.status.not_ready"](), + })}