Files
twenty_crm/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsMessageAutoCreationCard.tsx
BOHEUS ff001d9def Add missing translations (#10414)
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>
2025-02-23 23:35:03 +01:00

50 lines
1.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 Ive sent emails to and received emails from.`,
value: MessageChannelContactAutoCreationPolicy.SENT_AND_RECEIVED,
cardMedia: (
<SettingsAccountsMessageAutoCreationIcon isSentActive isReceivedActive />
),
},
{
title: msg`Sent`,
description: msg`People Ive sent emails to.`,
value: MessageChannelContactAutoCreationPolicy.SENT,
cardMedia: <SettingsAccountsMessageAutoCreationIcon isSentActive />,
},
{
title: msg`None`,
description: msg`Dont 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}
/>
);