feat: improve translation coverage (#1427)

Improves translation coverage across the app.
This commit is contained in:
David Nguyen
2024-11-01 08:57:32 +09:00
committed by GitHub
parent 0cee07aed3
commit f199183c78
41 changed files with 1746 additions and 439 deletions

View File

@ -4,6 +4,8 @@ import { useTransition } from 'react';
import { useRouter } from 'next/navigation';
import { Trans, msg } from '@lingui/macro';
import { useLingui } from '@lingui/react';
import { Loader } from 'lucide-react';
import { DO_NOT_INVALIDATE_QUERY_ON_MUTATION } from '@documenso/lib/constants/trpc';
@ -37,6 +39,7 @@ export const InitialsField = ({
}: InitialsFieldProps) => {
const router = useRouter();
const { toast } = useToast();
const { _ } = useLingui();
const { fullName } = useRequiredSigningContext();
const initials = extractInitials(fullName);
@ -83,8 +86,8 @@ export const InitialsField = ({
console.error(err);
toast({
title: 'Error',
description: 'An error occurred while signing the document.',
title: _(msg`Error`),
description: _(msg`An error occurred while signing the document.`),
variant: 'destructive',
});
}
@ -109,8 +112,8 @@ export const InitialsField = ({
console.error(err);
toast({
title: 'Error',
description: 'An error occurred while removing the signature.',
title: _(msg`Error`),
description: _(msg`An error occurred while removing the field.`),
variant: 'destructive',
});
}
@ -126,7 +129,7 @@ export const InitialsField = ({
{!field.inserted && (
<p className="group-hover:text-primary text-muted-foreground duration-200 group-hover:text-yellow-300">
Initials
<Trans>Initials</Trans>
</p>
)}