From 65ebd3a4f6308e8bd5da910cbd90ae520a278483 Mon Sep 17 00:00:00 2001 From: ZhaiSoul <842607283@qq.com> Date: Mon, 3 Mar 2025 23:10:17 +0800 Subject: [PATCH] Add more i18n keys --- web/public/locales/en/translation.json | 30 +++++++ web/public/locales/zh-CN/translation.json | 28 ++++++ .../filter/CalendarFilterButton.tsx | 2 +- .../components/filter/ReviewFilterGroup.tsx | 2 +- .../overlay/detail/SearchDetailDialog.tsx | 8 +- .../overlay/dialog/SearchFilterDialog.tsx | 12 ++- .../overlay/dialog/TextEntryDialog.tsx | 5 +- .../settings/CameraStreamingDialog.tsx | 90 ++++++++++++------- web/src/views/events/EventView.tsx | 6 +- web/src/views/settings/ObjectSettingsView.tsx | 20 +++-- 10 files changed, 156 insertions(+), 47 deletions(-) diff --git a/web/public/locales/en/translation.json b/web/public/locales/en/translation.json index de23ffd7e..dd8284516 100644 --- a/web/public/locales/en/translation.json +++ b/web/public/locales/en/translation.json @@ -137,12 +137,16 @@ "ui.time.s": "s", "ui.time.second": "{{time}} seconds", + "ui.unit.speed.mph": "mph", + "ui.unit.speed.kph": "kph", + "ui.time.formattedTimestamp": "%b %-d, %I:%M:%S %p", "ui.time.formattedTimestamp.24hour": "%b %-d, %H:%M:%S", "ui.time.formattedTimestampExcludeSeconds": "%b %-d, %I:%M %p", "ui.time.formattedTimestampExcludeSeconds.24hour": "%b %-d, %H:%M", "ui.time.formattedTimestampWithYear": "%b %-d %Y, %I:%M %p", "ui.time.formattedTimestampWithYear.24hour": "%b %-d %Y, %H:%M", + "ui.time.formattedTimestampOnlyMonthAndDay": "%b %-d", "ui.iconPicker.selectIcon": "Select an icon", "ui.iconPicker.search.placeholder": "Search for an icon...", @@ -286,13 +290,31 @@ "ui.cameraGroup.icon": "Icon", "ui.cameraGroup.success": "Camera group ({{name}}) has been saved.", "ui.cameraGroup.toast.error": "Failed to save config changes: {{error}}", + "ui.cameraGroup.camera.setting": "{{cameraName}} Streaming Settings", + "ui.cameraGroup.camera.setting.desc": "Change the live streaming options for this camera group's dashboard. These settings are device/browser-specific.", + "ui.cameraGroup.camera.setting.audioIsAvailable": "Audio is available for this stream", + "ui.cameraGroup.camera.setting.audioIsUnavailable": "Audio is available for this stream", + "ui.cameraGroup.camera.setting.audio.tips": "Audio must be output from your camera and configured in go2rtc for this stream.", + "ui.cameraGroup.camera.setting.audio.tips.document": "Read the documentation ", + "ui.cameraGroup.camera.setting.streamMethod": "Streaming Method", + "ui.cameraGroup.camera.setting.streamMethod.method.noStreaming": "No Streaming", + "ui.cameraGroup.camera.setting.streamMethod.method.noStreaming.desc": "Camera images will only update once per minute and no live streaming will occur.", + "ui.cameraGroup.camera.setting.streamMethod.method.smartStreaming": "Smart Streaming (recommended)", + "ui.cameraGroup.camera.setting.streamMethod.method.smartStreaming.desc": "Smart streaming will update your camera image once per minute when no detectable activity is occurring to conserve bandwidth and resources. When activity is detected, the image seamlessly switches to a live stream.", + "ui.cameraGroup.camera.setting.streamMethod.method.continuousStreaming": "Continuous Streaming", + "ui.cameraGroup.camera.setting.streamMethod.method.continuousStreaming.desc": "Camera image will always be a live stream when visible on the dashboard, even if no activity is being detected.", + "ui.cameraGroup.camera.setting.streamMethod.method.continuousStreaming.desc.warning": "Continuous streaming may cause high bandwidth usage and performance issues. Use with caution.", + "ui.cameraGroup.camera.setting.compatibilityMode": "Compatibility mode", + "ui.cameraGroup.camera.setting.compatibilityMode.desc": "Enable this option only if your camera's live stream is displaying color artifacts and has a diagonal line on the right side of the image.", "ui.eventView.alerts": "Alerts", "ui.eventView.detections": "Detections", "ui.eventView.motion": "Motion", + "ui.eventView.motion.only": "Motion only", "ui.eventView.allCameras": "All Cameras", "ui.eventView.empty.alert": "There are no alerts to review", "ui.eventView.empty.detection": "There are no detections to review", + "ui.eventView.empty.motion": "No motion data found", "ui.exploreView.trackedObjectDetails": "Tracked Object Details", "ui.exploreView.type.details": "details", @@ -301,6 +323,8 @@ "ui.exploreView.type.object_lifecycle": "object lifecycle", "ui.exploreView.details.label": "Label", "ui.exploreView.details.editSubLable": "Edit sub label", + "ui.exploreView.details.editSubLable.desc": "Enter a new sub label for this {{label}}", + "ui.exploreView.details.editSubLable.desc.noLabel": "Enter a new sub label for this tracked object", "ui.exploreView.details.topScore": "Top Score", "ui.exploreView.details.topScore.info": "The top score is the highest median score for the tracked object, so this may differ from the score shown on the search result thumbnail.", "ui.exploreView.details.estimatedSpeed": "Estimated Speed", @@ -342,6 +366,7 @@ "ui.filter.subLabels": "Sub Labels", "ui.filter.allSubLabels": "All Sub Labels", "ui.filter.score": "Score", + "ui.filter.estimatedSpeed": "Estimated Speed ({{unit}})", "ui.filter.features": "Features", "ui.filter.features.hasSnapshot": "Has a snapshot", "ui.filter.features.hasVideoClip": "Has a video clip", @@ -377,6 +402,7 @@ "ui.yes": "Yes", "ui.no": "No", "ui.download": "Download", + "ui.info": "Info", "ui.live.documentTitle": "Live - Frigate", "ui.live.documentTitle.withCamera": "{{camera}} - Live - Frigate", @@ -581,6 +607,10 @@ "ui.settingView.debug.regions": "Regions", "ui.settingView.debug.regions.desc": "Show a box of the region of interest sent to the object detector", "ui.settingView.debug.regions.tips": "
Region Boxes
Bright green boxes will be overlaid on areas of interest in the frame that are being sent to the object detector.
", + "ui.settingView.debug.objectShapeFilterDrawing": "Object Shape Filter Drawing", + "ui.settingView.debug.objectShapeFilterDrawing.desc": "Draw a rectangle on the image to view area and ratio details", + "ui.settingView.debug.objectShapeFilterDrawing.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.", + "ui.settingView.debug.objectShapeFilterDrawing.document": "Read the documentation ", "ui.settingView.users": "Users", "ui.settingView.users.addUser": "Add User", diff --git a/web/public/locales/zh-CN/translation.json b/web/public/locales/zh-CN/translation.json index 82658d045..f5292d5db 100644 --- a/web/public/locales/zh-CN/translation.json +++ b/web/public/locales/zh-CN/translation.json @@ -143,6 +143,10 @@ "ui.time.formattedTimestampExcludeSeconds.24hour": "%m月%-d日 %H:%M", "ui.time.formattedTimestampWithYear": "%Y年%m月%-d日 %I:%M:%S %p", "ui.time.formattedTimestampWithYear.24hour": "%Y年%m月%-d日 %H:%M", + "ui.time.formattedTimestampOnlyMonthAndDay": "%m月%-d日", + + "ui.unit.speed.mph": "公里/小时", + "ui.unit.speed.kph": "英里/小时", "ui.iconPicker.selectIcon": "选择图标", "ui.iconPicker.search.placeholder": "搜索图标...", @@ -288,13 +292,30 @@ "ui.cameraGroup.icon": "图标", "ui.cameraGroup.toast.success": "摄像头组({{name}})保存成功。", "ui.cameraGroup.toast.error": "保存设置失败: {{error}}", + "ui.cameraGroup.camera.setting": "{{cameraName}} 视频流设置", + "ui.cameraGroup.camera.setting.desc": "更改此摄像头组仪表板的实时视频流选项。这些设置特定于设备/浏览器。", + "ui.cameraGroup.camera.setting.audioIsAvailable": "此视频流支持音频", + "ui.cameraGroup.camera.setting.audioIsUnavailable": "此视频流不支持音频", + "ui.cameraGroup.camera.setting.streamMethod": "视频流方法", + "ui.cameraGroup.camera.setting.streamMethod.method.noStreaming": "无视频流", + "ui.cameraGroup.camera.setting.streamMethod.method.noStreaming.desc": "摄像头图像每分钟仅更新一次,不会进行实时视频流播放。", + "ui.cameraGroup.camera.setting.streamMethod.method.smartStreaming": "智能视频流(推荐)", + "ui.cameraGroup.camera.setting.streamMethod.method.smartStreaming.desc": "智能视频流在没有检测到活动时,每分钟更新一次摄像头图像,以节省带宽和资源。当检测到活动时,图像会无缝切换到实时视频流。", + "ui.cameraGroup.camera.setting.streamMethod.method.continuousStreaming": "持续视频流", + "ui.cameraGroup.camera.setting.streamMethod.method.continuousStreaming.desc": "当摄像头画面在仪表板上可见时,始终为实时视频流,即使未检测到活动。", + "ui.cameraGroup.camera.setting.streamMethod.method.continuousStreaming.desc.warning": "持续视频流可能会导致高带宽使用和性能问题,请谨慎使用。", + "ui.cameraGroup.camera.setting.compatibilityMode": "兼容模式", + "ui.cameraGroup.camera.setting.compatibilityMode.desc": "仅在摄像头的实时视频流显示颜色伪影,并且图像右侧有一条对角线时启用此选项。", + "ui.eventView.alerts": "警告", "ui.eventView.detections": "检测", "ui.eventView.motion": "运动", + "ui.eventView.motion.only": "仅运动画面", "ui.eventView.allCameras": "所有摄像头", "ui.eventView.empty.alert": "还没有“警告”类回放", "ui.eventView.empty.detection": "还没有“探测”类回放", + "ui.eventView.empty.motion": "还没有运动类数据", "ui.exploreView.trackedObjectDetails": "探测对象详情", "ui.exploreView.type.details": "详情", @@ -303,6 +324,8 @@ "ui.exploreView.type.object_lifecycle": "对象生命周期", "ui.exploreView.details.label": "标签", "ui.exploreView.details.editSubLable": "编辑子标签", + "ui.exploreView.details.editSubLable.desc": "为 {{label}} 输入新的子标签", + "ui.exploreView.details.editSubLable.desc.noLabel": "为此跟踪对象输入新的子标签", "ui.exploreView.details.topScore": "最高得分", "ui.exploreView.details.topScore.info": "最高分是跟踪对象的最高中位数得分,因此可能与搜索结果缩略图上显示的得分不同。", "ui.exploreView.details.estimatedSpeed": "预计速度", @@ -344,6 +367,7 @@ "ui.filter.subLabels": "子标签", "ui.filter.allSubLabels": "所有子标签", "ui.filter.score": "分值", + "ui.filter.estimatedSpeed": "预计速度({{unit}})", "ui.filter.features": "特性", "ui.filter.features.hasSnapshot": "包含快照", "ui.filter.features.hasVideoClip": "包含视频片段", @@ -582,6 +606,10 @@ "ui.settingView.debug.regions": "范围", "ui.settingView.debug.regions.desc": "显示发送到运动检测器感兴趣范围的框。", "ui.settingView.debug.regions.tips": "范围框
将在帧中发送到目标检测器的感兴趣范围上叠加绿色框。
", + "ui.settingView.debug.objectShapeFilterDrawing": "允许绘制“对象形状过滤器”", + "ui.settingView.debug.objectShapeFilterDrawing.desc": "在图像上绘制矩形,以查看区域和比例详细信息。", + "ui.settingView.debug.objectShapeFilterDrawing.tips": "启用此选项,能够在摄像头图像上绘制矩形,将显示其区域和比例。然后,您可以使用这些值在配置中设置对象形状过滤器参数。", + "ui.settingView.debug.objectShapeFilterDrawing.document": "阅读文档(英文)", "ui.settingView.users": "用户管理", "ui.settingView.users.addUser": "添加用户", diff --git a/web/src/components/filter/CalendarFilterButton.tsx b/web/src/components/filter/CalendarFilterButton.tsx index c8d213493..551c9e031 100644 --- a/web/src/components/filter/CalendarFilterButton.tsx +++ b/web/src/components/filter/CalendarFilterButton.tsx @@ -100,7 +100,7 @@ export function CalendarRangeFilterButton({ const selectedDate = useFormattedRange( range?.from == undefined ? 0 : range.from.getTime() / 1000 + 1, range?.to == undefined ? 0 : range.to.getTime() / 1000 - 1, - "%b %-d", + t("ui.time.formattedTimestampOnlyMonthAndDay"), ); const trigger = ( diff --git a/web/src/components/filter/ReviewFilterGroup.tsx b/web/src/components/filter/ReviewFilterGroup.tsx index 7d2bf1525..4401daf65 100644 --- a/web/src/components/filter/ReviewFilterGroup.tsx +++ b/web/src/components/filter/ReviewFilterGroup.tsx @@ -610,7 +610,7 @@ function ShowMotionOnlyButton({ className="mx-2 cursor-pointer text-primary" htmlFor="collapse-motion" > - Motion only +
- Camera images will only update once per minute and no live
- streaming will occur.
+
- Smart streaming will update your camera image once per minute when
- no detectable activity is occurring to conserve bandwidth and
- resources. When activity is detected, the image seamlessly
- switches to a live stream.
+
- Camera image will always be a live stream when visible on the
- dashboard, even if no activity is being detected.
+
- Enable this option only if your camera's live stream is displaying
- color artifacts and has a diagonal line on the right side of the
- image.
+