From ec86f456ddd1c130b5e443332a912c542aafd632 Mon Sep 17 00:00:00 2001 From: ZhaiSoul <842607283@qq.com> Date: Thu, 13 Mar 2025 00:15:48 +0800 Subject: [PATCH] feat: add more live i18n keys --- web/public/locales/en/views/live.json | 44 ++++++++++ web/public/locales/zh-CN/views/live.json | 43 ++++++++++ web/src/views/live/LiveCameraView.tsx | 100 ++++++++++------------- 3 files changed, 132 insertions(+), 55 deletions(-) diff --git a/web/public/locales/en/views/live.json b/web/public/locales/en/views/live.json index 91bf80893..f5c33bd4f 100644 --- a/web/public/locales/en/views/live.json +++ b/web/public/locales/en/views/live.json @@ -72,6 +72,17 @@ "disable": "Hide Stream Stats" }, "manualRecording": { + "title": "On-Demand Recording", + "tips": "Start a manual event based on this camera's recording retention settings.", + "playInBackground": { + "label": "Play in background", + "desc": "Enable this option to continue streaming when the player is hidden." + }, + "showStats": { + "label": "Show Stats", + "desc": "Enable this option to show stream statistics as an overlay on the camera feed." + }, + "debugView": "Debug View", "start": "Start on-demand recording", "started": "Started manual on-demand recording.", "failedToStart": "Failed to start manual on-demand recording.", @@ -85,5 +96,38 @@ "audio": "Audio", "suspend:": { "forTime": "Suspend for: " + }, + "stream": { + "title": "Stream", + "audio": { + "tips": "Audio must be output from your camera and configured in go2rtc for this stream.", + "tips.documentation": "Read the documentation ", + "available": "Audio is available for this stream", + "unavailable": "Audio is not available for this stream" + }, + "twoWayTalk": { + "tips": "Your device must suppport the feature and WebRTC must be configured for two-way talk.", + "tips.documentation": "Read the documentation ", + "available": "Two-way talk is available for this stream", + "unavailable": "Two-way talk is unavailable for this stream" + }, + "lowBandwidth": { + "tips": "Live view is in low-bandwidth mode due to buffering or stream errors.", + "resetStream": "Reset stream" + }, + "playInBackground": { + "label": "Play in background", + "tips": "Enable this option to continue streaming when the player is hidden." + }, + "": "" + }, + "cameraSettings": { + "title": "{{camera}} Settings", + "cameraEnabled": "Camera Enabled", + "objectDetection": "Object Detection", + "recording": "Recording", + "snapshots": "Snapshots", + "audioDetection": "Audio Detection", + "autotracking": "Autotracking" } } diff --git a/web/public/locales/zh-CN/views/live.json b/web/public/locales/zh-CN/views/live.json index 3638d4cdb..03230152b 100644 --- a/web/public/locales/zh-CN/views/live.json +++ b/web/public/locales/zh-CN/views/live.json @@ -72,6 +72,17 @@ "disable": "隐藏视频流统计信息" }, "manualRecording": { + "title": "按需录制", + "tips": "根据此摄像机的录制保留设置,手动启动事件。", + "playInBackground": { + "label": "后台播放", + "desc": "启用此选项可在播放器隐藏时继续视频流播放。" + }, + "showStats": { + "label": "显示统计信息", + "desc": "启用此选项可在摄像机画面上叠加显示视频流统计信息。" + }, + "debugView": "调试视图", "start": "开始手动按需录制", "started": "已启用手动按需录制", "failedToStart": "启动手动录制失败", @@ -85,5 +96,37 @@ "audio": "音频", "suspend": { "forTime": "暂停时长:" + }, + "stream": { + "title": "视频流", + "audio": { + "tips": "音频必须从摄像机输出并在 go2rtc 中配置为此视频流使用。", + "tips.documentation": "阅读文档 ", + "available": "此视频流支持音频", + "unavailable": "此视频流不支持音频" + }, + "twoWayTalk": { + "tips": "您的设备必须支持此功能,并且必须配置 WebRTC 以支持双向对讲。", + "tips.documentation": "阅读文档 ", + "available": "此视频流支持双向对讲", + "unavailable": "此视频流不支持双向对讲" + }, + "lowBandwidth": { + "tips": "由于缓冲或视频流错误,实时视图处于低带宽模式。", + "resetStream": "重置视频流" + }, + "playInBackground": { + "label": "后台播放", + "tips": "启用此选项可在播放器隐藏时继续视频流播放。" + } + }, + "cameraSettings": { + "title": "{{camera}} 设置", + "cameraEnabled": "摄像机已启用", + "objectDetection": "对象检测", + "recording": "录制", + "snapshots": "快照", + "audioDetection": "音频检测", + "autotracking": "自动跟踪" } } diff --git a/web/src/views/live/LiveCameraView.tsx b/web/src/views/live/LiveCameraView.tsx index 5ea70ad42..412974ddd 100644 --- a/web/src/views/live/LiveCameraView.tsx +++ b/web/src/views/live/LiveCameraView.tsx @@ -1233,7 +1233,7 @@ function FrigateCameraFeatures({
- Info + {t("button.info", {ns: "common"})}
@@ -1261,7 +1261,7 @@ function FrigateCameraFeatures({ {isRestreamed && Object.values(camera.live.streams).length > 0 && (
- + { @@ -1611,22 +1607,21 @@ function FrigateCameraFeatures({ {supportsAudioOutput ? ( <> -
Audio is available for this stream
+
{t("stream.audio.available")}
) : ( <> -
Audio is unavailable for this stream
+
{t("stream.audio.unavailable")}
- Info + {t("button.info", {ns: "common"})}
- Audio must be output from your camera and configured - in go2rtc for this stream. + {t("stream.audio.tips")}
- Read the documentation{" "} + {t("stream.audio.tips.documentation")}
@@ -1651,22 +1646,21 @@ function FrigateCameraFeatures({ {supports2WayTalk ? ( <> -
Two-way talk is available for this stream
+
{t("stream.twoWayTalk.available")}
) : ( <> -
Two-way talk is unavailable for this stream
+
{t("stream.twoWayTalk.unavailable")}
- Info + {t("button.info", {ns: "common"})}
- Your device must suppport the feature and WebRTC - must be configured for two-way talk. + {t("stream.twoWayTalk.tips")}
- Read the documentation{" "} + {t("stream.twoWayTalk.tips.documentation")}
@@ -1690,8 +1684,7 @@ function FrigateCameraFeatures({

- Live view is in low-bandwidth mode due to buffering or - stream errors. + {t("stream.lowBandwidth.tips")}

)} @@ -1710,7 +1703,7 @@ function FrigateCameraFeatures({ )}
- On-Demand Recording + {t("manualRecording.title")}
{isRestreamed && ( <>
{ setPlayInBackground(checked); }} />

- Enable this option to continue streaming when the player is - hidden. + {t("manualRecording.playInBackground.desc")}

{ setShowStats(checked); }} />

- Enable this option to show stream statistics as an overlay on - the camera feed. + {t("manualRecording.showStats.desc")}

)}
- Debug View + {t("manualRecording.debugView")} navigate(`/settings?page=debug&camera=${camera.name}`)