diff --git a/web/public/locales/en/components/dialog.json b/web/public/locales/en/components/dialog.json index 5d185d2890..a18d20bafc 100644 --- a/web/public/locales/en/components/dialog.json +++ b/web/public/locales/en/components/dialog.json @@ -15,15 +15,11 @@ "desc": "Objects in locations you want to avoid are not false positives. Submitting them as false positives will confuse the model." }, "review": { - "true": { + "question": { "label": "Confirm this label for Frigate Plus", - "true_one": "This is a {{label}}", - "true_other": "This is an {{label}}" - }, - "false": { - "label": "Do not confirm this label for Frigate Plus", - "false_one": "This is not a {{label}}", - "false_other": "This is not an {{label}}" + "ask_a": "Is this object a {{label}}?", + "ask_an": "Is this object an {{label}}?", + "ask_full": "Is this object a {{untranslatedLabel}} ({{translatedLabel}})?" }, "state": { "submitted": "Submitted" diff --git a/web/src/components/overlay/detail/SearchDetailDialog.tsx b/web/src/components/overlay/detail/SearchDetailDialog.tsx index 72cb0f8267..7c59f01cb9 100644 --- a/web/src/components/overlay/detail/SearchDetailDialog.tsx +++ b/web/src/components/overlay/detail/SearchDetailDialog.tsx @@ -73,7 +73,7 @@ import { LuInfo, LuSearch } from "react-icons/lu"; import { TooltipPortal } from "@radix-ui/react-tooltip"; import { FaPencilAlt } from "react-icons/fa"; import TextEntryDialog from "@/components/overlay/dialog/TextEntryDialog"; -import { useTranslation } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { TbFaceId } from "react-icons/tb"; import { useIsAdmin } from "@/hooks/use-is-admin"; import FaceSelectionDialog from "../FaceSelectionDialog"; @@ -1017,7 +1017,7 @@ export function ObjectSnapshotTab({ search, onEventUploaded, }: ObjectSnapshotTabProps) { - const { t } = useTranslation(["components/dialog"]); + const { t, i18n } = useTranslation(["components/dialog"]); type SubmissionState = "reviewing" | "uploading" | "submitted"; const [imgRef, imgLoaded, onImgLoad] = useImageLoaded(); @@ -1128,42 +1128,67 @@ export function ObjectSnapshotTab({ -
+
{state == "reviewing" && ( <> - - +
+ {i18n.language === "en" ? ( + // English with a/an logic plus label + <> + {/^[aeiou]/i.test(search?.label || "") ? ( + + explore.plus.review.question.ask_an + + ) : ( + + explore.plus.review.question.ask_a + + )} + + ) : ( + // For other languages + + explore.plus.review.question.ask_full + + )} +
+
+ + +
)} {state == "uploading" && }