diff --git a/web/public/locales/en/translation.json b/web/public/locales/en/translation.json index e321c7594..b6124489e 100644 --- a/web/public/locales/en/translation.json +++ b/web/public/locales/en/translation.json @@ -12,6 +12,7 @@ "camera": "Camera", "cameras": "Cameras", "cancel": "Cancel", + "click_to_edit": "Click To Edit", "clip": "Clip", "close": "Close", "_confidence": "confidence", @@ -23,6 +24,7 @@ "debug_update_interval": "Debug stats update automatically every {interval} seconds.", "delete": "Delete", "desc_delete_saved_event": "Confirm deletion of saved event.", + "desc_mask_creation": "This tool can help you create masks & zones for your {camera} camera. When done, copy each mask configuration into your config.yml file restart your Frigate instance to save your changes.", "desc_no_recordings": "Make sure you have enabled the record role in your configuration for the {camera} camera.", "_detector": "detector", "documentation": "Documentation", @@ -34,7 +36,10 @@ "last_month": "Last Month", "last_seven_days": "Last Seven Days", "light": "Light", + "motion_masks": "Motion Masks", + "object_masks": "Object Masks", "recordings": "Recordings", + "remove": "Remove", "restart_frigate": "Restart Frigate", "restart_in_progress": "Restart in progress", "send_to_frigate_plus": "Send To Frigate+", @@ -43,6 +48,7 @@ "this_month": "This Month", "thumbnail": "Thumbnail", "title_delete_saved_event": "Delete Saved Event?", + "title_mask_creation": "{camera} Mask & Zone Creator", "title_no_recordings": "No Recordings Found", "today": "Today", "toggle_detect": "Toggle Detect", @@ -50,6 +56,8 @@ "toggle_snapshots": "Toggle Snapshots", "uploading": "Uploading...", "wait_for_restart": "Please wait a few seconds for the restart to complete before reloading the page.", + "warning": "Warning", "yes": "Yes", - "yesterday": "Yesterday" + "yesterday": "Yesterday", + "zones": "Zones" } \ No newline at end of file diff --git a/web/src/routes/CameraMap.jsx b/web/src/routes/CameraMap.jsx index 6f7bc6fce..72e3a7d3d 100644 --- a/web/src/routes/CameraMap.jsx +++ b/web/src/routes/CameraMap.jsx @@ -7,8 +7,10 @@ import { useResizeObserver } from '../hooks'; import { useCallback, useMemo, useRef, useState } from 'preact/hooks'; import { useApiHost } from '../api'; import useSWR from 'swr'; +import { useTranslation } from 'react-i18next'; export default function CameraMasks({ camera }) { + const { t } = useTranslation(); const { data: config } = useSWR('config'); const apiHost = useApiHost(); const imageRef = useRef(null); @@ -198,17 +200,20 @@ ${Object.keys(objectMaskPoints) return (
- {camera} mask & zone creator + {t('title_mask_creation') + .replace("{camera}", camera.replace("_", " ")) + } + - This tool can help you create masks & zones for your {camera} camera. When done, copy each mask - configuration into your config.yml file restart your Frigate instance to - save your changes. + {t('desc_mask_creation') + .replace("{camera}", camera.replace("_", " ")) + }

} - header="Warning" + header={t('warning')} />
@@ -231,7 +236,7 @@ ${Object.keys(objectMaskPoints)
{`${yamlKeyPrefix(points, mainkey, subkey)}${polylinePointsToPolyline(points)}`} {showButtons ? ( @@ -518,7 +525,7 @@ function Item({ mainkey, subkey, editing, handleEdit, points, showButtons, _hand data-subkey={subkey} onClick={handleRemove} > - Remove + {t('remove')} ) : null}