As per title, add ~200 missing translations in different places of app. Most places are now available for translation with AI but still some aren't available - some enums (like in MenuItemSelectColor.tsx) or values in complex types (like in SettingsNonCompositeFieldTypeConfigs.ts) or values where are injected some variables (like in SettingsDataModelFieldNumberForm.tsx) --------- Co-authored-by: Félix Malfait <felix@twenty.com>
50 lines
1.7 KiB
TypeScript
50 lines
1.7 KiB
TypeScript
import { MessageChannelContactAutoCreationPolicy } from '@/accounts/types/MessageChannel';
|
||
import { SettingsAccountsMessageAutoCreationIcon } from '@/settings/accounts/components/SettingsAccountsMessageAutoCreationIcon';
|
||
import { SettingsAccountsRadioSettingsCard } from '@/settings/accounts/components/SettingsAccountsRadioSettingsCard';
|
||
import { msg } from '@lingui/core/macro';
|
||
|
||
type SettingsAccountsMessageAutoCreationCardProps = {
|
||
onChange: (nextValue: MessageChannelContactAutoCreationPolicy) => void;
|
||
value?: MessageChannelContactAutoCreationPolicy;
|
||
};
|
||
|
||
const autoCreationOptions = [
|
||
{
|
||
title: msg`Sent and Received`,
|
||
description: msg`People I’ve sent emails to and received emails from.`,
|
||
value: MessageChannelContactAutoCreationPolicy.SENT_AND_RECEIVED,
|
||
cardMedia: (
|
||
<SettingsAccountsMessageAutoCreationIcon isSentActive isReceivedActive />
|
||
),
|
||
},
|
||
{
|
||
title: msg`Sent`,
|
||
description: msg`People I’ve sent emails to.`,
|
||
value: MessageChannelContactAutoCreationPolicy.SENT,
|
||
cardMedia: <SettingsAccountsMessageAutoCreationIcon isSentActive />,
|
||
},
|
||
{
|
||
title: msg`None`,
|
||
description: msg`Don’t auto-create contacts.`,
|
||
value: MessageChannelContactAutoCreationPolicy.NONE,
|
||
cardMedia: (
|
||
<SettingsAccountsMessageAutoCreationIcon
|
||
isSentActive={false}
|
||
isReceivedActive={false}
|
||
/>
|
||
),
|
||
},
|
||
];
|
||
|
||
export const SettingsAccountsMessageAutoCreationCard = ({
|
||
onChange,
|
||
value = MessageChannelContactAutoCreationPolicy.SENT_AND_RECEIVED,
|
||
}: SettingsAccountsMessageAutoCreationCardProps) => (
|
||
<SettingsAccountsRadioSettingsCard
|
||
name="message-auto-creation"
|
||
options={autoCreationOptions}
|
||
value={value}
|
||
onChange={onChange}
|
||
/>
|
||
);
|