Add admin site settings sections and locale defaults

This commit is contained in:
MOH
2026-03-15 04:06:33 +01:00
parent 3e9edc5873
commit 5d3f77962a
21 changed files with 993 additions and 456 deletions
+9 -1
View File
@@ -29,11 +29,19 @@ export function stripLocalePrefix(pathname: string): string {
}
export function getLocalizedPath(locale: string, pathname = "/"): string {
return getLocalizedPathWithDefault(locale, pathname, routing.defaultLocale);
}
export function getLocalizedPathWithDefault(
locale: string,
pathname = "/",
defaultLocale: AppLocale = routing.defaultLocale,
): string {
const localeKey = resolveLocale(locale);
const normalizedPath = pathname === "" ? "/" : pathname;
const strippedPath = stripLocalePrefix(normalizedPath);
if (localeKey === routing.defaultLocale) {
if (localeKey === defaultLocale) {
return strippedPath;
}