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.exportVm.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/export-vm", }, } } type StringItem = string type FormatRow = { format: string; output: string; pros: string; cons: string } type ImportItem = { href?: string; preRich?: string; linkLabel?: string; tailRich?: string } type RelatedItem = { href: string; label: string; tail?: string; tailRich?: string } export default async function ExportVmPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.utils.exportVm" }) const messages = (await getMessages({ locale })) as unknown as { docs: { utils: { exportVm: { stopped: { items: StringItem[] } format: { rows: FormatRow[] } exported: { items: StringItem[]; notItems: StringItem[] } import: { items: ImportItem[] } related: { items: RelatedItem[] } } } } } const block = messages.docs.utils.exportVm const stoppedItems = block.stopped.items const formatRows = block.format.rows const exportedItems = block.exported.items const notExportedItems = block.exported.notItems const importItems = block.import.items const relatedItems = block.related.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} return (
{t.rich("intro.body", { code })}

{t("picker.heading")}

{t.rich("picker.body", { code })}

{t("picker.imgAlt")}

{t("stopped.heading")}

{t("stopped.intro")}

    {stoppedItems.map((_, idx) => (
  1. {t.rich(`stopped.items.${idx}`, { code })}
  2. ))}
{t.rich("stopped.warnBody", { code })}

{t("format.heading")}

{formatRows.map((row, idx) => ( ))}
{t("format.headerFormat")} {t("format.headerOutput")} {t("format.headerPros")} {t("format.headerCons")}
{row.format} {row.output} {row.pros} {row.cons}

{t("destination.heading")}

{t.rich("destination.body", { code })}

{t("destination.calloutBody")}

{t("package.heading")}

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

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

{t("exported.heading")}

    {exportedItems.map((_, idx) => (
  • {t.rich(`exported.items.${idx}`, { code, strong })}
  • ))}
    {notExportedItems.map((_, idx) => (
  • {t.rich(`exported.notItems.${idx}`, { code, strong })}
  • ))}

{t("conversion.heading")}

{t("conversion.intro")}

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

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

{t("manifest.heading")}

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

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

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

{t("import.heading")}

{t("import.intro")}

    {importItems.map((item, idx) => (
  • {item.href && item.linkLabel ? ( <> {t.rich(`import.items.${idx}.preRich`, { strong })} {item.linkLabel} {t.rich(`import.items.${idx}.tailRich`, { strong })} ) : ( t.rich(`import.items.${idx}.tailRich`, { strong }) )}
  • ))}

{t("troubleshoot.heading")}

{t("troubleshoot.noSpaceBody")} {t.rich("troubleshoot.unsupportedHwBody", { code })} {t.rich("troubleshoot.nicBody", { code })} {t.rich("troubleshoot.runningBody", { code })} {t.rich("troubleshoot.slowBody", { code })}

{t("related.heading")}

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