Add admin import overview page and extend CMS translations to all 6 locales

This commit is contained in:
openhands committed 2026-07-12 21:28:16 +02:00
1 parent 2e4ed76121
commit 6933fb77d5
4 files changed
+100 -29

No files matched your search

+10 -3
View File
@@ -2,10 +2,17 @@ import fs from "node:fs/promises";
import path from "node:path";
import { TranslationsClient } from "../translations-client";
const LOCALES = ["en", "it", "nl", "de", "fr", "es"] as const;
export default async function CmsTranslationsPage() {
const messagesDir = path.join(process.cwd(), "messages");
const enContent = await fs.readFile(path.join(messagesDir, "en.json"), "utf-8");
const itContent = await fs.readFile(path.join(messagesDir, "it.json"), "utf-8");
return <TranslationsClient enJson={enContent} itJson={itContent} />;
const contents: Record<string, string> = {};
await Promise.all(
LOCALES.map(async (locale) => {
contents[locale] = await fs.readFile(path.join(messagesDir, `${locale}.json`), "utf-8");
}),
);
return <TranslationsClient localeContents={contents} />;
}