From 13c4390f967512f7fccd39ee54d621d808136a58 Mon Sep 17 00:00:00 2001 From: mohadeseh safari Date: Fri, 9 May 2025 14:58:13 -0400 Subject: [PATCH] fix: translate UI elements in menu and uptime page - Added translations for sidebar menu items in all languages - Fixed "Create new" button to use translation instead of hardcoded text - Added missing translations for "Bulk Import" in Russian and Turkish - Translated status box labels (UP, DOWN, PAUSED) in the uptime monitors page - Made greeting component fully translatable with proper context - Fixed lint warnings in components --- .../Components/MonitorCreateHeader/index.jsx | 6 ++-- .../Monitors/Components/StatusBoxes/index.jsx | 9 ++++-- client/src/Utils/greeting.jsx | 8 ++++-- client/src/locales/gb.json | 10 +++++++ client/src/locales/ru.json | 23 ++++++++++++++- client/src/locales/tr.json | 28 +++++++++++++------ 6 files changed, 66 insertions(+), 18 deletions(-) diff --git a/client/src/Components/MonitorCreateHeader/index.jsx b/client/src/Components/MonitorCreateHeader/index.jsx index 05a9b7f9b..15d6d5c0f 100644 --- a/client/src/Components/MonitorCreateHeader/index.jsx +++ b/client/src/Components/MonitorCreateHeader/index.jsx @@ -6,7 +6,7 @@ import { useTheme } from "@emotion/react"; const CreateMonitorHeader = ({ isAdmin, - label = "Create new", + label, isLoading = true, path, bulkPath, @@ -14,6 +14,8 @@ const CreateMonitorHeader = ({ const navigate = useNavigate(); const { t } = useTranslation(); const theme = useTheme(); + + // Use the provided label or fall back to the translated default if (!isAdmin) return null; @@ -30,7 +32,7 @@ const CreateMonitorHeader = ({ color="accent" onClick={() => navigate(path)} > - {label} + {label || t("createNew")} {bulkPath && (