mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 20:17:42 +03:00
tracked object lifecycle i18n fix
This commit is contained in:
parent
db67fad5af
commit
106ac6dca6
@ -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}}",
|
||||
|
||||
@ -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({
|
||||
<TooltipContent side="top" className="smart-capitalize">
|
||||
{pos.lifecycle_item
|
||||
? getLifecycleItemDescription(pos.lifecycle_item)
|
||||
: "Tracked point"}
|
||||
: t("objectLifecycle.trackedPoint")}
|
||||
</TooltipContent>
|
||||
</TooltipPortal>
|
||||
</Tooltip>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user