* Object labels with spaces should use correct i18n keys

* Add Hungarian

* Ensure onvif move request has a valid speed before removing

When autotracking zooming is set to `disabled` (or is left out of the config), move_request["Speed"] may not exist, depending on the camera

* Add another frame cache debug log
This commit is contained in:
Josh Hawkins
2025-06-25 16:45:24 -05:00
committed by GitHub
parent 623bc72633
commit f97629433d
14 changed files with 45 additions and 30 deletions
+2 -1
View File
@@ -22,6 +22,7 @@ import SearchResultActions from "@/components/menu/SearchResultActions";
import { SearchTab } from "@/components/overlay/detail/SearchDetailDialog";
import { FrigateConfig } from "@/types/frigateConfig";
import { useTranslation } from "react-i18next";
import { getTranslatedLabel } from "@/utils/i18n";
type ExploreViewProps = {
searchDetail: SearchResult | undefined;
@@ -152,7 +153,7 @@ function ThumbnailRow({
return (
<div className="rounded-lg bg-background_alt p-2 md:px-4">
<div className="flex flex-row items-center text-lg smart-capitalize">
{t(objectType, { ns: "objects" })}
{getTranslatedLabel(objectType)}
{searchResults && (
<span className="ml-3 text-sm text-secondary-foreground">
{t("trackedObjectsCount", {
@@ -32,6 +32,7 @@ import { Switch } from "@/components/ui/switch";
import { Label } from "@/components/ui/label";
import { useAlertsState, useDetectionsState, useEnabledState } from "@/api/ws";
import { useDocDomain } from "@/hooks/use-doc-domain";
import { getTranslatedLabel } from "@/utils/i18n";
type CameraSettingsViewProps = {
selectedCamera: string;
@@ -81,18 +82,18 @@ export default function CameraSettingsView({
const alertsLabels = useMemo(() => {
return cameraConfig?.review.alerts.labels
? cameraConfig.review.alerts.labels
.map((label) => t(label, { ns: "objects" }))
.map((label) => getTranslatedLabel(label))
.join(", ")
: "";
}, [cameraConfig, t]);
}, [cameraConfig]);
const detectionsLabels = useMemo(() => {
return cameraConfig?.review.detections.labels
? cameraConfig.review.detections.labels
.map((label) => t(label, { ns: "objects" }))
.map((label) => getTranslatedLabel(label))
.join(", ")
: "";
}, [cameraConfig, t]);
}, [cameraConfig]);
// form
+2 -1
View File
@@ -42,6 +42,7 @@ import { useSearchEffect } from "@/hooks/use-overlay-state";
import { useTranslation } from "react-i18next";
import { useDocDomain } from "@/hooks/use-doc-domain";
import { getTranslatedLabel } from "@/utils/i18n";
type MasksAndZoneViewProps = {
selectedCamera: string;
@@ -332,7 +333,7 @@ export default function MasksAndZonesView({
camera: cameraConfig.name,
name: t("masksAndZones.objectMaskLabel", {
number: globalObjectMasksCount + index + 1,
label: t(objectName, { ns: "objects" }),
label: getTranslatedLabel(objectName),
}),
objects: [objectName],
points: interpolatePoints(
@@ -29,6 +29,7 @@ import { Separator } from "@/components/ui/separator";
import { isDesktop } from "react-device-detect";
import { Trans, useTranslation } from "react-i18next";
import { useDocDomain } from "@/hooks/use-doc-domain";
import { getTranslatedLabel } from "@/utils/i18n";
type ObjectSettingsViewProps = {
selectedCamera?: string;
@@ -371,7 +372,7 @@ function ObjectList({ cameraConfig, objects }: ObjectListProps) {
{getIconForLabel(obj.label, "size-5 text-white")}
</div>
<div className="ml-3 text-lg">
{t(obj.label, { ns: "objects" })}
{getTranslatedLabel(obj.label)}
</div>
</div>
<div className="flex w-8/12 flex-row items-center justify-end">