From d56dabc13a5743570eeb45a2ca41c8f0170eca4e Mon Sep 17 00:00:00 2001 From: g-but <41178744+g-but@users.noreply.github.com> Date: Wed, 22 Apr 2026 16:03:46 +0200 Subject: [PATCH] fix(i18n): wire services catalog to translations across all 7 locales MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - services/data.ts: strip all hardcoded German strings; add ServiceConfig with key + categoryKey fields. Service type becomes ServiceConfig + translated fields, built at runtime in page.tsx. - services/page.tsx: use useTranslations('services.catalog') + .raw() to hydrate services from translations; build filter labels from services.page translations; schemaType now uses actual translated service titles. - FilterableSection: add 'use client' and useTranslations('common') to eliminate hardcoded "Alle" allLabel, "Filter zurücksetzen" reset button, and "{n} von {m} Ergebnissen" results count. - messages/*.json (all 7 locales): add services.catalog.{computerRepair, dataRecovery, hardwareRecycling, webDesign, linuxOpenSource, openSourceSolutions, buildYourComputer} with title/description/features/ highlight/pricing; add services.page.categoryLabels + filterByCategory; add common.resetFilters + common.resultsCount. Co-Authored-By: Claude Sonnet 4.6 --- docs/DESIGN_AUDIT.md | 206 ++++++++++++++++++++++++ messages/de.json | 99 +++++++++++- messages/en.json | 99 +++++++++++- messages/es.json | 99 +++++++++++- messages/fr.json | 99 +++++++++++- messages/it.json | 99 +++++++++++- messages/ja.json | 99 +++++++++++- messages/ko.json | 99 +++++++++++- src/app/[locale]/services/data.ts | 163 +++++++------------ src/app/[locale]/services/page.tsx | 47 ++++-- src/components/ui/FilterableSection.tsx | 25 ++- 11 files changed, 998 insertions(+), 136 deletions(-) create mode 100644 docs/DESIGN_AUDIT.md diff --git a/docs/DESIGN_AUDIT.md b/docs/DESIGN_AUDIT.md new file mode 100644 index 000000000..b424231f0 --- /dev/null +++ b/docs/DESIGN_AUDIT.md @@ -0,0 +1,206 @@ +# Design Audit Report + +**Date**: 2026-04-21 +**Branch**: main +**Commit**: 0f5c3ffa + +--- + +## Executive Summary + +The codebase has a well-designed *design system* that is largely unused. `tailwind.config.ts` defines a proper semantic token layer (primary/secondary/neutral palettes, status colors), `src/lib/design/tokens.ts` defines button themes and gradients, and reusable `Button`, `Card`, `Badge` components exist in `src/components/ui/`. None of these are used on the homepage — every button, card, and color is manually inlined in JSX. + +The result: the homepage looks inconsistent because it *is* inconsistent. Three different secondary button styles exist side by side. Card radii vary. Colors mix configured semantic tokens with raw Tailwind defaults (emerald, blue, purple) that have no definition in the theme. The footer has a WCAG AA contrast failure. The design system is a SSOT violation waiting to be fixed. + +Information hierarchy is structurally correct (h1 → h2 → h3, mobile-first, max-w containers), but section 2 has six CTAs in one view and the social proof section has no heading — both weaken the visual rhythm. + +--- + +## Health Scores + +| Area | Score | Notes | +|------|-------|-------| +| Design Token SSOT | 3/10 | Tokens defined, almost never used | +| Typography | 5/10 | Heading scale exists; body copy has no scale | +| Color System | 4/10 | Palette defined; raw colors bypass it everywhere | +| Information Hierarchy | 7/10 | Structurally sound; CTA overload in section 2 | +| Component Consistency | 3/10 | Button/Card components ignored; everything inline | +| Responsive Design | 8/10 | Mobile-first, consistent breakpoints | +| Accessibility | 5/10 | Footer contrast fails WCAG AA; form labels missing | +| **Overall** | **5/10** | Good bones, poor execution | + +--- + +## Critical Issues + +### 1. Footer WCAG AA Contrast Failure +`src/components/layout/footer/Footer.tsx` + +- `text-gray-400` (`#a3a3a3`) on `bg-gray-900` (`#171717`) → contrast ratio ≈ **2.5:1** (WCAG AA requires 4.5:1) +- Lines: gray-400 at ~L82, L111, L144; gray-500 at L85 — all fail +- **Fix:** Replace `text-gray-400` → `text-gray-200`, `text-gray-500` → `text-gray-300` in footer + +### 2. Design Tokens Defined, Never Used +`src/lib/design/tokens.ts`, `tailwind.config.ts` + +The file `src/lib/design/tokens.ts` defines `DESIGN_TOKENS.buttons` (themed button colors for every section) and `DESIGN_TOKENS.gradients` (13 named page gradients). The `tailwind.config.ts` defines `primary` (green), `secondary` (orange), `neutral`, `success`, `warning`, `error`, `info` semantic tokens. + +**What actually happens on the homepage:** +- `src/app/[locale]/page.tsx:122` — `bg-green-600` (raw class, not `bg-primary-600`) +- `src/app/[locale]/page.tsx:160` — `bg-emerald-100` (NOT in tailwind.config.ts at all) +- `src/app/[locale]/page.tsx:275` — `bg-purple-100`, `border-purple-300`, `ring-purple-200` (NOT defined) +- `src/app/[locale]/page.tsx:164` — `bg-emerald-600 hover:bg-emerald-500` on the Repair card button +- PageHero.tsx at L34-38: only component that uses DESIGN_TOKENS — the rest of the codebase ignores it + +**Colors used but not in theme:** emerald (full palette), blue (full palette), purple (full palette) +These resolve to Tailwind's bundled defaults, bypassing the configured palette entirely. + +### 3. Button and Card Components Not Used +`src/components/ui/button.tsx`, `src/components/ui/card.tsx` + +Both components are fully built with variants and sizes. Neither appears on the homepage. Every button is an inline-styled `` or `` tag. Every card is a `
` or `` with hand-rolled classes. + +**Three different "secondary" button styles coexist:** +- Hero secondary: plain `text-base font-semibold text-gray-900` + arrow (`src/app/[locale]/page.tsx:127`) +- Card secondary border style: `border bg-white text-{color}` (`src/app/[locale]/page.tsx:200`) +- Community card: entire card is the link, no button element + +**Two different card border radii:** `rounded-2xl` (action cards) vs `rounded-xl` (community cards) + +### 4. Newsletter Form — No Labels +`src/components/community/NewsletterSignup.tsx` + +Form inputs use placeholder text as the only label. `
@@ -95,7 +104,7 @@ export function FilterableSection({ {showResultsCount && (

- {filteredItems.length} von {items.length} Ergebnissen + {t('resultsCount', { filtered: filteredItems.length, total: items.length })} {getFilterSummary() && ` (${getFilterSummary()})`}

@@ -103,4 +112,4 @@ export function FilterableSection({ ) -} \ No newline at end of file +}