i18n observability hub: analytics pages and log tables.
Translate analytics overview/activity/economy plus peak-hours/revenue charts, and audit/chat/commands/trades DataTables (en/nl/it). Includes prior events/polls detail i18n. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
a25008deb5
commit
bcbdca841b
13 files changed
+576
-211
No files matched your search
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslations } from "next-intl";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
|
||||
interface RevenueDataPoint {
|
||||
@@ -9,6 +10,7 @@ interface RevenueDataPoint {
|
||||
}
|
||||
|
||||
export function RevenueChart({ data }: { data: RevenueDataPoint[] }) {
|
||||
const t = useTranslations("pages.admin.analytics.economy");
|
||||
const max = Math.max(
|
||||
1,
|
||||
...data.flatMap((point) => [point.credits, point.points]),
|
||||
@@ -16,7 +18,9 @@ export function RevenueChart({ data }: { data: RevenueDataPoint[] }) {
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader className="pb-2">
|
||||
<CardTitle className="text-sm font-medium">Catalog Spending</CardTitle>
|
||||
<CardTitle className="text-sm font-medium">
|
||||
{t("catalogSpendingTitle")}
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="space-y-3">
|
||||
@@ -32,14 +36,14 @@ export function RevenueChart({ data }: { data: RevenueDataPoint[] }) {
|
||||
style={{
|
||||
width: `${Math.max(2, (point.credits / max) * 100)}%`,
|
||||
}}
|
||||
title={`${point.credits} credits`}
|
||||
title={t("creditsTooltip", { count: point.credits })}
|
||||
/>
|
||||
<div
|
||||
className="h-2 rounded bg-[var(--admin-accent)]"
|
||||
style={{
|
||||
width: `${Math.max(2, (point.points / max) * 100)}%`,
|
||||
}}
|
||||
title={`${point.points} points`}
|
||||
title={t("pointsTooltip", { count: point.points })}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user