Files
portfolio/app/components/fenster/getWindowLabels.ts
denshooter 9e6ae866d0
CI / CD / test-build (push) Successful in 11m13s
CI / CD / deploy-dev (push) Successful in 2m25s
CI / CD / deploy-production (push) Has been skipped
feat: plakat redesign phase 4 (chat window, contact, footer, cleanup) (#77)
- AI chat moves into a window/sheet, opened from a new speech-bubble card on
  the desk; it now respects the chatbot consent and asks before sending
  anything to n8n (previously it ignored the consent)
- Contact as red poster section with big mail address and the form on a paper
  card; validation errors are finally shown inline (aria-invalid, role=alert)
- Footer as ink strip with dk0 wordmark, legal links and a button to reopen
  the privacy settings
- "About me" in the header opens the about window on the home page
- Remove the old About section and its parts (BentoChat, ActivityFeed,
  CurrentlyReading, ReadBooks), the unused ChatWidget, Projects and BentoGrid,
  their tests, wrappers, loaders, types and texts
- scripts/directus-cleanup-redesign.mjs: dry run by default, --apply archives
  hobbies, tech stack categories and old content pages and deletes four
  unused message overrides after a full JSON backup; run only after the
  redesign is live on production

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:49:56 +02:00

67 lines
2.0 KiB
TypeScript

import { getTranslations } from "next-intl/server";
import type { WindowLabels } from "./types";
/** Alle Texte für Fenster und Sheets, serverseitig geladen und als Props weitergereicht. */
export async function getWindowLabels(locale: string): Promise<WindowLabels> {
const t = await getTranslations({ locale, namespace: "home.windows" });
const tisch = await getTranslations({ locale, namespace: "home.tisch" });
return {
close: t("close"),
minimize: t("minimize"),
openWindows: t("openWindows"),
projectPage: t("projectPage"),
source: t("source"),
live: t("live"),
stack: t("stack"),
year: t("year"),
now: {
title: t("now.title"),
days: t("now.days"),
rows: (["study", "work", "side"] as const).map((k) => ({ label: t(`now.${k}.label`), text: t(`now.${k}.text`) })),
},
server: {
title: t("server.title"),
headline: t("server.headline"),
rows: (["ingress", "mail", "home"] as const).map((k) => ({
name: tisch(`servers.${k}.name`),
detail: tisch(`servers.${k}.detail`),
})),
note: tisch("serverNote"),
},
read: {
title: t("read.title"),
progress: t("read.progress"),
empty: t("read.empty"),
library: t("read.library"),
libraryHref: `/${locale}/books`,
},
about: {
title: t("about.title"),
paragraphs: [t("about.p1"), t("about.p2")],
facts: (["laptop", "pc", "study", "languages"] as const).map((k) => ({
label: t(`about.facts.${k}.label`),
value: t(`about.facts.${k}.value`),
})),
},
chat: {
title: t("chat.title"),
welcome: t("chat.welcome"),
consent: t("chat.consent"),
allow: t("chat.allow"),
placeholder: t("chat.placeholder"),
send: t("chat.send"),
error: t("chat.error"),
thinking: t("chat.thinking"),
note: t("chat.note"),
},
contact: {
title: t("contact.title"),
body: t("contact.body"),
copy: t("contact.copy"),
copied: t("contact.copied"),
form: t("contact.form"),
},
};
}