diff --git a/application/src/components/services/ServiceStatsCards.tsx b/application/src/components/services/ServiceStatsCards.tsx index db469e1..4d84708 100644 --- a/application/src/components/services/ServiceStatsCards.tsx +++ b/application/src/components/services/ServiceStatsCards.tsx @@ -4,6 +4,7 @@ import { Service, UptimeData } from "@/types/service.types"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { useMemo } from "react"; import { formatDistanceStrict } from "date-fns"; +import {useLanguage} from "@/contexts/LanguageContext.tsx"; interface ServiceStatsCardsProps { service: Service; @@ -11,6 +12,8 @@ interface ServiceStatsCardsProps { } export function ServiceStatsCards({ service, uptimeData }: ServiceStatsCardsProps) { + + const { t } = useLanguage(); // Calculate uptime percentage const calculateUptimePercentage = () => { if (uptimeData.length === 0) return 100; @@ -109,41 +112,46 @@ export function ServiceStatsCards({ service, uptimeData }: ServiceStatsCardsProp
Last checked at {service.lastChecked}
+{t('lastCheckedAt').replace('{datetime}', service.lastChecked)}
{avgResponseTime > 0 && avgResponseTime !== service.responseTime && ( -Avg: {avgResponseTime}ms (last {upChecks.length} up checks)
+{t('avg')}: {avgResponseTime}ms ({t('lastUpChecksCount').replace('{count}', String(upChecks.length))})
)}Based on last {uptimeData.length} checks
+{t('basedOnlastChecksCount').replace('{count}', String(uptimeData.length))}