mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-04 04:27: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.",
|
"scrollViewTips": "Scroll to view the significant moments of this object's lifecycle.",
|
||||||
"autoTrackingTips": "Bounding box positions will be inaccurate for autotracking cameras.",
|
"autoTrackingTips": "Bounding box positions will be inaccurate for autotracking cameras.",
|
||||||
"count": "{{first}} of {{second}}",
|
"count": "{{first}} of {{second}}",
|
||||||
|
"trackedPoint": "Tracked Point",
|
||||||
"lifecycleItemDesc": {
|
"lifecycleItemDesc": {
|
||||||
"visible": "{{label}} detected",
|
"visible": "{{label}} detected",
|
||||||
"entered_zone": "{{label}} entered {{zones}}",
|
"entered_zone": "{{label}} entered {{zones}}",
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import {
|
|||||||
} from "@/components/ui/tooltip";
|
} from "@/components/ui/tooltip";
|
||||||
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
||||||
import { getLifecycleItemDescription } from "@/utils/lifecycleUtil";
|
import { getLifecycleItemDescription } from "@/utils/lifecycleUtil";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
type ObjectPathProps = {
|
type ObjectPathProps = {
|
||||||
positions?: Position[];
|
positions?: Position[];
|
||||||
@ -40,6 +41,7 @@ export function ObjectPath({
|
|||||||
onPointClick,
|
onPointClick,
|
||||||
visible = true,
|
visible = true,
|
||||||
}: ObjectPathProps) {
|
}: ObjectPathProps) {
|
||||||
|
const { t } = useTranslation(["views/explore"]);
|
||||||
const getAbsolutePositions = useCallback(() => {
|
const getAbsolutePositions = useCallback(() => {
|
||||||
if (!imgRef.current || !positions) return [];
|
if (!imgRef.current || !positions) return [];
|
||||||
const imgRect = imgRef.current.getBoundingClientRect();
|
const imgRect = imgRef.current.getBoundingClientRect();
|
||||||
@ -103,7 +105,7 @@ export function ObjectPath({
|
|||||||
<TooltipContent side="top" className="smart-capitalize">
|
<TooltipContent side="top" className="smart-capitalize">
|
||||||
{pos.lifecycle_item
|
{pos.lifecycle_item
|
||||||
? getLifecycleItemDescription(pos.lifecycle_item)
|
? getLifecycleItemDescription(pos.lifecycle_item)
|
||||||
: "Tracked point"}
|
: t("objectLifecycle.trackedPoint")}
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</TooltipPortal>
|
</TooltipPortal>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user