Fix runtime default locale resolution
CI / quality (push) Waiting to run

This commit is contained in:
MOH
2026-03-15 06:02:27 +01:00
parent 9b8409a7d3
commit c18128c965
29 changed files with 330 additions and 108 deletions
+4 -3
View File
@@ -6,7 +6,7 @@ import { isRedirectError } from "next/dist/client/components/redirect-error";
import { getAdminAppPath, toInternalAdminPath } from "@/lib/admin-routing";
import { clearAdminSessionCookie, isAdminAuthenticated } from "@/lib/admin-auth";
import { updateMarqueeSettings } from "@/lib/app-config";
import { getSiteSettings, updateMarqueeSettings } from "@/lib/app-config";
import { routing } from "@/i18n/routing";
import { getLocalizedPath } from "@/lib/locale";
@@ -27,10 +27,11 @@ function withMessage(pathname: string, type: "success" | "error", message: strin
async function revalidateMarqueePages() {
revalidatePath(toInternalAdminPath("/"));
revalidatePath(toInternalAdminPath("/marquee"));
const siteSettings = await getSiteSettings();
for (const locale of routing.locales) {
revalidatePath(getLocalizedPath(locale), "layout");
revalidatePath(getLocalizedPath(locale));
revalidatePath(getLocalizedPath(locale, "/", siteSettings.defaultLocale), "layout");
revalidatePath(getLocalizedPath(locale, "/", siteSettings.defaultLocale));
}
}