fix: UX improvements for German association users
Some checks failed
Workflow / ʦ TypeScript (push) Failing after 6m6s
Workflow / ⚫️ Test (push) Has been skipped

- fix(member-detail): display gender in German (Männlich/Weiblich/Divers)
  instead of raw English enum values (male/female/diverse)

- fix(member-detail): display country names in German (Österreich, Deutschland)
  instead of raw ISO codes (AT, DE)

- fix(member-statistics): total member count was always 0
  getStatistics() returns per-status counts without a total key;
  now computes total by summing all status counts

- fix(i18n): add 56 breadcrumb segment translations for DE and EN
  Breadcrumbs were showing English path segments (Courses, Calendar,
  Registrations) because translation keys for URL path segments were
  missing. Added all segment-level route translations so breadcrumbs
  now display in German throughout the app.
This commit is contained in:
Zaid Marzguioui
2026-04-03 22:10:02 +02:00
parent 9f83b5cc75
commit 1215e351c1
4 changed files with 128 additions and 7 deletions

View File

@@ -35,7 +35,11 @@ export default async function MemberStatisticsPage({ params }: PageProps) {
if (!acct) return <AccountNotFound />; if (!acct) return <AccountNotFound />;
const { query } = createMemberServices(client); const { query } = createMemberServices(client);
const stats = await query.getStatistics(acct.id); const statsRaw = await query.getStatistics(acct.id);
// Compute total from individual status counts
const total = Object.values(statsRaw).reduce((a, b) => a + b, 0);
const stats = { ...statsRaw, total };
const statusChartData = [ const statusChartData = [
{ name: t('status.active'), value: stats.active ?? 0 }, { name: t('status.active'), value: stats.active ?? 0 },

View File

@@ -139,7 +139,58 @@
"administration": "Administration", "administration": "Administration",
"accountSettings": "Kontoeinstellungen", "accountSettings": "Kontoeinstellungen",
"application": "Anwendung", "application": "Anwendung",
"home": "Startseite" "home": "Startseite",
"courses": "Kurse",
"calendar": "Kalender",
"instructors": "Kursleiter",
"locations": "Standorte",
"categories": "Kategorien",
"statistics": "Statistiken",
"events": "Veranstaltungen",
"registrations": "Anmeldungen",
"holiday passes": "Ferienpässe",
"bookings": "Buchungen",
"rooms": "Zimmer",
"guests": "Gäste",
"finance": "Finanzen",
"invoices": "Rechnungen",
"sepa": "SEPA-Einzüge",
"payments": "Zahlungen",
"documents": "Dokumente",
"generate": "Generieren",
"templates": "Vorlagen",
"newsletter": "Newsletter",
"new": "Neu",
"edit": "Bearbeiten",
"members": "Mitglieder",
"members cms": "Vereinsmitglieder",
"site builder": "Website",
"posts": "Beiträge",
"fischerei": "Fischerei",
"waters": "Gewässer",
"species": "Fischarten",
"stocking": "Besatz",
"leases": "Pachten",
"catch books": "Fangbücher",
"permits": "Erlaubnisscheine",
"competitions": "Wettbewerbe",
"meetings": "Sitzungen",
"protocols": "Protokolle",
"tasks": "Aufgaben",
"verband": "Verband",
"clubs": "Vereine",
"hierarchy": "Organisationsstruktur",
"reporting": "Berichte",
"modules": "Module",
"import": "Import",
"applications": "Aufnahmeanträge",
"departments": "Abteilungen",
"dues": "Beiträge",
"tags": "Tags",
"cards": "Mitgliedsausweise",
"invitations": "Einladungen",
"attendance": "Anwesenheit",
"participants": "Teilnehmer"
}, },
"roles": { "roles": {
"owner": { "owner": {

View File

@@ -139,7 +139,58 @@
"associationTemplates": "Shared Templates", "associationTemplates": "Shared Templates",
"administration": "Administration", "administration": "Administration",
"accountSettings": "Account Settings", "accountSettings": "Account Settings",
"application": "Application" "application": "Application",
"courses": "Courses",
"calendar": "Calendar",
"instructors": "Instructors",
"locations": "Locations",
"categories": "Categories",
"statistics": "Statistics",
"events": "Events",
"registrations": "Registrations",
"holiday passes": "Holiday Passes",
"bookings": "Bookings",
"rooms": "Rooms",
"guests": "Guests",
"finance": "Finance",
"invoices": "Invoices",
"sepa": "SEPA",
"payments": "Payments",
"documents": "Documents",
"generate": "Generate",
"templates": "Templates",
"newsletter": "Newsletter",
"new": "New",
"edit": "Edit",
"members": "Members",
"members cms": "Members",
"site builder": "Site Builder",
"posts": "Posts",
"fischerei": "Fisheries",
"waters": "Waters",
"species": "Species",
"stocking": "Stocking",
"leases": "Leases",
"catch books": "Catch Books",
"permits": "Permits",
"competitions": "Competitions",
"meetings": "Meetings",
"protocols": "Protocols",
"tasks": "Tasks",
"verband": "Federation",
"clubs": "Clubs",
"hierarchy": "Hierarchy",
"reporting": "Reporting",
"modules": "Modules",
"import": "Import",
"applications": "Applications",
"departments": "Departments",
"dues": "Dues",
"tags": "Tags",
"cards": "Cards",
"invitations": "Invitations",
"attendance": "Attendance",
"participants": "Participants"
}, },
"roles": { "roles": {
"owner": { "owner": {

View File

@@ -158,7 +158,11 @@ export function MemberDetailTabs({
/> />
<DetailRow <DetailRow
label="Geschlecht" label="Geschlecht"
value={String(member.gender ?? '—')} value={
member.gender
? { male: 'Männlich', female: 'Weiblich', diverse: 'Divers' }[member.gender as string] ?? String(member.gender)
: '—'
}
/> />
</CardContent> </CardContent>
</Card> </Card>
@@ -211,7 +215,18 @@ export function MemberDetailTabs({
/> />
<DetailRow <DetailRow
label="Land" label="Land"
value={String(member.country ?? 'DE')} value={
(() => {
const code = String(member.country ?? 'DE');
const countries: Record<string, string> = {
DE: 'Deutschland', AT: 'Österreich', CH: 'Schweiz',
LI: 'Liechtenstein', LU: 'Luxemburg', IT: 'Italien',
FR: 'Frankreich', NL: 'Niederlande', BE: 'Belgien',
PL: 'Polen', CZ: 'Tschechien', DK: 'Dänemark',
};
return countries[code] ?? code;
})()
}
/> />
</CardContent> </CardContent>
</Card> </Card>