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

@@ -33,6 +33,7 @@ import {
} from "@app/components/ui/form";
import { Alert, AlertDescription } from "@app/components/ui/alert";
import CreateSiteForm from "../[orgId]/settings/sites/CreateSiteForm";
import { useTranslations } from 'next-intl';
type Step = "org" | "site" | "resources";
@@ -112,13 +113,15 @@ export default function StepperForm() {
setLoading(false);
}
const t = useTranslations();
return (
<>
<Card>
<CardHeader>
<CardTitle>New Organization</CardTitle>
<CardTitle>{t('setupNewOrg')}</CardTitle>
<CardDescription>
Create your organization, site, and resources
{t('setupCreate')}
</CardDescription>
</CardHeader>
<CardContent>
@@ -141,7 +144,7 @@ export default function StepperForm() {
: "text-muted-foreground"
}`}
>
Create Org
{t('setupCreateOrg')}
</span>
</div>
<div className="flex flex-col items-center">
@@ -161,7 +164,7 @@ export default function StepperForm() {
: "text-muted-foreground"
}`}
>
Create Site
{t('setupCreateSite')}
</span>
</div>
<div className="flex flex-col items-center">
@@ -181,7 +184,7 @@ export default function StepperForm() {
: "text-muted-foreground"
}`}
>
Create Resources
{t('setupCreateResources')}
</span>
</div>
</div>
@@ -200,7 +203,7 @@ export default function StepperForm() {
render={({ field }) => (
<FormItem>
<FormLabel>
Organization Name
{t('setupOrgName')}
</FormLabel>
<FormControl>
<Input
@@ -228,8 +231,7 @@ export default function StepperForm() {
</FormControl>
<FormMessage />
<FormDescription>
This is the display name for
your organization.
{t('setupDisplayName')}
</FormDescription>
</FormItem>
)}
@@ -240,7 +242,7 @@ export default function StepperForm() {
render={({ field }) => (
<FormItem>
<FormLabel>
Organization ID
{t('setupOrgId')}
</FormLabel>
<FormControl>
<Input
@@ -250,11 +252,7 @@ export default function StepperForm() {
</FormControl>
<FormMessage />
<FormDescription>
This is the unique
identifier for your
organization. This is
separate from the display
name.
{t('setupIdentifierMessage')}
</FormDescription>
</FormItem>
)}
@@ -263,9 +261,7 @@ export default function StepperForm() {
{orgIdTaken && (
<Alert variant="destructive">
<AlertDescription>
Organization ID is already
taken. Please choose a different
one.
{t('setupErrorIdentifier')}
</AlertDescription>
</Alert>
)}
@@ -288,7 +284,7 @@ export default function StepperForm() {
orgIdTaken
}
>
Create Organization
{t('setupCreateOrg')}
</Button>
</div>
</form>