fix: buildLocalePath always includes locale prefix - required by routing

This commit is contained in:
Unchained
2026-03-24 11:56:54 +02:00
parent 5ee3ab6713
commit c40d91e35b

View File

@@ -32,8 +32,6 @@ export function getPathWithoutLocale(pathname: string): string {
} }
export function buildLocalePath(locale: Locale, path: string): string { export function buildLocalePath(locale: Locale, path: string): string {
if (locale === DEFAULT_LOCALE) { const pathPart = path === "/" ? "" : path;
return path === "/" ? "/" : path; return `/${locale}${pathPart}`;
}
return `/${locale}${path === "/" ? "" : path}`;
} }