Refactor for i18n, CMS integration, and project slugs; enhance admin & analytics

Co-authored-by: dennis <dennis@konkol.net>
This commit is contained in:
Cursor Agent
2026-01-12 14:36:10 +00:00
parent 0349c686fa
commit 12245eec8e
55 changed files with 4573 additions and 753 deletions

View File

@@ -26,6 +26,34 @@ jest.mock("next/navigation", () => ({
notFound: jest.fn(),
}));
// Mock next-intl (ESM) for Jest
jest.mock("next-intl", () => ({
useLocale: () => "en",
useTranslations:
(namespace?: string) =>
(key: string) => {
if (namespace === "nav") {
const map: Record<string, string> = {
home: "Home",
about: "About",
projects: "Projects",
contact: "Contact",
};
return map[key] || key;
}
if (namespace === "common") {
const map: Record<string, string> = {
backToHome: "Back to Home",
backToProjects: "Back to Projects",
};
return map[key] || key;
}
return key;
},
NextIntlClientProvider: ({ children }: { children: React.ReactNode }) =>
React.createElement(React.Fragment, null, children),
}));
// Mock next/link
jest.mock("next/link", () => {
return function Link({