UI/UX pass: i18n completion, responsive fixes, cleanup
Deploy Iddaai Frontend / build-and-deploy (push) Successful in 2m37s

- Fix flex 'align=flex-start' shrinking content to min width in column
  mode on matches, dashboard, and coupon-builder layouts (mobile/tablet
  cards now span full width)
- Localize all user-facing hardcoded Turkish strings: lineups card,
  odds card, v28 odds band panel, team/league pages, teams search,
  auth toasts, league headers (new keys in tr/en messages)
- Populate empty predictions.prediction-reasons group (20 veto reasons)
  and missing predictions.ui keys so the EN locale gets full coverage
- Use the active locale for all date formatting instead of hardcoded
  tr-TR (match card, match detail, team detail)
- Replace raw native date input with Chakra Input (dark mode + theming)
- Rename match-detail first tab from 'Tüm Maçlar' to 'Genel Bakış'
- Fix '4 maçlar' grammar with a proper {count} maç message
- Delete dead 3300-line Chakra showcase component (home-card.tsx)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 16:55:52 +03:00
parent 095992ad26
commit 5dc3d7e3a3
20 changed files with 407 additions and 3463 deletions
+28 -24
View File
@@ -12,6 +12,7 @@ import {
Icon,
} from "@chakra-ui/react";
import { useColorModeValue } from "@/components/ui/color-mode";
import { useTranslations } from "next-intl";
import {
LuUsers,
LuUser,
@@ -30,47 +31,49 @@ interface LineupsCardProps {
/**
* Lineup source metadata used for title, badge, and informational banners.
*/
function getLineupSourceMeta(source?: string) {
function getLineupSourceMeta(
source: string | undefined,
t: ReturnType<typeof useTranslations>,
) {
switch (source) {
case "confirmed_live":
return {
title: "Resmi İlk 11",
badge: "Onaylı Kadro",
title: t("lineup-official-xi"),
badge: t("lineup-confirmed-squad"),
badgeColor: "green" as const,
icon: LuShieldCheck,
description: "Kadro resmi olarak onaylandı.",
description: t("lineup-confirmed-live-desc"),
};
case "confirmed_participation":
return {
title: "Onaylı Kadro",
badge: "Onaylı",
title: t("lineup-confirmed-squad"),
badge: t("lineup-confirmed"),
badgeColor: "green" as const,
icon: LuShieldCheck,
description: "Kadro maç katılım verilerinden alındı.",
description: t("lineup-participation-desc"),
};
case "probable_xi":
return {
title: "Muhtemel Kadro",
badge: "Muhtemel",
title: t("lineup-probable-squad"),
badge: t("lineup-probable"),
badgeColor: "orange" as const,
icon: LuUsers,
description:
"Son maçlardaki ilk 11 verilerine dayalı muhtemel kadro. AI analizi bu kadro üzerinden yapılmaktadır.",
description: t("lineup-probable-desc"),
};
case "none":
default:
return {
title: "Kadro Bilgisi",
badge: "Kadro Bekleniyor",
title: t("lineup-info"),
badge: t("lineup-pending"),
badgeColor: "gray" as const,
icon: LuClock,
description:
"Kadro henüz açıklanmadı. AI analizi, takımların genel güç dengesi ve istatistiklerine dayalı olarak üretilmiştir.",
description: t("lineup-pending-desc"),
};
}
}
export default function LineupsCard({ match, prediction }: LineupsCardProps) {
const t = useTranslations("matches");
const cardBg = useColorModeValue("white", "gray.800");
const borderColor = useColorModeValue("gray.100", "gray.700");
const headerBg = useColorModeValue("gray.50", "whiteAlpha.50");
@@ -82,7 +85,7 @@ export default function LineupsCard({ match, prediction }: LineupsCardProps) {
// Determine lineup source from prediction data quality
const source = prediction?.data_quality?.lineup_source;
const meta = getLineupSourceMeta(source);
const meta = getLineupSourceMeta(source, t);
// Fallback: If no starting players are marked, but we have players, treat them as probable XI
if (
@@ -195,10 +198,10 @@ export default function LineupsCard({ match, prediction }: LineupsCardProps) {
gap={1}
>
<Text fontSize="sm" color="fg.muted" fontWeight="medium">
Kadro henüz belli değil
{t("lineup-tbd")}
</Text>
<Text fontSize="xs" color="fg.subtle">
Maç saatine yakın güncellenecek
{t("lineup-tbd-sub")}
</Text>
</Flex>
)}
@@ -259,10 +262,10 @@ export default function LineupsCard({ match, prediction }: LineupsCardProps) {
gap={1}
>
<Text fontSize="sm" color="fg.muted" fontWeight="medium">
Kadro henüz belli değil
{t("lineup-tbd")}
</Text>
<Text fontSize="xs" color="fg.subtle">
Maç saatine yakın güncellenecek
{t("lineup-tbd-sub")}
</Text>
</Flex>
)}
@@ -280,7 +283,7 @@ export default function LineupsCard({ match, prediction }: LineupsCardProps) {
<Icon as={LuClock} boxSize={8} color="fg.subtle" />
<VStack gap={1}>
<Text fontWeight="semibold" color="fg.muted">
Kadro Henüz Açıklanmadı
{t("lineup-not-announced")}
</Text>
<Text
fontSize="sm"
@@ -288,9 +291,10 @@ export default function LineupsCard({ match, prediction }: LineupsCardProps) {
textAlign="center"
maxW="sm"
>
{match.homeTeamName} ve {match.awayTeamName} kadroları maç
saatine yakın güncellenecektir. AI analizi, takım istatistikleri
ve güç dengesi üzerinden yapılmaktadır.
{t("lineup-not-announced-desc", {
home: match.homeTeamName,
away: match.awayTeamName,
})}
</Text>
</VStack>
</Flex>