Fix CMS translations path to src/messages.
Local Build and Deploy / deploy (push) Failing after 1m5s

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-17 18:43:34 +02:00
1 parent d2c33145a2
commit 9b411e69b4
2 files changed
+10 -5

No files matched your search

+9 -5
View File
@@ -28,15 +28,19 @@ const LOCALES = [
] as const;
export default async function CmsTranslationsPage() {
const messagesDir = path.join(process.cwd(), "messages");
const messagesDir = path.join(process.cwd(), "src", "messages");
const contents: Record<string, string> = {};
await Promise.all(
LOCALES.map(async (locale) => {
contents[locale] = await fs.readFile(
path.join(messagesDir, `${locale}.json`),
"utf-8",
);
try {
contents[locale] = await fs.readFile(
path.join(messagesDir, `${locale}.json`),
"utf-8",
);
} catch {
// Skip missing locale files instead of failing the whole page.
}
}),
);