setup localization for twenty-emails (#9806)
One of the steps to address #8128 How to test: Please change the locale in the settings and click on change password button. A password reset email in the preferred locale will be sent.   Todo: - Remove the hardcoded locales for invitation, warn suspended workspace email, clean suspended workspace emails - Need to test invitation, email verification, warn suspended workspace email, clean suspended workspace emails - The duration variable `5 minutes` is always in english. Do we need to do something about that? It does seems odd in case of chinese translations. Notes: - Only tested the password reset , password update notify templates. - Cant test email verification due to error during sign up `Internal server error: New workspace setup is disabled` --------- Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
committed by
GitHub
parent
4b9414a002
commit
39e7f6cec3
@ -1,26 +1,34 @@
|
||||
import { t } from '@lingui/core/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
|
||||
import { BaseEmail } from 'src/components/BaseEmail';
|
||||
import { CallToAction } from 'src/components/CallToAction';
|
||||
import { Footer } from 'src/components/Footer';
|
||||
import { MainText } from 'src/components/MainText';
|
||||
import { Title } from 'src/components/Title';
|
||||
import { APP_LOCALES } from 'twenty-shared';
|
||||
|
||||
type SendEmailVerificationLinkEmailProps = {
|
||||
link: string;
|
||||
locale: keyof typeof APP_LOCALES;
|
||||
};
|
||||
|
||||
export const SendEmailVerificationLinkEmail = ({
|
||||
link,
|
||||
locale,
|
||||
}: SendEmailVerificationLinkEmailProps) => {
|
||||
return (
|
||||
<BaseEmail width={333}>
|
||||
<Title value="Confirm your email address" />
|
||||
<CallToAction href={link} value="Verify Email" />
|
||||
<BaseEmail width={333} locale={locale}>
|
||||
<Title value={t`Confirm your email address`} />
|
||||
<CallToAction href={link} value={t`Verify Email`} />
|
||||
<br />
|
||||
<br />
|
||||
<MainText>
|
||||
Thanks for registering for an account on Twenty! Before we get started,
|
||||
we just need to confirm that this is you. Click above to verify your
|
||||
email address.
|
||||
<Trans>
|
||||
Thanks for registering for an account on Twenty! Before we get
|
||||
started, we just need to confirm that this is you. Click above to
|
||||
verify your email address.
|
||||
</Trans>
|
||||
</MainText>
|
||||
<Footer />
|
||||
</BaseEmail>
|
||||
|
||||
Reference in New Issue
Block a user