{user.ipRegister}
{user.ipCurrent}
- {user.machine_id || "N/A"}
+ {user.machine_id || t("unavailable")}
No badges
; + return{t("noBadges")}
; } return ( diff --git a/src/app/admin/users/_components/user-hero.tsx b/src/app/admin/users/_components/user-hero.tsx index 80178dbba6..d809f2b247 100644 --- a/src/app/admin/users/_components/user-hero.tsx +++ b/src/app/admin/users/_components/user-hero.tsx @@ -10,6 +10,7 @@ import { WifiOff, } from "lucide-react"; import { useSearchParams } from "next/navigation"; +import { useTranslations } from "next-intl"; import { AdminBreadcrumb } from "@/components/admin/admin-breadcrumb"; import { UserWatchToggle } from "@/components/admin/user-watch-toggle"; import Link from "@/components/link"; @@ -42,6 +43,7 @@ interface UserHeroProps { activeBan: boolean; mode: "show" | "edit"; canEdit: boolean; + canViewLogs?: boolean; /** When non-null, render the watch toggle with this initial state. */ watching?: boolean | null; } @@ -58,7 +60,9 @@ export function UserHero({ mode, canEdit, watching, + canViewLogs = true, }: UserHeroProps) { + const t = useTranslations("pages.admin.users.presentation"); const params = useSearchParams(); const list = params.get("list") ?? ""; const listHref = userListHref(list); @@ -66,9 +70,9 @@ export function UserHero({ <>{roomCount}
-Rooms
+{t("rooms")}
-{formatNumber(chatCount)}
-Messages
-{tradeCount}
-Trades
-{formatNumber(chatCount)}
++ {t("messages")} +
+{tradeCount}
++ {t("trades")} +
+{t("hint")}
+ {sections.length === 0 && ( ++ {t("restricted")} +
+ )} ++ {t("purchaseHint")} +
+ )} + {section.key === "activity" && ( ++ {t("activityHint")} +
+ )} + {section.state === "error" ? ( ++ {t("error")} +
+ ) : section.rows.length === 0 ? ( +{t("empty")}
+ ) : ( ++ {t("purchaseDetail", { + amount: row.amount ?? "—", + credits: row.credits ?? "—", + points: row.points ?? "—", + type: row.pointsType ?? "—", + })} +
+ )} + {row.detail && ( ++ {row.detail} +
+ )} ++ {section.key === "mute" + ? t("muteUntil", { date: eventDate(row.at) }) + : eventDate(row.at)} +
++ {overviewT("error")} +
+ ) : ( ++ {overviewT("error")} +
+ ) : ( +