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:
Félix Malfait
2025-01-16 23:34:54 +01:00
committed by GitHub
parent f44b31573a
commit 7acb68929f
46 changed files with 3019 additions and 299 deletions

View File

@ -7,6 +7,7 @@ import { SettingsPath } from '@/types/SettingsPath';
import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
import styled from '@emotion/styled';
import { useLingui } from '@lingui/react/macro';
import { Button, H2Title, IconPlus, MOBILE_VIEWPORT, Section } from 'twenty-ui';
const StyledButtonContainer = styled.div`
@ -27,30 +28,32 @@ const StyledContainer = styled.div<{ isMobile: boolean }>`
export const SettingsDevelopers = () => {
const isMobile = useIsMobile();
const { t } = useLingui();
return (
<SubMenuTopBarContainer
title="Developers"
title={t`Developers`}
actionButton={<SettingsReadDocumentationButton />}
links={[
{
children: 'Workspace',
children: t`Workspace`,
href: getSettingsPagePath(SettingsPath.Workspace),
},
{ children: 'Developers' },
{ children: t`Developers` },
]}
>
<SettingsPageContainer>
<StyledContainer isMobile={isMobile}>
<Section>
<H2Title
title="API keys"
description="Active APIs keys created by you or your team."
title={t`API keys`}
description={t`Active APIs keys created by you or your team.`}
/>
<SettingsApiKeysTable />
<StyledButtonContainer>
<Button
Icon={IconPlus}
title="Create API key"
title={t`Create API key`}
size="small"
variant="secondary"
to={'/settings/developers/api-keys/new'}
@ -59,14 +62,14 @@ export const SettingsDevelopers = () => {
</Section>
<Section>
<H2Title
title="Webhooks"
description="Establish Webhook endpoints for notifications on asynchronous events."
title={t`Webhooks`}
description={t`Establish Webhook endpoints for notifications on asynchronous events.`}
/>
<SettingsWebhooksTable />
<StyledButtonContainer>
<Button
Icon={IconPlus}
title="Create Webhook"
title={t`Create Webhook`}
size="small"
variant="secondary"
to={'/settings/developers/webhooks/new'}