* i18n translated label fixes

* Fix frame cache race bug

Objects that were marked as false positives (that would later become true positives) would sometimes have their saved frame prematurely removed from the frame cache.
This commit is contained in:
Josh Hawkins
2025-06-26 09:25:47 -05:00
committed by GitHub
parent fd96cd5dae
commit 5593495abd
5 changed files with 12 additions and 21 deletions

View File

@@ -52,6 +52,7 @@ import useSWR from "swr";
import { FrigateConfig } from "@/types/frigateConfig";
import { MdImageSearch } from "react-icons/md";
import { useTranslation } from "react-i18next";
import { getTranslatedLabel } from "@/utils/i18n";
type InputWithTagsProps = {
inputFocused: boolean;
@@ -419,9 +420,7 @@ export default function InputWithTags({
? t("button.yes", { ns: "common" })
: t("button.no", { ns: "common" });
} else if (filterType === "labels") {
return t(filterValues as string, {
ns: "objects",
});
return getTranslatedLabel(filterValues as string);
} else if (filterType === "search_type") {
return t("filter.searchType." + (filterValues as string));
} else {
@@ -828,9 +827,7 @@ export default function InputWithTags({
>
{t("filter.label." + filterType)}:{" "}
{filterType === "labels"
? t(value, {
ns: "objects",
})
? getTranslatedLabel(value)
: value.replaceAll("_", " ")}
<button
onClick={() =>