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,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { Warning } from "@phosphor-icons/react";
import { forgotPasswordSchema } from "@reactive-resume/dto";
import {
@ -44,7 +45,7 @@ export const ForgotPasswordPage = () => {
toast({
variant: "error",
icon: <Warning size={16} weight="bold" />,
title: "An error occurred while trying to send your password recovery email",
title: t`An error occurred while trying to send your password recovery email.`,
description: message,
});
}
@ -55,11 +56,10 @@ export const ForgotPasswordPage = () => {
return (
<div className="space-y-8">
<div className="space-y-4">
<h2 className="text-2xl font-semibold tracking-tight">You've got mail!</h2>
<h2 className="text-2xl font-semibold tracking-tight">{t`You've got mail!`}</h2>
<Alert variant="success">
<AlertDescription className="pt-0">
A password reset link should have been sent to your inbox, if an account existed with
the email you provided.
{t`A password reset link should have been sent to your inbox, if an account existed with the email you provided.`}
</AlertDescription>
</Alert>
</div>
@ -70,10 +70,9 @@ export const ForgotPasswordPage = () => {
return (
<div className="space-y-8">
<div className="space-y-1.5">
<h2 className="text-2xl font-semibold tracking-tight">Forgot your password?</h2>
<h2 className="text-2xl font-semibold tracking-tight">{t`Forgot your password?`}</h2>
<h6 className="leading-relaxed opacity-75">
Enter your email address and we will send you a link to reset your password if the account
exists.
{t`Enter your email address and we will send you a link to reset your password if the account exists.`}
</h6>
</div>
@ -85,7 +84,7 @@ export const ForgotPasswordPage = () => {
control={form.control}
render={({ field }) => (
<FormItem>
<FormLabel>Email</FormLabel>
<FormLabel>{t`Email`}</FormLabel>
<FormControl>
<Input placeholder="john.doe@example.com" {...field} />
</FormControl>
@ -95,7 +94,7 @@ export const ForgotPasswordPage = () => {
/>
<Button type="submit" disabled={loading} className="mt-4 w-full">
Send Email
{t`Send Email`}
</Button>
</form>
</Form>