skillguard/artifacts/skillguard/src/pages/haftungsausschluss.tsx
amertensreplit 2236ad179d Add DE/EN/ES multilingual support to SkillGuard (Task #49)
German is source of truth; EN/ES fully translated with no German residue.
Auto-detects browser language (fallback German), persists choice, language
switcher on all pages, localized formats/Clerk/legal. Scans store their language.

Backend (T001-T003): language column on scans, openapi+codegen, ruleCatalogI18n,
language threaded scans route -> analyzeSkill -> runStaticRule -> AI calls.
Route/AI error messages localized via expanded i18n MESSAGES + reqLang(req)
(?lang query -> Accept-Language header -> "de"). No German left in routes.

Frontend (T004-T005): react-i18next framework, LanguageSwitcher, locale-aware
format.ts, Clerk localizations. All page/component strings externalized to
de/en/es locale area files across catalog, education, scan form/report/compare,
history, dashboard, admin, legal pages.

T006 verification + review-fix follow-up (this session):
- Applied formatNumber to all visible metrics in scan-report (risk score,
  severity counts, security/privacy) and scan-compare (risk score, file count,
  diff counts); PDF/HTML export numbers formatted via Intl.NumberFormat(lng).
- Fixed leftover `@workspace/n` import alias in i18n/index.ts -> real package
  `@workspace/api-client-react` (was failing workspace typecheck).
- Verified: full `pnpm run typecheck` green; api-server tests 72/72 pass;
  curl confirms localized error responses (de/en/es) on scans route.

Deviations: AI connection-test prompts left in German intentionally (sent to
the model, not user-facing). proposeFollowUpTasks already created #52.

Replit-Task-Id: 9f137230-db11-45dc-9276-4e5cbcceff03
2026-06-13 09:05:57 +00:00

44 lines
1.5 KiB
TypeScript

import { Card, CardContent } from "@/components/ui/card";
import { ShieldAlert } from "lucide-react";
import { useTranslation } from "react-i18next";
export default function Haftungsausschluss() {
const { t } = useTranslation();
return (
<div className="space-y-6 pb-12">
<div className="flex flex-col gap-2">
<h1 className="text-3xl font-bold tracking-tight flex items-center gap-3">
<ShieldAlert className="w-7 h-7 text-sidebar-primary" />
{t("legal.haftung.title")}
</h1>
</div>
<Card>
<CardContent className="pt-6 space-y-8 text-sm leading-relaxed">
<section className="space-y-2">
<h2 className="font-semibold text-foreground text-base">
{t("legal.haftung.noGuarantee.heading")}
</h2>
<p>{t("legal.haftung.noGuarantee.p1")}</p>
<p>{t("legal.haftung.noGuarantee.p2")}</p>
</section>
<section className="space-y-2">
<h2 className="font-semibold text-foreground text-base">
{t("legal.haftung.ownResponsibility.heading")}
</h2>
<p>{t("legal.haftung.ownResponsibility.p1")}</p>
</section>
<section className="space-y-2">
<h2 className="font-semibold text-foreground text-base">
{t("legal.haftung.limitation.heading")}
</h2>
<p>{t("legal.haftung.limitation.p1")}</p>
</section>
</CardContent>
</Card>
</div>
);
}