NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
fix: fix system enrichments view classification i18n (#21366)
GuoQing Liu8a4d5f34da55
diff --git a/web/public/locales/en/views/system.json b/web/public/locales/en/views/system.jsonindex 73c6d65b50..ada23cdc26 100644--- a/web/public/locales/en/views/system.json+++ b/web/public/locales/en/views/system.json@@ -192,7 +192,10 @@"review_description_events_per_second": "Review Description","object_description": "Object Description","object_description_speed": "Object Description Speed",- "object_description_events_per_second": "Object Description"+ "object_description_events_per_second": "Object Description",+ "classification": "{{name}} Classification",+ "classification_speed": "{{name}} Classification Speed",+ "classification_events_per_second": "{{name}} Classification Events Per Second"}}}diff --git a/web/src/views/system/EnrichmentMetrics.tsx b/web/src/views/system/EnrichmentMetrics.tsxindex 75ab593a02..29eda8fa27 100644--- a/web/src/views/system/EnrichmentMetrics.tsx+++ b/web/src/views/system/EnrichmentMetrics.tsx@@ -88,11 +88,20 @@ export default function EnrichmentMetrics({Object.entries(stats.embeddings).forEach(([rawKey, stat]) => {const key = rawKey.replaceAll("_", " ");-if (!(key in series)) {+ const classificationIndex = rawKey.indexOf("_classification_");+ const seriesName =+ classificationIndex === -1+ ? t("enrichments.embeddings." + rawKey)+ : t(+ `enrichments.embeddings.${rawKey.substring(classificationIndex + 1)}`,+ {+ name: rawKey.substring(0, classificationIndex),+ },+ );series[key] = {rawKey,- name: t("enrichments.embeddings." + rawKey),+ name: seriesName,metrics: getThreshold(rawKey),data: [],};@@ -133,8 +142,14 @@ export default function EnrichmentMetrics({isSpeed = false;}+ let categoryName = "";// Get translated category name- const categoryName = t("enrichments.embeddings." + categoryKey);+ if (categoryKey.endsWith("_classification")) {+ const name = categoryKey.replace("_classification", "");+ categoryName = t("enrichments.embeddings.classification", { name });+ } else {+ categoryName = t("enrichments.embeddings." + categoryKey);+ }if (!(categoryKey in grouped)) {grouped[categoryKey] = {