Add first i18n stuff

This commit is contained in:
Lokowitz
2025-05-04 15:11:42 +00:00
parent 21f1326045
commit 7eb08474ff
35 changed files with 2629 additions and 759 deletions

View File

@@ -31,6 +31,7 @@ import { createApiClient } from "@app/lib/api";
import { useEnvContext } from "@app/hooks/useEnvContext";
import Image from "next/image";
import { cleanRedirect } from "@app/lib/cleanRedirect";
import { useTranslations } from 'next-intl';
type SignupFormProps = {
redirect?: string;
@@ -112,6 +113,8 @@ export default function SignupForm({
setLoading(false);
}
const t = useTranslations();
return (
<Card className="w-full max-w-md">
<CardHeader>
@@ -125,10 +128,10 @@ export default function SignupForm({
</div>
<div className="text-center space-y-1">
<h1 className="text-2xl font-bold mt-1">
Welcome to Pangolin
{t('welcome')}
</h1>
<p className="text-sm text-muted-foreground">
Create an account to get started
{t('authCreateAccount')}
</p>
</div>
</CardHeader>
@@ -143,7 +146,7 @@ export default function SignupForm({
name="email"
render={({ field }) => (
<FormItem>
<FormLabel>Email</FormLabel>
<FormLabel>{t('email')}</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
@@ -156,7 +159,7 @@ export default function SignupForm({
name="password"
render={({ field }) => (
<FormItem>
<FormLabel>Password</FormLabel>
<FormLabel>{t('password')}</FormLabel>
<FormControl>
<Input
type="password"
@@ -172,7 +175,7 @@ export default function SignupForm({
name="confirmPassword"
render={({ field }) => (
<FormItem>
<FormLabel>Confirm Password</FormLabel>
<FormLabel>{t('confirmPassword')}</FormLabel>
<FormControl>
<Input
type="password"
@@ -191,7 +194,7 @@ export default function SignupForm({
)}
<Button type="submit" className="w-full">
Create Account
{t('createAccount')}
</Button>
</form>
</Form>