From 47f36693c386b0343074d0440cfa13eacb566b39 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sat, 27 Aug 2022 11:06:50 -0600 Subject: [PATCH] Add events translations --- web/public/locales/en/translation.json | 31 +++++++++++++-- web/src/routes/Events.jsx | 54 +++++++++++++------------- 2 files changed, 56 insertions(+), 29 deletions(-) diff --git a/web/public/locales/en/translation.json b/web/public/locales/en/translation.json index 8ef89a6a7..a6ba93d44 100644 --- a/web/public/locales/en/translation.json +++ b/web/public/locales/en/translation.json @@ -1,21 +1,46 @@ { + "all": "All", + "all_cameras": "All Cameras", + "all_labels": "All Labels", + "all_sub_labels": "All Sub Labels" + "all_zones": "All Zones", "are_you_sure": "Are you sure?", "auto_dark_mode": "Auto Dark Mode", + "best_image": "Best Image", "birdseye": "Birdseye", "cameras": "Cameras", "cancel": "Cancel", + "clip": "Clip", + "close": "Close", + "_confidence": "confidence", + "custom_range": "Custom Range", "dark": "Dark", "debug": "Debug", + "delete": "Delete", + "desc_delete_saved_event": "Confirm deletion of saved event.", + "desc_no_recordings": "Make sure you have enabled the record role in your configuration for the {camera} camera.", "documentation": "Documentation", + "download_clip": "Download Clip", + "download_snapshot": "Download Snapshot", "events": "Events", "github": "GitHub", + "in_progress": "In Progress", + "last_month": "Last Month", + "last_seven_days": "Last Seven Days", "light": "Light", - "title_no_recordings": "No Recordings Found", - "desc_no_recordings": "Make sure you have enabled the record role in your configuration for the {camera} camera.", "recordings": "Recordings", "restart_frigate": "Restart Frigate", "restart_in_progress": "Restart in progress", + "send_to_frigate_plus": "Send To Frigate+", + "sent_to_frigate_plus": "Sent To Frigate+", "style_guide": "Style Guide", + "this_month": "This Month", + "thumbnail": "Thumbnail", + "title_delete_saved_event": "Delete Saved Event?", + "title_no_recordings": "No Recordings Found", + "today": "Today", + "uploading": "Uploading...", "wait_for_restart": "Please wait a few seconds for the restart to complete before reloading the page.", - "yes": "Yes" + "yes": "Yes", + "yesterday": "Yesterday" } \ No newline at end of file diff --git a/web/src/routes/Events.jsx b/web/src/routes/Events.jsx index b93d661e4..dafe56f76 100644 --- a/web/src/routes/Events.jsx +++ b/web/src/routes/Events.jsx @@ -21,6 +21,7 @@ import CalendarIcon from '../icons/Calendar'; import Calendar from '../components/Calendar'; import Button from '../components/Button'; import Dialog from '../components/Dialog'; +import { useTranslation } from 'react-i18next'; const API_LIMIT = 25; @@ -37,6 +38,7 @@ const monthsAgo = (num) => { }; export default function Events({ path, ...props }) { + const { t } = useTranslation(); const apiHost = useApiHost(); const [searchParams, setSearchParams] = useState({ before: null, @@ -241,14 +243,14 @@ export default function Events({ path, ...props }) { return (
- Events + {t('events')}