complete i18n migration to /[locale]/ with EN+ES content

Full rewrite of the docs site under app/[locale]/ with next-intl
in localePrefix:"always" mode. Every page now exists at both
/en/<path> and /es/<path>; the root / shows a meta-refresh + JS
redirect to /<defaultLocale>/ so GitHub Pages serves something
on the apex URL.

Highlights:
- 107 doc pages migrated to file-per-page JSON namespaces under
  messages/en/ and messages/es/. Spanish content is fully
  translated (no copy-of-English placeholders).
- New documentation for the Active Suppressions section in the
  Settings tab and the per-event Dismiss dropdown in the Health
  Monitor modal.
- New screenshots: dismiss-duration-dropdown.png and an updated
  health-suppression-settings.png.
- Pagefind integrated for client-side search; index is built on
  every CI deploy (not committed).
- RSS feeds: per-locale at /<locale>/rss.xml plus root /rss.xml
  for backward compat.
- Removed the dead app/[locale]/guides/[slug]/ route — every
  guide now has its own static page and no markdown source
  remains.
- Fixed orphan link /guides/nvidia -> /guides/nvidia-manual in
  docs/hardware/nvidia-host.
- Removed obsolete components (footer2, calendar, drawer).

Verified locally with `npm ci && npm run build`: 2804 files in
out/, 231 pages indexed by pagefind, root redirect intact, both
locale roots and the new Active Suppressions docs render OK.
This commit is contained in:
MacRimi
2026-05-31 12:41:10 +02:00
parent 875910b4d7
commit 5ca3463bf6
649 changed files with 83958 additions and 11096 deletions

View File

@@ -0,0 +1,249 @@
import type { Metadata } from "next"
import Image from "next/image"
import { ExternalLink } from "lucide-react"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.utils.uupDumpIsoCreator.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/UUp-Dump-ISO-Creator",
images: [
{
url: "/utils/uup-dump-iso-creator.png",
width: 1200,
height: 630,
alt: t("ogImageAlt"),
},
],
},
}
}
type DepRow = { pkg: string; roleRich: string }
type FlowStep = string
type Flag = string
type StepItem = {
title: string
img: string
caption: string
body?: string
bodyRich?: string
}
export default async function UUPDumpISOCreatorPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.utils.uupDumpIsoCreator" })
const messages = (await getMessages({ locale })) as unknown as {
docs: {
utils: {
uupDumpIsoCreator: {
what: { items: string[] }
dependencies: { rows: DepRow[] }
flow: { steps: FlowStep[] }
aria2: { flags: Flag[] }
step1: { items: StepItem[] }
step2: { items: StepItem[] }
}
}
}
}
const block = messages.docs.utils.uupDumpIsoCreator
const whatItems = block.what.items
const depRows = block.dependencies.rows
const flowSteps = block.flow.steps
const aria2Flags = block.aria2.flags
const step1Items = block.step1.items
const step2Items = block.step2.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const extlinkUupdump = (chunks: React.ReactNode) => (
<a
href="https://uupdump.net/"
target="_blank"
rel="noopener noreferrer"
className="text-blue-600 hover:underline inline-flex items-center gap-1"
>
{chunks}
<ExternalLink className="w-3 h-3" />
</a>
)
const step1Badge = t("step1.stepBadge")
const step2Badge = t("step2.stepBadge")
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={15}
scriptPath="vm/uupdump_creator.sh"
/>
<Callout variant="info" title={t("intro.title")}>
{t("intro.body")}
</Callout>
<div className="flex flex-col items-center my-6">
<div className="w-full max-w-[768px] overflow-hidden rounded-md border border-gray-200">
<Image
src="/utils/uup-dump-iso-creator.png"
alt={t("hero.imageAlt")}
width={768}
height={0}
style={{ height: "auto" }}
className="w-full object-contain"
sizes="(max-width: 768px) 100vw, 768px"
/>
</div>
<span className="mt-2 text-sm text-gray-600">{t("hero.caption")}</span>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("what.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("what.intro")}</p>
<ul className="list-disc pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
{whatItems.map((_, idx) => (
<li key={idx}>{t(`what.items.${idx}`)}</li>
))}
</ul>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("what.learnMore", { extlink: extlinkUupdump })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("automates.heading")}</h2>
<h3 className="text-xl font-semibold mt-6 mb-3 text-gray-900">{t("dependencies.heading")}</h3>
<p className="mb-3 text-gray-800 leading-relaxed">{t.rich("dependencies.intro", { code })}</p>
<div className="overflow-x-auto mb-4 rounded-md border border-gray-200">
<table className="min-w-full text-sm">
<thead className="bg-gray-50 text-left text-gray-700">
<tr>
<th className="px-4 py-2 font-semibold">{t("dependencies.headerPackage")}</th>
<th className="px-4 py-2 font-semibold">{t("dependencies.headerRole")}</th>
</tr>
</thead>
<tbody className="divide-y divide-gray-200 text-gray-800">
{depRows.map((row, idx) => (
<tr key={row.pkg}>
<td className="px-4 py-2"><code>{row.pkg}</code></td>
<td className="px-4 py-2">{t.rich(`dependencies.rows.${idx}.roleRich`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="mb-3 text-sm text-gray-700 leading-relaxed">{t("dependencies.manualIntro")}</p>
<pre className="bg-gray-100 p-3 rounded-md overflow-x-auto text-sm font-mono mb-4">
<code>{t("dependencies.manualCode")}</code>
</pre>
<h3 className="text-xl font-semibold mt-8 mb-3 text-gray-900">{t("flow.heading")}</h3>
<ol className="list-decimal pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
{flowSteps.map((_, idx) => (
<li key={idx}>{t.rich(`flow.steps.${idx}`, { code })}</li>
))}
</ol>
<h3 className="text-xl font-semibold mt-8 mb-3 text-gray-900">{t("aria2.heading")}</h3>
<pre className="bg-gray-100 p-3 rounded-md overflow-x-auto text-sm font-mono mb-3">
<code>{t("aria2.code")}</code>
</pre>
<ul className="list-disc pl-6 mb-4 text-sm text-gray-700 leading-relaxed space-y-1">
{aria2Flags.map((_, idx) => (
<li key={idx}>{t.rich(`aria2.flags.${idx}`, { code })}</li>
))}
</ul>
<p className="text-sm text-gray-600 mb-4">{t("aria2.runtime")}</p>
<h2 className="text-2xl font-semibold mt-12 mb-4 text-gray-900">{t("step1.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("step1.intro", { code, extlink: extlinkUupdump })}
</p>
{step1Items.map((item, idx) => (
<section key={`s1-${idx}`} className="mt-8 border-b border-gray-200 pb-8">
<div className="flex items-center gap-3 mb-3">
<span className="inline-flex items-center rounded-full border border-blue-200 bg-blue-50 px-2.5 py-0.5 text-xs font-semibold text-blue-800">
{step1Badge} {idx + 1}
</span>
<h3 className="text-lg font-semibold text-gray-900 m-0">{item.title}</h3>
</div>
<p className="mb-4 text-gray-800 leading-relaxed">
{item.bodyRich ? t.rich(`step1.items.${idx}.bodyRich`, { code, strong, em }) : item.body}
</p>
<div className="flex flex-col items-center">
<div className="w-full max-w-[768px] overflow-hidden rounded-md border border-gray-200">
<Image
src={item.img}
alt={item.caption}
width={768}
height={0}
style={{ height: "auto" }}
className="w-full object-contain"
sizes="(max-width: 768px) 100vw, 768px"
/>
</div>
<span className="mt-2 text-sm text-gray-600">{item.caption}</span>
</div>
</section>
))}
<h2 className="text-2xl font-semibold mt-12 mb-4 text-gray-900">{t("step2.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("step2.intro")}</p>
{step2Items.map((item, idx) => (
<section key={`s2-${idx}`} className="mt-8 border-b border-gray-200 pb-8">
<div className="flex items-center gap-3 mb-3">
<span className="inline-flex items-center rounded-full border border-blue-200 bg-blue-50 px-2.5 py-0.5 text-xs font-semibold text-blue-800">
{step2Badge} {idx + 1}
</span>
<h3 className="text-lg font-semibold text-gray-900 m-0">{item.title}</h3>
</div>
<p className="mb-4 text-gray-800 leading-relaxed">
{item.bodyRich ? t.rich(`step2.items.${idx}.bodyRich`, { code, strong, em }) : item.body}
</p>
<div className="flex flex-col items-center">
<div className="w-full max-w-[768px] overflow-hidden rounded-md border border-gray-200">
<Image
src={item.img}
alt={item.caption}
width={768}
height={0}
style={{ height: "auto" }}
className="w-full object-contain"
sizes="(max-width: 768px) 100vw, 768px"
/>
</div>
<span className="mt-2 text-sm text-gray-600">{item.caption}</span>
</div>
</section>
))}
<Callout variant="info" title={t("tempFiles.title")}>
{t.rich("tempFiles.body", { code })}
</Callout>
</div>
)
}

View File

@@ -0,0 +1,223 @@
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<Metadata> {
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) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={6}
scriptPath="utilities/export_vm_ova_ovf.sh"
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("picker.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("picker.body", { code })}
</p>
<Image
src="/utils/export-vm-picker.png"
alt={t("picker.imgAlt")}
width={900}
height={500}
className="rounded shadow-lg my-6"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("stopped.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("stopped.intro")}</p>
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{stoppedItems.map((_, idx) => (
<li key={idx}>{t.rich(`stopped.items.${idx}`, { code })}</li>
))}
</ol>
<Callout variant="warning" title={t("stopped.warnTitle")}>
{t.rich("stopped.warnBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("format.heading")}</h2>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("format.headerFormat")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("format.headerOutput")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("format.headerPros")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("format.headerCons")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{formatRows.map((row, idx) => (
<tr key={row.format} className={idx < formatRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.format}</strong></td>
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs">{row.output}</td>
<td className="px-3 py-2 align-top">{row.pros}</td>
<td className="px-3 py-2 align-top">{row.cons}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("destination.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("destination.body", { code })}
</p>
<Callout variant="info" title={t("destination.calloutTitle")}>
{t("destination.calloutBody")}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("package.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("package.intro", { code })}
</p>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("package.code") as string}</pre>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("exported.heading")}</h2>
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{exportedItems.map((_, idx) => (
<li key={idx}>{t.rich(`exported.items.${idx}`, { code, strong })}</li>
))}
</ul>
<Callout variant="warning" title={t("exported.notTitle")}>
<ul className="list-disc pl-6 mb-0 space-y-1">
{notExportedItems.map((_, idx) => (
<li key={idx}>{t.rich(`exported.notItems.${idx}`, { code, strong })}</li>
))}
</ul>
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("conversion.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("conversion.intro")}</p>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("conversion.code") as string}</pre>
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">
{t.rich("conversion.outro", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("manifest.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("manifest.intro", { code })}
</p>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("manifest.code") as string}</pre>
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">
{t.rich("manifest.outro", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("import.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("import.intro")}</p>
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{importItems.map((item, idx) => (
<li key={idx}>
{item.href && item.linkLabel ? (
<>
{t.rich(`import.items.${idx}.preRich`, { strong })}
<Link href={item.href} className="text-blue-600 hover:underline">
{item.linkLabel}
</Link>
{t.rich(`import.items.${idx}.tailRich`, { strong })}
</>
) : (
t.rich(`import.items.${idx}.tailRich`, { strong })
)}
</li>
))}
</ul>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
<Callout variant="troubleshoot" title={t("troubleshoot.noSpaceTitle")}>
{t("troubleshoot.noSpaceBody")}
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.unsupportedHwTitle")}>
{t.rich("troubleshoot.unsupportedHwBody", { code })}
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.nicTitle")}>
{t.rich("troubleshoot.nicBody", { code })}
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.runningTitle")}>
{t.rich("troubleshoot.runningBody", { code })}
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.slowTitle")}>
{t.rich("troubleshoot.slowBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item, idx) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { code }) : item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,245 @@
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"
import { DataFlowDiagram } from "@/components/ui/data-flow-diagram"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.utils.importVm.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/import-vm",
},
}
}
type StringItem = string
type FlowNode = { label: string; detail: string; variant: "source" | "bridge" | "target" }
type OvfRow = { field: string; source: string; default: string }
type PostRow = { setting: string; default: string; recommended?: string; recommendedRich?: string }
type RelatedItem = { href: string; label: string; tail?: string; tailRich?: string }
export default async function ImportVmPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.utils.importVm" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { utils: { importVm: {
picker: { items: StringItem[] }
flow: { nodes: FlowNode[] }
ovf: { rows: OvfRow[] }
dialog: { items: StringItem[] }
diskLoop: { items: StringItem[] }
postImport: { rows: PostRow[] }
notImported: { items: StringItem[] }
related: { items: RelatedItem[] }
} } }
}
const block = messages.docs.utils.importVm
const pickerItems = block.picker.items
const flowNodes = block.flow.nodes
const ovfRows = block.ovf.rows
const dialogItems = block.dialog.items
const diskLoopItems = block.diskLoop.items
const postRows = block.postImport.rows
const notImportedItems = block.notImported.items
const relatedItems = block.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={6}
scriptPath="utilities/import_vm_ova_ovf.sh"
/>
<Callout variant="info" title={t("intro.title")}>
{t("intro.body")}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("picker.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("picker.intro")}</p>
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{pickerItems.map((_, idx) => (
<li key={idx}>{t.rich(`picker.items.${idx}`, { code })}</li>
))}
</ul>
<p className="mb-6 text-gray-800 leading-relaxed">{t.rich("picker.outro", { code })}</p>
<Image
src="/utils/import-vm-picker.png"
alt={t("picker.imageAlt")}
width={900}
height={500}
className="rounded shadow-lg my-6"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("flow.heading")}</h2>
<DataFlowDiagram
nodes={flowNodes.map((n) => ({ label: n.label, detail: n.detail, variant: n.variant }))}
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("ovf.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("ovf.intro", { code, strong })}</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("ovf.headerField")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("ovf.headerSource")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("ovf.headerDefault")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{ovfRows.map((row, idx) => (
<tr key={idx} className={idx < ovfRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.field}</strong></td>
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs">{row.source}</td>
<td className="px-3 py-2 align-top">{row.default}</td>
</tr>
))}
</tbody>
</table>
</div>
<Callout variant="warning" title={t("memWarn.title")}>
{t.rich("memWarn.body", { code, strong, em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("dialog.heading")}</h2>
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-2">
{dialogItems.map((_, idx) => (
<li key={idx}>{t.rich(`dialog.items.${idx}`, { code, strong })}</li>
))}
</ol>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("create.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("create.intro")}</p>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("create.code") as string}</pre>
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">{t.rich("create.outro", { code })}</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("diskLoop.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("diskLoop.intro")}</p>
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{diskLoopItems.map((_, idx) => (
<li key={idx}>{t.rich(`diskLoop.items.${idx}`, { code })}</li>
))}
</ol>
<p className="mb-6 text-gray-800 leading-relaxed">{t.rich("diskLoop.outro", { code })}</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("postImport.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("postImport.intro")}</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("postImport.headerSetting")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("postImport.headerDefault")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("postImport.headerRecommended")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{postRows.map((row, idx) => (
<tr key={idx} className={idx < postRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.setting}</strong></td>
<td className="px-3 py-2 align-top">{row.default}</td>
<td className="px-3 py-2 align-top">
{row.recommendedRich
? t.rich(`postImport.rows.${idx}.recommendedRich`, { code })
: row.recommended}
</td>
</tr>
))}
</tbody>
</table>
</div>
<Callout variant="warning" title={t("fwWarn.title")}>
{t.rich("fwWarn.body", { code, em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("notImported.heading")}</h2>
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{notImportedItems.map((_, idx) => (
<li key={idx}>{t.rich(`notImported.items.${idx}`, { strong })}</li>
))}
</ul>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
<Callout variant="troubleshoot" title={t("troubleshoot.orphanTitle")}>
{t("troubleshoot.orphanIntro")}
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{t.raw("troubleshoot.orphanCode") as string}</pre>
{t("troubleshoot.orphanOutro")}
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.memTitle")}>
{t("troubleshoot.memIntro")}
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{t.raw("troubleshoot.memCode") as string}</pre>
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.bootTitle")}>
{t("troubleshoot.bootIntro")}
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{t.raw("troubleshoot.bootCode") as string}</pre>
{t("troubleshoot.bootOutro")}
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.bsodTitle")}>
{t.rich("troubleshoot.bsodBody", { code, em })}
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.zeroTitle")}>
{t.rich("troubleshoot.zeroBody", { code })}
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.awkTitle")}>
{t.rich("troubleshoot.awkIntro", { code })}
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{t.raw("troubleshoot.awkCode") as string}</pre>
{t("troubleshoot.awkOutro")}
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.netTitle")}>
{t.rich("troubleshoot.netBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("files.heading")}</h2>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("files.code") as string}</pre>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item, idx) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { code }) : item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,253 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import Image from "next/image"
import {
ArrowRight,
Disc,
Package,
RefreshCw,
ArrowUpCircle,
Upload,
Download,
Wrench,
Boxes,
ArrowLeftRight,
} from "lucide-react"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.utils.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"proxmox utilities",
"proxmox update",
"pve 8 to 9 upgrade",
"pve9 upgrade",
"proxmox ova export",
"proxmox ovf import",
"uup dump proxmox",
"windows iso proxmox",
"vmware to proxmox",
"virtualbox to proxmox",
],
alternates: { canonical: "https://proxmenux.com/docs/utils" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/utils",
},
twitter: {
card: "summary",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type StringItem = string
type OptionItem = { title: string; description: string; href: string }
interface OptionProps {
title: string
description: string
Icon: React.ComponentType<{ className?: string; "aria-hidden"?: boolean }>
href: string
}
function OptionCard({ title, description, Icon, href }: OptionProps) {
return (
<Link
href={href}
className="group flex items-start gap-3 rounded-md border border-gray-200 bg-white p-3 transition-colors hover:border-blue-400 hover:bg-blue-50"
>
<span className="inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md bg-gray-100 text-gray-600 group-hover:bg-blue-100 group-hover:text-blue-700">
<Icon className="h-4 w-4" aria-hidden />
</span>
<div className="min-w-0 flex-1">
<div className="flex items-center gap-1 text-sm font-medium text-gray-900 group-hover:text-blue-700">
{title}
<ArrowRight className="h-3.5 w-3.5 text-gray-400 group-hover:text-blue-600 transition-transform group-hover:translate-x-0.5" />
</div>
<div className="mt-0.5 text-xs text-gray-600 leading-snug">{description}</div>
</div>
</Link>
)
}
export default async function UtilitiesOverviewPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.utils" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { utils: {
groups: {
iso: { bullets: StringItem[] }
maintenance: { bullets: StringItem[] }
portability: { bullets: StringItem[] }
}
isoSection: { options: OptionItem[] }
maintenanceSection: { options: OptionItem[] }
portabilitySection: { options: OptionItem[] }
} }
}
const block = messages.docs.utils
const isoBullets = block.groups.iso.bullets
const maintBullets = block.groups.maintenance.bullets
const portBullets = block.groups.portability.bullets
const isoOptions = block.isoSection.options
const maintOptions = block.maintenanceSection.options
const portOptions = block.portabilitySection.options
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const isoIcons: React.ComponentType<{ className?: string; "aria-hidden"?: boolean }>[] = [Disc]
const maintIcons: React.ComponentType<{ className?: string; "aria-hidden"?: boolean }>[] = [Package, RefreshCw, ArrowUpCircle]
const portIcons: React.ComponentType<{ className?: string; "aria-hidden"?: boolean }>[] = [Upload, Download]
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={5}
scriptPath="menus/utilities_menu.sh"
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("opening.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("opening.body", { strong })}</p>
<Image
src="/utils/utilities-menu.png"
alt={t("opening.imageAlt")}
width={900}
height={500}
className="rounded shadow-lg my-6"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("groups.heading")}</h2>
<p className="mb-6 text-gray-800 leading-relaxed">{t("groups.intro")}</p>
<div className="grid gap-4 md:grid-cols-1 lg:grid-cols-3 mb-8 not-prose">
<a
href="#iso"
className="rounded-lg border-2 border-blue-300 bg-blue-50 p-5 flex flex-col transition-shadow hover:shadow-md"
>
<div className="flex items-center gap-3 mb-3">
<span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-blue-100 text-blue-700">
<Disc className="h-5 w-5" aria-hidden />
</span>
<h3 className="text-lg font-semibold text-gray-900 m-0">{t("groups.iso.title")}</h3>
</div>
<p className="text-sm text-gray-800 mb-3">{t("groups.iso.body")}</p>
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
{isoBullets.map((_, idx) => (
<li key={idx}>{t(`groups.iso.bullets.${idx}`)}</li>
))}
</ul>
</a>
<a
href="#maintenance"
className="rounded-lg border-2 border-emerald-300 bg-emerald-50 p-5 flex flex-col transition-shadow hover:shadow-md"
>
<div className="flex items-center gap-3 mb-3">
<span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-emerald-100 text-emerald-700">
<Wrench className="h-5 w-5" aria-hidden />
</span>
<h3 className="text-lg font-semibold text-gray-900 m-0">{t("groups.maintenance.title")}</h3>
</div>
<p className="text-sm text-gray-800 mb-3">{t("groups.maintenance.body")}</p>
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
{maintBullets.map((_, idx) => (
<li key={idx}>{t(`groups.maintenance.bullets.${idx}`)}</li>
))}
</ul>
</a>
<a
href="#portability"
className="rounded-lg border-2 border-amber-300 bg-amber-50 p-5 flex flex-col transition-shadow hover:shadow-md"
>
<div className="flex items-center gap-3 mb-3">
<span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-amber-100 text-amber-700">
<ArrowLeftRight className="h-5 w-5" aria-hidden />
</span>
<h3 className="text-lg font-semibold text-gray-900 m-0">{t("groups.portability.title")}</h3>
</div>
<p className="text-sm text-gray-800 mb-3">{t("groups.portability.body")}</p>
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
{portBullets.map((_, idx) => (
<li key={idx}>{t(`groups.portability.bullets.${idx}`)}</li>
))}
</ul>
</a>
</div>
<Callout variant="warning" title={t("upgradeWarn.title")}>
{t.rich("upgradeWarn.body", { strong })}
</Callout>
<h2 id="iso" className="text-2xl font-semibold mt-10 mb-4 text-gray-900 scroll-mt-24">
{t("isoSection.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("isoSection.body", { code })}</p>
<div className="grid gap-3 md:grid-cols-2 mb-8 not-prose">
{isoOptions.map((o, idx) => (
<OptionCard key={o.href} {...o} Icon={isoIcons[idx]} />
))}
</div>
<h2 id="maintenance" className="text-2xl font-semibold mt-10 mb-4 text-gray-900 scroll-mt-24">
{t("maintenanceSection.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("maintenanceSection.body", { strong })}</p>
<div className="grid gap-3 md:grid-cols-2 mb-8 not-prose">
{maintOptions.map((o, idx) => (
<OptionCard key={o.href} {...o} Icon={maintIcons[idx]} />
))}
</div>
<h2 id="portability" className="text-2xl font-semibold mt-10 mb-4 text-gray-900 scroll-mt-24">
{t("portabilitySection.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("portabilitySection.body")}</p>
<div className="grid gap-3 md:grid-cols-2 mb-8 not-prose">
{portOptions.map((o, idx) => (
<OptionCard key={o.href} {...o} Icon={portIcons[idx]} />
))}
</div>
<Callout variant="info" title={t("diskSpaceCallout.title")}>
{t.rich("diskSpaceCallout.body", { code, strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
<Boxes className="inline h-5 w-5 mr-1 -mt-1 text-gray-700" aria-hidden />
{t("fitsTogether.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("fitsTogether.body", { code, em })}</p>
</div>
)
}

View File

@@ -0,0 +1,221 @@
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"
import { DataFlowDiagram } from "@/components/ui/data-flow-diagram"
import CopyableCode from "@/components/CopyableCode"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.utils.systemUpdate.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-update",
},
}
}
type StringItem = string
type TroubleItem = { title: string; body: string }
type RelatedItem = { href: string; label: string; tail?: string }
export default async function SystemUpdatePage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.utils.systemUpdate" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { utils: { systemUpdate: {
onTop: { items: StringItem[] }
worker: { items: StringItem[] }
post: { items: StringItem[] }
noSub: { items: StringItem[] }
doesnt: { items: StringItem[] }
troubleshooting: { items: TroubleItem[] }
related: { items: RelatedItem[] }
} } }
}
const block = messages.docs.utils.systemUpdate
const onTopItems = block.onTop.items
const workerItems = block.worker.items
const postItems = block.post.items
const noSubItems = block.noSub.items
const doesntItems = block.doesnt.items
const troubleItems = block.troubleshooting.items
const relatedItems = block.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const kbd = (chunks: React.ReactNode) => <kbd>{chunks}</kbd>
const linkUpgrade = (chunks: React.ReactNode) => (
<Link href="/docs/utils/upgrade-pve8-pve9" className="text-blue-700 hover:underline">{chunks}</Link>
)
const linkUpgrade2 = (chunks: React.ReactNode) => (
<Link href="/docs/utils/upgrade-pve8-pve9" className="text-blue-600 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={5}
scriptPath="utilities/proxmox_update.sh"
/>
<Callout variant="info" title={t("calloutWhat.title")}>
{t.rich("calloutWhat.body", { strong, link: linkUpgrade })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("official.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("official.intro")}</p>
<CopyableCode code={t.raw("official.code") as string} language="bash" />
<p className="mb-4 text-gray-800 leading-relaxed">{t("official.outro")}</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("onTop.heading")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("onTop.intro", { strong, code })}
</p>
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{onTopItems.map((_, idx) => (
<li key={idx}>{t.rich(`onTop.items.${idx}`, { strong, code })}</li>
))}
</ul>
<Callout variant="info" title={t("calloutOneSentence.title")}>
{t("calloutOneSentence.body")}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("confirm.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("confirm.intro")}</p>
<Image
src="/utils/system-update-confirm.png"
alt={t("confirm.imageAlt")}
width={900}
height={500}
className="rounded shadow-lg my-6"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("routes.heading")}</h2>
<DataFlowDiagram
nodes={[
{
label: t("routes.nodes.source.label"),
detail: t("routes.nodes.source.detail"),
variant: "source",
},
{
label: t("routes.nodes.bridge.label"),
detail: t("routes.nodes.bridge.detail"),
variant: "bridge",
},
{
label: t("routes.nodes.target.label"),
detail: t("routes.nodes.target.detail"),
variant: "target",
},
]}
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("worker.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("worker.intro", { code })}
</p>
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-2">
{workerItems.map((_, idx) => (
<li key={idx}>{t.rich(`worker.items.${idx}`, { strong, code })}</li>
))}
</ol>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("post.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("post.intro")}</p>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("post.code") as string}</pre>
<p className="mt-4 mb-4 text-gray-800 leading-relaxed">{t("post.afterCode")}</p>
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{postItems.map((_, idx) => (
<li key={idx}>{t.rich(`post.items.${idx}`, { code })}</li>
))}
</ul>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("post.outro", { em })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("end.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("end.intro")}</p>
<Image
src="/utils/system-update-result.png"
alt={t("end.imageAlt")}
width={900}
height={500}
className="rounded shadow-lg my-6"
/>
<Callout variant="warning" title={t("calloutDeclineReboot.title")}>
{t.rich("calloutDeclineReboot.body", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("noSub.heading")}</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("noSub.intro", { code })}
</p>
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{noSubItems.map((_, idx) => (
<li key={idx}>{t.rich(`noSub.items.${idx}`, { code })}</li>
))}
</ol>
<p className="mb-6 text-gray-800 leading-relaxed">{t("noSub.outro")}</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("cluster.heading")}</h2>
<Callout variant="warning" title={t("cluster.calloutTitle")}>
{t.rich("cluster.calloutBody", { strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("doesnt.heading")}</h2>
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{doesntItems.map((_, idx) => (
<li key={idx}>{t.rich(`doesnt.items.${idx}`, { strong, link: linkUpgrade2 })}</li>
))}
</ul>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshooting.heading")}</h2>
{troubleItems.map((_, idx) => (
<Callout key={idx} variant="troubleshoot" title={t(`troubleshooting.items.${idx}.title`)}>
{t.rich(`troubleshooting.items.${idx}.body`, { code, kbd })}
</Callout>
))}
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("files.heading")}</h2>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("files.code") as string}</pre>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item, idx) => (
<li key={idx}>
<Link href={item.href} className="text-blue-600 hover:underline">{item.label}</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,187 @@
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<Metadata> {
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) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const kbd = (chunks: React.ReactNode) => <kbd>{chunks}</kbd>
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={4}
scriptPath="utilities/system_utils.sh"
/>
<Callout variant="info" title={t("info.title")}>
{t.rich("info.body", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("opening.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("opening.intro", { strong })}
</p>
<Image
src="/utils/system-utils-menu.png"
alt={t("opening.imageAlt")}
width={900}
height={500}
className="rounded shadow-lg my-6"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("actions.heading")}</h2>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("actions.headerOption")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("actions.headerBehaviour")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{actionRows.map((row, idx) => (
<tr key={idx} className={idx < actionRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.option}</strong></td>
<td className="px-3 py-2 align-top">{t.rich(`actions.rows.${idx}.behaviourRich`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("packages.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("packages.intro", { code })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("packages.headerPackage")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("packages.headerVerify")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("packages.headerDescription")}</th>
</tr>
</thead>
<tbody className="text-gray-800 [&>tr>td]:px-3 [&>tr>td]:py-2 [&>tr>td]:align-top [&>tr>td:nth-child(-n+2)]:whitespace-nowrap [&>tr>td:nth-child(-n+2)]:font-mono [&>tr>td:nth-child(-n+2)]:text-xs">
{packageRows.map((row, idx) => (
<tr key={idx} className={idx < packageRows.length - 1 ? "border-b border-gray-100" : ""}>
<td>{row.package}</td>
<td>{row.verify}</td>
<td>{row.description}</td>
</tr>
))}
</tbody>
</table>
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("howItWorks.heading")}</h2>
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{howItems.map((_, idx) => (
<li key={idx}>{t.rich(`howItWorks.items.${idx}`, { code })}</li>
))}
<li>
{t.rich("howItWorks.verifyIntro", { code })}
<ul className="list-disc pl-6 mt-1 space-y-1">
{verifyOutcomes.map((_, idx) => (
<li key={idx}>{t.rich(`howItWorks.verifyOutcomes.${idx}`, { strong, em })}</li>
))}
</ul>
</li>
<li>{t.rich("howItWorks.summary", { em })}</li>
</ol>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("verify.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("verify.intro", { code })}
</p>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("verify.code") as string}</pre>
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">
{t.rich("verify.outro", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
<Callout variant="troubleshoot" title={t("troubleshoot.reposTitle")}>
{t.rich("troubleshoot.reposBody", { code })}
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.warningsTitle")}>
{t.rich("troubleshoot.warningsBody", { code })}
</Callout>
<Callout variant="troubleshoot" title={t("troubleshoot.hangsTitle")}>
{t.rich("troubleshoot.hangsBody", { code, kbd })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("files.heading")}</h2>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("files.code") as string}</pre>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item, idx) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { code }) : null}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,475 @@
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<Metadata> {
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) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const kbd = (chunks: React.ReactNode) => <kbd>{chunks}</kbd>
const autolink = (chunks: React.ReactNode) => (
<Link href="#auto" className="text-blue-600 hover:underline">
{chunks}
</Link>
)
const dpkglink = (chunks: React.ReactNode) => (
<Link href="#dpkg-prompts" className="text-blue-700 hover:underline">
{chunks}
</Link>
)
const netlink = (chunks: React.ReactNode) => (
<Link href="/docs/network/persistent-names" className="text-blue-600 hover:underline">
{chunks}
</Link>
)
const wikilink = (chunks: React.ReactNode) => (
<a
href="https://pve.proxmox.com/wiki/Upgrade_from_8_to_9"
target="_blank"
rel="noopener noreferrer"
className="text-blue-600 hover:underline inline-flex items-center gap-1"
>
{chunks}
<ExternalLink className="w-3 h-3" />
</a>
)
const cephlink = (chunks: React.ReactNode) => (
<a
href="https://pve.proxmox.com/wiki/Ceph_Squid"
target="_blank"
rel="noopener noreferrer"
className="text-blue-700 hover:underline inline-flex items-center gap-1"
>
{chunks}
<ExternalLink className="w-3 h-3" />
</a>
)
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={20}
scriptPath="utilities/upgrade_pve8_to_pve9.sh"
/>
<Callout variant="danger" title={t("dangerCallout.title")}>
{t.rich("dangerCallout.intro", { strong })}
<ul className="list-disc pl-6 mt-2 mb-0 space-y-1">
{dangerItems.map((_, idx) => (
<li key={idx}>{t.rich(`dangerCallout.items.${idx}`, { strong })}</li>
))}
</ul>
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("modeMenu.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("modeMenu.intro", { em })}
</p>
<Image
src="/utils/upgrade-pve8-pve9-menu.png"
alt={t("modeMenu.imageAlt")}
width={900}
height={500}
className="rounded shadow-lg my-6"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("threeWays.heading")}</h2>
<p className="mb-6 text-gray-800 leading-relaxed">
{t.rich("threeWays.intro", { code })}
</p>
<div className="grid gap-4 md:grid-cols-1 lg:grid-cols-3 mb-8 not-prose">
<a
href="#auto"
className="rounded-lg border-2 border-emerald-300 bg-emerald-50 p-5 flex flex-col transition-shadow hover:shadow-md"
>
<div className="flex items-center gap-3 mb-3">
<span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-emerald-100 text-emerald-700">
<Zap className="h-5 w-5" aria-hidden />
</span>
<h3 className="text-lg font-semibold text-gray-900 m-0">{t("threeWays.auto.title")}</h3>
</div>
<p className="text-sm text-gray-800 mb-3">
{t.rich("threeWays.auto.summary", { code, strong })}
</p>
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
{autoCardItems.map((_, idx) => (
<li key={idx}>{t.rich(`threeWays.auto.items.${idx}`, { code, strong })}</li>
))}
</ul>
</a>
<a
href="#interactive"
className="rounded-lg border-2 border-amber-300 bg-amber-50 p-5 flex flex-col transition-shadow hover:shadow-md"
>
<div className="flex items-center gap-3 mb-3">
<span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-amber-100 text-amber-700">
<MessageSquare className="h-5 w-5" aria-hidden />
</span>
<h3 className="text-lg font-semibold text-gray-900 m-0">{t("threeWays.interactive.title")}</h3>
</div>
<p className="text-sm text-gray-800 mb-3">
{t("threeWays.interactive.summary")}
</p>
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
{interactiveCardItems.map((_, idx) => (
<li key={idx}>{t.rich(`threeWays.interactive.items.${idx}`, { code })}</li>
))}
</ul>
</a>
<a
href="#manual"
className="rounded-lg border-2 border-blue-300 bg-blue-50 p-5 flex flex-col transition-shadow hover:shadow-md"
>
<div className="flex items-center gap-3 mb-3">
<span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-blue-100 text-blue-700">
<BookOpen className="h-5 w-5" aria-hidden />
</span>
<h3 className="text-lg font-semibold text-gray-900 m-0">{t("threeWays.manual.title")}</h3>
</div>
<p className="text-sm text-gray-800 mb-3">
{t("threeWays.manual.summary")}
</p>
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
{manualCardItems.map((_, idx) => (
<li key={idx}>{t(`threeWays.manual.items.${idx}`)}</li>
))}
</ul>
</a>
</div>
<Callout variant="info" title={t("precheckCallout.title")}>
{t.rich("precheckCallout.body", { code, strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("webTerminal.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("webTerminal.body", { code })}
</p>
<Callout variant="warning" title={t("webTerminal.warningTitle")}>
{t.rich("webTerminal.warningBody", { code })}
</Callout>
<h2 id="auto" className="text-2xl font-semibold mt-10 mb-4 text-gray-900 scroll-mt-24">
{t("auto.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("auto.intro")}
</p>
<h3 className="text-xl font-semibold mt-6 mb-3 text-gray-900">{t("auto.behaviourHeading")}</h3>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("auto.behaviourTable.settingHeader")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("auto.behaviourTable.effectHeader")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{behaviourRows.map((_, idx) => (
<tr key={idx} className={idx < behaviourRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap">
{t.rich(`auto.behaviourTable.rows.${idx}.settingRich`, { code })}
</td>
<td className="px-3 py-2 align-top">
{t.rich(`auto.behaviourTable.rows.${idx}.effectRich`, { strong })}
</td>
</tr>
))}
</tbody>
</table>
</div>
<h3 className="text-xl font-semibold mt-8 mb-3 text-gray-900">{t("auto.flowHeading")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("auto.flowIntro", { code })}
</p>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-900 leading-relaxed border border-gray-200 whitespace-pre">{t.raw("auto.flowDiagram") as string}</pre>
<h3 className="text-xl font-semibold mt-8 mb-3 text-gray-900">{t("auto.preflightHeading")}</h3>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("auto.preflightTable.checkHeader")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("auto.preflightTable.whyHeader")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{preflightRows.map((_, idx) => (
<tr key={idx} className={idx < preflightRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top whitespace-nowrap">
{t.rich(`auto.preflightTable.rows.${idx}.checkRich`, { strong })}
</td>
<td className="px-3 py-2 align-top">
{t.rich(`auto.preflightTable.rows.${idx}.whyRich`, { code })}
</td>
</tr>
))}
</tbody>
</table>
</div>
<h3 className="text-xl font-semibold mt-8 mb-3 text-gray-900">{t("auto.distUpgradeHeading")}</h3>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("auto.distUpgradeCode") as string}</pre>
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">
{t.rich("auto.distUpgradeOutro", { code })}
</p>
<h3 className="text-xl font-semibold mt-8 mb-3 text-gray-900">{t("auto.postHeading")}</h3>
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{postItems.map((_, idx) => (
<li key={idx}>{t.rich(`auto.postItems.${idx}`, { code, strong })}</li>
))}
</ol>
<h2 id="interactive" className="text-2xl font-semibold mt-10 mb-4 text-gray-900 scroll-mt-24">
{t("interactive.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("interactive.intro", { code, strong, autolink })}
</p>
<h3 className="text-xl font-semibold mt-6 mb-3 text-gray-900">{t("interactive.distUpgradeHeading")}</h3>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("interactive.distUpgradeCode") as string}</pre>
<h3 className="text-xl font-semibold mt-6 mb-3 text-gray-900">{t("interactive.whenHeading")}</h3>
<ul className="list-disc pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
{whenItems.map((_, idx) => (
<li key={idx}>{t.rich(`interactive.whenItems.${idx}`, { code })}</li>
))}
</ul>
<Callout variant="info" title={t("interactive.promptCalloutTitle")}>
{t.rich("interactive.promptCalloutBody", { strong, dpkglink })}
</Callout>
<h2 id="manual" className="text-2xl font-semibold mt-10 mb-4 text-gray-900 scroll-mt-24">
{t("manual.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("manual.intro", { strong, em, wikilink })}
</p>
<Callout variant="warning" title={t("manual.rootCalloutTitle")}>
{t.rich("manual.rootCalloutBody", { code })}
</Callout>
<h3 className="text-xl font-semibold mt-8 mb-3 text-gray-900">{t("manual.phase1Heading")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("manual.phase1Intro")}
</p>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("manual.phase1Code") as string}</pre>
<h3 className="text-xl font-semibold mt-8 mb-3 text-gray-900">{t("manual.phase2Heading")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("manual.phase2Intro", { strong })}
</p>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("manual.phase2Code") as string}</pre>
<h3 className="text-xl font-semibold mt-8 mb-3 text-gray-900">{t("manual.phase3Heading")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("manual.phase3Intro")}
</p>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("manual.phase3Code") as string}</pre>
<h4 id="dpkg-prompts" className="text-lg font-semibold mt-6 mb-3 text-gray-900 scroll-mt-24">
{t("manual.dpkgHeading")}
</h4>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("manual.dpkgIntro", { strong })}
</p>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("manual.dpkgTable.fileHeader")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("manual.dpkgTable.answerHeader")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("manual.dpkgTable.whyHeader")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{dpkgRows.map((row, idx) => (
<tr key={idx} className={idx < dpkgRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className={`px-3 py-2 align-top whitespace-nowrap${row.fileFont ? " font-mono text-xs" : ""}`}>
{t.rich(`manual.dpkgTable.rows.${idx}.fileRich`, { code })}
</td>
<td className="px-3 py-2 align-top whitespace-nowrap">
{t.rich(`manual.dpkgTable.rows.${idx}.answerRich`, { strong, kbd })}
</td>
<td className="px-3 py-2 align-top">
{t(`manual.dpkgTable.rows.${idx}.whyRich`)}
</td>
</tr>
))}
</tbody>
</table>
</div>
<Callout variant="info" title={t("manual.inspectCalloutTitle")}>
{t.rich("manual.inspectCalloutBody", { strong })}
</Callout>
<h3 className="text-xl font-semibold mt-8 mb-3 text-gray-900">{t("manual.phase4Heading")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("manual.phase4Intro", { code })}
</p>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("manual.phase4Code") as string}</pre>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("clusterCeph.heading")}</h2>
<Callout variant="warning" title={t("clusterCeph.clusterCalloutTitle")}>
{t.rich("clusterCeph.clusterCalloutBody", { code, strong })}
</Callout>
<Callout variant="warning" title={t("clusterCeph.cephCalloutTitle")}>
{t.rich("clusterCeph.cephCalloutBody", { code, cephlink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshooting.heading")}</h2>
{troubleItems.map((item, idx) => (
<Callout key={idx} variant="troubleshoot" title={item.title}>
{t.rich(`troubleshooting.items.${idx}.bodyRich`, { code, netlink })}
</Callout>
))}
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("files.heading")}</h2>
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("files.code") as string}</pre>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
<ExternalLink className="inline h-5 w-5 mr-1 -mt-1 text-gray-700" aria-hidden />
{t("references.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("references.intro")}
</p>
<div className="grid gap-3 md:grid-cols-2 mb-6 not-prose">
{refItems.map((item, idx) => (
<a
key={idx}
href={item.href}
target="_blank"
rel="noopener noreferrer"
className="block rounded-md border border-gray-200 bg-white p-4 transition-colors hover:border-blue-400 hover:bg-blue-50"
>
<div className="font-semibold text-gray-900 mb-1 flex items-center gap-1.5">
{t(`references.items.${idx}.title`)}
<ExternalLink className="h-3.5 w-3.5 text-gray-400" aria-hidden />
</div>
<div className="text-xs text-gray-600">{t(`references.items.${idx}.desc`)}</div>
</a>
))}
</div>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
<Youtube className="inline h-5 w-5 mr-1 -mt-1 text-red-600" aria-hidden />
{t("video.heading")}
</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("video.intro")}
</p>
<YouTubeEmbed
videoId="AmpgWHePp18"
title={t("video.title")}
caption={t("video.caption")}
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item, idx) => (
<li key={idx}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}