feat(i18n): implement localization using LinguiJS

This commit is contained in:
Amruth Pillai
2023-11-10 09:07:47 +01:00
parent 13d91411e3
commit 6ad4358d70
108 changed files with 4631 additions and 798 deletions

View File

@ -1,3 +1,4 @@
import { t, Trans } from "@lingui/macro";
import { ArrowRight, Info, SealCheck, Warning } from "@phosphor-icons/react";
import { Alert, AlertDescription, AlertTitle, Button } from "@reactive-resume/ui";
import { AxiosError } from "axios";
@ -25,7 +26,7 @@ export const VerifyEmailPage = () => {
toast({
variant: "success",
icon: <SealCheck size={16} weight="bold" />,
title: "Your email address has been verified successfully.",
title: t`Your email address has been verified successfully.`,
});
navigate("/dashboard/resumes", { replace: true });
@ -36,7 +37,7 @@ export const VerifyEmailPage = () => {
toast({
variant: "error",
icon: <Warning size={16} weight="bold" />,
title: "An error occurred while trying to verify your email address",
title: t`An error occurred while trying to verify your email address.`,
description: message,
});
}
@ -51,27 +52,26 @@ export const VerifyEmailPage = () => {
return (
<div className="space-y-6">
<div className="space-y-2">
<h2 className="text-2xl font-semibold tracking-tight">Verify your email address</h2>
<h2 className="text-2xl font-semibold tracking-tight">{t`Verify your email address`}</h2>
<p className="leading-relaxed opacity-75">
You should have received an email from <strong>Reactive Resume</strong> with a link to
verify your account.
<Trans>
You should have received an email from <strong>Reactive Resume</strong> with a link to
verify your account.
</Trans>
</p>
</div>
<Alert variant="info">
<Info size={18} />
<AlertTitle>Please note that this step is completely optional.</AlertTitle>
<AlertTitle>{t`Please note that this step is completely optional.`}</AlertTitle>
<AlertDescription>
We verify your email address only to ensure that we can send you a password reset link in
case you forget your password.
{t`We verify your email address only to ensure that we can send you a password reset link in case you forget your password.`}
</AlertDescription>
</Alert>
<Button asChild disabled={loading}>
<Link to="/dashboard">
Continue to Dashboard
{t`Go to Dashboard`}
<ArrowRight className="ml-2" />
</Link>
</Button>