[dyad] Adding multi-language support - wrote 17 file(s), renamed 5 file(s), deleted 1 file(s), added next-international package(s)
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
"input-otp": "^1.4.2",
|
"input-otp": "^1.4.2",
|
||||||
"lucide-react": "^0.511.0",
|
"lucide-react": "^0.511.0",
|
||||||
"next": "15.3.8",
|
"next": "15.3.8",
|
||||||
|
"next-international": "^1.3.1",
|
||||||
"next-themes": "^0.4.6",
|
"next-themes": "^0.4.6",
|
||||||
"react": "^19.2.1",
|
"react": "^19.2.1",
|
||||||
"react-day-picker": "^8.10.1",
|
"react-day-picker": "^8.10.1",
|
||||||
|
|||||||
22
pnpm-lock.yaml
generated
22
pnpm-lock.yaml
generated
@@ -113,6 +113,9 @@ importers:
|
|||||||
next:
|
next:
|
||||||
specifier: 15.3.8
|
specifier: 15.3.8
|
||||||
version: 15.3.8(react-dom@19.2.1(react@19.2.1))(react@19.2.1)
|
version: 15.3.8(react-dom@19.2.1(react@19.2.1))(react@19.2.1)
|
||||||
|
next-international:
|
||||||
|
specifier: ^1.3.1
|
||||||
|
version: 1.3.1
|
||||||
next-themes:
|
next-themes:
|
||||||
specifier: ^0.4.6
|
specifier: ^0.4.6
|
||||||
version: 0.4.6(react-dom@19.2.1(react@19.2.1))(react@19.2.1)
|
version: 0.4.6(react-dom@19.2.1(react@19.2.1))(react@19.2.1)
|
||||||
@@ -1495,6 +1498,9 @@ packages:
|
|||||||
react: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc
|
react: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc
|
||||||
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc
|
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc
|
||||||
|
|
||||||
|
international-types@0.8.1:
|
||||||
|
resolution: {integrity: sha512-tajBCAHo4I0LIFlmQ9ZWfjMWVyRffzuvfbXCd6ssFt5u1Zw15DN0UBpVTItXdNa1ls+cpQt3Yw8+TxsfGF8JcA==}
|
||||||
|
|
||||||
internmap@2.0.3:
|
internmap@2.0.3:
|
||||||
resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==}
|
resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
@@ -1616,6 +1622,9 @@ packages:
|
|||||||
neo-async@2.6.2:
|
neo-async@2.6.2:
|
||||||
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
|
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
|
||||||
|
|
||||||
|
next-international@1.3.1:
|
||||||
|
resolution: {integrity: sha512-ydU9jQe+4MohMWltbZae/yuWeKhmp0QKQqJNNi8WCCMwrly03qfMAHw/tWbT2qgAlG++CxF5jMXmGQZgOHeVOw==}
|
||||||
|
|
||||||
next-themes@0.4.6:
|
next-themes@0.4.6:
|
||||||
resolution: {integrity: sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==}
|
resolution: {integrity: sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -1867,6 +1876,9 @@ packages:
|
|||||||
serialize-javascript@6.0.2:
|
serialize-javascript@6.0.2:
|
||||||
resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==}
|
resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==}
|
||||||
|
|
||||||
|
server-only@0.0.1:
|
||||||
|
resolution: {integrity: sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==}
|
||||||
|
|
||||||
sharp@0.34.2:
|
sharp@0.34.2:
|
||||||
resolution: {integrity: sha512-lszvBmB9QURERtyKT2bNmsgxXK0ShJrL/fvqlonCo7e6xBF8nT8xU6pW+PMIbLsz0RxQk3rgH9kd8UmvOzlMJg==}
|
resolution: {integrity: sha512-lszvBmB9QURERtyKT2bNmsgxXK0ShJrL/fvqlonCo7e6xBF8nT8xU6pW+PMIbLsz0RxQk3rgH9kd8UmvOzlMJg==}
|
||||||
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
|
||||||
@@ -3400,6 +3412,8 @@ snapshots:
|
|||||||
react: 19.2.1
|
react: 19.2.1
|
||||||
react-dom: 19.2.1(react@19.2.1)
|
react-dom: 19.2.1(react@19.2.1)
|
||||||
|
|
||||||
|
international-types@0.8.1: {}
|
||||||
|
|
||||||
internmap@2.0.3: {}
|
internmap@2.0.3: {}
|
||||||
|
|
||||||
is-arrayish@0.3.2:
|
is-arrayish@0.3.2:
|
||||||
@@ -3498,6 +3512,12 @@ snapshots:
|
|||||||
|
|
||||||
neo-async@2.6.2: {}
|
neo-async@2.6.2: {}
|
||||||
|
|
||||||
|
next-international@1.3.1:
|
||||||
|
dependencies:
|
||||||
|
client-only: 0.0.1
|
||||||
|
international-types: 0.8.1
|
||||||
|
server-only: 0.0.1
|
||||||
|
|
||||||
next-themes@0.4.6(react-dom@19.2.1(react@19.2.1))(react@19.2.1):
|
next-themes@0.4.6(react-dom@19.2.1(react@19.2.1))(react@19.2.1):
|
||||||
dependencies:
|
dependencies:
|
||||||
react: 19.2.1
|
react: 19.2.1
|
||||||
@@ -3736,6 +3756,8 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
randombytes: 2.1.0
|
randombytes: 2.1.0
|
||||||
|
|
||||||
|
server-only@0.0.1: {}
|
||||||
|
|
||||||
sharp@0.34.2:
|
sharp@0.34.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
color: 4.2.3
|
color: 4.2.3
|
||||||
|
|||||||
@@ -2,15 +2,17 @@ import { Changelog } from "@/components/changelog";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { ArrowLeft } from "lucide-react";
|
import { ArrowLeft } from "lucide-react";
|
||||||
|
import { getI18n } from "@/lib/i18n/server";
|
||||||
|
|
||||||
export default function ChangelogPage() {
|
export default async function ChangelogPage() {
|
||||||
|
const t = await getI18n();
|
||||||
return (
|
return (
|
||||||
<div className="relative flex flex-col items-center min-h-screen p-4 sm:p-8 bg-gray-50 dark:bg-background font-[family-name:var(--font-geist-sans)]">
|
<div className="relative flex flex-col items-center min-h-screen p-4 sm:p-8 bg-gray-50 dark:bg-background font-[family-name:var(--font-geist-sans)]">
|
||||||
<div className="w-full max-w-4xl mx-auto">
|
<div className="w-full max-w-4xl mx-auto">
|
||||||
<Button asChild variant="ghost" className="mb-4 -ml-4">
|
<Button asChild variant="ghost" className="mb-4 -ml-4">
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<ArrowLeft className="mr-2 h-4 w-4" />
|
<ArrowLeft className="mr-2 h-4 w-4" />
|
||||||
Back to Converter
|
{t('changelog.back')}
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -2,28 +2,30 @@ import Link from "next/link";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { ArrowLeft } from "lucide-react";
|
import { ArrowLeft } from "lucide-react";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
|
import { getI18n } from "@/lib/i18n/server";
|
||||||
|
|
||||||
export default function ImprintPage() {
|
export default async function ImprintPage() {
|
||||||
|
const t = await getI18n();
|
||||||
return (
|
return (
|
||||||
<div className="relative flex flex-col items-center min-h-screen p-4 sm:p-8 bg-gray-50 dark:bg-background">
|
<div className="relative flex flex-col items-center min-h-screen p-4 sm:p-8 bg-gray-50 dark:bg-background">
|
||||||
<div className="w-full max-w-4xl mx-auto">
|
<div className="w-full max-w-4xl mx-auto">
|
||||||
<Button asChild variant="ghost" className="mb-4 -ml-4">
|
<Button asChild variant="ghost" className="mb-4 -ml-4">
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<ArrowLeft className="mr-2 h-4 w-4" />
|
<ArrowLeft className="mr-2 h-4 w-4" />
|
||||||
Back to Converter
|
{t('imprint.back')}
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
<main className="w-full">
|
<main className="w-full">
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="text-3xl font-bold">Imprint</CardTitle>
|
<CardTitle className="text-3xl font-bold">{t('imprint.title')}</CardTitle>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="space-y-6 text-muted-foreground">
|
<CardContent className="space-y-6 text-muted-foreground">
|
||||||
<p>
|
<p>
|
||||||
Information according to § 5 TMG (German Telemedia Act)
|
{t('imprint.info')}
|
||||||
</p>
|
</p>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<h3 className="font-semibold text-foreground">Contact Information:</h3>
|
<h3 className="font-semibold text-foreground">{t('imprint.contact.title')}</h3>
|
||||||
<p>[Your Company Name]</p>
|
<p>[Your Company Name]</p>
|
||||||
<p>[Street Name & Number]</p>
|
<p>[Street Name & Number]</p>
|
||||||
<p>[Postal Code & City]</p>
|
<p>[Postal Code & City]</p>
|
||||||
@@ -31,13 +33,13 @@ export default function ImprintPage() {
|
|||||||
<p>Phone: [your-phone-number]</p>
|
<p>Phone: [your-phone-number]</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<h3 className="font-semibold text-foreground">Represented by:</h3>
|
<h3 className="font-semibold text-foreground">{t('imprint.represented_by.title')}</h3>
|
||||||
<p>[Your Name/CEO's Name]</p>
|
<p>[Your Name/CEO's Name]</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="pt-4 border-t">
|
<div className="pt-4 border-t">
|
||||||
<h3 className="font-semibold text-foreground">Disclaimer:</h3>
|
<h3 className="font-semibold text-foreground">{t('imprint.disclaimer.title')}</h3>
|
||||||
<p className="text-sm">
|
<p className="text-sm">
|
||||||
This is a sample imprint and not legally binding. Please replace the placeholder content with your own information and consult a legal professional to ensure compliance with all applicable laws.
|
{t('imprint.disclaimer.text')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
55
src/app/[locale]/layout.tsx
Normal file
55
src/app/[locale]/layout.tsx
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
import type { Metadata } from "next";
|
||||||
|
import { Geist, Geist_Mono } from "next/font/google";
|
||||||
|
import "../globals.css";
|
||||||
|
import { ThemeProvider } from "@/components/theme-provider";
|
||||||
|
import { Toaster } from "@/components/ui/sonner";
|
||||||
|
import { Footer } from "@/components/footer";
|
||||||
|
import { I18nProviderClient } from "@/lib/i18n/client";
|
||||||
|
import { getI18n } from "@/lib/i18n/server";
|
||||||
|
|
||||||
|
const geistSans = Geist({
|
||||||
|
variable: "--font-geist-sans",
|
||||||
|
subsets: ["latin"],
|
||||||
|
});
|
||||||
|
|
||||||
|
const geistMono = Geist_Mono({
|
||||||
|
variable: "--font-geist-mono",
|
||||||
|
subsets: ["latin"],
|
||||||
|
});
|
||||||
|
|
||||||
|
export async function generateMetadata({ params: { locale } }: { params: { locale: string } }): Promise<Metadata> {
|
||||||
|
const t = await getI18n();
|
||||||
|
return {
|
||||||
|
title: t('meta.title'),
|
||||||
|
description: t('meta.description'),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function RootLayout({
|
||||||
|
children,
|
||||||
|
params: { locale }
|
||||||
|
}: Readonly<{
|
||||||
|
children: React.ReactNode;
|
||||||
|
params: { locale: string };
|
||||||
|
}>) {
|
||||||
|
return (
|
||||||
|
<html lang={locale} suppressHydrationWarning>
|
||||||
|
<body
|
||||||
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||||
|
>
|
||||||
|
<I18nProviderClient locale={locale}>
|
||||||
|
<ThemeProvider
|
||||||
|
attribute="class"
|
||||||
|
defaultTheme="system"
|
||||||
|
enableSystem
|
||||||
|
disableTransitionOnChange
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
<Footer />
|
||||||
|
<Toaster />
|
||||||
|
</ThemeProvider>
|
||||||
|
</I18nProviderClient>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,15 +1,17 @@
|
|||||||
import { ImageConverter } from "@/components/image-converter";
|
import { ImageConverter } from "@/components/image-converter";
|
||||||
|
import { getI18n } from "@/lib/i18n/server";
|
||||||
|
|
||||||
export default function Home() {
|
export default async function Home() {
|
||||||
|
const t = await getI18n();
|
||||||
return (
|
return (
|
||||||
<div className="relative flex flex-col items-center justify-center min-h-screen p-4 sm:p-8 bg-gray-50 dark:bg-background font-[family-name:var(--font-geist-sans)]">
|
<div className="relative flex flex-col items-center justify-center min-h-screen p-4 sm:p-8 bg-gray-50 dark:bg-background font-[family-name:var(--font-geist-sans)]">
|
||||||
<main className="flex flex-col items-center w-full max-w-6xl z-10">
|
<main className="flex flex-col items-center w-full max-w-6xl z-10">
|
||||||
<div className="text-center mb-8">
|
<div className="text-center mb-8">
|
||||||
<h1 className="text-4xl font-bold tracking-tight text-gray-900 dark:text-gray-100 sm:text-5xl">
|
<h1 className="text-4xl font-bold tracking-tight text-gray-900 dark:text-gray-100 sm:text-5xl">
|
||||||
Image Web Exporter
|
{t('home.title')}
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-3 text-lg text-gray-600 dark:text-gray-400">
|
<p className="mt-3 text-lg text-gray-600 dark:text-gray-400">
|
||||||
Upload a picture, then export it in a different resolution and format.
|
{t('home.subtitle')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<ImageConverter />
|
<ImageConverter />
|
||||||
@@ -2,45 +2,47 @@ import Link from "next/link";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { ArrowLeft } from "lucide-react";
|
import { ArrowLeft } from "lucide-react";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
|
import { getI18n } from "@/lib/i18n/server";
|
||||||
|
|
||||||
export default function PrivacyPage() {
|
export default async function PrivacyPage() {
|
||||||
|
const t = await getI18n();
|
||||||
return (
|
return (
|
||||||
<div className="relative flex flex-col items-center min-h-screen p-4 sm:p-8 bg-gray-50 dark:bg-background">
|
<div className="relative flex flex-col items-center min-h-screen p-4 sm:p-8 bg-gray-50 dark:bg-background">
|
||||||
<div className="w-full max-w-4xl mx-auto">
|
<div className="w-full max-w-4xl mx-auto">
|
||||||
<Button asChild variant="ghost" className="mb-4 -ml-4">
|
<Button asChild variant="ghost" className="mb-4 -ml-4">
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<ArrowLeft className="mr-2 h-4 w-4" />
|
<ArrowLeft className="mr-2 h-4 w-4" />
|
||||||
Back to Converter
|
{t('privacy.back')}
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
<main className="w-full">
|
<main className="w-full">
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="text-3xl font-bold">Data Privacy Policy</CardTitle>
|
<CardTitle className="text-3xl font-bold">{t('privacy.title')}</CardTitle>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="space-y-6 text-muted-foreground">
|
<CardContent className="space-y-6 text-muted-foreground">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<h3 className="font-semibold text-foreground">1. General Information</h3>
|
<h3 className="font-semibold text-foreground">{t('privacy.general.title')}</h3>
|
||||||
<p>
|
<p>
|
||||||
This is a placeholder for your data privacy policy. It outlines how personal data is collected, used, and protected when you use this website.
|
{t('privacy.general.text')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<h3 className="font-semibold text-foreground">2. Data Collection on This Website</h3>
|
<h3 className="font-semibold text-foreground">{t('privacy.collection.title')}</h3>
|
||||||
<p>
|
<p>
|
||||||
All image processing happens directly in your browser. The images you upload are not sent to any server and are not stored by us. We do not collect any personal data from the images.
|
{t('privacy.collection.text')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<h3 className="font-semibold text-foreground">3. Your Rights</h3>
|
<h3 className="font-semibold text-foreground">{t('privacy.rights.title')}</h3>
|
||||||
<p>
|
<p>
|
||||||
As no personal data is collected, rights regarding access, rectification, or erasure of personal data are not applicable in this context.
|
{t('privacy.rights.text')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="pt-4 border-t">
|
<div className="pt-4 border-t">
|
||||||
<h3 className="font-semibold text-foreground">Disclaimer:</h3>
|
<h3 className="font-semibold text-foreground">{t('privacy.disclaimer.title')}</h3>
|
||||||
<p className="text-sm">
|
<p className="text-sm">
|
||||||
This is a sample privacy policy and not legally binding. It is crucial to adapt this text to your specific data processing activities and to consult with a legal professional to ensure full GDPR compliance.
|
{t('privacy.disclaimer.text')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
import type { Metadata } from "next";
|
|
||||||
import { Geist, Geist_Mono } from "next/font/google";
|
|
||||||
import "./globals.css";
|
|
||||||
import { ThemeProvider } from "@/components/theme-provider";
|
|
||||||
import { Toaster } from "@/components/ui/sonner";
|
|
||||||
import { Footer } from "@/components/footer";
|
|
||||||
|
|
||||||
const geistSans = Geist({
|
|
||||||
variable: "--font-geist-sans",
|
|
||||||
subsets: ["latin"],
|
|
||||||
});
|
|
||||||
|
|
||||||
const geistMono = Geist_Mono({
|
|
||||||
variable: "--font-geist-mono",
|
|
||||||
subsets: ["latin"],
|
|
||||||
});
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
|
||||||
title: "Image Web Exporter",
|
|
||||||
description: "Upload a picture, then export it in a different resolution and format.",
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function RootLayout({
|
|
||||||
children,
|
|
||||||
}: Readonly<{
|
|
||||||
children: React.ReactNode;
|
|
||||||
}>) {
|
|
||||||
return (
|
|
||||||
<html lang="en" suppressHydrationWarning>
|
|
||||||
<body
|
|
||||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
||||||
>
|
|
||||||
<ThemeProvider
|
|
||||||
attribute="class"
|
|
||||||
defaultTheme="system"
|
|
||||||
enableSystem
|
|
||||||
disableTransitionOnChange
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
<Footer />
|
|
||||||
<Toaster />
|
|
||||||
</ThemeProvider>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -3,17 +3,28 @@
|
|||||||
import { Badge } from "@/components/ui/badge";
|
import { Badge } from "@/components/ui/badge";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { changelogData } from "@/lib/changelog-data";
|
import { useI18n } from "@/lib/i18n/client";
|
||||||
|
import { changelogData, type Change } from "@/lib/changelog-config";
|
||||||
|
|
||||||
export function Changelog() {
|
export function Changelog() {
|
||||||
|
const t = useI18n();
|
||||||
|
|
||||||
|
const getBadgeText = (type: Change['type']) => {
|
||||||
|
switch (type) {
|
||||||
|
case 'New': return t('changelog.types.new');
|
||||||
|
case 'Improved': return t('changelog.types.improved');
|
||||||
|
case 'Fixed': return t('changelog.types.fixed');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full max-w-4xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
|
<div className="w-full max-w-4xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
|
||||||
<div className="text-center mb-12">
|
<div className="text-center mb-12">
|
||||||
<h1 className="text-4xl font-bold tracking-tight text-gray-900 dark:text-gray-100 sm:text-5xl">
|
<h1 className="text-4xl font-bold tracking-tight text-gray-900 dark:text-gray-100 sm:text-5xl">
|
||||||
Changelog
|
{t('changelog.title')}
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-3 text-lg text-gray-600 dark:text-gray-400">
|
<p className="mt-3 text-lg text-gray-600 dark:text-gray-400">
|
||||||
Tracking all the new features, improvements, and bug fixes.
|
{t('changelog.subtitle')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-8">
|
<div className="space-y-8">
|
||||||
@@ -21,7 +32,7 @@ export function Changelog() {
|
|||||||
<Card key={entry.version}>
|
<Card key={entry.version}>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2">
|
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2">
|
||||||
<CardTitle className="text-2xl font-bold">Version {entry.version}</CardTitle>
|
<CardTitle className="text-2xl font-bold">{t('changelog.version')} {entry.version}</CardTitle>
|
||||||
<p className="text-sm text-muted-foreground">{entry.date}</p>
|
<p className="text-sm text-muted-foreground">{entry.date}</p>
|
||||||
</div>
|
</div>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
@@ -37,9 +48,9 @@ export function Changelog() {
|
|||||||
"border-red-500/50 bg-red-500/10 text-red-700 dark:text-red-300": change.type === "Fixed",
|
"border-red-500/50 bg-red-500/10 text-red-700 dark:text-red-300": change.type === "Fixed",
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{change.type}
|
{getBadgeText(change.type)}
|
||||||
</Badge>
|
</Badge>
|
||||||
<p className="text-foreground">{change.text}</p>
|
<p className="text-foreground">{t(`changelog.logs.${change.textKey}`)}</p>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,16 +1,44 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { Github, Twitter } from "lucide-react";
|
import { Github, Twitter, Globe } from "lucide-react";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { changelogData } from "@/lib/changelog-data";
|
import { changelogData } from "@/lib/changelog-config";
|
||||||
|
import { useI18n, useChangeLocale } from "@/lib/i18n/client";
|
||||||
|
import {
|
||||||
|
DropdownMenu,
|
||||||
|
DropdownMenuContent,
|
||||||
|
DropdownMenuItem,
|
||||||
|
DropdownMenuTrigger,
|
||||||
|
} from "@/components/ui/dropdown-menu";
|
||||||
|
|
||||||
export function Footer() {
|
export function Footer() {
|
||||||
|
const t = useI18n();
|
||||||
|
const changeLocale = useChangeLocale();
|
||||||
const latestVersion = changelogData[0]?.version;
|
const latestVersion = changelogData[0]?.version;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer className="w-full border-t bg-background">
|
<footer className="w-full border-t bg-background">
|
||||||
<div className="container relative mx-auto flex h-16 items-center justify-between px-4 md:px-6">
|
<div className="container relative mx-auto flex h-16 items-center justify-between px-4 md:px-6">
|
||||||
<div className="text-sm text-muted-foreground">
|
<div className="flex items-center gap-4">
|
||||||
<p>© {new Date().getFullYear()} Pascal Linxweiler</p>
|
<DropdownMenu>
|
||||||
|
<DropdownMenuTrigger asChild>
|
||||||
|
<Button variant="ghost" size="icon" aria-label="Change language">
|
||||||
|
<Globe className="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent align="start">
|
||||||
|
<DropdownMenuItem onClick={() => changeLocale("en")}>
|
||||||
|
English
|
||||||
|
</DropdownMenuItem>
|
||||||
|
<DropdownMenuItem onClick={() => changeLocale("de")}>
|
||||||
|
Deutsch
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
<div className="text-sm text-muted-foreground hidden sm:block">
|
||||||
|
<p>© {new Date().getFullYear()} Pascal Linxweiler</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center gap-1">
|
<div className="absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center gap-1">
|
||||||
@@ -27,8 +55,8 @@ export function Footer() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-4 text-sm text-muted-foreground">
|
<div className="flex items-center gap-4 text-sm text-muted-foreground">
|
||||||
<Link href="/imprint" className="hover:text-primary transition-colors">Imprint</Link>
|
<Link href="/imprint" className="hover:text-primary transition-colors">{t('footer.imprint')}</Link>
|
||||||
<Link href="/privacy" className="hover:text-primary transition-colors">Privacy</Link>
|
<Link href="/privacy" className="hover:text-primary transition-colors">{t('footer.privacy')}</Link>
|
||||||
{latestVersion && (
|
{latestVersion && (
|
||||||
<Link
|
<Link
|
||||||
href="/changelog"
|
href="/changelog"
|
||||||
|
|||||||
@@ -36,14 +36,7 @@ import {
|
|||||||
TooltipProvider,
|
TooltipProvider,
|
||||||
TooltipTrigger,
|
TooltipTrigger,
|
||||||
} from "@/components/ui/tooltip";
|
} from "@/components/ui/tooltip";
|
||||||
|
import { useScopedI18n } from "@/lib/i18n/client";
|
||||||
const aspectRatios = [
|
|
||||||
{ name: "Custom", value: "custom" },
|
|
||||||
{ name: "1:1 (Square)", value: "1/1" },
|
|
||||||
{ name: "4:3 (Standard)", value: "4/3" },
|
|
||||||
{ name: "3:2 (Photography)", value: "3/2" },
|
|
||||||
{ name: "16:9 (Widescreen)", value: "16/9" },
|
|
||||||
];
|
|
||||||
|
|
||||||
const initialSettings = {
|
const initialSettings = {
|
||||||
width: "",
|
width: "",
|
||||||
@@ -64,6 +57,16 @@ const initialSettings = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function ImageConverter() {
|
export function ImageConverter() {
|
||||||
|
const t = useScopedI18n('converter');
|
||||||
|
|
||||||
|
const aspectRatios = [
|
||||||
|
{ name: t('aspect_ratios.custom'), value: "custom" },
|
||||||
|
{ name: t('aspect_ratios.square'), value: "1/1" },
|
||||||
|
{ name: t('aspect_ratios.standard'), value: "4/3" },
|
||||||
|
{ name: t('aspect_ratios.photography'), value: "3/2" },
|
||||||
|
{ name: t('aspect_ratios.widescreen'), value: "16/9" },
|
||||||
|
];
|
||||||
|
|
||||||
const [images, setImages] = useState<File[]>([]);
|
const [images, setImages] = useState<File[]>([]);
|
||||||
const [previewUrls, setPreviewUrls] = useState<string[]>([]);
|
const [previewUrls, setPreviewUrls] = useState<string[]>([]);
|
||||||
const [filenames, setFilenames] = useState<string[]>([]);
|
const [filenames, setFilenames] = useState<string[]>([]);
|
||||||
@@ -104,7 +107,7 @@ export function ImageConverter() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (imageFiles.length === 0) {
|
if (imageFiles.length === 0) {
|
||||||
toast.error("No valid image files found.");
|
toast.error(t('toasts.no_valid_files'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,7 +129,7 @@ export function ImageConverter() {
|
|||||||
setPreviewUrls(newPreviewUrls);
|
setPreviewUrls(newPreviewUrls);
|
||||||
setFilenames(newFilenames);
|
setFilenames(newFilenames);
|
||||||
|
|
||||||
toast.success(`${imageFiles.length} image(s) added.`);
|
toast.success(t('toasts.images_added', { count: imageFiles.length }));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleImageChange = (e: ChangeEvent<HTMLInputElement>) => {
|
const handleImageChange = (e: ChangeEvent<HTMLInputElement>) => {
|
||||||
@@ -168,7 +171,7 @@ export function ImageConverter() {
|
|||||||
setFilenames([]);
|
setFilenames([]);
|
||||||
setWidth(initialSettings.width);
|
setWidth(initialSettings.width);
|
||||||
setHeight(initialSettings.height);
|
setHeight(initialSettings.height);
|
||||||
toast.info("All images cleared.");
|
toast.info(t('toasts.all_cleared'));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFilenameChange = (index: number, newName: string) => {
|
const handleFilenameChange = (index: number, newName: string) => {
|
||||||
@@ -286,23 +289,23 @@ export function ImageConverter() {
|
|||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
reject(new Error(`Could not process ${image.name}.`));
|
reject(new Error(t('toasts.error_processing', { filename: image.name })));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
img.onerror = () => {
|
img.onerror = () => {
|
||||||
reject(new Error(`Failed to load ${image.name} for conversion.`));
|
reject(new Error(t('toasts.error_loading', { filename: image.name })));
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleConvertAndDownloadAll = async () => {
|
const handleConvertAndDownloadAll = async () => {
|
||||||
if (images.length === 0) {
|
if (images.length === 0) {
|
||||||
toast.error("Please upload images first.");
|
toast.error(t('toasts.upload_images_first'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsConverting(true);
|
setIsConverting(true);
|
||||||
toast.info(`Starting conversion for ${images.length} images...`);
|
toast.info(t('toasts.conversion_start_all', { count: images.length }));
|
||||||
|
|
||||||
const conversionPromises = images.map((image, index) =>
|
const conversionPromises = images.map((image, index) =>
|
||||||
convertAndDownload(image, previewUrls[index], index)
|
convertAndDownload(image, previewUrls[index], index)
|
||||||
@@ -310,12 +313,12 @@ export function ImageConverter() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await Promise.all(conversionPromises);
|
await Promise.all(conversionPromises);
|
||||||
toast.success(`Successfully exported all ${images.length} images!`);
|
toast.success(t('toasts.conversion_success_all', { count: images.length }));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
toast.error(error.message);
|
toast.error(error.message);
|
||||||
} else {
|
} else {
|
||||||
toast.error("An unknown error occurred during conversion.");
|
toast.error(t('toasts.conversion_error'));
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
setIsConverting(false);
|
setIsConverting(false);
|
||||||
@@ -324,16 +327,16 @@ export function ImageConverter() {
|
|||||||
|
|
||||||
const handleConvertAndDownloadSingle = async (index: number) => {
|
const handleConvertAndDownloadSingle = async (index: number) => {
|
||||||
setConvertingIndex(index);
|
setConvertingIndex(index);
|
||||||
toast.info(`Starting conversion for ${filenames[index]}...`);
|
toast.info(t('toasts.conversion_start_single', { filename: filenames[index] }));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await convertAndDownload(images[index], previewUrls[index], index);
|
await convertAndDownload(images[index], previewUrls[index], index);
|
||||||
toast.success(`Successfully exported ${filenames[index]}!`);
|
toast.success(t('toasts.conversion_success_single', { filename: filenames[index] }));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
toast.error(error.message);
|
toast.error(error.message);
|
||||||
} else {
|
} else {
|
||||||
toast.error("An unknown error occurred during conversion.");
|
toast.error(t('toasts.conversion_error'));
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
setConvertingIndex(null);
|
setConvertingIndex(null);
|
||||||
@@ -341,7 +344,7 @@ export function ImageConverter() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleApplySettings = () => {
|
const handleApplySettings = () => {
|
||||||
toast.info("Settings updated and will be used for all downloads.");
|
toast.info(t('toasts.settings_applied'));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleResetSettings = () => {
|
const handleResetSettings = () => {
|
||||||
@@ -360,7 +363,7 @@ export function ImageConverter() {
|
|||||||
setDefaultBaseName(initialSettings.defaultBaseName);
|
setDefaultBaseName(initialSettings.defaultBaseName);
|
||||||
setScaleMode(initialSettings.scaleMode);
|
setScaleMode(initialSettings.scaleMode);
|
||||||
setObjectPosition(initialSettings.objectPosition);
|
setObjectPosition(initialSettings.objectPosition);
|
||||||
toast.success("All settings have been reset to their defaults.");
|
toast.success(t('toasts.settings_reset'));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleAspectRatioChange = (value: string) => {
|
const handleAspectRatioChange = (value: string) => {
|
||||||
@@ -408,16 +411,16 @@ export function ImageConverter() {
|
|||||||
|
|
||||||
const handleApplyDefaultBaseNameToAll = () => {
|
const handleApplyDefaultBaseNameToAll = () => {
|
||||||
if (!defaultBaseName) {
|
if (!defaultBaseName) {
|
||||||
toast.error("Please enter a default base name to apply.");
|
toast.error(t('toasts.base_name_required'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!hasImages) {
|
if (!hasImages) {
|
||||||
toast.info("Upload some images first.");
|
toast.info(t('toasts.upload_first'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const newFilenames = filenames.map(() => defaultBaseName);
|
const newFilenames = filenames.map(() => defaultBaseName);
|
||||||
setFilenames(newFilenames);
|
setFilenames(newFilenames);
|
||||||
toast.success(`Set base name to "${defaultBaseName}" for all ${images.length} images.`);
|
toast.success(t('toasts.base_name_applied', { baseName: defaultBaseName, count: images.length }));
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -427,7 +430,7 @@ export function ImageConverter() {
|
|||||||
<Card>
|
<Card>
|
||||||
<CardContent className="pt-6">
|
<CardContent className="pt-6">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<h3 className="text-lg font-medium">Upload Images</h3>
|
<h3 className="text-lg font-medium">{t('upload.title')}</h3>
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"w-full h-48 rounded-lg border-2 border-dashed flex items-center justify-center relative transition-colors cursor-pointer hover:border-primary/60",
|
"w-full h-48 rounded-lg border-2 border-dashed flex items-center justify-center relative transition-colors cursor-pointer hover:border-primary/60",
|
||||||
@@ -440,8 +443,8 @@ export function ImageConverter() {
|
|||||||
>
|
>
|
||||||
<div className="flex flex-col items-center justify-center text-center text-muted-foreground">
|
<div className="flex flex-col items-center justify-center text-center text-muted-foreground">
|
||||||
<Upload className="w-8 h-8 mb-2" />
|
<Upload className="w-8 h-8 mb-2" />
|
||||||
<p className="font-semibold">Click or drag and drop to upload</p>
|
<p className="font-semibold">{t('upload.cta')}</p>
|
||||||
<p className="text-xs text-muted-foreground mt-1">PNG, JPG, WEBP supported</p>
|
<p className="text-xs text-muted-foreground mt-1">{t('upload.supported')}</p>
|
||||||
</div>
|
</div>
|
||||||
<Input type="file" ref={fileInputRef} onChange={handleImageChange} className="hidden" accept="image/*" multiple />
|
<Input type="file" ref={fileInputRef} onChange={handleImageChange} className="hidden" accept="image/*" multiple />
|
||||||
</div>
|
</div>
|
||||||
@@ -453,25 +456,25 @@ export function ImageConverter() {
|
|||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<CardTitle>Uploaded Images</CardTitle>
|
<CardTitle>{t('uploaded.title')}</CardTitle>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<Button variant="ghost" size="sm" onClick={handleClearAll} disabled={isConverting || convertingIndex !== null}><Trash2 className="mr-2 h-4 w-4" />Clear All</Button>
|
<Button variant="ghost" size="sm" onClick={handleClearAll} disabled={isConverting || convertingIndex !== null}><Trash2 className="mr-2 h-4 w-4" />{t('uploaded.clear_all')}</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Remove all uploaded images.</p>
|
<p>{t('uploaded.clear_all_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<Button onClick={handleConvertAndDownloadAll} disabled={!hasImages || isConverting || convertingIndex !== null}>
|
<Button onClick={handleConvertAndDownloadAll} disabled={!hasImages || isConverting || convertingIndex !== null}>
|
||||||
<Download className="mr-2 h-4 w-4" />
|
<Download className="mr-2 h-4 w-4" />
|
||||||
{isConverting ? "Converting..." : `Download All (${images.length})`}
|
{isConverting ? t('uploaded.converting') : t('uploaded.download_all', { count: images.length })}
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Convert and download all images with the current settings.</p>
|
<p>{t('uploaded.download_all_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -485,7 +488,7 @@ export function ImageConverter() {
|
|||||||
<div key={url} className="p-4 border rounded-lg flex items-center gap-4">
|
<div key={url} className="p-4 border rounded-lg flex items-center gap-4">
|
||||||
<img src={url} alt={`Preview ${index + 1}`} className="w-20 h-20 object-cover rounded-md shrink-0" />
|
<img src={url} alt={`Preview ${index + 1}`} className="w-20 h-20 object-cover rounded-md shrink-0" />
|
||||||
<div className="flex-1 min-w-0">
|
<div className="flex-1 min-w-0">
|
||||||
<Label htmlFor={`filename-${index}`} className="text-xs text-muted-foreground">Base Name</Label>
|
<Label htmlFor={`filename-${index}`} className="text-xs text-muted-foreground">{t('uploaded.base_name')}</Label>
|
||||||
<Input
|
<Input
|
||||||
id={`filename-${index}`}
|
id={`filename-${index}`}
|
||||||
value={filenames[index]}
|
value={filenames[index]}
|
||||||
@@ -493,7 +496,7 @@ export function ImageConverter() {
|
|||||||
className="text-sm font-medium h-8 mt-1"
|
className="text-sm font-medium h-8 mt-1"
|
||||||
/>
|
/>
|
||||||
<p className="text-xs text-muted-foreground truncate mt-1" title={`${finalFilename}.${format}`}>
|
<p className="text-xs text-muted-foreground truncate mt-1" title={`${finalFilename}.${format}`}>
|
||||||
Final name: {finalFilename}.{format}
|
{t('uploaded.final_name', { filename: `${finalFilename}.${format}` })}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center shrink-0">
|
<div className="flex items-center shrink-0">
|
||||||
@@ -510,7 +513,7 @@ export function ImageConverter() {
|
|||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Download this image</p>
|
<p>{t('uploaded.download_image_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
@@ -526,7 +529,7 @@ export function ImageConverter() {
|
|||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Remove this image</p>
|
<p>{t('uploaded.remove_image_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -544,9 +547,9 @@ export function ImageConverter() {
|
|||||||
<AccordionItem value="image-settings" className="border rounded-lg bg-card">
|
<AccordionItem value="image-settings" className="border rounded-lg bg-card">
|
||||||
<AccordionTrigger className="p-6 hover:no-underline">
|
<AccordionTrigger className="p-6 hover:no-underline">
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<h3 className="text-lg font-medium leading-none">Image Settings</h3>
|
<h3 className="text-lg font-medium leading-none">{t('settings.image.title')}</h3>
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
<p className="text-sm text-muted-foreground mt-1">
|
||||||
Adjust resolution and scaling for all images.
|
{t('settings.image.description')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</AccordionTrigger>
|
</AccordionTrigger>
|
||||||
@@ -554,13 +557,13 @@ export function ImageConverter() {
|
|||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
<Label htmlFor="aspect-ratio">Aspect Ratio</Label>
|
<Label htmlFor="aspect-ratio">{t('settings.image.aspect_ratio')}</Label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Choose a preset aspect ratio or select 'Custom' to enter dimensions manually.</p>
|
<p>{t('settings.image.aspect_ratio_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -580,13 +583,13 @@ export function ImageConverter() {
|
|||||||
<div className="flex items-end gap-2">
|
<div className="flex items-end gap-2">
|
||||||
<div className="space-y-2 flex-1">
|
<div className="space-y-2 flex-1">
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
<Label htmlFor="width">Width (px)</Label>
|
<Label htmlFor="width">{t('settings.image.width')}</Label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Set the output width in pixels. Leave blank to use the original width.</p>
|
<p>{t('settings.image.width_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -599,18 +602,18 @@ export function ImageConverter() {
|
|||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Swap the entered width and height values.</p>
|
<p>{t('settings.image.swap_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<div className="space-y-2 flex-1">
|
<div className="space-y-2 flex-1">
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
<Label htmlFor="height">Height (px)</Label>
|
<Label htmlFor="height">{t('settings.image.height')}</Label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Set the output height in pixels. Leave blank to use the original height.</p>
|
<p>{t('settings.image.height_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -620,13 +623,13 @@ export function ImageConverter() {
|
|||||||
<div className="flex items-center space-x-2 pt-2">
|
<div className="flex items-center space-x-2 pt-2">
|
||||||
<Checkbox id="keep-orientation" checked={keepOrientation} onCheckedChange={(checked) => setKeepOrientation(Boolean(checked))} />
|
<Checkbox id="keep-orientation" checked={keepOrientation} onCheckedChange={(checked) => setKeepOrientation(Boolean(checked))} />
|
||||||
<Label htmlFor="keep-orientation" className="cursor-pointer flex items-center gap-1.5">
|
<Label htmlFor="keep-orientation" className="cursor-pointer flex items-center gap-1.5">
|
||||||
Keep original orientation
|
{t('settings.image.keep_orientation')}
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger onClick={(e) => e.preventDefault()}>
|
<TooltipTrigger onClick={(e) => e.preventDefault()}>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Automatically swaps width and height to match the original image's orientation.</p>
|
<p>{t('settings.image.keep_orientation_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Label>
|
</Label>
|
||||||
@@ -634,39 +637,39 @@ export function ImageConverter() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="mt-4 space-y-2">
|
<div className="mt-4 space-y-2">
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
<Label htmlFor="scale-mode">Scaling</Label>
|
<Label htmlFor="scale-mode">{t('settings.image.scaling')}</Label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Determines how the image fits into the new dimensions.</p>
|
<p>{t('settings.image.scaling_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
<Select value={scaleMode} onValueChange={(value: 'fill' | 'cover' | 'contain') => setScaleMode(value)}>
|
<Select value={scaleMode} onValueChange={(value: 'fill' | 'cover' | 'contain') => setScaleMode(value)}>
|
||||||
<SelectTrigger id="scale-mode"><SelectValue placeholder="Select scaling mode" /></SelectTrigger>
|
<SelectTrigger id="scale-mode"><SelectValue placeholder="Select scaling mode" /></SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="fill">Fill (stretch to fit)</SelectItem>
|
<SelectItem value="fill">{t('settings.image.scaling_options.fill')}</SelectItem>
|
||||||
<SelectItem value="cover">Cover (crop to fit)</SelectItem>
|
<SelectItem value="cover">{t('settings.image.scaling_options.cover')}</SelectItem>
|
||||||
<SelectItem value="contain">Contain (letterbox)</SelectItem>
|
<SelectItem value="contain">{t('settings.image.scaling_options.contain')}</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
{scaleMode !== 'fill' && (
|
{scaleMode !== 'fill' && (
|
||||||
<div className="mt-4 space-y-2">
|
<div className="mt-4 space-y-2">
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
<Label>Position</Label>
|
<Label>{t('settings.image.position')}</Label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Sets the anchor point for 'Cover' or 'Contain' scaling.</p>
|
<p>{t('settings.image.position_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
<ObjectPositionControl value={objectPosition} onChange={(pos) => setObjectPosition(pos)} />
|
<ObjectPositionControl value={objectPosition} onChange={(pos) => setObjectPosition(pos as string)} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</AccordionContent>
|
</AccordionContent>
|
||||||
@@ -675,8 +678,8 @@ export function ImageConverter() {
|
|||||||
<AccordionItem value="filename-settings" className="border rounded-lg bg-card">
|
<AccordionItem value="filename-settings" className="border rounded-lg bg-card">
|
||||||
<AccordionTrigger className="p-6 hover:no-underline">
|
<AccordionTrigger className="p-6 hover:no-underline">
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<h3 className="text-lg font-medium leading-none">Filename Settings</h3>
|
<h3 className="text-lg font-medium leading-none">{t('settings.filename.title')}</h3>
|
||||||
<p className="text-sm text-muted-foreground mt-1">Customize the output filenames.</p>
|
<p className="text-sm text-muted-foreground mt-1">{t('settings.filename.description')}</p>
|
||||||
</div>
|
</div>
|
||||||
</AccordionTrigger>
|
</AccordionTrigger>
|
||||||
<AccordionContent className="px-6 pb-6">
|
<AccordionContent className="px-6 pb-6">
|
||||||
@@ -684,20 +687,20 @@ export function ImageConverter() {
|
|||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<Switch id="use-default-base-name" checked={useDefaultBaseName} onCheckedChange={setUseDefaultBaseName} />
|
<Switch id="use-default-base-name" checked={useDefaultBaseName} onCheckedChange={setUseDefaultBaseName} />
|
||||||
<Label htmlFor="use-default-base-name" className="flex items-center gap-1.5 cursor-pointer">
|
<Label htmlFor="use-default-base-name" className="flex items-center gap-1.5 cursor-pointer">
|
||||||
Use default base name
|
{t('settings.filename.use_default_base_name')}
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger onClick={(e) => e.preventDefault()}>
|
<TooltipTrigger onClick={(e) => e.preventDefault()}>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>When enabled, all newly uploaded images will use the specified default base name.</p>
|
<p>{t('settings.filename.use_default_base_name_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Label>
|
</Label>
|
||||||
</div>
|
</div>
|
||||||
{useDefaultBaseName && (
|
{useDefaultBaseName && (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="default-base-name">Default base name</Label>
|
<Label htmlFor="default-base-name">{t('settings.filename.default_base_name')}</Label>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Input
|
<Input
|
||||||
id="default-base-name"
|
id="default-base-name"
|
||||||
@@ -708,11 +711,11 @@ export function ImageConverter() {
|
|||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<Button variant="outline" size="sm" onClick={handleApplyDefaultBaseNameToAll} disabled={!defaultBaseName || !hasImages}>
|
<Button variant="outline" size="sm" onClick={handleApplyDefaultBaseNameToAll} disabled={!defaultBaseName || !hasImages}>
|
||||||
Apply to all
|
{t('settings.filename.apply_to_all')}
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Apply this base name to all currently uploaded images.</p>
|
<p>{t('settings.filename.apply_to_all_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -720,13 +723,13 @@ export function ImageConverter() {
|
|||||||
)}
|
)}
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
<Label htmlFor="prefix">Prefix</Label>
|
<Label htmlFor="prefix">{t('settings.filename.prefix')}</Label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Add text to the beginning of every filename.</p>
|
<p>{t('settings.filename.prefix_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -734,13 +737,13 @@ export function ImageConverter() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
<Label htmlFor="suffix">Suffix</Label>
|
<Label htmlFor="suffix">{t('settings.filename.suffix')}</Label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Add text to the end of every filename (before the number).</p>
|
<p>{t('settings.filename.suffix_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -749,13 +752,13 @@ export function ImageConverter() {
|
|||||||
<div className="flex items-center space-x-2 pt-2">
|
<div className="flex items-center space-x-2 pt-2">
|
||||||
<Switch id="use-counter" checked={useCounter} onCheckedChange={setUseCounter} />
|
<Switch id="use-counter" checked={useCounter} onCheckedChange={setUseCounter} />
|
||||||
<Label htmlFor="use-counter" className="flex items-center gap-1.5 cursor-pointer">
|
<Label htmlFor="use-counter" className="flex items-center gap-1.5 cursor-pointer">
|
||||||
Add sequential number
|
{t('settings.filename.add_sequential_number')}
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger onClick={(e) => e.preventDefault()}>
|
<TooltipTrigger onClick={(e) => e.preventDefault()}>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Append a numbered sequence to each filename.</p>
|
<p>{t('settings.filename.add_sequential_number_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Label>
|
</Label>
|
||||||
@@ -764,13 +767,13 @@ export function ImageConverter() {
|
|||||||
<div className="grid grid-cols-2 gap-4 pt-2">
|
<div className="grid grid-cols-2 gap-4 pt-2">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
<Label htmlFor="counter-start">Start number</Label>
|
<Label htmlFor="counter-start">{t('settings.filename.start_number')}</Label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>The first number to use in the sequence.</p>
|
<p>{t('settings.filename.start_number_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -784,13 +787,13 @@ export function ImageConverter() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
<Label htmlFor="counter-digits">Padding digits</Label>
|
<Label htmlFor="counter-digits">{t('settings.filename.padding_digits')}</Label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Total number of digits for the counter, padded with leading zeros (e.g., 3 for 001).</p>
|
<p>{t('settings.filename.padding_digits_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -811,21 +814,21 @@ export function ImageConverter() {
|
|||||||
<AccordionItem value="quality-settings" className="border rounded-lg bg-card">
|
<AccordionItem value="quality-settings" className="border rounded-lg bg-card">
|
||||||
<AccordionTrigger className="p-6 hover:no-underline">
|
<AccordionTrigger className="p-6 hover:no-underline">
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<h3 className="text-lg font-medium leading-none">Quality Settings</h3>
|
<h3 className="text-lg font-medium leading-none">{t('settings.quality.title')}</h3>
|
||||||
<p className="text-sm text-muted-foreground mt-1">Choose format and compression level.</p>
|
<p className="text-sm text-muted-foreground mt-1">{t('settings.quality.description')}</p>
|
||||||
</div>
|
</div>
|
||||||
</AccordionTrigger>
|
</AccordionTrigger>
|
||||||
<AccordionContent className="px-6 pb-6">
|
<AccordionContent className="px-6 pb-6">
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
<Label htmlFor="format">Format</Label>
|
<Label htmlFor="format">{t('settings.quality.format')}</Label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Choose the output file format for the images.</p>
|
<p>{t('settings.quality.format_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -841,13 +844,13 @@ export function ImageConverter() {
|
|||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5">
|
||||||
<Label htmlFor="quality">Quality</Label>
|
<Label htmlFor="quality">{t('settings.quality.quality')}</Label>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
<HelpCircle className="h-4 w-4 text-muted-foreground" />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Set compression quality for JPEG/WEBP. Higher is better quality but larger file size.</p>
|
<p>{t('settings.quality.quality_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@@ -863,7 +866,7 @@ export function ImageConverter() {
|
|||||||
disabled={format === 'png'}
|
disabled={format === 'png'}
|
||||||
/>
|
/>
|
||||||
{format === 'png' && (
|
{format === 'png' && (
|
||||||
<p className="text-xs text-muted-foreground pt-1">Quality slider is disabled for PNG (lossless format).</p>
|
<p className="text-xs text-muted-foreground pt-1">{t('settings.quality.png_disabled_notice')}</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -879,11 +882,11 @@ export function ImageConverter() {
|
|||||||
variant="outline"
|
variant="outline"
|
||||||
>
|
>
|
||||||
<RotateCcw className="mr-2 h-4 w-4" />
|
<RotateCcw className="mr-2 h-4 w-4" />
|
||||||
Reset
|
{t('settings.reset')}
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Reset all settings to their default values.</p>
|
<p>{t('settings.reset_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
@@ -893,11 +896,11 @@ export function ImageConverter() {
|
|||||||
className="w-full"
|
className="w-full"
|
||||||
>
|
>
|
||||||
<Check className="mr-2 h-4 w-4" />
|
<Check className="mr-2 h-4 w-4" />
|
||||||
Apply
|
{t('settings.apply')}
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
<p>Confirm and apply all the settings above. This does not download the images.</p>
|
<p>{t('settings.apply_tooltip')}</p>
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
38
src/lib/changelog-config.ts
Normal file
38
src/lib/changelog-config.ts
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
export type Change = {
|
||||||
|
type: "New" | "Improved" | "Fixed";
|
||||||
|
textKey: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ChangelogEntry = {
|
||||||
|
version: string;
|
||||||
|
date: string;
|
||||||
|
changes: Change[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export const changelogData: ChangelogEntry[] = [
|
||||||
|
{
|
||||||
|
version: "1.2.0",
|
||||||
|
date: "July 26, 2024",
|
||||||
|
changes: [
|
||||||
|
{ type: "New", textKey: "v1_2_0.new_changelog_page" },
|
||||||
|
{ type: "Improved", textKey: "v1_2_0.improved_auto_dimensioning" },
|
||||||
|
{ type: "Fixed", textKey: "v1_2_0.fixed_buttons_enabled" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
version: "1.1.0",
|
||||||
|
date: "July 25, 2024",
|
||||||
|
changes: [
|
||||||
|
{ type: "Improved", textKey: "v1_1_0.improved_aspect_ratio_detection" },
|
||||||
|
{ type: "Fixed", textKey: "v1_1_0.fixed_dimension_swap" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
version: "1.0.0",
|
||||||
|
date: "July 24, 2024",
|
||||||
|
changes: [
|
||||||
|
{ type: "New", textKey: "v1_0_0.new_initial_release" },
|
||||||
|
{ type: "New", textKey: "v1_0_0.new_features" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
export const changelogData = [
|
|
||||||
{
|
|
||||||
version: "1.2.0",
|
|
||||||
date: "July 26, 2024",
|
|
||||||
changes: [
|
|
||||||
{ type: "New", text: "Added a changelog page to track updates and new features." },
|
|
||||||
{ type: "Improved", text: "Implemented 'auto' dimensioning for batch processing. When one dimension (width or height) is set, the other is calculated automatically for each image to maintain its aspect ratio." },
|
|
||||||
{ type: "Fixed", text: "Enabled the 'Reset' and 'Apply' buttons to be used even when no images are uploaded." },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
version: "1.1.0",
|
|
||||||
date: "July 25, 2024",
|
|
||||||
changes: [
|
|
||||||
{ type: "Improved", text: "Aspect ratio is now automatically detected from the first uploaded image and can be locked." },
|
|
||||||
{ type: "Fixed", text: "Corrected an issue where swapping dimensions would not update the aspect ratio to 'Custom'."}
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
version: "1.0.0",
|
|
||||||
date: "July 24, 2024",
|
|
||||||
changes: [
|
|
||||||
{ type: "New", text: "Initial release of the Image Web Exporter." },
|
|
||||||
{ type: "New", text: "Features include image uploading, format conversion (PNG, JPEG, WEBP), resizing, quality adjustment, and filename customization." },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
6
src/lib/i18n/client.ts
Normal file
6
src/lib/i18n/client.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { createI18nClient } from 'next-international/client';
|
||||||
|
|
||||||
|
export const { useI18n, useScopedI18n, I18nProviderClient, useChangeLocale, useCurrentLocale } = createI18nClient({
|
||||||
|
en: () => import('./en'),
|
||||||
|
de: () => import('./de'),
|
||||||
|
});
|
||||||
175
src/lib/i18n/de.ts
Normal file
175
src/lib/i18n/de.ts
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
export default {
|
||||||
|
meta: {
|
||||||
|
title: "Bild Web Exporter",
|
||||||
|
description: "Laden Sie ein Bild hoch und exportieren Sie es in einer anderen Auflösung und einem anderen Format.",
|
||||||
|
},
|
||||||
|
home: {
|
||||||
|
title: "Bild Web Exporter",
|
||||||
|
subtitle: "Laden Sie ein Bild hoch und exportieren Sie es in einer anderen Auflösung und einem anderen Format.",
|
||||||
|
},
|
||||||
|
footer: {
|
||||||
|
imprint: "Impressum",
|
||||||
|
privacy: "Datenschutz",
|
||||||
|
},
|
||||||
|
changelog: {
|
||||||
|
back: "Zurück zum Konverter",
|
||||||
|
title: "Änderungsprotokoll",
|
||||||
|
subtitle: "Verfolgung aller neuen Funktionen, Verbesserungen und Fehlerbehebungen.",
|
||||||
|
version: "Version",
|
||||||
|
types: {
|
||||||
|
new: "Neu",
|
||||||
|
improved: "Verbessert",
|
||||||
|
fixed: "Behoben",
|
||||||
|
},
|
||||||
|
logs: {
|
||||||
|
v1_2_0: {
|
||||||
|
new_changelog_page: "Eine Changelog-Seite hinzugefügt, um Updates und neue Funktionen zu verfolgen.",
|
||||||
|
improved_auto_dimensioning: "Automatische Dimensionierung für die Stapelverarbeitung implementiert. Wenn eine Dimension (Breite oder Höhe) festgelegt wird, wird die andere für jedes Bild automatisch berechnet, um das Seitenverhältnis beizubehalten.",
|
||||||
|
fixed_buttons_enabled: "Die Schaltflächen 'Zurücksetzen' und 'Anwenden' können nun auch ohne hochgeladene Bilder verwendet werden.",
|
||||||
|
},
|
||||||
|
v1_1_0: {
|
||||||
|
improved_aspect_ratio_detection: "Das Seitenverhältnis wird nun automatisch vom ersten hochgeladenen Bild erkannt und kann gesperrt werden.",
|
||||||
|
fixed_dimension_swap: "Ein Problem wurde behoben, bei dem das Tauschen der Dimensionen das Seitenverhältnis nicht auf 'Benutzerdefiniert' aktualisierte.",
|
||||||
|
},
|
||||||
|
v1_0_0: {
|
||||||
|
new_initial_release: "Erstveröffentlichung des Image Web Exporters.",
|
||||||
|
new_features: "Funktionen umfassen das Hochladen von Bildern, die Konvertierung von Formaten (PNG, JPEG, WEBP), Größenänderung, Qualitätsanpassung und Anpassung von Dateinamen.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
imprint: {
|
||||||
|
back: "Zurück zum Konverter",
|
||||||
|
title: "Impressum",
|
||||||
|
info: "Angaben gemäß § 5 TMG",
|
||||||
|
contact: {
|
||||||
|
title: "Kontaktinformationen:",
|
||||||
|
},
|
||||||
|
represented_by: {
|
||||||
|
title: "Vertreten durch:",
|
||||||
|
},
|
||||||
|
disclaimer: {
|
||||||
|
title: "Haftungsausschluss:",
|
||||||
|
text: "Dies ist ein Musterimpressum und nicht rechtsverbindlich. Bitte ersetzen Sie den Platzhalterinhalt durch Ihre eigenen Informationen und konsultieren Sie einen Rechtsexperten, um die Einhaltung aller geltenden Gesetze sicherzustellen.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
privacy: {
|
||||||
|
back: "Zurück zum Konverter",
|
||||||
|
title: "Datenschutzerklärung",
|
||||||
|
general: {
|
||||||
|
title: "1. Allgemeine Informationen",
|
||||||
|
text: "Dies ist ein Platzhalter für Ihre Datenschutzerklärung. Sie beschreibt, wie personenbezogene Daten erfasst, verwendet und geschützt werden, wenn Sie diese Website nutzen.",
|
||||||
|
},
|
||||||
|
collection: {
|
||||||
|
title: "2. Datenerfassung auf dieser Website",
|
||||||
|
text: "Die gesamte Bildverarbeitung findet direkt in Ihrem Browser statt. Die von Ihnen hochgeladenen Bilder werden nicht an einen Server gesendet und von uns nicht gespeichert. Wir erheben keine personenbezogenen Daten aus den Bildern.",
|
||||||
|
},
|
||||||
|
rights: {
|
||||||
|
title: "3. Ihre Rechte",
|
||||||
|
text: "Da keine personenbezogenen Daten erhoben werden, sind Rechte bezüglich Auskunft, Berichtigung oder Löschung personenbezogener Daten in diesem Zusammenhang nicht anwendbar.",
|
||||||
|
},
|
||||||
|
disclaimer: {
|
||||||
|
title: "Haftungsausschluss:",
|
||||||
|
text: "Dies ist eine Muster-Datenschutzerklärung und nicht rechtsverbindlich. Es ist entscheidend, diesen Text an Ihre spezifischen Datenverarbeitungsaktivitäten anzupassen und einen Rechtsexperten zu konsultieren, um die vollständige DSGVO-Konformität sicherzustellen.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
converter: {
|
||||||
|
upload: {
|
||||||
|
title: "Bilder hochladen",
|
||||||
|
cta: "Klicken oder per Drag & Drop hochladen",
|
||||||
|
supported: "PNG, JPG, WEBP werden unterstützt",
|
||||||
|
},
|
||||||
|
uploaded: {
|
||||||
|
title: "Hochgeladene Bilder",
|
||||||
|
clear_all: "Alle löschen",
|
||||||
|
clear_all_tooltip: "Alle hochgeladenen Bilder entfernen.",
|
||||||
|
download_all: "Alle ({count}) herunterladen",
|
||||||
|
download_all_tooltip: "Alle Bilder mit den aktuellen Einstellungen konvertieren und herunterladen.",
|
||||||
|
converting: "Konvertiere...",
|
||||||
|
base_name: "Basisname",
|
||||||
|
final_name: "Finaler Name: {filename}",
|
||||||
|
download_image_tooltip: "Dieses Bild herunterladen",
|
||||||
|
remove_image_tooltip: "Dieses Bild entfernen",
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
image: {
|
||||||
|
title: "Bildeinstellungen",
|
||||||
|
description: "Auflösung und Skalierung für alle Bilder anpassen.",
|
||||||
|
aspect_ratio: "Seitenverhältnis",
|
||||||
|
aspect_ratio_tooltip: "Wählen Sie ein voreingestelltes Seitenverhältnis oder 'Benutzerdefiniert', um die Abmessungen manuell einzugeben.",
|
||||||
|
width: "Breite (px)",
|
||||||
|
width_tooltip: "Legen Sie die Ausgabebreite in Pixel fest. Leer lassen, um die Originalbreite zu verwenden.",
|
||||||
|
swap_tooltip: "Die eingegebenen Werte für Breite und Höhe tauschen.",
|
||||||
|
height: "Höhe (px)",
|
||||||
|
height_tooltip: "Legen Sie die Ausgabehöhe in Pixel fest. Leer lassen, um die Originalhöhe zu verwenden.",
|
||||||
|
keep_orientation: "Originalausrichtung beibehalten",
|
||||||
|
keep_orientation_tooltip: "Tauscht automatisch Breite und Höhe, um der Ausrichtung des Originalbildes zu entsprechen.",
|
||||||
|
scaling: "Skalierung",
|
||||||
|
scaling_tooltip: "Bestimmt, wie das Bild in die neuen Abmessungen passt.",
|
||||||
|
scaling_options: {
|
||||||
|
fill: "Füllen (strecken)",
|
||||||
|
cover: "Abdecken (zuschneiden)",
|
||||||
|
contain: "Enthalten (Letterbox)",
|
||||||
|
},
|
||||||
|
position: "Position",
|
||||||
|
position_tooltip: "Legt den Ankerpunkt für die Skalierung 'Abdecken' oder 'Enthalten' fest.",
|
||||||
|
},
|
||||||
|
filename: {
|
||||||
|
title: "Dateinameneinstellungen",
|
||||||
|
description: "Passen Sie die Ausgabedateinamen an.",
|
||||||
|
use_default_base_name: "Standard-Basisnamen verwenden",
|
||||||
|
use_default_base_name_tooltip: "Wenn aktiviert, verwenden alle neu hochgeladenen Bilder den angegebenen Standard-Basisnamen.",
|
||||||
|
default_base_name: "Standard-Basisname",
|
||||||
|
apply_to_all: "Auf alle anwenden",
|
||||||
|
apply_to_all_tooltip: "Diesen Basisnamen auf alle aktuell hochgeladenen Bilder anwenden.",
|
||||||
|
prefix: "Präfix",
|
||||||
|
prefix_tooltip: "Fügen Sie Text am Anfang jedes Dateinamens hinzu.",
|
||||||
|
suffix: "Suffix",
|
||||||
|
suffix_tooltip: "Fügen Sie Text am Ende jedes Dateinamens hinzu (vor der Nummer).",
|
||||||
|
add_sequential_number: "Laufende Nummer hinzufügen",
|
||||||
|
add_sequential_number_tooltip: "Fügen Sie jedem Dateinamen eine nummerierte Sequenz an.",
|
||||||
|
start_number: "Startnummer",
|
||||||
|
start_number_tooltip: "Die erste Nummer, die in der Sequenz verwendet wird.",
|
||||||
|
padding_digits: "Auffüllziffern",
|
||||||
|
padding_digits_tooltip: "Gesamtzahl der Ziffern für den Zähler, aufgefüllt mit führenden Nullen (z. B. 3 für 001).",
|
||||||
|
},
|
||||||
|
quality: {
|
||||||
|
title: "Qualitätseinstellungen",
|
||||||
|
description: "Wählen Sie Format und Komprimierungsstufe.",
|
||||||
|
format: "Format",
|
||||||
|
format_tooltip: "Wählen Sie das Ausgabedateiformat für die Bilder.",
|
||||||
|
quality: "Qualität",
|
||||||
|
quality_tooltip: "Stellen Sie die Komprimierungsqualität für JPEG/WEBP ein. Höher bedeutet bessere Qualität, aber größere Dateigröße.",
|
||||||
|
png_disabled_notice: "Der Qualitätsschieberegler ist für PNG (verlustfreies Format) deaktiviert.",
|
||||||
|
},
|
||||||
|
reset: "Zurücksetzen",
|
||||||
|
reset_tooltip: "Alle Einstellungen auf ihre Standardwerte zurücksetzen.",
|
||||||
|
apply: "Anwenden",
|
||||||
|
apply_tooltip: "Bestätigen und alle oben genannten Einstellungen anwenden. Dies lädt die Bilder nicht herunter.",
|
||||||
|
},
|
||||||
|
aspect_ratios: {
|
||||||
|
custom: "Benutzerdefiniert",
|
||||||
|
square: "1:1 (Quadratisch)",
|
||||||
|
standard: "4:3 (Standard)",
|
||||||
|
photography: "3:2 (Fotografie)",
|
||||||
|
widescreen: "16:9 (Breitbild)",
|
||||||
|
},
|
||||||
|
toasts: {
|
||||||
|
no_valid_files: "Keine gültigen Bilddateien gefunden.",
|
||||||
|
images_added: "{count} Bild(er) hinzugefügt.",
|
||||||
|
all_cleared: "Alle Bilder gelöscht.",
|
||||||
|
conversion_start_all: "Konvertierung für {count} Bilder wird gestartet...",
|
||||||
|
conversion_success_all: "Alle {count} Bilder erfolgreich exportiert!",
|
||||||
|
conversion_error: "Während der Konvertierung ist ein unbekannter Fehler aufgetreten.",
|
||||||
|
conversion_start_single: "Konvertierung für {filename} wird gestartet...",
|
||||||
|
conversion_success_single: "{filename} erfolgreich exportiert!",
|
||||||
|
settings_applied: "Einstellungen aktualisiert und werden für alle Downloads verwendet.",
|
||||||
|
settings_reset: "Alle Einstellungen wurden auf ihre Standardwerte zurückgesetzt.",
|
||||||
|
base_name_required: "Bitte geben Sie einen Standard-Basisnamen ein, um ihn anzuwenden.",
|
||||||
|
upload_first: "Laden Sie zuerst einige Bilder hoch.",
|
||||||
|
base_name_applied: "Basisname für alle {count} Bilder auf \"{baseName}\" gesetzt.",
|
||||||
|
error_processing: "Konnte {filename} nicht verarbeiten.",
|
||||||
|
error_loading: "Fehler beim Laden von {filename} für die Konvertierung.",
|
||||||
|
upload_images_first: "Bitte laden Sie zuerst Bilder hoch.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as const;
|
||||||
175
src/lib/i18n/en.ts
Normal file
175
src/lib/i18n/en.ts
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
export default {
|
||||||
|
meta: {
|
||||||
|
title: "Image Web Exporter",
|
||||||
|
description: "Upload a picture, then export it in a different resolution and format.",
|
||||||
|
},
|
||||||
|
home: {
|
||||||
|
title: "Image Web Exporter",
|
||||||
|
subtitle: "Upload a picture, then export it in a different resolution and format.",
|
||||||
|
},
|
||||||
|
footer: {
|
||||||
|
imprint: "Imprint",
|
||||||
|
privacy: "Privacy",
|
||||||
|
},
|
||||||
|
changelog: {
|
||||||
|
back: "Back to Converter",
|
||||||
|
title: "Changelog",
|
||||||
|
subtitle: "Tracking all the new features, improvements, and bug fixes.",
|
||||||
|
version: "Version",
|
||||||
|
types: {
|
||||||
|
new: "New",
|
||||||
|
improved: "Improved",
|
||||||
|
fixed: "Fixed",
|
||||||
|
},
|
||||||
|
logs: {
|
||||||
|
v1_2_0: {
|
||||||
|
new_changelog_page: "Added a changelog page to track updates and new features.",
|
||||||
|
improved_auto_dimensioning: "Implemented 'auto' dimensioning for batch processing. When one dimension (width or height) is set, the other is calculated automatically for each image to maintain its aspect ratio.",
|
||||||
|
fixed_buttons_enabled: "Enabled the 'Reset' and 'Apply' buttons to be used even when no images are uploaded.",
|
||||||
|
},
|
||||||
|
v1_1_0: {
|
||||||
|
improved_aspect_ratio_detection: "Aspect ratio is now automatically detected from the first uploaded image and can be locked.",
|
||||||
|
fixed_dimension_swap: "Corrected an issue where swapping dimensions would not update the aspect ratio to 'Custom'.",
|
||||||
|
},
|
||||||
|
v1_0_0: {
|
||||||
|
new_initial_release: "Initial release of the Image Web Exporter.",
|
||||||
|
new_features: "Features include image uploading, format conversion (PNG, JPEG, WEBP), resizing, quality adjustment, and filename customization.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
imprint: {
|
||||||
|
back: "Back to Converter",
|
||||||
|
title: "Imprint",
|
||||||
|
info: "Information according to § 5 TMG (German Telemedia Act)",
|
||||||
|
contact: {
|
||||||
|
title: "Contact Information:",
|
||||||
|
},
|
||||||
|
represented_by: {
|
||||||
|
title: "Represented by:",
|
||||||
|
},
|
||||||
|
disclaimer: {
|
||||||
|
title: "Disclaimer:",
|
||||||
|
text: "This is a sample imprint and not legally binding. Please replace the placeholder content with your own information and consult a legal professional to ensure compliance with all applicable laws.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
privacy: {
|
||||||
|
back: "Back to Converter",
|
||||||
|
title: "Data Privacy Policy",
|
||||||
|
general: {
|
||||||
|
title: "1. General Information",
|
||||||
|
text: "This is a placeholder for your data privacy policy. It outlines how personal data is collected, used, and protected when you use this website.",
|
||||||
|
},
|
||||||
|
collection: {
|
||||||
|
title: "2. Data Collection on This Website",
|
||||||
|
text: "All image processing happens directly in your browser. The images you upload are not sent to any server and are not stored by us. We do not collect any personal data from the images.",
|
||||||
|
},
|
||||||
|
rights: {
|
||||||
|
title: "3. Your Rights",
|
||||||
|
text: "As no personal data is collected, rights regarding access, rectification, or erasure of personal data are not applicable in this context.",
|
||||||
|
},
|
||||||
|
disclaimer: {
|
||||||
|
title: "Disclaimer:",
|
||||||
|
text: "This is a sample privacy policy and not legally binding. It is crucial to adapt this text to your specific data processing activities and to consult with a legal professional to ensure full GDPR compliance.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
converter: {
|
||||||
|
upload: {
|
||||||
|
title: "Upload Images",
|
||||||
|
cta: "Click or drag and drop to upload",
|
||||||
|
supported: "PNG, JPG, WEBP supported",
|
||||||
|
},
|
||||||
|
uploaded: {
|
||||||
|
title: "Uploaded Images",
|
||||||
|
clear_all: "Clear All",
|
||||||
|
clear_all_tooltip: "Remove all uploaded images.",
|
||||||
|
download_all: "Download All ({count})",
|
||||||
|
download_all_tooltip: "Convert and download all images with the current settings.",
|
||||||
|
converting: "Converting...",
|
||||||
|
base_name: "Base Name",
|
||||||
|
final_name: "Final name: {filename}",
|
||||||
|
download_image_tooltip: "Download this image",
|
||||||
|
remove_image_tooltip: "Remove this image",
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
image: {
|
||||||
|
title: "Image Settings",
|
||||||
|
description: "Adjust resolution and scaling for all images.",
|
||||||
|
aspect_ratio: "Aspect Ratio",
|
||||||
|
aspect_ratio_tooltip: "Choose a preset aspect ratio or select 'Custom' to enter dimensions manually.",
|
||||||
|
width: "Width (px)",
|
||||||
|
width_tooltip: "Set the output width in pixels. Leave blank to use the original width.",
|
||||||
|
swap_tooltip: "Swap the entered width and height values.",
|
||||||
|
height: "Height (px)",
|
||||||
|
height_tooltip: "Set the output height in pixels. Leave blank to use the original height.",
|
||||||
|
keep_orientation: "Keep original orientation",
|
||||||
|
keep_orientation_tooltip: "Automatically swaps width and height to match the original image's orientation.",
|
||||||
|
scaling: "Scaling",
|
||||||
|
scaling_tooltip: "Determines how the image fits into the new dimensions.",
|
||||||
|
scaling_options: {
|
||||||
|
fill: "Fill (stretch to fit)",
|
||||||
|
cover: "Cover (crop to fit)",
|
||||||
|
contain: "Contain (letterbox)",
|
||||||
|
},
|
||||||
|
position: "Position",
|
||||||
|
position_tooltip: "Sets the anchor point for 'Cover' or 'Contain' scaling.",
|
||||||
|
},
|
||||||
|
filename: {
|
||||||
|
title: "Filename Settings",
|
||||||
|
description: "Customize the output filenames.",
|
||||||
|
use_default_base_name: "Use default base name",
|
||||||
|
use_default_base_name_tooltip: "When enabled, all newly uploaded images will use the specified default base name.",
|
||||||
|
default_base_name: "Default base name",
|
||||||
|
apply_to_all: "Apply to all",
|
||||||
|
apply_to_all_tooltip: "Apply this base name to all currently uploaded images.",
|
||||||
|
prefix: "Prefix",
|
||||||
|
prefix_tooltip: "Add text to the beginning of every filename.",
|
||||||
|
suffix: "Suffix",
|
||||||
|
suffix_tooltip: "Add text to the end of every filename (before the number).",
|
||||||
|
add_sequential_number: "Add sequential number",
|
||||||
|
add_sequential_number_tooltip: "Append a numbered sequence to each filename.",
|
||||||
|
start_number: "Start number",
|
||||||
|
start_number_tooltip: "The first number to use in the sequence.",
|
||||||
|
padding_digits: "Padding digits",
|
||||||
|
padding_digits_tooltip: "Total number of digits for the counter, padded with leading zeros (e.g., 3 for 001).",
|
||||||
|
},
|
||||||
|
quality: {
|
||||||
|
title: "Quality Settings",
|
||||||
|
description: "Choose format and compression level.",
|
||||||
|
format: "Format",
|
||||||
|
format_tooltip: "Choose the output file format for the images.",
|
||||||
|
quality: "Quality",
|
||||||
|
quality_tooltip: "Set compression quality for JPEG/WEBP. Higher is better quality but larger file size.",
|
||||||
|
png_disabled_notice: "Quality slider is disabled for PNG (lossless format).",
|
||||||
|
},
|
||||||
|
reset: "Reset",
|
||||||
|
reset_tooltip: "Reset all settings to their default values.",
|
||||||
|
apply: "Apply",
|
||||||
|
apply_tooltip: "Confirm and apply all the settings above. This does not download the images.",
|
||||||
|
},
|
||||||
|
aspect_ratios: {
|
||||||
|
custom: "Custom",
|
||||||
|
square: "1:1 (Square)",
|
||||||
|
standard: "4:3 (Standard)",
|
||||||
|
photography: "3:2 (Photography)",
|
||||||
|
widescreen: "16:9 (Widescreen)",
|
||||||
|
},
|
||||||
|
toasts: {
|
||||||
|
no_valid_files: "No valid image files found.",
|
||||||
|
images_added: "{count} image(s) added.",
|
||||||
|
all_cleared: "All images cleared.",
|
||||||
|
conversion_start_all: "Starting conversion for {count} images...",
|
||||||
|
conversion_success_all: "Successfully exported all {count} images!",
|
||||||
|
conversion_error: "An unknown error occurred during conversion.",
|
||||||
|
conversion_start_single: "Starting conversion for {filename}...",
|
||||||
|
conversion_success_single: "Successfully exported {filename}!",
|
||||||
|
settings_applied: "Settings updated and will be used for all downloads.",
|
||||||
|
settings_reset: "All settings have been reset to their defaults.",
|
||||||
|
base_name_required: "Please enter a default base name to apply.",
|
||||||
|
upload_first: "Upload some images first.",
|
||||||
|
base_name_applied: "Set base name to \"{baseName}\" for all {count} images.",
|
||||||
|
error_processing: "Could not process {filename}.",
|
||||||
|
error_loading: "Failed to load {filename} for conversion.",
|
||||||
|
upload_images_first: "Please upload images first.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as const;
|
||||||
1
src/lib/i18n/index.ts
Normal file
1
src/lib/i18n/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const locales = ['en', 'de'] as const;
|
||||||
6
src/lib/i18n/server.ts
Normal file
6
src/lib/i18n/server.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { createI18nServer } from 'next-international/server';
|
||||||
|
|
||||||
|
export const { getI18n, getScopedI18n, getCurrentLocale } = createI18nServer({
|
||||||
|
en: () => import('./en'),
|
||||||
|
de: () => import('./de'),
|
||||||
|
});
|
||||||
17
src/middleware.ts
Normal file
17
src/middleware.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import { createI18nMiddleware } from 'next-international/middleware';
|
||||||
|
import { NextRequest } from 'next/server';
|
||||||
|
import { locales } from './lib/i18n';
|
||||||
|
|
||||||
|
const I18nMiddleware = createI18nMiddleware({
|
||||||
|
locales,
|
||||||
|
defaultLocale: 'en',
|
||||||
|
urlMappingStrategy: 'rewrite',
|
||||||
|
});
|
||||||
|
|
||||||
|
export function middleware(request: NextRequest) {
|
||||||
|
return I18nMiddleware(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const config = {
|
||||||
|
matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'],
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user