1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

build: update to Node.js v24.0.0, pnpm v10, Tailwind CSS v4

This commit is contained in:
2025-05-11 16:59:11 +02:00
parent cec70161f7
commit 69af1bccc3
43 changed files with 3941 additions and 3664 deletions

View File

@ -1,10 +1,9 @@
import type fr from "./translations/fr-FR.json"
import type { routing } from "./routing.ts"
import type messages from "./translations/en-US.json"
type Messages = typeof fr
declare global {
/**
* Use type safe message keys with `next-intl`.
*/
interface IntlMessages extends Messages {}
declare module "next-intl" {
interface AppConfig {
Locale: (typeof routing.locales)[number]
Messages: typeof messages
}
}

View File

@ -1,15 +1,16 @@
import type { AbstractIntlMessages } from "next-intl"
import { hasLocale } from "next-intl"
import { getRequestConfig } from "next-intl/server"
import { routing } from "./routing.ts"
import type { Locale } from "@repo/utils/constants"
import { LOCALE_DEFAULT, LOCALES } from "@repo/utils/constants"
import { LOCALE_DEFAULT } from "@repo/utils/constants"
import { deepMerge } from "@repo/utils/objects"
export default getRequestConfig(async ({ requestLocale }) => {
let locale = await requestLocale
if (!LOCALES.includes(locale as Locale)) {
locale = LOCALE_DEFAULT
}
const requested = await requestLocale
const locale = hasLocale(routing.locales, requested)
? requested
: routing.defaultLocale
const userMessages = (await import(`./translations/${locale}.json`)).default
const defaultMessages = (