From c40d91e35b052c91371ed95f7b2c7198988f0abf Mon Sep 17 00:00:00 2001 From: Unchained Date: Tue, 24 Mar 2026 11:56:54 +0200 Subject: [PATCH] fix: buildLocalePath always includes locale prefix - required by routing --- src/lib/i18n/locales.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/i18n/locales.ts b/src/lib/i18n/locales.ts index 864c2c6..9b45baa 100644 --- a/src/lib/i18n/locales.ts +++ b/src/lib/i18n/locales.ts @@ -32,8 +32,6 @@ export function getPathWithoutLocale(pathname: string): string { } export function buildLocalePath(locale: Locale, path: string): string { - if (locale === DEFAULT_LOCALE) { - return path === "/" ? "/" : path; - } - return `/${locale}${path === "/" ? "" : path}`; + const pathPart = path === "/" ? "" : path; + return `/${locale}${pathPart}`; }