NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
fix: fix classification missing i18n (#21179)
GuoQing Liu644c7fa6b414
diff --git a/web/public/locales/en/views/classificationModel.json b/web/public/locales/en/views/classificationModel.jsonindex aecf3ca89d..0e9095e490 100644--- a/web/public/locales/en/views/classificationModel.json+++ b/web/public/locales/en/views/classificationModel.json@@ -83,6 +83,7 @@"aria": "Select Recent Classifications"},"categories": "Classes",+ "none": "None","createCategory": {"new": "Create New Class"},diff --git a/web/src/components/overlay/ClassificationSelectionDialog.tsx b/web/src/components/overlay/ClassificationSelectionDialog.tsxindex b4ae79e35b..ab35ac3ce2 100644--- a/web/src/components/overlay/ClassificationSelectionDialog.tsx+++ b/web/src/components/overlay/ClassificationSelectionDialog.tsx@@ -131,7 +131,9 @@ export default function ClassificationSelectionDialog({className="flex cursor-pointer gap-2 smart-capitalize"onClick={() => onCategorizeImage(category)}>- {category.replaceAll("_", " ")}+ {category === "none"+ ? t("none")+ : category.replaceAll("_", " ")}</SelectorItem>))}<Separator />diff --git a/web/src/components/overlay/dialog/TrainFilterDialog.tsx b/web/src/components/overlay/dialog/TrainFilterDialog.tsxindex 982523ae96..0bade7e77e 100644--- a/web/src/components/overlay/dialog/TrainFilterDialog.tsx+++ b/web/src/components/overlay/dialog/TrainFilterDialog.tsx@@ -180,7 +180,9 @@ export function ClassFilterContent({{allClasses.map((item) => (<FilterSwitchkey={item}- label={item.replaceAll("_", " ")}+ label={+ item === "none" ? t("none") : item.replaceAll("_", " ")+ }isChecked={classes?.includes(item) ?? false}onCheckedChange={(isChecked) => {if (isChecked) {diff --git a/web/src/pages/FaceLibrary.tsx b/web/src/pages/FaceLibrary.tsxindex 439a9bde47..d25c997c0c 100644--- a/web/src/pages/FaceLibrary.tsx+++ b/web/src/pages/FaceLibrary.tsx@@ -371,7 +371,12 @@ export default function FaceLibrary() {{selectedFaces?.length > 0 ? (<div className="flex items-center justify-center gap-2"><div className="mx-1 flex w-48 items-center justify-center text-sm text-muted-foreground">- <div className="p-1">{`${selectedFaces.length} selected`}</div>+ <div className="p-1">+ {t("selected", {+ ns: "views/event",+ count: selectedFaces.length,+ })}+ </div><div className="p-1">{"|"}</div><divclassName="cursor-pointer p-2 text-primary hover:rounded-lg hover:bg-secondary"diff --git a/web/src/views/classification/ModelTrainingView.tsx b/web/src/views/classification/ModelTrainingView.tsxindex f9c1044efb..b3ef2cf192 100644--- a/web/src/views/classification/ModelTrainingView.tsx+++ b/web/src/views/classification/ModelTrainingView.tsx@@ -422,7 +422,12 @@ export default function ModelTrainingView({ model }: ModelTrainingViewProps) {)}><div className="flex w-48 items-center justify-center text-sm text-muted-foreground">- <div className="p-1">{`${selectedImages.length} selected`}</div>+ <div className="p-1">+ {t("selected", {+ ns: "views/event",+ count: selectedImages.length,+ })}+ </div><div className="p-1">{"|"}</div><divclassName="cursor-pointer p-2 text-primary hover:rounded-lg hover:bg-secondary"@@ -682,7 +687,7 @@ function LibrarySelector({className="flex-grow cursor-pointer capitalize"onClick={() => setPageToggle(id)}>- {id.replaceAll("_", " ")}+ {id === "none" ? t("none") : id.replaceAll("_", " ")}<span className="ml-2 text-muted-foreground">({dataset?.[id].length})</span>