From 106ac6dca669e197f0a768ed27284c73427f6a61 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 14 May 2025 13:20:07 -0500 Subject: [PATCH] tracked object lifecycle i18n fix --- web/public/locales/en/views/explore.json | 1 + web/src/components/overlay/detail/ObjectPath.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web/public/locales/en/views/explore.json b/web/public/locales/en/views/explore.json index 22bf232bd..13cc494ea 100644 --- a/web/public/locales/en/views/explore.json +++ b/web/public/locales/en/views/explore.json @@ -44,6 +44,7 @@ "scrollViewTips": "Scroll to view the significant moments of this object's lifecycle.", "autoTrackingTips": "Bounding box positions will be inaccurate for autotracking cameras.", "count": "{{first}} of {{second}}", + "trackedPoint": "Tracked Point", "lifecycleItemDesc": { "visible": "{{label}} detected", "entered_zone": "{{label}} entered {{zones}}", diff --git a/web/src/components/overlay/detail/ObjectPath.tsx b/web/src/components/overlay/detail/ObjectPath.tsx index 06a47d571..0101a71f1 100644 --- a/web/src/components/overlay/detail/ObjectPath.tsx +++ b/web/src/components/overlay/detail/ObjectPath.tsx @@ -7,6 +7,7 @@ import { } from "@/components/ui/tooltip"; import { TooltipPortal } from "@radix-ui/react-tooltip"; import { getLifecycleItemDescription } from "@/utils/lifecycleUtil"; +import { useTranslation } from "react-i18next"; type ObjectPathProps = { positions?: Position[]; @@ -40,6 +41,7 @@ export function ObjectPath({ onPointClick, visible = true, }: ObjectPathProps) { + const { t } = useTranslation(["views/explore"]); const getAbsolutePositions = useCallback(() => { if (!imgRef.current || !positions) return []; const imgRect = imgRef.current.getBoundingClientRect(); @@ -103,7 +105,7 @@ export function ObjectPath({ {pos.lifecycle_item ? getLifecycleItemDescription(pos.lifecycle_item) - : "Tracked point"} + : t("objectLifecycle.trackedPoint")}