feat: finish up translations

This commit is contained in:
Maya 2025-07-25 21:03:20 +03:00
parent dff9c94ed5
commit fa310d506b
No known key found for this signature in database
5 changed files with 48 additions and 29 deletions

View File

@ -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": "<b>Status:</b> {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": "<b>File converters have always disappointed us.</b> 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.<br/><br/>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.<br/><br/>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": "<b>File converters have always disappointed us.</b> 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.<br/><br/>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.<br/><br/>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."
}
}
}

View File

@ -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"](),
);
}
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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 @@
<hr />
<div class="mt-10 md:mt-16">
<h2 class="text-center text-4xl">{m["upload.supports_title"]()}</h2>
<h2 class="text-center text-4xl">{m["upload.cards.title"]()}</h2>
<div class="flex gap-4 mt-8 md:flex-row flex-col">
{#each Object.entries(status) as [key, s]}
@ -125,25 +125,30 @@
<p>
{@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",
)}
</p>
{:else}
<p class="flex tems-center justify-center gap-2">
<Check size="20" />
{m["upload.local_supported"]()}
{m["upload.cards.local_supported"]()}
</p>
{/if}
<p>
<b>{m["upload.status"]()}</b>
{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"](),
})}
</p>
<div>
<span class="flex flex-wrap justify-center">
<b>{m["upload.supported_formats"]()}&nbsp;</b>
<b
>{m[
"upload.cards.supported_formats"
]()}&nbsp;</b
>
{#each s.formats.split(", ") as format, index}
{@const isPartial = format.endsWith("*")}
{@const formatName = isPartial