fix(i18n): prepare for Lokalise

This commit is contained in:
Michael Zetterberg
2025-01-03 14:54:46 +01:00
parent cbc17e2c5b
commit d2ce9c0d7c
120 changed files with 1703 additions and 1042 deletions

View File

@@ -1,19 +1,13 @@
"use client" // Error components must be Client Components
"use client"
import * as Sentry from "@sentry/nextjs"
import {
useParams,
usePathname,
useRouter,
useSearchParams,
} from "next/navigation"
import { useParams, useRouter, useSearchParams } from "next/navigation"
import { startTransition, useEffect, useRef } from "react"
import { useIntl } from "react-intl"
import { login } from "@/constants/routes/handleAuth"
import { SESSION_EXPIRED } from "@/server/errors/trpc"
import { findLang } from "@/utils/languages"
import styles from "./error.module.css"
import type { LangParams } from "@/types/params"
@@ -63,13 +57,10 @@ export default function Error({
currentSearchParamsRef.current = currentSearchParams
}, [searchParams, reset, router])
const pathname = usePathname()
const lang = findLang(pathname)
return (
<section className={styles.layout}>
<div className={styles.content}>
{lang}: {intl.formatMessage({ id: "Something went wrong!" })}
{intl.formatMessage({ id: "Something went wrong!" })}
</div>
</section>
)