Translation files, step 1: common texts (forms, status pages, lightbox, labels) in common.json
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useEffect } from 'react';
|
||||
import { chakra, useRecipe } from '@chakra-ui/react';
|
||||
import { useRouter, type ErrorComponentProps } from '@tanstack/react-router';
|
||||
import { t } from '@/i18n';
|
||||
import { reportError } from '@/monitoring/sentry';
|
||||
import LinkButton from '../LinkButton';
|
||||
import StatusPage from './StatusPage';
|
||||
@@ -24,10 +25,15 @@ export default function ErrorPage({ error, reset }: ErrorComponentProps) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<title>Er ging iets mis | Andrea Slop Fotografie</title>
|
||||
<title>
|
||||
{t('common.status.documentTitle', {
|
||||
title: t('common.status.error.title'),
|
||||
siteName: t('common.site.name'),
|
||||
})}
|
||||
</title>
|
||||
<meta name="robots" content="noindex" />
|
||||
<StatusPage
|
||||
title="Er ging iets mis"
|
||||
title={t('common.status.error.title')}
|
||||
actions={
|
||||
<>
|
||||
<chakra.button
|
||||
@@ -37,20 +43,19 @@ export default function ErrorPage({ error, reset }: ErrorComponentProps) {
|
||||
cursor="pointer"
|
||||
data-testid="error-page-retry-button"
|
||||
>
|
||||
Opnieuw proberen
|
||||
{t('common.actions.retry')}
|
||||
</chakra.button>
|
||||
<LinkButton
|
||||
to="/"
|
||||
variant="outline"
|
||||
data-testid="error-page-home-link"
|
||||
>
|
||||
Terug naar home
|
||||
{t('common.actions.backHome')}
|
||||
</LinkButton>
|
||||
</>
|
||||
}
|
||||
>
|
||||
Door een fout kan deze pagina nu niet worden getoond. Probeer
|
||||
het opnieuw of ga terug naar de homepage.
|
||||
{t('common.status.error.text')}
|
||||
</StatusPage>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useRouterState } from '@tanstack/react-router';
|
||||
import useHydrated from '@/hooks/useHydrated';
|
||||
import { t } from '@/i18n';
|
||||
import { isShootSectionPath } from '@/lib/isShootSectionPath';
|
||||
import LinkButton from '../LinkButton';
|
||||
import StatusPage from './StatusPage';
|
||||
@@ -19,10 +20,15 @@ export default function NotFound() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<title>Pagina niet gevonden | Andrea Slop Fotografie</title>
|
||||
<title>
|
||||
{t('common.status.documentTitle', {
|
||||
title: t('common.status.notFound.title'),
|
||||
siteName: t('common.site.name'),
|
||||
})}
|
||||
</title>
|
||||
<meta name="robots" content="noindex" />
|
||||
<StatusPage
|
||||
title="Pagina niet gevonden"
|
||||
title={t('common.status.notFound.title')}
|
||||
actions={
|
||||
hydrated && isShootSectionPath(pathname) ? (
|
||||
<>
|
||||
@@ -31,21 +37,20 @@ export default function NotFound() {
|
||||
variant="accent"
|
||||
data-testid="status-page-section-link"
|
||||
>
|
||||
Terug naar Soorten fotoshoots
|
||||
{t('common.status.backToShoots')}
|
||||
</LinkButton>
|
||||
<LinkButton
|
||||
to="/"
|
||||
variant="outline"
|
||||
data-testid="status-page-home-link"
|
||||
>
|
||||
Terug naar home
|
||||
{t('common.actions.backHome')}
|
||||
</LinkButton>
|
||||
</>
|
||||
) : undefined
|
||||
}
|
||||
>
|
||||
Deze pagina bestaat niet (meer). Misschien is de link verouderd
|
||||
of zit er een typfout in het adres.
|
||||
{t('common.status.notFound.text')}
|
||||
</StatusPage>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import { Container, Flex, Heading, Text } from '@chakra-ui/react';
|
||||
import { t } from '@/i18n';
|
||||
import LinkButton from '../LinkButton';
|
||||
|
||||
type StatusPageProps = {
|
||||
@@ -32,7 +33,7 @@ export default function StatusPage({
|
||||
<Flex gap={4} justifyContent="center" wrap="wrap">
|
||||
{actions ?? (
|
||||
<LinkButton to="/" data-testid="status-page-home-link">
|
||||
Terug naar home
|
||||
{t('common.actions.backHome')}
|
||||
</LinkButton>
|
||||
)}
|
||||
</Flex>
|
||||
|
||||
Reference in New Issue
Block a user