mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-06-14 12:27:02 +00:00
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:
@@ -3,10 +3,20 @@
|
||||
import { Rss, Copy, Check } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
import { useState } from "react"
|
||||
import { useLocale, useTranslations } from "next-intl"
|
||||
|
||||
export default function RSSLink() {
|
||||
const [copied, setCopied] = useState(false)
|
||||
const rssUrl = "https://proxmenux.com/rss.xml"
|
||||
const locale = useLocale()
|
||||
const t = useTranslations("rssLink")
|
||||
|
||||
// English keeps the existing root /rss.xml endpoint for backwards
|
||||
// compatibility with existing subscribers; other locales use the
|
||||
// per-locale feed served from app/[locale]/rss.xml/route.ts.
|
||||
const rssUrl =
|
||||
locale === "en"
|
||||
? "https://proxmenux.com/rss.xml"
|
||||
: `https://proxmenux.com/${locale}/rss.xml`
|
||||
|
||||
const copyToClipboard = async () => {
|
||||
try {
|
||||
@@ -22,11 +32,10 @@ export default function RSSLink() {
|
||||
<div className="mb-8 p-4 bg-orange-50 border border-orange-200 rounded-lg">
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<h3 className="text-lg font-semibold text-orange-900 mb-1">Stay Updated!</h3>
|
||||
<p className="text-orange-700 text-sm">Subscribe to our RSS feed to get notified of new changes.</p>
|
||||
<h3 className="text-lg font-semibold text-orange-900 mb-1">{t("heading")}</h3>
|
||||
<p className="text-orange-700 text-sm">{t("body")}</p>
|
||||
</div>
|
||||
|
||||
{/* RSS URL and buttons - Responsive layout */}
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<code className="bg-orange-100 text-orange-800 px-2 py-1 rounded text-xs flex-1 min-w-0 truncate">
|
||||
@@ -35,10 +44,10 @@ export default function RSSLink() {
|
||||
<button
|
||||
onClick={copyToClipboard}
|
||||
className="flex items-center gap-1 px-2 py-1 bg-gray-600 text-white rounded hover:bg-gray-700 transition-colors text-xs whitespace-nowrap"
|
||||
title="Copy RSS URL"
|
||||
title={t("copyTitle")}
|
||||
>
|
||||
{copied ? <Check className="h-3 w-3" /> : <Copy className="h-3 w-3" />}
|
||||
<span className="hidden sm:inline">{copied ? "Copied!" : "Copy"}</span>
|
||||
<span className="hidden sm:inline">{copied ? t("copied") : t("copy")}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -47,10 +56,10 @@ export default function RSSLink() {
|
||||
className="inline-flex items-center justify-center space-x-2 px-4 py-2 bg-orange-600 text-white rounded-lg hover:bg-orange-700 transition-colors w-full sm:w-auto"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
title="Open RSS Feed"
|
||||
title={t("openTitle")}
|
||||
>
|
||||
<Rss className="h-4 w-4" />
|
||||
<span>Open RSS Feed</span>
|
||||
<span>{t("openFeed")}</span>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user