From a726b40b7851c01b4cdd9daa67029ce82f86ca37 Mon Sep 17 00:00:00 2001 From: ZhaiSoul <842607283@qq.com> Date: Thu, 13 Mar 2025 00:41:53 +0800 Subject: [PATCH] chore: add object setting i18n keys --- web/public/locales/en/views/settings.json | 5 ++++- web/public/locales/zh-CN/views/settings.json | 5 ++++- web/src/views/settings/ObjectSettingsView.tsx | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json index 6d778c792..496622f0d 100644 --- a/web/public/locales/en/views/settings.json +++ b/web/public/locales/en/views/settings.json @@ -246,7 +246,10 @@ "title": "Object Shape Filter Drawing", "desc": "Draw a rectangle on the image to view area and ratio details", "tips": "Enable this option to draw a rectangle on the camera image to show its area and ratio. These values can then be used to set object shape filter parameters in your config.", - "document": "Read the documentation " + "document": "Read the documentation ", + "score": "Score", + "ratio": "Ratio", + "area": "Area" } }, "users": { diff --git a/web/public/locales/zh-CN/views/settings.json b/web/public/locales/zh-CN/views/settings.json index 19be3e44f..acfbb6c86 100644 --- a/web/public/locales/zh-CN/views/settings.json +++ b/web/public/locales/zh-CN/views/settings.json @@ -246,7 +246,10 @@ "title": "允许绘制“对象形状过滤器”", "desc": "在图像上绘制矩形,以查看区域和比例详细信息。", "tips": "启用此选项,能够在摄像头图像上绘制矩形,将显示其区域和比例。然后,您可以使用这些值在配置中设置对象形状过滤器参数。", - "document": "阅读文档(英文)" + "document": "阅读文档(英文)", + "score": "分数", + "ratio": "比例", + "area": "区域" } }, "users": { diff --git a/web/src/views/settings/ObjectSettingsView.tsx b/web/src/views/settings/ObjectSettingsView.tsx index 5f43e7133..55717bedc 100644 --- a/web/src/views/settings/ObjectSettingsView.tsx +++ b/web/src/views/settings/ObjectSettingsView.tsx @@ -373,7 +373,7 @@ function ObjectList({ cameraConfig, objects }: ObjectListProps) {

- Score + {t("debug.objectShapeFilterDrawing.score")}

{obj.score ? (obj.score * 100).toFixed(1).toString() @@ -384,7 +384,7 @@ function ObjectList({ cameraConfig, objects }: ObjectListProps) {

- Ratio + {t("debug.objectShapeFilterDrawing.ratio")}

{obj.ratio ? obj.ratio.toFixed(2).toString() : "-"}
@@ -392,7 +392,7 @@ function ObjectList({ cameraConfig, objects }: ObjectListProps) {

- Area + {t("debug.objectShapeFilterDrawing.area")}

{obj.area ? ( <>