mirror of https://github.com/VERT-sh/VERT.git
feat: final translation things
enjoy uwu language (temporarily)
This commit is contained in:
parent
fa310d506b
commit
ecddeb7249
|
@ -1,8 +1,25 @@
|
|||
{
|
||||
"$schema": "https://inlang.com/schema/inlang-message-format",
|
||||
"navbar": {
|
||||
"upload": "Upload",
|
||||
"convert": "Convert",
|
||||
"settings": "Settings",
|
||||
"about": "About",
|
||||
"toggle_theme": "Toggle theme"
|
||||
},
|
||||
"footer": {
|
||||
"copyright": "© {year} VERT.",
|
||||
"source_code": "Source code",
|
||||
"discord_server": "Discord server"
|
||||
},
|
||||
"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.",
|
||||
"uploader": {
|
||||
"text": "Drop or click to {action}",
|
||||
"convert": "convert",
|
||||
"jpegify": "jpegify"
|
||||
},
|
||||
"cards": {
|
||||
"title": "VERT supports...",
|
||||
"images": "Images",
|
||||
|
@ -97,6 +114,10 @@
|
|||
"plausible_description": "We use [plausible_link]Plausible[/plausible_link], a privacy-focused analytics tool, to gather completely anonymous statistics. All data is anonymized and aggregated, and no identifiable information is ever sent or stored. You can view the analytics [analytics_link]here[/analytics_link] and choose to opt out below.",
|
||||
"opt_in": "Opt-in",
|
||||
"opt_out": "Opt-out"
|
||||
},
|
||||
"language": {
|
||||
"title": "Language",
|
||||
"description": "Select your preferred language for the VERT interface."
|
||||
}
|
||||
},
|
||||
"about": {
|
||||
|
@ -157,5 +178,12 @@
|
|||
"magick": "Error in Magick worker, image conversion may not work as expected.`",
|
||||
"ffmpeg": "Error loading ffmpeg, some features may not work."
|
||||
}
|
||||
},
|
||||
"jpegify": {
|
||||
"title": "SECRET JPEGIFY!!!",
|
||||
"subtitle": "(shh... don't tell anyone!)",
|
||||
"button": "JPEGIFY {compression}%!!!",
|
||||
"download": "Download",
|
||||
"delete": "Delete"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,189 @@
|
|||
{
|
||||
"$schema": "https://inlang.com/schema/inlang-message-format",
|
||||
"upload": {
|
||||
"title": "The fiwe conwewtew you'ww wuv.",
|
||||
"subtitle": "Aww image, audio, and document pwocessing is donye on youw dewice. Videos awe conwewted on ouw wightnying-fast sewwews. Nyo fiwe size wimit, nyo ads, and compwetewy open souwce.",
|
||||
"uploader": {
|
||||
"text": "Dwop or cwick to {action}",
|
||||
"convert": "conwewt",
|
||||
"jpegify": "jpegify"
|
||||
},
|
||||
"cards": {
|
||||
"title": "VEWT suppowts...",
|
||||
"images": "Images",
|
||||
"audio": "Audio",
|
||||
"documents": "Documents",
|
||||
"video": "Video",
|
||||
"video_server_processing": "Video upwoads to a sewwew fow pwocessing by defauwt, weawn how to set it up wocawwy [wiki_link]hewe[/wiki_link].",
|
||||
"local_supported": "Wocaw fuwwy suppowted",
|
||||
"status": {
|
||||
"text": "<b>Status:</b> {status}",
|
||||
"ready": "weady",
|
||||
"not_ready": "nyot weady"
|
||||
},
|
||||
"supported_formats": "Suppowted fowmats:"
|
||||
},
|
||||
"tooltip": {
|
||||
"partial_support": "This fowmat can onwy be conwewted as {direction}.",
|
||||
"direction_input": "input (fwom)",
|
||||
"direction_output": "output (to)"
|
||||
}
|
||||
},
|
||||
"convert": {
|
||||
"panel": {
|
||||
"convert_all": "Conwewt aww",
|
||||
"download_all": "Downwoad aww as .zip",
|
||||
"remove_all": "Wemuv aww fiwes",
|
||||
"set_all_to": "Set aww to",
|
||||
"na": "N/A"
|
||||
},
|
||||
"tooltips": {
|
||||
"unknown_file": "Unknyown fiwe type",
|
||||
"audio_file": "Audio fiwe",
|
||||
"video_file": "Video fiwe",
|
||||
"document_file": "Document fiwe",
|
||||
"image_file": "Image fiwe",
|
||||
"convert_file": "Conwewt this fiwe",
|
||||
"download_file": "Downwoad this fiwe"
|
||||
},
|
||||
"errors": {
|
||||
"cant_convert": "We can't conwewt this fiwe.",
|
||||
"vertd_server": "what awe you doing..? you'we supposed to wun the wewtd sewwew!",
|
||||
"unsupported_format": "Onwy image, wideo, audio, and document fiwes awe suppowted",
|
||||
"vertd_not_found": "Couwd nyot find the wewtd instance to stawt wideo conwewsion. Awe you suwe the instance UWW is set cowwectwy?"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"title": "Settings",
|
||||
"errors": {
|
||||
"save_failed": "Faiwed to sawe settings!"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "Appeawance",
|
||||
"brightness_theme": "Bwightnyess theme",
|
||||
"brightness_description": "Want a sunny fwash-bang, ow a quiet wonyewy nyight?",
|
||||
"light": "Wight",
|
||||
"dark": "Dawk",
|
||||
"effect_settings": "Effect settings",
|
||||
"effect_description": "Wouwd you wike fancy effects, ow a mowe static expewience?",
|
||||
"enable": "Enyabwe",
|
||||
"disable": "Disabwe"
|
||||
},
|
||||
"conversion": {
|
||||
"title": "Conwewsion",
|
||||
"filename_format": "Fiwe nyame fowmat",
|
||||
"filename_description": "This wiww detewminye the nyame of the fiwe on downwoad, <b>nyot incwuding the fiwe extension.</b> You can put these fowwowing tempwates in the fowmat, which wiww be wepwaced with the wewewant infowmation: <b>%nyame%</b> fow the owiginyaw fiwe nyame, <b>%extension%</b> fow the owiginyaw fiwe extension, and <b>%date%</b> fow a date stwing of when the fiwe was conwewted.",
|
||||
"placeholder": "VEWT_%nyame%"
|
||||
},
|
||||
"vertd": {
|
||||
"title": "Video conwewsion",
|
||||
"status": "status:",
|
||||
"loading": "woading...",
|
||||
"available": "awaiwabwe, commit id {commitId}",
|
||||
"unavailable": "unyawaiwabwe (is the uww wight?)",
|
||||
"description": "The <code>wewtd</code> pwojyect is a sewwew wwappew fow FFmpeg. This awwows you to conwewt wideos thwough the conwenyience of VEWT's web intewface, whiwe stiww being abwe to hawnyess the powew of youw GPU to do it as quickwy as possibwe.",
|
||||
"hosting_info": "We host a pubwic instance fow youw conwenyience, but it is quite easy to host youw own on youw PC ow sewwew if you knyow what you awe doing. You can downwoad the sewwew binyawies [vertd_link]hewe[/vertd_link] - the pwocess of setting this up wiww become easiew in the futuwe, so stay tunyed!",
|
||||
"instance_url": "Instance UWW",
|
||||
"url_placeholder": "Exampwe: http://wocawhost:24153",
|
||||
"conversion_speed": "Conwewsion speed",
|
||||
"speed_description": "This descwibes the twadeoff between speed and quawity. Fastew speeds wiww wesuwt in wowew quawity, but wiww get the jyob donye quickew.",
|
||||
"speeds": {
|
||||
"very_slow": "Vewy Swow",
|
||||
"slower": "Swowew",
|
||||
"slow": "Swow",
|
||||
"medium": "Medium",
|
||||
"fast": "Fast",
|
||||
"ultra_fast": "Uwtwa Fast"
|
||||
}
|
||||
},
|
||||
"privacy": {
|
||||
"title": "Pwiwacy",
|
||||
"plausible_title": "Pwausibwe anyawytics",
|
||||
"plausible_description": "We use [plausible_link]Pwausibwe[/plausible_link], a pwiwacy-focused anyawytics toow, to gathew compwetewy anyonymous statistics. Aww data is anyonymized and aggwegated, and nyo identifiabwe infowmation is ewew sent ow stowed. You can wiew the anyawytics [analytics_link]hewe[/analytics_link] and choose to opt out bewow.",
|
||||
"opt_in": "Opt-in",
|
||||
"opt_out": "Opt-out"
|
||||
},
|
||||
"language": {
|
||||
"title": "Wanguage",
|
||||
"description": "Sewect youw pwefewwed wanguage fow the VEWT intewface."
|
||||
}
|
||||
},
|
||||
"about": {
|
||||
"title": "About",
|
||||
"why": {
|
||||
"title": "Why VEWT?",
|
||||
"description": "<b>Fiwe conwewtews hawe awways disappointed us.</b> They'we ugwy, widdwed with ads, and most impowtantwy; swow. We decided to sowwe this pwobwem once and fow aww by making an awtewnyatiwe that sowwes aww those pwobwems, and mowe.<br/><br/>Aww nyon-wideo fiwes awe conwewted compwetewy on-dewice; this means that thewe's nyo deway between sending and weceiwing the fiwes fwom a sewwew, and we nyewew get to snyoop on the fiwes you conwewt.<br/><br/>Video fiwes get upwoaded to ouw wightnying-fast WTX 4000 Ada sewwew. Youw wideos stay on thewe fow an houw if you do nyot conwewt them. If you do conwewt the fiwe, the wideo wiww stay on the sewwew fow an houw, ow untiw it is downwoaded. The fiwe wiww then be deweted fwom ouw sewwew."
|
||||
},
|
||||
"sponsors": {
|
||||
"title": "Sponsows",
|
||||
"description": "Want to suppowt us? Contact a dewewopew in the [discord_link]Discowd[/discord_link] sewwew, ow send an emaiw to",
|
||||
"email_copied": "Emaiw copied to cwipboawd!"
|
||||
},
|
||||
"resources": {
|
||||
"title": "Wesouwces",
|
||||
"discord": "Discowd",
|
||||
"source": "Souwce",
|
||||
"email": "Emaiw"
|
||||
},
|
||||
"donate": {
|
||||
"title": "Donyate to VEWT",
|
||||
"description": "With youw suppowt, we can keep maintainying and impwowing VEWT.",
|
||||
"one_time": "Onye-time",
|
||||
"monthly": "Monthwy",
|
||||
"custom": "Custom",
|
||||
"pay_now": "Pay nyow",
|
||||
"donate_amount": "Donyate ${amount} USD",
|
||||
"thank_you": "Thank you fow youw donyation!",
|
||||
"payment_failed": "Payment faiwed: {message}{period} You hawe nyot been chawged.",
|
||||
"donation_error": "An ewwow occuwwed whiwe pwocessing youw donyation. Pwease twy again watew.",
|
||||
"payment_error": "Ewwow fetching payment detaiws. Pwease twy again watew."
|
||||
},
|
||||
"credits": {
|
||||
"title": "Cwedits",
|
||||
"contact_team": "If you wouwd wike to contact the dewewopment team, pwease use the emaiw found on the \"Wesouwces\" cawd.",
|
||||
"notable_contributors": "Nyotabwe contwibutows",
|
||||
"notable_description": "We'd wike to thank these peopwe fow theiw majyow contwibutions to VEWT.",
|
||||
"github_contributors": "GitHub contwibutows",
|
||||
"github_description": "Big [jpegify_link]thanks[/jpegify_link] to aww these peopwe fow hewping out! [github_link]Want to hewp too?[/github_link]",
|
||||
"no_contributors": "Seems wike nyo onye has contwibuted yet... [contribute_link]be the fiwst to contwibute![/contribute_link]",
|
||||
"libraries": "Wibwawies",
|
||||
"libraries_description": "A beeg thankies to FFmpeg (audio, wideo), ImageMagick (images) and Pandoc (documents) fow maintainying such excewwent wibwawies fow so many yeaws. VEWT wewies on them to pwowide you with youw conwewsions.",
|
||||
"roles": {
|
||||
"lead_developer": "Wead dewewopew; conwewsion backend, UI impwementation",
|
||||
"developer": "Dewewopew; UI impwementation",
|
||||
"designer": "Designyew; UX, bwanding, mawketing",
|
||||
"docker_ci": "Maintainying Dockew & CI suppowt",
|
||||
"former_cofounder": "Fowmew co-foundew & designyew"
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"github_contributors": "Ewwow fetching GitHub contwibutows"
|
||||
}
|
||||
},
|
||||
"workers": {
|
||||
"errors": {
|
||||
"general": "Ewwow conwewting fiwe {file}: {message}",
|
||||
"magick": "Ewwow in Magick wowkew, image conwewsion may nyot wowk as expected.`",
|
||||
"ffmpeg": "Ewwow woading ffmpeg, some featuwes may nyot wowk."
|
||||
}
|
||||
},
|
||||
"jpegify": {
|
||||
"title": "SECWET JPEGIFY!!!",
|
||||
"subtitle": "(shh... don't teww anyonye!)",
|
||||
"button": "JPEGIFY {compression}%!!!",
|
||||
"download": "Downwoad",
|
||||
"delete": "Dewete"
|
||||
},
|
||||
"navbar": {
|
||||
"upload": "Upwoad",
|
||||
"convert": "Conwewt",
|
||||
"settings": "Settings",
|
||||
"about": "About",
|
||||
"toggle_theme": "Toggwe theme"
|
||||
},
|
||||
"footer": {
|
||||
"copyright": "© {year} VEWT.",
|
||||
"source_code": "Souwce code",
|
||||
"discord_server": "Discowd sewwew"
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
"baseLocale": "en",
|
||||
"locales": [
|
||||
"en",
|
||||
"de"
|
||||
"uwu"
|
||||
],
|
||||
"modules": [
|
||||
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { duration, fade, transition } from "$lib/animation";
|
||||
import { m } from "$lib/paraglide/messages";
|
||||
import { isMobile, files } from "$lib/store/index.svelte";
|
||||
import type { Categories } from "$lib/types";
|
||||
import { ChevronDown, SearchIcon } from "lucide-svelte";
|
||||
|
@ -240,7 +241,7 @@
|
|||
: 'border-b-separator text-muted'}"
|
||||
onclick={() => selectCategory(category)}
|
||||
>
|
||||
{category}
|
||||
{(m as any)[`upload.cards.${category}`]?.() || category}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
import { converters } from "$lib/converters";
|
||||
import { goto } from "$app/navigation";
|
||||
import { page } from "$app/state";
|
||||
import { m } from "$lib/paraglide/messages";
|
||||
|
||||
type Props = {
|
||||
class?: string;
|
||||
|
@ -98,7 +99,11 @@
|
|||
<UploadIcon class="w-full h-full text-on-accent" />
|
||||
</div>
|
||||
<h2 class="text-center text-2xl font-semibold mt-4">
|
||||
Drop or click to {jpegify ? "JPEGIFY" : "convert"}
|
||||
{m["upload.uploader.text"]({
|
||||
action: jpegify
|
||||
? m["upload.uploader.jpegify"]()
|
||||
: m["upload.uploader.convert"]()
|
||||
})}
|
||||
</h2>
|
||||
</Panel>
|
||||
</button>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import { GITHUB_URL_VERT, DISCORD_URL } from "$lib/consts";
|
||||
import { m } from "$lib/paraglide/messages";
|
||||
|
||||
const items = Object.entries({
|
||||
//"Privacy policy": "#",
|
||||
"Source code": GITHUB_URL_VERT,
|
||||
"Discord server": DISCORD_URL,
|
||||
});
|
||||
const items = $derived([
|
||||
[m["footer.source_code"](), GITHUB_URL_VERT],
|
||||
[m["footer.discord_server"](), DISCORD_URL],
|
||||
]);
|
||||
|
||||
const year = new Date().getFullYear();
|
||||
</script>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<div
|
||||
class="w-full h-full flex items-center justify-center text-muted gap-3 relative"
|
||||
>
|
||||
<p>© {year} VERT.</p>
|
||||
<p>{m["footer.copyright"]({ year })}</p>
|
||||
{#each items as [name, url] (name)}
|
||||
<!-- bullet point -->
|
||||
<p>•</p>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
import Logo from "../../visual/svg/Logo.svelte";
|
||||
import { beforeNavigate } from "$app/navigation";
|
||||
import Tooltip from "$lib/components/visual/Tooltip.svelte";
|
||||
import { m } from "$lib/paraglide/messages";
|
||||
|
||||
const items = $derived<
|
||||
{
|
||||
|
@ -33,13 +34,13 @@
|
|||
}[]
|
||||
>([
|
||||
{
|
||||
name: "Upload",
|
||||
name: m["navbar.upload"](),
|
||||
url: "/",
|
||||
activeMatch: (pathname) => pathname === "/",
|
||||
icon: UploadIcon,
|
||||
},
|
||||
{
|
||||
name: "Convert",
|
||||
name: m["navbar.convert"](),
|
||||
url: "/convert/",
|
||||
activeMatch: (pathname) =>
|
||||
pathname === "/convert/" || pathname === "/convert",
|
||||
|
@ -47,13 +48,13 @@
|
|||
badge: files.files.length,
|
||||
},
|
||||
{
|
||||
name: "Settings",
|
||||
name: m["navbar.settings"](),
|
||||
url: "/settings/",
|
||||
activeMatch: (pathname) => pathname.startsWith("/settings"),
|
||||
icon: SettingsIcon,
|
||||
},
|
||||
{
|
||||
name: "About",
|
||||
name: m["navbar.about"](),
|
||||
url: "/about/",
|
||||
activeMatch: (pathname) => pathname.startsWith("/about"),
|
||||
icon: InfoIcon,
|
||||
|
@ -180,7 +181,7 @@
|
|||
{@render link(item, i)}
|
||||
{/each}
|
||||
<div class="w-0.5 bg-separator h-full hidden md:flex"></div>
|
||||
<Tooltip text="Toggle theme" position="right">
|
||||
<Tooltip text={m["navbar.toggle_theme"]()} position="right">
|
||||
<button
|
||||
onclick={() => {
|
||||
const isDark =
|
||||
|
|
|
@ -101,6 +101,8 @@
|
|||
["jpegify_link", "github_link"],
|
||||
m["about.credits.github_description"](),
|
||||
["/jpegify", GITHUB_URL_VERT],
|
||||
[false, true],
|
||||
["text-black dynadark:text-white", "text-blue-500 font-normal hover:underline"]
|
||||
)}
|
||||
</p>
|
||||
{:else}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
effects,
|
||||
setEffects,
|
||||
setTheme,
|
||||
updateLocale,
|
||||
availableLocales,
|
||||
} from "$lib/store/index.svelte";
|
||||
import {
|
||||
MoonIcon,
|
||||
|
@ -15,6 +17,22 @@
|
|||
} from "lucide-svelte";
|
||||
import { onMount, onDestroy } from "svelte";
|
||||
import { m } from "$lib/paraglide/messages";
|
||||
import { getLocale } from "$lib/paraglide/runtime";
|
||||
import Dropdown from "$lib/components/functional/Dropdown.svelte";
|
||||
|
||||
let currentLocale = $state("en");
|
||||
|
||||
const getLanguageDisplayName = (locale: string) => {
|
||||
try {
|
||||
return availableLocales[locale as keyof typeof availableLocales];
|
||||
} catch {
|
||||
return locale.toUpperCase();
|
||||
}
|
||||
};
|
||||
|
||||
const languageOptions = Object.keys(availableLocales).map((locale) =>
|
||||
getLanguageDisplayName(locale),
|
||||
);
|
||||
|
||||
let lightElement: HTMLButtonElement;
|
||||
let darkElement: HTMLButtonElement;
|
||||
|
@ -50,6 +68,8 @@
|
|||
onMount(() => {
|
||||
effectsUnsubscribe = effects.subscribe(updateEffectsClasses);
|
||||
themeUnsubscribe = theme.subscribe(updateThemeClasses);
|
||||
|
||||
currentLocale = localStorage.getItem("locale") || getLocale();
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
|
@ -58,9 +78,20 @@
|
|||
});
|
||||
|
||||
$effect(() => {
|
||||
updateEffectsClasses($effects);
|
||||
updateThemeClasses($theme);
|
||||
});
|
||||
updateEffectsClasses($effects);
|
||||
updateThemeClasses($theme);
|
||||
});
|
||||
|
||||
function handleLanguageChange(selectedLanguage: string) {
|
||||
const selectedLocale = Object.keys(availableLocales).find(
|
||||
(locale) => getLanguageDisplayName(locale) === selectedLanguage,
|
||||
);
|
||||
|
||||
if (selectedLocale && selectedLocale !== currentLocale) {
|
||||
currentLocale = selectedLocale;
|
||||
updateLocale(selectedLocale);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<Panel class="flex flex-col gap-8 p-6">
|
||||
|
@ -76,7 +107,9 @@
|
|||
<div class="flex flex-col gap-8">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex flex-col gap-2">
|
||||
<p class="text-base font-bold">{m["settings.appearance.brightness_theme"]()}</p>
|
||||
<p class="text-base font-bold">
|
||||
{m["settings.appearance.brightness_theme"]()}
|
||||
</p>
|
||||
<p class="text-sm text-muted font-normal italic">
|
||||
{m["settings.appearance.brightness_description"]()}
|
||||
</p>
|
||||
|
@ -86,7 +119,9 @@
|
|||
<button
|
||||
bind:this={lightElement}
|
||||
onclick={() => setTheme("light")}
|
||||
class="btn {$effects ? "" : "!scale-100"} flex-1 p-4 rounded-lg text-black dynadark:text-white flex items-center justify-center"
|
||||
class="btn {$effects
|
||||
? ''
|
||||
: '!scale-100'} flex-1 p-4 rounded-lg text-black dynadark:text-white flex items-center justify-center"
|
||||
>
|
||||
<SunIcon size="24" class="inline-block mr-2" />
|
||||
{m["settings.appearance.light"]()}
|
||||
|
@ -95,7 +130,9 @@
|
|||
<button
|
||||
bind:this={darkElement}
|
||||
onclick={() => setTheme("dark")}
|
||||
class="btn {$effects ? "" : "!scale-100"} flex-1 p-4 rounded-lg text-black flex items-center justify-center"
|
||||
class="btn {$effects
|
||||
? ''
|
||||
: '!scale-100'} flex-1 p-4 rounded-lg text-black flex items-center justify-center"
|
||||
>
|
||||
<MoonIcon size="24" class="inline-block mr-2" />
|
||||
{m["settings.appearance.dark"]()}
|
||||
|
@ -105,7 +142,9 @@
|
|||
</div>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex flex-col gap-2">
|
||||
<p class="text-base font-bold">{m["settings.appearance.effect_settings"]()}</p>
|
||||
<p class="text-base font-bold">
|
||||
{m["settings.appearance.effect_settings"]()}
|
||||
</p>
|
||||
<p class="text-sm text-muted font-normal italic">
|
||||
{m["settings.appearance.effect_description"]()}
|
||||
</p>
|
||||
|
@ -115,7 +154,9 @@
|
|||
<button
|
||||
bind:this={enableEffectsElement}
|
||||
onclick={() => setEffects(true)}
|
||||
class="btn {$effects ? "" : "!scale-100"} flex-1 p-4 rounded-lg text-black dynadark:text-white flex items-center justify-center"
|
||||
class="btn {$effects
|
||||
? ''
|
||||
: '!scale-100'} flex-1 p-4 rounded-lg text-black dynadark:text-white flex items-center justify-center"
|
||||
>
|
||||
<PlayIcon size="24" class="inline-block mr-2" />
|
||||
{m["settings.appearance.enable"]()}
|
||||
|
@ -124,7 +165,9 @@
|
|||
<button
|
||||
bind:this={disableEffectsElement}
|
||||
onclick={() => setEffects(false)}
|
||||
class="btn {$effects ? "" : "!scale-100"} flex-1 p-4 rounded-lg text-black dynadark:text-white flex items-center justify-center"
|
||||
class="btn {$effects
|
||||
? ''
|
||||
: '!scale-100'} flex-1 p-4 rounded-lg text-black dynadark:text-white flex items-center justify-center"
|
||||
>
|
||||
<PauseIcon size="24" class="inline-block mr-2" />
|
||||
{m["settings.appearance.disable"]()}
|
||||
|
@ -132,6 +175,24 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex flex-col gap-2">
|
||||
<p class="text-base font-bold">
|
||||
{m["settings.language.title"]()}
|
||||
</p>
|
||||
<p class="text-sm text-muted font-normal italic">
|
||||
{m["settings.language.description"]()}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-col gap-3 w-full">
|
||||
<Dropdown
|
||||
options={languageOptions}
|
||||
settingsStyle
|
||||
selected={getLanguageDisplayName(currentLocale)}
|
||||
onselect={handleLanguageChange}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
|
|
|
@ -6,6 +6,7 @@ import { parseBlob, selectCover } from "music-metadata";
|
|||
import { writable } from "svelte/store";
|
||||
import { addDialog } from "./DialogProvider";
|
||||
import PQueue from "p-queue";
|
||||
import { getLocale, setLocale } from "$lib/paraglide/runtime";
|
||||
|
||||
class Files {
|
||||
public files = $state<VertFile[]>([]);
|
||||
|
@ -292,3 +293,17 @@ export const vertdLoaded = writable(false);
|
|||
export const isMobile = writable(false);
|
||||
export const effects = writable(true);
|
||||
export const theme = writable<"light" | "dark">("light");
|
||||
export const locale = writable(getLocale());
|
||||
export const availableLocales = {
|
||||
"en": "English",
|
||||
"uwu": "UwU",
|
||||
}
|
||||
|
||||
export function updateLocale(newLocale: string) {
|
||||
log(["locale"], `set to ${newLocale}`);
|
||||
localStorage.setItem("locale", newLocale);
|
||||
// @ts-expect-error shush
|
||||
setLocale(newLocale, { reload: false });
|
||||
// @ts-expect-error shush
|
||||
locale.set(newLocale);
|
||||
}
|
|
@ -19,6 +19,8 @@
|
|||
theme,
|
||||
dropping,
|
||||
vertdLoaded,
|
||||
locale,
|
||||
updateLocale,
|
||||
} from "$lib/store/index.svelte";
|
||||
import "$lib/css/app.scss";
|
||||
import { browser } from "$app/environment";
|
||||
|
@ -73,6 +75,7 @@
|
|||
theme.set(
|
||||
(localStorage.getItem("theme") as "light" | "dark") || "light",
|
||||
);
|
||||
updateLocale(localStorage.getItem("locale") || "en");
|
||||
|
||||
Settings.instance.load();
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
import { files } from "$lib/store/index.svelte";
|
||||
import { quintOut } from "svelte/easing";
|
||||
import { blur } from "svelte/transition";
|
||||
import { m } from "$lib/paraglide/messages";
|
||||
|
||||
const images = $derived(
|
||||
files.files.filter((f) =>
|
||||
|
@ -31,9 +32,9 @@
|
|||
</script>
|
||||
|
||||
<div class="mx-auto w-full max-w-[778px] flex flex-col gap-8">
|
||||
<h1 class="text-5xl text-center">SECRET JPEGIFY!!!</h1>
|
||||
<h1 class="text-5xl text-center">{m["jpegify.title"]()}</h1>
|
||||
<p class="text-muted text-center -mt-4 font-normal italic">
|
||||
(shh... don't tell anyone!)
|
||||
{m["jpegify.subtitle"]()}
|
||||
</p>
|
||||
<Uploader class="w-full h-64" jpegify={true} />
|
||||
<input
|
||||
|
@ -49,7 +50,7 @@
|
|||
onclick={jpegify}
|
||||
disabled={processing}
|
||||
class="btn bg-accent text-black rounded-2xl text-2xl w-full mx-auto"
|
||||
>JPEGIFY {compressionInverted}%!!!</button
|
||||
>{m["jpegify.button"]({ compression: compressionInverted })}</button
|
||||
>
|
||||
<div class="flex flex-wrap flex-row justify-center gap-4">
|
||||
{#each images as file, i (file.id)}
|
||||
|
@ -89,7 +90,7 @@
|
|||
disabled={!!!file.result}
|
||||
class="btn bg-accent text-black rounded-2xl text-2xl w-full mx-auto"
|
||||
>
|
||||
Download
|
||||
{m["jpegify.download"]()}
|
||||
</button>
|
||||
<button
|
||||
onclick={() => {
|
||||
|
@ -103,7 +104,7 @@
|
|||
}}
|
||||
class="btn border-accent-red border-2 bg-transparent text-black dynadark:text-white rounded-2xl text-2xl w-full mx-auto"
|
||||
>
|
||||
Delete
|
||||
{m["jpegify.delete"]()}
|
||||
</button>
|
||||
</div>
|
||||
</Panel>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { paraglideVitePlugin } from '@inlang/paraglide-js'
|
||||
import { paraglideVitePlugin } from "@inlang/paraglide-js";
|
||||
import { sveltekit } from "@sveltejs/kit/vite";
|
||||
import { defineConfig, type PluginOption } from "vite";
|
||||
import svg from "@poppanator/sveltekit-svg";
|
||||
|
@ -7,7 +7,11 @@ import wasm from "vite-plugin-wasm";
|
|||
export default defineConfig(({ command }) => {
|
||||
const plugins: PluginOption[] = [
|
||||
sveltekit(),
|
||||
paraglideVitePlugin({ project: './project.inlang', outdir: './src/lib/paraglide' }),
|
||||
paraglideVitePlugin({
|
||||
project: "./project.inlang",
|
||||
outdir: "./src/lib/paraglide",
|
||||
strategy: ["globalVariable", "preferredLanguage", "baseLocale"],
|
||||
}),
|
||||
svg({
|
||||
includePaths: ["./src/lib/assets"],
|
||||
svgoOptions: {
|
||||
|
|
Loading…
Reference in New Issue