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>
This commit is contained in:
@ -5,6 +5,7 @@ import { TableBody } from '@/ui/layout/table/components/TableBody';
|
||||
import { TableHeader } from '@/ui/layout/table/components/TableHeader';
|
||||
import { TableRow } from '@/ui/layout/table/components/TableRow';
|
||||
import styled from '@emotion/styled';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
type SettingsAccountsBlocklistTableProps = {
|
||||
blocklist: BlocklistItem[];
|
||||
@ -31,8 +32,8 @@ export const SettingsAccountsBlocklistTable = ({
|
||||
gridAutoColumns="200px 1fr 20px"
|
||||
mobileGridAutoColumns="120px 1fr 20px"
|
||||
>
|
||||
<TableHeader>Email/Domain</TableHeader>
|
||||
<TableHeader>Added to blocklist</TableHeader>
|
||||
<TableHeader>{t`Email/Domain`}</TableHeader>
|
||||
<TableHeader>{t`Added to blocklist`}</TableHeader>
|
||||
<TableHeader></TableHeader>
|
||||
</TableRow>
|
||||
<StyledTableBody>
|
||||
|
||||
@ -7,6 +7,7 @@ import styled from '@emotion/styled';
|
||||
import { Section } from '@react-email/components';
|
||||
import { Card, H2Title, IconUserPlus } from 'twenty-ui';
|
||||
import { CalendarChannelVisibility } from '~/generated-metadata/graphql';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
const StyledDetailsContainer = styled.div`
|
||||
display: flex;
|
||||
@ -50,8 +51,8 @@ export const SettingsAccountsCalendarChannelDetails = ({
|
||||
<StyledDetailsContainer>
|
||||
<Section>
|
||||
<H2Title
|
||||
title="Event visibility"
|
||||
description="Define what will be visible to other users in your workspace"
|
||||
title={t`Event visibility`}
|
||||
description={t`Define what will be visible to other users in your workspace`}
|
||||
/>
|
||||
<SettingsAccountsEventVisibilitySettingsCard
|
||||
value={calendarChannel.visibility}
|
||||
@ -60,14 +61,14 @@ export const SettingsAccountsCalendarChannelDetails = ({
|
||||
</Section>
|
||||
<Section>
|
||||
<H2Title
|
||||
title="Contact auto-creation"
|
||||
description="Automatically create contacts for people you've participated in an event with."
|
||||
title={t`Contact auto-creation`}
|
||||
description={t`Automatically create contacts for people you've participated in an event with.`}
|
||||
/>
|
||||
<Card rounded>
|
||||
<SettingsOptionCardContentToggle
|
||||
Icon={IconUserPlus}
|
||||
title="Auto-creation"
|
||||
description="Automatically create contacts for people."
|
||||
title={t`Auto-creation`}
|
||||
description={t`Automatically create contacts for people.`}
|
||||
checked={calendarChannel.isContactAutoCreationEnabled}
|
||||
onChange={() => {
|
||||
handleContactAutoCreationToggle(
|
||||
|
||||
@ -11,6 +11,7 @@ import {
|
||||
CalendarChannelVisibility,
|
||||
TimelineCalendarEvent,
|
||||
} from '~/generated/graphql';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
const StyledGeneralContainer = styled.div`
|
||||
display: flex;
|
||||
@ -65,15 +66,15 @@ export const SettingsAccountsCalendarChannelsGeneral = () => {
|
||||
<StyledGeneralContainer>
|
||||
<Section>
|
||||
<H2Title
|
||||
title="Display"
|
||||
description="Configure how we should display your events in your calendar"
|
||||
title={t`Display`}
|
||||
description={t`Configure how we should display your events in your calendar`}
|
||||
/>
|
||||
<SettingsAccountsCalendarDisplaySettings />
|
||||
</Section>
|
||||
<Section>
|
||||
<H2Title
|
||||
title="Color code"
|
||||
description="Events you participated in are displayed in red."
|
||||
title={t`Color code`}
|
||||
description={t`Events you participated in are displayed in red.`}
|
||||
/>
|
||||
<CalendarContext.Provider
|
||||
value={{
|
||||
|
||||
@ -2,6 +2,7 @@ import styled from '@emotion/styled';
|
||||
|
||||
import { SettingsAccountsRadioSettingsCard } from '@/settings/accounts/components/SettingsAccountsRadioSettingsCard';
|
||||
import { SettingsAccountsVisibilityIcon } from '@/settings/accounts/components/SettingsAccountsVisibilityIcon';
|
||||
import { msg } from '@lingui/core/macro';
|
||||
import { CalendarChannelVisibility } from '~/generated/graphql';
|
||||
|
||||
type SettingsAccountsEventVisibilitySettingsCardProps = {
|
||||
@ -15,14 +16,14 @@ const StyledCardMedia = styled(SettingsAccountsVisibilityIcon)`
|
||||
|
||||
const eventSettingsVisibilityOptions = [
|
||||
{
|
||||
title: 'Everything',
|
||||
description: 'The whole event details will be shared with your team.',
|
||||
title: msg`Everything`,
|
||||
description: msg`The whole event details will be shared with your team.`,
|
||||
value: CalendarChannelVisibility.SHARE_EVERYTHING,
|
||||
cardMedia: <StyledCardMedia subject="active" body="active" />,
|
||||
},
|
||||
{
|
||||
title: 'Metadata',
|
||||
description: 'Only date & participants will be shared with your team.',
|
||||
title: msg`Metadata`,
|
||||
description: msg`Only date & participants will be shared with your team.`,
|
||||
value: CalendarChannelVisibility.METADATA,
|
||||
cardMedia: <StyledCardMedia subject="active" body="inactive" />,
|
||||
},
|
||||
|
||||
@ -7,6 +7,7 @@ import { SettingsPath } from '@/types/SettingsPath';
|
||||
import { SettingsAccountsConnectedAccountsRowRightContainer } from '@/settings/accounts/components/SettingsAccountsConnectedAccountsRowRightContainer';
|
||||
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
|
||||
import { SettingsListCard } from '../../components/SettingsListCard';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
|
||||
const ProviderIcons: { [k: string]: IconComponent } = {
|
||||
google: IconGoogle,
|
||||
@ -21,6 +22,7 @@ export const SettingsAccountsConnectedAccountsListCard = ({
|
||||
loading?: boolean;
|
||||
}) => {
|
||||
const navigate = useNavigateSettings();
|
||||
const { t } = useLingui();
|
||||
|
||||
if (!accounts.length) {
|
||||
return <SettingsAccountsListEmptyStateCard />;
|
||||
@ -36,7 +38,7 @@ export const SettingsAccountsConnectedAccountsListCard = ({
|
||||
<SettingsAccountsConnectedAccountsRowRightContainer account={account} />
|
||||
)}
|
||||
hasFooter={true}
|
||||
footerButtonLabel="Add account"
|
||||
footerButtonLabel={t`Add account`}
|
||||
onFooterButtonClick={() => navigate(SettingsPath.NewAccount)}
|
||||
/>
|
||||
);
|
||||
|
||||
@ -4,6 +4,7 @@ import { SyncStatus } from '@/settings/accounts/constants/SyncStatus';
|
||||
import { computeSyncStatus } from '@/settings/accounts/utils/computeSyncStatus';
|
||||
import { Status } from 'twenty-ui';
|
||||
import styled from '@emotion/styled';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
const StyledRowRightContainer = styled.div`
|
||||
align-items: center;
|
||||
@ -27,18 +28,18 @@ export const SettingsAccountsConnectedAccountsRowRightContainer = ({
|
||||
return (
|
||||
<StyledRowRightContainer>
|
||||
{status === SyncStatus.FAILED && (
|
||||
<Status color="red" text="Sync failed" weight="medium" />
|
||||
<Status color="red" text={t`Sync failed`} weight="medium" />
|
||||
)}
|
||||
{status === SyncStatus.SYNCED && (
|
||||
<Status color="green" text="Synced" weight="medium" />
|
||||
<Status color="green" text={t`Synced`} weight="medium" />
|
||||
)}
|
||||
{status === SyncStatus.NOT_SYNCED && (
|
||||
<Status color="orange" text="Not synced" weight="medium" />
|
||||
<Status color="orange" text={t`Not synced`} weight="medium" />
|
||||
)}
|
||||
{status === SyncStatus.IMPORTING && (
|
||||
<Status
|
||||
color="turquoise"
|
||||
text="Importing"
|
||||
text={t`Importing`}
|
||||
weight="medium"
|
||||
isLoaderVisible
|
||||
/>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
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;
|
||||
@ -9,22 +10,22 @@ type SettingsAccountsMessageAutoCreationCardProps = {
|
||||
|
||||
const autoCreationOptions = [
|
||||
{
|
||||
title: 'Sent and Received',
|
||||
description: 'People I’ve sent emails to and received emails from.',
|
||||
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: 'Sent',
|
||||
description: 'People I’ve sent emails to.',
|
||||
title: msg`Sent`,
|
||||
description: msg`People I’ve sent emails to.`,
|
||||
value: MessageChannelContactAutoCreationPolicy.SENT,
|
||||
cardMedia: <SettingsAccountsMessageAutoCreationIcon isSentActive />,
|
||||
},
|
||||
{
|
||||
title: 'None',
|
||||
description: 'Don’t auto-create contacts.',
|
||||
title: msg`None`,
|
||||
description: msg`Don’t auto-create contacts.`,
|
||||
value: MessageChannelContactAutoCreationPolicy.NONE,
|
||||
cardMedia: (
|
||||
<SettingsAccountsMessageAutoCreationIcon
|
||||
|
||||
@ -11,6 +11,7 @@ import { SettingsAccountsMessageAutoCreationCard } from '@/settings/accounts/com
|
||||
import { SettingsAccountsMessageVisibilityCard } from '@/settings/accounts/components/SettingsAccountsMessageVisibilityCard';
|
||||
import { SettingsOptionCardContentToggle } from '@/settings/components/SettingsOptions/SettingsOptionCardContentToggle';
|
||||
import { MessageChannelVisibility } from '~/generated-metadata/graphql';
|
||||
import { t } from '@lingui/core/macro';
|
||||
|
||||
type SettingsAccountsMessageChannelDetailsProps = {
|
||||
messageChannel: Pick<
|
||||
@ -79,8 +80,8 @@ export const SettingsAccountsMessageChannelDetails = ({
|
||||
<StyledDetailsContainer>
|
||||
<Section>
|
||||
<H2Title
|
||||
title="Visibility"
|
||||
description="Define what will be visible to other users in your workspace"
|
||||
title={t`Visibility`}
|
||||
description={t`Define what will be visible to other users in your workspace`}
|
||||
/>
|
||||
<SettingsAccountsMessageVisibilityCard
|
||||
value={messageChannel.visibility}
|
||||
@ -89,8 +90,8 @@ export const SettingsAccountsMessageChannelDetails = ({
|
||||
</Section>
|
||||
<Section>
|
||||
<H2Title
|
||||
title="Contact auto-creation"
|
||||
description="Automatically create People records when receiving or sending emails"
|
||||
title={t`Contact auto-creation`}
|
||||
description={t`Automatically create People records when receiving or sending emails`}
|
||||
/>
|
||||
<SettingsAccountsMessageAutoCreationCard
|
||||
value={messageChannel.contactAutoCreationPolicy}
|
||||
@ -101,8 +102,8 @@ export const SettingsAccountsMessageChannelDetails = ({
|
||||
<Card rounded>
|
||||
<SettingsOptionCardContentToggle
|
||||
Icon={IconBriefcase}
|
||||
title="Exclude non-professional emails"
|
||||
description="Don’t create contacts from/to Gmail, Outlook emails"
|
||||
title={t`Exclude non-professional emails`}
|
||||
description={t`Don’t create contacts from/to Gmail, Outlook emails`}
|
||||
divider
|
||||
checked={messageChannel.excludeNonProfessionalEmails}
|
||||
onChange={() => {
|
||||
@ -113,8 +114,8 @@ export const SettingsAccountsMessageChannelDetails = ({
|
||||
/>
|
||||
<SettingsOptionCardContentToggle
|
||||
Icon={IconUsers}
|
||||
title="Exclude group emails"
|
||||
description="Don’t sync emails from team@ support@ noreply@..."
|
||||
title={t`Exclude group emails`}
|
||||
description={t`Don’t sync emails from team@ support@ noreply@...`}
|
||||
checked={messageChannel.excludeGroupEmails}
|
||||
onChange={() =>
|
||||
handleIsGroupEmailExcludedToggle(
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { SettingsAccountsRadioSettingsCard } from '@/settings/accounts/components/SettingsAccountsRadioSettingsCard';
|
||||
import { SettingsAccountsVisibilityIcon } from '@/settings/accounts/components/SettingsAccountsVisibilityIcon';
|
||||
import { msg } from '@lingui/core/macro';
|
||||
import { MessageChannelVisibility } from '~/generated/graphql';
|
||||
|
||||
type SettingsAccountsMessageVisibilityCardProps = {
|
||||
@ -9,8 +10,8 @@ type SettingsAccountsMessageVisibilityCardProps = {
|
||||
|
||||
const inboxSettingsVisibilityOptions = [
|
||||
{
|
||||
title: 'Everything',
|
||||
description: 'Subject, body and attachments will be shared with your team.',
|
||||
title: msg`Everything`,
|
||||
description: msg`Subject, body and attachments will be shared with your team.`,
|
||||
value: MessageChannelVisibility.SHARE_EVERYTHING,
|
||||
cardMedia: (
|
||||
<SettingsAccountsVisibilityIcon
|
||||
@ -21,8 +22,8 @@ const inboxSettingsVisibilityOptions = [
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Subject and metadata',
|
||||
description: 'Subject and metadata will be shared with your team.',
|
||||
title: msg`Subject and metadata`,
|
||||
description: msg`Subject and metadata will be shared with your team.`,
|
||||
value: MessageChannelVisibility.SUBJECT,
|
||||
cardMedia: (
|
||||
<SettingsAccountsVisibilityIcon
|
||||
@ -33,8 +34,8 @@ const inboxSettingsVisibilityOptions = [
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Metadata',
|
||||
description: 'Timestamp and participants will be shared with your team.',
|
||||
title: msg`Metadata`,
|
||||
description: msg`Timestamp and participants will be shared with your team.`,
|
||||
value: MessageChannelVisibility.METADATA,
|
||||
cardMedia: (
|
||||
<SettingsAccountsVisibilityIcon
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import styled from '@emotion/styled';
|
||||
import { MessageDescriptor } from '@lingui/core';
|
||||
import { Trans } from '@lingui/react';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
import { Card, CardContent, Radio } from 'twenty-ui';
|
||||
@ -40,8 +42,8 @@ const StyledRadio = styled(Radio)`
|
||||
export const SettingsAccountsRadioSettingsCard = <
|
||||
Option extends {
|
||||
cardMedia: ReactNode;
|
||||
description: string;
|
||||
title: string;
|
||||
description: MessageDescriptor;
|
||||
title: MessageDescriptor;
|
||||
value: string;
|
||||
},
|
||||
>({
|
||||
@ -59,8 +61,12 @@ export const SettingsAccountsRadioSettingsCard = <
|
||||
>
|
||||
{option.cardMedia}
|
||||
<div>
|
||||
<StyledTitle>{option.title}</StyledTitle>
|
||||
<StyledDescription>{option.description}</StyledDescription>
|
||||
<StyledTitle>
|
||||
<Trans id={option.title.id} />
|
||||
</StyledTitle>
|
||||
<StyledDescription>
|
||||
<Trans id={option.description.id} />
|
||||
</StyledDescription>
|
||||
</div>
|
||||
<StyledRadio
|
||||
name={name}
|
||||
|
||||
@ -19,6 +19,7 @@ import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/Drop
|
||||
import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';
|
||||
import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';
|
||||
import { useNavigateSettings } from '~/hooks/useNavigateSettings';
|
||||
import { Trans, useLingui } from '@lingui/react/macro';
|
||||
|
||||
type SettingsAccountsRowDropdownMenuProps = {
|
||||
account: ConnectedAccount;
|
||||
@ -28,7 +29,7 @@ export const SettingsAccountsRowDropdownMenu = ({
|
||||
account,
|
||||
}: SettingsAccountsRowDropdownMenuProps) => {
|
||||
const dropdownId = `settings-account-row-${account.id}`;
|
||||
|
||||
const { t } = useLingui();
|
||||
const [isDeleteAccountModalOpen, setIsDeleteAccountModalOpen] =
|
||||
useState(false);
|
||||
|
||||
@ -59,7 +60,7 @@ export const SettingsAccountsRowDropdownMenu = ({
|
||||
<DropdownMenuItemsContainer>
|
||||
<MenuItem
|
||||
LeftIcon={IconMail}
|
||||
text="Emails settings"
|
||||
text={t`Emails settings`}
|
||||
onClick={() => {
|
||||
navigate(SettingsPath.AccountsEmails);
|
||||
closeDropdown();
|
||||
@ -67,7 +68,7 @@ export const SettingsAccountsRowDropdownMenu = ({
|
||||
/>
|
||||
<MenuItem
|
||||
LeftIcon={IconCalendarEvent}
|
||||
text="Calendar settings"
|
||||
text={t`Calendar settings`}
|
||||
onClick={() => {
|
||||
navigate(SettingsPath.AccountsCalendars);
|
||||
closeDropdown();
|
||||
@ -76,7 +77,7 @@ export const SettingsAccountsRowDropdownMenu = ({
|
||||
{account.authFailedAt && (
|
||||
<MenuItem
|
||||
LeftIcon={IconRefresh}
|
||||
text="Reconnect"
|
||||
text={t`Reconnect`}
|
||||
onClick={() => {
|
||||
triggerApisOAuth(account.provider);
|
||||
closeDropdown();
|
||||
@ -86,7 +87,7 @@ export const SettingsAccountsRowDropdownMenu = ({
|
||||
<MenuItem
|
||||
accent="danger"
|
||||
LeftIcon={IconTrash}
|
||||
text="Remove account"
|
||||
text={t`Remove account`}
|
||||
onClick={() => {
|
||||
setIsDeleteAccountModalOpen(true);
|
||||
closeDropdown();
|
||||
@ -98,12 +99,14 @@ export const SettingsAccountsRowDropdownMenu = ({
|
||||
<ConfirmationModal
|
||||
isOpen={isDeleteAccountModalOpen}
|
||||
setIsOpen={setIsDeleteAccountModalOpen}
|
||||
title="Data deletion"
|
||||
title={t`Data deletion`}
|
||||
subtitle={
|
||||
<>All emails and events linked to this account will be deleted</>
|
||||
<Trans>
|
||||
All emails and events linked to this account will be deleted
|
||||
</Trans>
|
||||
}
|
||||
onConfirmClick={deleteAccount}
|
||||
deleteButtonText="Delete account"
|
||||
deleteButtonText={t`Delete account`}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user