import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { Link } from "@/i18n/navigation" import Image from "next/image" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.utils.systemUtils.meta" }) return { title: t("title"), description: t("description"), openGraph: { title: t("ogTitle"), description: t("ogDescription"), type: "article", url: "https://macrimi.github.io/ProxMenux/docs/utils/system-utils", }, } } type ActionRow = { option: string; behaviourRich: string } type PackageRow = { package: string; verify: string; description: string } type RelatedItem = { href: string; label: string; tailRich?: string } export default async function SystemUtilsPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.utils.systemUtils" }) const messages = (await getMessages({ locale })) as unknown as { docs: { utils: { systemUtils: { actions: { rows: ActionRow[] } packages: { rows: PackageRow[] } howItWorks: { items: string[]; verifyOutcomes: string[] } related: { items: RelatedItem[] } } } } } const block = messages.docs.utils.systemUtils const actionRows = block.actions.rows const packageRows = block.packages.rows const howItems = block.howItWorks.items const verifyOutcomes = block.howItWorks.verifyOutcomes const relatedItems = block.related.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const kbd = (chunks: React.ReactNode) => {chunks} return (
{t.rich("info.body", { code })}

{t("opening.heading")}

{t.rich("opening.intro", { strong })}

{t("opening.imageAlt")}

{t("actions.heading")}

{actionRows.map((row, idx) => ( ))}
{t("actions.headerOption")} {t("actions.headerBehaviour")}
{row.option} {t.rich(`actions.rows.${idx}.behaviourRich`, { code })}

{t("packages.heading")}

{t.rich("packages.intro", { code })}

{packageRows.map((row, idx) => ( ))}
{t("packages.headerPackage")} {t("packages.headerVerify")} {t("packages.headerDescription")}
{row.package} {row.verify} {row.description}

{t("howItWorks.heading")}

    {howItems.map((_, idx) => (
  1. {t.rich(`howItWorks.items.${idx}`, { code })}
  2. ))}
  3. {t.rich("howItWorks.verifyIntro", { code })}
      {verifyOutcomes.map((_, idx) => (
    • {t.rich(`howItWorks.verifyOutcomes.${idx}`, { strong, em })}
    • ))}
  4. {t.rich("howItWorks.summary", { em })}

{t("verify.heading")}

{t.rich("verify.intro", { code })}

{t.raw("verify.code") as string}

{t.rich("verify.outro", { code })}

{t("troubleshoot.heading")}

{t.rich("troubleshoot.reposBody", { code })} {t.rich("troubleshoot.warningsBody", { code })} {t.rich("troubleshoot.hangsBody", { code, kbd })}

{t("files.heading")}

{t.raw("files.code") as string}

{t("related.heading")}

    {relatedItems.map((item, idx) => (
  • {item.label} {item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { code }) : null}
  • ))}
) }