import type { ReactNode } from "react"; import type { Metadata } from "next"; import { Inter, JetBrains_Mono } from "next/font/google"; import { notFound } from "next/navigation"; import { NextIntlClientProvider } from "next-intl"; import { getMessages, getTranslations } from "next-intl/server"; import { routing } from "@/i18n/routing"; import "../globals.css"; const inter = Inter({ subsets: ["latin"], variable: "--font-inter", }); const jetbrainsMono = JetBrains_Mono({ subsets: ["latin"], variable: "--font-mono", }); export function generateStaticParams() { return routing.locales.map((locale) => ({ locale })); } export async function generateMetadata({ params, }: { params: Promise<{ locale: string }>; }): Promise { const { locale } = await params; const t = await getTranslations({ locale, namespace: "metadata" }); return { title: t("title"), description: t("description"), alternates: { languages: Object.fromEntries( routing.locales.map((l) => [l, `/${l}`]) ), }, other: { "application/ld+json": JSON.stringify({ "@context": "https://schema.org", "@type": "SoftwareApplication", name: "openclaw-reporter", applicationCategory: "DeveloperApplication", operatingSystem: "macOS, Linux, Windows", description: "A Claude Code skill that lets you join the OpenClaw global heatmap. Sends anonymous heartbeats (platform + model only) and generic task summaries. Install via: clawhub install openclaw-reporter", url: "https://kymr.top/", installUrl: "https://clawhub.com/skills/openclaw-reporter", offers: { "@type": "Offer", price: "0", priceCurrency: "USD" }, permissions: "Network access to https://kymr.top/, write to ~/.openclaw/, binaries: curl, python3, uname", }), }, }; } export default async function LocaleLayout({ children, params, }: { children: ReactNode; params: Promise<{ locale: string }>; }) { const { locale } = await params; if (!routing.locales.includes(locale as "en" | "zh")) { notFound(); } const messages = await getMessages(); return ( {children} ); }