import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { Link } from "@/i18n/navigation" import Image from "next/image" import { Zap, MessageSquare, BookOpen, ExternalLink, Youtube } from "lucide-react" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" import { YouTubeEmbed } from "@/components/ui/youtube-embed" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.utils.upgradePve8Pve9.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/upgrade-pve8-pve9", }, } } type StringItem = string type TableRow2 = { settingRich: string; effectRich: string } type PreflightRow = { checkRich: string; whyRich: string } type DpkgRow = { fileRich: string; answerRich: string; whyRich: string; fileFont: boolean } type TroubleItem = { title: string; bodyRich: string } type RefItem = { href: string; title: string; desc: string } type RelatedItem = { href: string; label: string; tail: string } export default async function UpgradePve8Pve9Page({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.utils.upgradePve8Pve9" }) const messages = (await getMessages({ locale })) as unknown as { docs: { utils: { upgradePve8Pve9: { dangerCallout: { items: StringItem[] } threeWays: { auto: { items: StringItem[] } interactive: { items: StringItem[] } manual: { items: StringItem[] } } auto: { behaviourTable: { rows: TableRow2[] } preflightTable: { rows: PreflightRow[] } postItems: StringItem[] } interactive: { whenItems: StringItem[] } manual: { dpkgTable: { rows: DpkgRow[] } } troubleshooting: { items: TroubleItem[] } references: { items: RefItem[] } related: { items: RelatedItem[] } } } } } const block = messages.docs.utils.upgradePve8Pve9 const dangerItems = block.dangerCallout.items const autoCardItems = block.threeWays.auto.items const interactiveCardItems = block.threeWays.interactive.items const manualCardItems = block.threeWays.manual.items const behaviourRows = block.auto.behaviourTable.rows const preflightRows = block.auto.preflightTable.rows const postItems = block.auto.postItems const whenItems = block.interactive.whenItems const dpkgRows = block.manual.dpkgTable.rows const troubleItems = block.troubleshooting.items const refItems = block.references.items 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} const autolink = (chunks: React.ReactNode) => ( {chunks} ) const dpkglink = (chunks: React.ReactNode) => ( {chunks} ) const netlink = (chunks: React.ReactNode) => ( {chunks} ) const wikilink = (chunks: React.ReactNode) => ( {chunks} ) const cephlink = (chunks: React.ReactNode) => ( {chunks} ) return (
{t.rich("dangerCallout.intro", { strong })}
    {dangerItems.map((_, idx) => (
  • {t.rich(`dangerCallout.items.${idx}`, { strong })}
  • ))}

{t("modeMenu.heading")}

{t.rich("modeMenu.intro", { em })}

{t("modeMenu.imageAlt")}

{t("threeWays.heading")}

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

{t("threeWays.auto.title")}

{t.rich("threeWays.auto.summary", { code, strong })}

    {autoCardItems.map((_, idx) => (
  • {t.rich(`threeWays.auto.items.${idx}`, { code, strong })}
  • ))}

{t("threeWays.interactive.title")}

{t("threeWays.interactive.summary")}

    {interactiveCardItems.map((_, idx) => (
  • {t.rich(`threeWays.interactive.items.${idx}`, { code })}
  • ))}

{t("threeWays.manual.title")}

{t("threeWays.manual.summary")}

    {manualCardItems.map((_, idx) => (
  • {t(`threeWays.manual.items.${idx}`)}
  • ))}
{t.rich("precheckCallout.body", { code, strong })}

{t("webTerminal.heading")}

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

{t.rich("webTerminal.warningBody", { code })}

{t("auto.heading")}

{t("auto.intro")}

{t("auto.behaviourHeading")}

{behaviourRows.map((_, idx) => ( ))}
{t("auto.behaviourTable.settingHeader")} {t("auto.behaviourTable.effectHeader")}
{t.rich(`auto.behaviourTable.rows.${idx}.settingRich`, { code })} {t.rich(`auto.behaviourTable.rows.${idx}.effectRich`, { strong })}

{t("auto.flowHeading")}

{t.rich("auto.flowIntro", { code })}

{t.raw("auto.flowDiagram") as string}

{t("auto.preflightHeading")}

{preflightRows.map((_, idx) => ( ))}
{t("auto.preflightTable.checkHeader")} {t("auto.preflightTable.whyHeader")}
{t.rich(`auto.preflightTable.rows.${idx}.checkRich`, { strong })} {t.rich(`auto.preflightTable.rows.${idx}.whyRich`, { code })}

{t("auto.distUpgradeHeading")}

{t.raw("auto.distUpgradeCode") as string}

{t.rich("auto.distUpgradeOutro", { code })}

{t("auto.postHeading")}

    {postItems.map((_, idx) => (
  1. {t.rich(`auto.postItems.${idx}`, { code, strong })}
  2. ))}

{t("interactive.heading")}

{t.rich("interactive.intro", { code, strong, autolink })}

{t("interactive.distUpgradeHeading")}

{t.raw("interactive.distUpgradeCode") as string}

{t("interactive.whenHeading")}

    {whenItems.map((_, idx) => (
  • {t.rich(`interactive.whenItems.${idx}`, { code })}
  • ))}
{t.rich("interactive.promptCalloutBody", { strong, dpkglink })}

{t("manual.heading")}

{t.rich("manual.intro", { strong, em, wikilink })}

{t.rich("manual.rootCalloutBody", { code })}

{t("manual.phase1Heading")}

{t("manual.phase1Intro")}

{t.raw("manual.phase1Code") as string}

{t("manual.phase2Heading")}

{t.rich("manual.phase2Intro", { strong })}

{t.raw("manual.phase2Code") as string}

{t("manual.phase3Heading")}

{t("manual.phase3Intro")}

{t.raw("manual.phase3Code") as string}

{t("manual.dpkgHeading")}

{t.rich("manual.dpkgIntro", { strong })}

{dpkgRows.map((row, idx) => ( ))}
{t("manual.dpkgTable.fileHeader")} {t("manual.dpkgTable.answerHeader")} {t("manual.dpkgTable.whyHeader")}
{t.rich(`manual.dpkgTable.rows.${idx}.fileRich`, { code })} {t.rich(`manual.dpkgTable.rows.${idx}.answerRich`, { strong, kbd })} {t(`manual.dpkgTable.rows.${idx}.whyRich`)}
{t.rich("manual.inspectCalloutBody", { strong })}

{t("manual.phase4Heading")}

{t.rich("manual.phase4Intro", { code })}

{t.raw("manual.phase4Code") as string}

{t("clusterCeph.heading")}

{t.rich("clusterCeph.clusterCalloutBody", { code, strong })} {t.rich("clusterCeph.cephCalloutBody", { code, cephlink })}

{t("troubleshooting.heading")}

{troubleItems.map((item, idx) => ( {t.rich(`troubleshooting.items.${idx}.bodyRich`, { code, netlink })} ))}

{t("files.heading")}

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

{t("references.heading")}

{t("references.intro")}

{refItems.map((item, idx) => (
{t(`references.items.${idx}.title`)}
{t(`references.items.${idx}.desc`)}
))}

{t("video.heading")}

{t("video.intro")}

{t("related.heading")}

    {relatedItems.map((item, idx) => (
  • {item.label} {item.tail}
  • ))}
) }