mirror of
https://github.com/theoludwig/theoludwig.git
synced 2026-05-06 13:48:12 +02:00
build: update to Node.js v24.0.0, pnpm v10, Tailwind CSS v4
This commit is contained in:
@@ -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 = (
|
||||
|
||||
Reference in New Issue
Block a user