Progress on translations (#9703)
Start adding a few translations on setting pages, introduce pseudo-locale, switch to dynamic import, add eslint rule
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { H2Title, Section } from 'twenty-ui';
|
||||
|
||||
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
|
||||
@ -10,39 +11,46 @@ import { getSettingsPagePath } from '@/settings/utils/getSettingsPagePath';
|
||||
import { SettingsPath } from '@/types/SettingsPath';
|
||||
import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';
|
||||
|
||||
export const SettingsProfile = () => (
|
||||
<SubMenuTopBarContainer
|
||||
title="Profile"
|
||||
links={[
|
||||
{
|
||||
children: 'User',
|
||||
href: getSettingsPagePath(SettingsPath.ProfilePage),
|
||||
},
|
||||
{ children: 'Profile' },
|
||||
]}
|
||||
>
|
||||
<SettingsPageContainer>
|
||||
<Section>
|
||||
<H2Title title="Picture" />
|
||||
<ProfilePictureUploader />
|
||||
</Section>
|
||||
<Section>
|
||||
<H2Title title="Name" description="Your name as it will be displayed" />
|
||||
<NameFields />
|
||||
</Section>
|
||||
<Section>
|
||||
<H2Title
|
||||
title="Email"
|
||||
description="The email associated to your account"
|
||||
/>
|
||||
<EmailField />
|
||||
</Section>
|
||||
<Section>
|
||||
<ChangePassword />
|
||||
</Section>
|
||||
<Section>
|
||||
<DeleteAccount />
|
||||
</Section>
|
||||
</SettingsPageContainer>
|
||||
</SubMenuTopBarContainer>
|
||||
);
|
||||
export const SettingsProfile = () => {
|
||||
const { t } = useLingui();
|
||||
|
||||
return (
|
||||
<SubMenuTopBarContainer
|
||||
title={t`Profile`}
|
||||
links={[
|
||||
{
|
||||
children: t`User`,
|
||||
href: getSettingsPagePath(SettingsPath.ProfilePage),
|
||||
},
|
||||
{ children: t`Profile` },
|
||||
]}
|
||||
>
|
||||
<SettingsPageContainer>
|
||||
<Section>
|
||||
<H2Title title={t`Picture`} />
|
||||
<ProfilePictureUploader />
|
||||
</Section>
|
||||
<Section>
|
||||
<H2Title
|
||||
title={t`Name`}
|
||||
description={t`Your name as it will be displayed`}
|
||||
/>
|
||||
<NameFields />
|
||||
</Section>
|
||||
<Section>
|
||||
<H2Title
|
||||
title={t`Email`}
|
||||
description={t`The email associated to your account`}
|
||||
/>
|
||||
<EmailField />
|
||||
</Section>
|
||||
<Section>
|
||||
<ChangePassword />
|
||||
</Section>
|
||||
<Section>
|
||||
<DeleteAccount />
|
||||
</Section>
|
||||
</SettingsPageContainer>
|
||||
</SubMenuTopBarContainer>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user