From e480349a1c422f5c304988f5f367f3897131d840 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 22 Aug 2025 16:42:23 -0500 Subject: [PATCH] Consolidate documentation i18n keys --- web/public/locales/en/common.json | 3 ++- web/public/locales/en/components/camera.json | 3 +-- web/public/locales/en/components/dialog.json | 3 +-- web/public/locales/en/views/explore.json | 4 +-- web/public/locales/en/views/faceLibrary.json | 1 - web/public/locales/en/views/live.json | 4 +-- web/public/locales/en/views/settings.json | 22 +++++----------- web/public/locales/en/views/system.json | 3 +-- .../overlay/detail/AnnotationSettingsPane.tsx | 4 +-- .../overlay/detail/FaceCreateWizardDialog.tsx | 2 +- .../settings/CameraStreamingDialog.tsx | 6 ++--- .../settings/MotionMaskEditPane.tsx | 4 +-- web/src/components/settings/ZoneEditPane.tsx | 2 +- web/src/pages/Explore.tsx | 4 +-- web/src/views/live/LiveCameraView.tsx | 25 ++++++++----------- web/src/views/settings/CameraSettingsView.tsx | 4 +-- .../settings/EnrichmentsSettingsView.tsx | 10 +++----- .../settings/FrigatePlusSettingsView.tsx | 2 +- web/src/views/settings/MasksAndZonesView.tsx | 10 +++----- web/src/views/settings/MotionTunerView.tsx | 2 +- .../settings/NotificationsSettingsView.tsx | 6 ++--- web/src/views/settings/ObjectSettingsView.tsx | 2 +- web/src/views/system/StorageMetrics.tsx | 2 +- 23 files changed, 46 insertions(+), 82 deletions(-) diff --git a/web/public/locales/en/common.json b/web/public/locales/en/common.json index 86304fff3..c22a9227d 100644 --- a/web/public/locales/en/common.json +++ b/web/public/locales/en/common.json @@ -262,5 +262,6 @@ "title": "404", "desc": "Page not found" }, - "selectItem": "Select {{item}}" + "selectItem": "Select {{item}}", + "readTheDocumentation": "Read the documentation" } diff --git a/web/public/locales/en/components/camera.json b/web/public/locales/en/components/camera.json index 10513a729..1ac9cc513 100644 --- a/web/public/locales/en/components/camera.json +++ b/web/public/locales/en/components/camera.json @@ -35,8 +35,7 @@ "audioIsUnavailable": "Audio is unavailable for this stream", "audio": { "tips": { - "title": "Audio must be output from your camera and configured in go2rtc for this stream.", - "document": "Read the documentation " + "title": "Audio must be output from your camera and configured in go2rtc for this stream." } }, "stream": "Stream", diff --git a/web/public/locales/en/components/dialog.json b/web/public/locales/en/components/dialog.json index 02ab43c4c..a64dbf594 100644 --- a/web/public/locales/en/components/dialog.json +++ b/web/public/locales/en/components/dialog.json @@ -69,8 +69,7 @@ "restreaming": { "disabled": "Restreaming is not enabled for this camera.", "desc": { - "title": "Set up go2rtc for additional live view options and audio for this camera.", - "readTheDocumentation": "Read the documentation" + "title": "Set up go2rtc for additional live view options and audio for this camera." } }, "showStats": { diff --git a/web/public/locales/en/views/explore.json b/web/public/locales/en/views/explore.json index 3e5e753d9..f35cfdc1d 100644 --- a/web/public/locales/en/views/explore.json +++ b/web/public/locales/en/views/explore.json @@ -24,8 +24,7 @@ "textTokenizer": "Text tokenizer" }, "tips": { - "context": "You may want to reindex the embeddings of your tracked objects once the models are downloaded.", - "documentation": "Read the documentation" + "context": "You may want to reindex the embeddings of your tracked objects once the models are downloaded." }, "error": "An error has occurred. Check Frigate logs." } @@ -73,7 +72,6 @@ "offset": { "label": "Annotation Offset", "desc": "This data comes from your camera's detect feed but is overlayed on images from the the record feed. It is unlikely that the two streams are perfectly in sync. As a result, the bounding box and the footage will not line up perfectly. However, the annotation_offset field can be used to adjust this.", - "documentation": "Read the documentation ", "millisecondsToOffset": "Milliseconds to offset detect annotations by. Default: 0", "tips": "TIP: Imagine there is an event clip with a person walking from left to right. If the event timeline bounding box is consistently to the left of the person then the value should be decreased. Similarly, if a person is walking from left to right and the bounding box is consistently ahead of the person then the value should be increased.", "toast": { diff --git a/web/public/locales/en/views/faceLibrary.json b/web/public/locales/en/views/faceLibrary.json index e734ca974..7bd60f95a 100644 --- a/web/public/locales/en/views/faceLibrary.json +++ b/web/public/locales/en/views/faceLibrary.json @@ -71,7 +71,6 @@ }, "nofaces": "No faces available", "pixels": "{{area}}px", - "readTheDocs": "Read the documentation", "trainFaceAs": "Train Face as:", "trainFace": "Train Face", "toast": { diff --git a/web/public/locales/en/views/live.json b/web/public/locales/en/views/live.json index 2af399296..f20fc5118 100644 --- a/web/public/locales/en/views/live.json +++ b/web/public/locales/en/views/live.json @@ -119,15 +119,13 @@ "title": "Stream", "audio": { "tips": { - "title": "Audio must be output from your camera and configured in go2rtc for this stream.", - "documentation": "Read the documentation " + "title": "Audio must be output from your camera and configured in go2rtc for this stream." }, "available": "Audio is available for this stream", "unavailable": "Audio is not available for this stream" }, "twoWayTalk": { "tips": "Your device must support 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" }, diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json index 516ddf9f2..38c66f630 100644 --- a/web/public/locales/en/views/settings.json +++ b/web/public/locales/en/views/settings.json @@ -92,7 +92,6 @@ "semanticSearch": { "title": "Semantic Search", "desc": "Semantic Search in Frigate allows you to find tracked objects within your review items using either the image itself, a user-defined text description, or an automatically generated one.", - "readTheDocumentation": "Read the Documentation", "reindexNow": { "label": "Reindex Now", "desc": "Reindexing will regenerate embeddings for all tracked object. This process runs in the background and may max out your CPU and take a fair amount of time depending on the number of tracked objects you have.", @@ -119,7 +118,6 @@ "faceRecognition": { "title": "Face Recognition", "desc": "Face recognition allows people to be assigned names and when their face is recognized Frigate will assign the person's name as a sub label. This information is included in the UI, filters, as well as in notifications.", - "readTheDocumentation": "Read the Documentation", "modelSize": { "label": "Model Size", "desc": "The size of the model used for face recognition.", @@ -135,8 +133,7 @@ }, "licensePlateRecognition": { "title": "License Plate Recognition", - "desc": "Frigate can recognize license plates on vehicles and automatically add the detected characters to the recognized_license_plate field or a known name as a sub_label to objects that are of type car. A common use case may be to read the license plates of cars pulling into a driveway or cars passing by on a street.", - "readTheDocumentation": "Read the Documentation" + "desc": "Frigate can recognize license plates on vehicles and automatically add the detected characters to the recognized_license_plate field or a known name as a sub_label to objects that are of type car. A common use case may be to read the license plates of cars pulling into a driveway or cars passing by on a street." }, "restart_required": "Restart required (Enrichments settings changed)", "toast": { @@ -167,7 +164,7 @@ "reviewClassification": { "title": "Review Classification", "desc": "Frigate categorizes review items as Alerts and Detections. By default, all person and car objects are considered Alerts. You can refine categorization of your review items by configuring required zones for them.", - "readTheDocumentation": "Read the Documentation", + "noDefinedZones": "No zones are defined for this camera.", "objectAlertsTips": "All {{alertsLabels}} objects on {{cameraName}} will be shown as Alerts.", "zoneObjectAlertsTips": "All {{alertsLabels}} objects detected in {{zone}} on {{cameraName}} will be shown as Alerts.", @@ -313,7 +310,6 @@ "speedEstimation": { "title": "Speed Estimation", "desc": "Enable speed estimation for objects in this zone. The zone must have exactly 4 points.", - "docs": "Read the documentation", "lineADistance": "Line A distance ({{unit}})", "lineBDistance": "Line B distance ({{unit}})", "lineCDistance": "Line C distance ({{unit}})", @@ -343,16 +339,14 @@ "add": "New Motion Mask", "edit": "Edit Motion Mask", "context": { - "title": "Motion masks are used to prevent unwanted types of motion from triggering detection (example: tree branches, camera timestamps). Motion masks should be used very sparingly, over-masking will make it more difficult for objects to be tracked.", - "documentation": "Read the documentation" + "title": "Motion masks are used to prevent unwanted types of motion from triggering detection (example: tree branches, camera timestamps). Motion masks should be used very sparingly, over-masking will make it more difficult for objects to be tracked." }, "point_one": "{{count}} point", "point_other": "{{count}} points", "clickDrawPolygon": "Click to draw a polygon on the image.", "polygonAreaTooLarge": { "title": "The motion mask is covering {{polygonArea}}% of the camera frame. Large motion masks are not recommended.", - "tips": "Motion masks do not prevent objects from being detected. You should use a required zone instead.", - "documentation": "Read the documentation" + "tips": "Motion masks do not prevent objects from being detected. You should use a required zone instead." }, "toast": { "success": { @@ -456,7 +450,6 @@ "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 ", "score": "Score", "ratio": "Ratio", "area": "Area" @@ -563,13 +556,11 @@ "title": "Notifications", "notificationSettings": { "title": "Notification Settings", - "desc": "Frigate can natively send push notifications to your device when it is running in the browser or installed as a PWA.", - "documentation": "Read the Documentation" + "desc": "Frigate can natively send push notifications to your device when it is running in the browser or installed as a PWA." }, "notificationUnavailable": { "title": "Notifications Unavailable", - "desc": "Web push notifications require a secure context (https://…). This is a browser limitation. Access Frigate securely to use notifications.", - "documentation": "Read the Documentation" + "desc": "Web push notifications require a secure context (https://…). This is a browser limitation. Access Frigate securely to use notifications." }, "globalSettings": { "title": "Global Settings", @@ -626,7 +617,6 @@ "snapshotConfig": { "title": "Snapshot Configuration", "desc": "Submitting to Frigate+ requires both snapshots and clean_copy snapshots to be enabled in your config.", - "documentation": "Read the documentation", "cleanCopyWarning": "Some cameras have snapshots enabled but have the clean copy disabled. You need to enable clean_copy in your snapshot config to be able to submit images from these cameras to Frigate+.", "table": { "camera": "Camera", diff --git a/web/public/locales/en/views/system.json b/web/public/locales/en/views/system.json index c03d10652..1357000c9 100644 --- a/web/public/locales/en/views/system.json +++ b/web/public/locales/en/views/system.json @@ -93,8 +93,7 @@ }, "shm": { "title": "SHM (shared memory) allocation", - "warning": "The current SHM size of {{total}}MB is too small. Increase it to at least {{min_shm}}MB.", - "readTheDocumentation": "Read the documentation" + "warning": "The current SHM size of {{total}}MB is too small. Increase it to at least {{min_shm}}MB." }, "cameraStorage": { "title": "Camera Storage", diff --git a/web/src/components/overlay/detail/AnnotationSettingsPane.tsx b/web/src/components/overlay/detail/AnnotationSettingsPane.tsx index f71c2d6ba..9e92bc011 100644 --- a/web/src/components/overlay/detail/AnnotationSettingsPane.tsx +++ b/web/src/components/overlay/detail/AnnotationSettingsPane.tsx @@ -187,9 +187,7 @@ export function AnnotationSettingsPane({ rel="noopener noreferrer" className="inline" > - {t( - "objectLifecycle.annotationSettings.offset.documentation", - )} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/components/overlay/detail/FaceCreateWizardDialog.tsx b/web/src/components/overlay/detail/FaceCreateWizardDialog.tsx index 9207ce02f..3ed512303 100644 --- a/web/src/components/overlay/detail/FaceCreateWizardDialog.tsx +++ b/web/src/components/overlay/detail/FaceCreateWizardDialog.tsx @@ -161,7 +161,7 @@ export default function CreateFaceWizardDialog({ rel="noopener noreferrer" className="inline" > - {t("readTheDocs")} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/components/settings/CameraStreamingDialog.tsx b/web/src/components/settings/CameraStreamingDialog.tsx index 0f070ce5f..0e39af83a 100644 --- a/web/src/components/settings/CameraStreamingDialog.tsx +++ b/web/src/components/settings/CameraStreamingDialog.tsx @@ -228,9 +228,7 @@ export function CameraStreamingDialog({ rel="noopener noreferrer" className="inline" > - {t("streaming.restreaming.desc.readTheDocumentation", { - ns: "components/dialog", - })} + {t("readTheDocumentation", { ns: "common" })} @@ -289,7 +287,7 @@ export function CameraStreamingDialog({ rel="noopener noreferrer" className="inline" > - {t("group.camera.setting.audio.tips.document")} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/components/settings/MotionMaskEditPane.tsx b/web/src/components/settings/MotionMaskEditPane.tsx index b59005d0b..ddb78c877 100644 --- a/web/src/components/settings/MotionMaskEditPane.tsx +++ b/web/src/components/settings/MotionMaskEditPane.tsx @@ -257,7 +257,7 @@ export default function MotionMaskEditPane({ rel="noopener noreferrer" className="inline" > - {t("masksAndZones.motionMasks.context.documentation")}{" "} + {t("readTheDocumentation", { ns: "common" })} @@ -303,7 +303,7 @@ export default function MotionMaskEditPane({ rel="noopener noreferrer" className="my-3 block" > - {t("masksAndZones.motionMasks.polygonAreaTooLarge.documentation")}{" "} + {t("readTheDocumentation", { ns: "common" })}{" "} diff --git a/web/src/components/settings/ZoneEditPane.tsx b/web/src/components/settings/ZoneEditPane.tsx index 17029728b..67f5f690a 100644 --- a/web/src/components/settings/ZoneEditPane.tsx +++ b/web/src/components/settings/ZoneEditPane.tsx @@ -687,7 +687,7 @@ export default function ZoneEditPane({ rel="noopener noreferrer" className="inline" > - {t("masksAndZones.zones.speedEstimation.docs")} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/pages/Explore.tsx b/web/src/pages/Explore.tsx index b6a4a43e5..9acc066ba 100644 --- a/web/src/pages/Explore.tsx +++ b/web/src/pages/Explore.tsx @@ -482,9 +482,7 @@ export default function Explore() { rel="noopener noreferrer" className="inline" > - {t( - "exploreIsUnavailable.downloadingModels.tips.documentation", - )}{" "} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/views/live/LiveCameraView.tsx b/web/src/views/live/LiveCameraView.tsx index 69d4a26f4..b4d099dd7 100644 --- a/web/src/views/live/LiveCameraView.tsx +++ b/web/src/views/live/LiveCameraView.tsx @@ -1379,12 +1379,7 @@ function FrigateCameraFeatures({ rel="noopener noreferrer" className="inline" > - {t( - "streaming.restreaming.desc.readTheDocumentation", - { - ns: "components/dialog", - }, - )} + {t("readTheDocumentation", { ns: "common" })} @@ -1457,7 +1452,9 @@ function FrigateCameraFeatures({ rel="noopener noreferrer" className="inline" > - {t("stream.audio.tips.documentation")} + {t("readTheDocumentation", { + ns: "common", + })} @@ -1500,9 +1497,9 @@ function FrigateCameraFeatures({ rel="noopener noreferrer" className="inline" > - {t( - "stream.twoWayTalk.tips.documentation", - )} + {t("readTheDocumentation", { + ns: "common", + })} @@ -1717,9 +1714,7 @@ function FrigateCameraFeatures({ rel="noopener noreferrer" className="inline" > - {t("streaming.restreaming.desc.readTheDocumentation", { - ns: "components/dialog", - })} + {t("readTheDocumentation", { ns: "common" })} @@ -1788,7 +1783,7 @@ function FrigateCameraFeatures({ rel="noopener noreferrer" className="inline" > - {t("stream.audio.tips.documentation")} + {t("readTheDocumentation", { ns: "common" })} @@ -1831,7 +1826,7 @@ function FrigateCameraFeatures({ rel="noopener noreferrer" className="inline" > - {t("stream.twoWayTalk.tips.documentation")} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/views/settings/CameraSettingsView.tsx b/web/src/views/settings/CameraSettingsView.tsx index 61f327c6e..41bb15bef 100644 --- a/web/src/views/settings/CameraSettingsView.tsx +++ b/web/src/views/settings/CameraSettingsView.tsx @@ -508,9 +508,7 @@ export default function CameraSettingsView({ rel="noopener noreferrer" className="inline" > - - camera.reviewClassification.readTheDocumentation - {" "} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/views/settings/EnrichmentsSettingsView.tsx b/web/src/views/settings/EnrichmentsSettingsView.tsx index 2f00b3f2c..a2a835969 100644 --- a/web/src/views/settings/EnrichmentsSettingsView.tsx +++ b/web/src/views/settings/EnrichmentsSettingsView.tsx @@ -263,7 +263,7 @@ export default function EnrichmentsSettingsView({ rel="noopener noreferrer" className="inline" > - {t("enrichments.semanticSearch.readTheDocumentation")} + {t("readTheDocumentation", { ns: "common" })} @@ -409,7 +409,7 @@ export default function EnrichmentsSettingsView({ rel="noopener noreferrer" className="inline" > - {t("enrichments.faceRecognition.readTheDocumentation")} + {t("readTheDocumentation", { ns: "common" })} @@ -512,9 +512,7 @@ export default function EnrichmentsSettingsView({ rel="noopener noreferrer" className="inline" > - {t( - "enrichments.licensePlateRecognition.readTheDocumentation", - )} + {t("readTheDocumentation", { ns: "common" })} @@ -558,7 +556,7 @@ export default function EnrichmentsSettingsView({ rel="noopener noreferrer" className="inline" > - {t("enrichments.semanticSearch.readTheDocumentation")} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/views/settings/FrigatePlusSettingsView.tsx b/web/src/views/settings/FrigatePlusSettingsView.tsx index e721aa13c..bcf7434e6 100644 --- a/web/src/views/settings/FrigatePlusSettingsView.tsx +++ b/web/src/views/settings/FrigatePlusSettingsView.tsx @@ -458,7 +458,7 @@ export default function FrigatePlusSettingsView({ rel="noopener noreferrer" className="inline" > - {t("frigatePlus.snapshotConfig.documentation")} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/views/settings/MasksAndZonesView.tsx b/web/src/views/settings/MasksAndZonesView.tsx index c9ba9971e..320fe0994 100644 --- a/web/src/views/settings/MasksAndZonesView.tsx +++ b/web/src/views/settings/MasksAndZonesView.tsx @@ -506,7 +506,7 @@ export default function MasksAndZonesView({ rel="noopener noreferrer" className="inline" > - {t("masksAndZones.zones.desc.documentation")}{" "} + {t("readTheDocumentation", { ns: "common" })} @@ -574,9 +574,7 @@ export default function MasksAndZonesView({ rel="noopener noreferrer" className="inline" > - {t( - "masksAndZones.motionMasks.desc.documentation", - )}{" "} + {t("readTheDocumentation", { ns: "common" })} @@ -646,9 +644,7 @@ export default function MasksAndZonesView({ rel="noopener noreferrer" className="inline" > - {t( - "masksAndZones.objectMasks.desc.documentation", - )}{" "} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/views/settings/MotionTunerView.tsx b/web/src/views/settings/MotionTunerView.tsx index ec75298eb..152de774f 100644 --- a/web/src/views/settings/MotionTunerView.tsx +++ b/web/src/views/settings/MotionTunerView.tsx @@ -205,7 +205,7 @@ export default function MotionTunerView({ rel="noopener noreferrer" className="inline" > - {t("motionDetectionTuner.desc.documentation")}{" "} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/views/settings/NotificationsSettingsView.tsx b/web/src/views/settings/NotificationsSettingsView.tsx index ab0241e24..e5027cd8e 100644 --- a/web/src/views/settings/NotificationsSettingsView.tsx +++ b/web/src/views/settings/NotificationsSettingsView.tsx @@ -341,7 +341,7 @@ export default function NotificationView({ rel="noopener noreferrer" className="inline" > - {t("notification.notificationSettings.documentation")}{" "} + {t("readTheDocumentation", { ns: "common" })} @@ -363,7 +363,7 @@ export default function NotificationView({ rel="noopener noreferrer" className="inline" > - {t("notification.notificationUnavailable.documentation")}{" "} + {t("readTheDocumentation", { ns: "common" })}{" "} @@ -396,7 +396,7 @@ export default function NotificationView({ rel="noopener noreferrer" className="inline" > - {t("notification.notificationSettings.documentation")}{" "} + {t("readTheDocumentation", { ns: "common" })}{" "} diff --git a/web/src/views/settings/ObjectSettingsView.tsx b/web/src/views/settings/ObjectSettingsView.tsx index d1f77e3ac..bd47b01bc 100644 --- a/web/src/views/settings/ObjectSettingsView.tsx +++ b/web/src/views/settings/ObjectSettingsView.tsx @@ -275,7 +275,7 @@ export default function ObjectSettingsView({ rel="noopener noreferrer" className="inline" > - {t("debug.objectShapeFilterDrawing.document")} + {t("readTheDocumentation", { ns: "common" })} diff --git a/web/src/views/system/StorageMetrics.tsx b/web/src/views/system/StorageMetrics.tsx index 050badce2..b91e66986 100644 --- a/web/src/views/system/StorageMetrics.tsx +++ b/web/src/views/system/StorageMetrics.tsx @@ -178,7 +178,7 @@ export default function StorageMetrics({ rel="noopener noreferrer" className="inline" > - {t("storage.shm.readTheDocumentation")} + {t("readTheDocumentation", { ns: "common" })}