more i18n

This commit is contained in:
Josh Hawkins 2025-10-16 07:53:09 -05:00
parent dedc26a866
commit 2fa9d9512f
2 changed files with 11 additions and 6 deletions

View File

@ -20,7 +20,10 @@
}, },
"detail": { "detail": {
"noDataFound": "No detail data to review", "noDataFound": "No detail data to review",
"aria": "Toggle detail view" "aria": "Toggle detail view",
"trackedObject_one": "tracked object",
"trackedObject_other": "tracked objects",
"noObjectDetailData": "No object detail data available."
}, },
"objectTrack": { "objectTrack": {
"trackedPoint": "Tracked point", "trackedPoint": "Tracked point",

View File

@ -255,6 +255,10 @@ function ReviewGroup({
if (iconLabels.length >= 5) break; if (iconLabels.length >= 5) break;
} }
} }
const objectCount = fetchedEvents
? fetchedEvents.length
: (review.data.objects ?? []).length;
return ( return (
<div <div
data-review-id={id} data-review-id={id}
@ -275,10 +279,7 @@ function ReviewGroup({
<div className="flex flex-col"> <div className="flex flex-col">
<div className="text-sm font-medium">{displayTime}</div> <div className="text-sm font-medium">{displayTime}</div>
<div className="text-xs text-muted-foreground"> <div className="text-xs text-muted-foreground">
{fetchedEvents {objectCount} {t("detail.trackedObject", { count: objectCount })}
? fetchedEvents.length
: (review.data.objects ?? []).length}{" "}
tracked objects
</div> </div>
</div> </div>
</div> </div>
@ -508,6 +509,7 @@ function ObjectTimeline({
onSeek: (ts: number) => void; onSeek: (ts: number) => void;
effectiveTime?: number; effectiveTime?: number;
}) { }) {
const { t } = useTranslation("views/events");
const { data: timeline, isValidating } = useSWR<ObjectLifecycleSequence[]>([ const { data: timeline, isValidating } = useSWR<ObjectLifecycleSequence[]>([
"timeline", "timeline",
{ {
@ -522,7 +524,7 @@ function ObjectTimeline({
if (!timeline || timeline.length === 0) { if (!timeline || timeline.length === 0) {
return ( return (
<div className="py-2 text-sm text-muted-foreground"> <div className="py-2 text-sm text-muted-foreground">
No object detail data available. {t("detail.noObjectDetailData")}
</div> </div>
); );
} }