diff --git a/client/src/Components/Dialog/index.jsx b/client/src/Components/Dialog/index.jsx index 3f4f16f05..e07597df4 100644 --- a/client/src/Components/Dialog/index.jsx +++ b/client/src/Components/Dialog/index.jsx @@ -2,6 +2,7 @@ import PropTypes from "prop-types"; import { Button, Stack } from "@mui/material"; import { GenericDialog } from "./genericDialog"; import { useTheme } from "@emotion/react"; +import { useTranslation } from "react-i18next"; const Dialog = ({ title, @@ -13,6 +14,7 @@ const Dialog = ({ isLoading, }) => { const theme = useTheme(); + const { t } = useTranslation(); return ( - Cancel + {t("cancel", "Cancel")} diff --git a/client/src/Pages/Account/index.jsx b/client/src/Pages/Account/index.jsx index c3e2be2f1..0f17d2d01 100644 --- a/client/src/Pages/Account/index.jsx +++ b/client/src/Pages/Account/index.jsx @@ -8,6 +8,7 @@ import TabContext from "@mui/lab/TabContext"; import ProfilePanel from "../../Components/TabPanels/Account/ProfilePanel"; import PasswordPanel from "../../Components/TabPanels/Account/PasswordPanel"; import TeamPanel from "../../Components/TabPanels/Account/TeamPanel"; +import { useTranslation } from "react-i18next"; import "./index.css"; /** @@ -24,24 +25,34 @@ const Account = ({ open = "profile" }) => { navigate(`/account/${newTab}`); }; const { user } = useSelector((state) => state.auth); + const { t } = useTranslation(); const requiredRoles = ["superadmin", "admin"]; - let tabList = ["Profile", "Password", "Team"]; + let tabList = [ + { name: t("menu.profile"), value: "profile" }, + { name: t("menu.password"), value: "password" }, + { name: t("menu.team"), value: "team" } + ]; const hideTeams = !requiredRoles.some((role) => user.role.includes(role)); if (hideTeams) { - tabList = ["Profile", "Password"]; + tabList = [ + { name: t("menu.profile"), value: "profile" }, + { name: t("menu.password"), value: "password" } + ]; } // Remove password for demo if (user.role.includes("demo")) { - tabList = ["Profile"]; + tabList = [ + { name: t("menu.profile"), value: "profile" } + ]; } const handleKeyDown = (event) => { - const currentIndex = tabList.findIndex((label) => label.toLowerCase() === tab); + const currentIndex = tabList.findIndex((item) => item.value === tab); if (event.key === "Tab") { const nextIndex = (currentIndex + 1) % tabList.length; - setFocusedTab(tabList[nextIndex].toLowerCase()); + setFocusedTab(tabList[nextIndex].value); } else if (event.key === "Enter") { event.preventDefault(); navigate(`/account/${focusedTab}`); @@ -60,13 +71,13 @@ const Account = ({ open = "profile" }) => { > - {tabList.map((label, index) => ( + {tabList.map((item, index) => ( handleFocus(label.toLowerCase())} + onFocus={() => handleFocus(item.value)} tabIndex={index} /> ))} diff --git a/client/src/Pages/Auth/ForgotPassword.jsx b/client/src/Pages/Auth/ForgotPassword.jsx index a67f67c14..ea2384f68 100644 --- a/client/src/Pages/Auth/ForgotPassword.jsx +++ b/client/src/Pages/Auth/ForgotPassword.jsx @@ -166,7 +166,7 @@ const ForgotPassword = () => { {t("authForgotPasswordTitle")} - No worries, we'll send you reset instructions. + {t("authForgotPasswordInstructions")} { { // Redux state const { user } = useSelector((state) => state.auth); + const { t } = useTranslation(); + + const BREADCRUMBS = [{ name: t("incidentsPageTitle", "Incidents"), path: "/incidents" }]; // Local state const [selectedMonitor, setSelectedMonitor] = useState("0"); diff --git a/client/src/locales/gb.json b/client/src/locales/gb.json index 6984b28fb..3391baec7 100644 --- a/client/src/locales/gb.json +++ b/client/src/locales/gb.json @@ -16,6 +16,7 @@ "commonBack": "Back", "authForgotPasswordTitle": "Forgot password?", "authForgotPasswordResetPassword": "Reset password", + "authForgotPasswordInstructions": "No worries, we'll send you reset instructions.", "createPassword": "Create your password", "createAPassword": "Password", "authRegisterAlreadyHaveAccount": "Already have an account?", @@ -71,6 +72,8 @@ "settingsAppearance": "Appearance", "settingsAppearanceDescription": "Switch between light and dark mode, or change user interface language", "settingsThemeMode": "Theme Mode", + "settingsThemeModeLight": "Light", + "settingsThemeModeDark": "Dark", "settingsLanguage": "Language", "settingsDistributedUptime": "Distributed uptime", "settingsDistributedUptimeDescription": "Enable/disable distributed uptime monitoring.", @@ -85,6 +88,7 @@ "settingsClearAllStatsDialogTitle": "Do you want to clear all stats?", "settingsClearAllStatsDialogDescription": "Once removed, the monitoring history and stats cannot be retrieved.", "settingsClearAllStatsDialogConfirm": "Yes, clear all stats", + "settingsClearAllStatsDialogCancel": "Cancel", "settingsDemoMonitors": "Demo monitors", "settingsDemoMonitorsDescription": "Add sample monitors for demonstration purposes.", "settingsAddDemoMonitors": "Adding demo monitors", @@ -299,6 +303,7 @@ "integrationsZapier": "Zapier", "integrationsZapierInfo": "Send all incidents to Zapier, and then see them everywhere", "commonSave": "Save", + "commonSaving": "Saving...", "createYour": "Create your", "createMonitor": "Create monitor", "pause": "Pause", @@ -500,7 +505,7 @@ "uptime": "Uptime", "pagespeed": "Pagespeed", "infrastructure": "Infrastructure", - "distributedUptime": "Distributed uptime", + "distributedUptime": "Distributed Uptime", "incidents": "Incidents", "statusPages": "Status pages", "maintenance": "Maintenance", @@ -512,6 +517,23 @@ "changelog": "Changelog", "profile": "Profile", "password": "Password", - "team": "Team" - } + "team": "Team", + "logOut": "Log out" + }, + "navControls": "Controls", + "statusBreadCrumbsStatusPages": "Status Pages", + "statusBreadCrumbsDetails": "Details", + "incidentsPageTitle": "Incidents", + "passwordPanel": { + "passwordChangedSuccess": "Your password was changed successfully.", + "passwordInputIncorrect": "Your password input was incorrect.", + "currentPassword": "Current password", + "enterCurrentPassword": "Enter your current password", + "newPassword": "New password", + "enterNewPassword": "Enter your new password", + "confirmNewPassword": "Confirm new password", + "passwordRequirements": "New password must contain at least 8 characters and must have at least one uppercase letter, one lowercase letter, one number and one special character.", + "saving": "Saving..." + }, + "uptimeCreateSelectURL": "Enter the URL or IP to monitor (e.g., https://example.com/ or 192.168.1.100) and add a clear display name that appears on the dashboard." } diff --git a/client/src/locales/ru.json b/client/src/locales/ru.json index 66eb4028a..df1e5a5a7 100644 --- a/client/src/locales/ru.json +++ b/client/src/locales/ru.json @@ -16,6 +16,7 @@ "commonBack": "Назад", "authForgotPasswordTitle": "Забыли пароль?", "authForgotPasswordResetPassword": "Сбросить пароль", + "authForgotPasswordInstructions": "Не волнуйтесь, мы отправим вам инструкции по сбросу.", "createPassword": "Создайте свой пароль", "createAPassword": "Пароль", "authRegisterAlreadyHaveAccount": "Уже есть аккаунт?", @@ -85,6 +86,8 @@ "settingsAppearance": "Внешний вид", "settingsAppearanceDescription": "Переключение между светлым и темным режимом или изменение языка пользовательского интерфейса", "settingsThemeMode": "Тема", + "settingsThemeModeLight": "Светлая", + "settingsThemeModeDark": "Тёмная", "settingsLanguage": "Язык", "settingsDistributedUptime": "Distributed uptime", "settingsDistributedUptimeDescription": "Включить/выключить distributed uptime monitoring.", @@ -99,6 +102,7 @@ "settingsClearAllStatsDialogTitle": "Хотите очистить всю статистику?", "settingsClearAllStatsDialogDescription": "После удаления история мониторинга и статистика не могут быть восстановлены.", "settingsClearAllStatsDialogConfirm": "Да, очистить всю статистику", + "settingsClearAllStatsDialogCancel": "Отмена", "settingsDemoMonitors": "Демо мониторы", "settingsDemoMonitorsDescription": "Добавьте примеры мониторов для демонстрации.", "settingsAddDemoMonitors": "Добавление демонстрационных мониторов", @@ -114,6 +118,8 @@ "settingsAbout": "О", "settingsDevelopedBy": "Developed by Bluewave Labs.", "settingsSave": "Сохранить", + "commonSave": "Сохранить", + "commonSaving": "Сохранение...", "settingsSuccessSaved": "Настройки успешно сохранены", "settingsFailedToSave": "Не удалось сохранить настройки", "settingsStatsCleared": "Статистика успешно очищена", @@ -306,7 +312,6 @@ "integrationsDiscordInfo": "Подключитесь к Discord и просматривайте инциденты прямо в канале", "integrationsZapier": "Zapier", "integrationsZapierInfo": "Отправляйте все инциденты в Zapier, и тогда вы сможете видеть их везде", - "commonSave": "", "createYour": "", "createMonitor": "", "pause": "", @@ -326,19 +331,6 @@ "pingMonitoring": "", "pingMonitoringDescription": "", "dockerContainerMonitoring": "", - "dockerContainerMonitoringDescription": "", - "portMonitoring": "", - "portMonitoringDescription": "", - "createMaintenanceWindow": "", - "createMaintenance": "", - "editMaintenance": "", - "maintenanceWindowName": "", - "friendlyNameInput": "", - "friendlyNamePlaceholder": "", - "maintenanceRepeat": "", - "maintenance": "", - "duration": "", - "addMonitors": "", "window": "", "cancel": "", "message": "", @@ -402,6 +394,18 @@ "uptimeCreateJsonPath": "", "uptimeCreateJsonPathQuery": "", "maintenanceTableActionMenuDialogTitle": "", + "incidentsPageTitle": "Инциденты", + "passwordPanel": { + "passwordChangedSuccess": "Ваш пароль был успешно изменен.", + "passwordInputIncorrect": "Ваш пароль введен неверно.", + "currentPassword": "Текущий пароль", + "enterCurrentPassword": "Введите ваш текущий пароль", + "newPassword": "Новый пароль", + "enterNewPassword": "Введите ваш новый пароль", + "confirmNewPassword": "Подтвердите новый пароль", + "passwordRequirements": "Новый пароль должен содержать не менее 8 символов и должен иметь как минимум одну заглавную букву, одну строчную букву, одну цифру и один специальный символ.", + "saving": "Сохранение..." + }, "pageSpeedWarning": "Предупреждение: Вы не добавили ключ API Google PageSpeed. Без него монитор PageSpeed не будет работать.", "pageSpeedLearnMoreLink": "Нажмите здесь, чтобы узнать", "pageSpeedAddApiKey": "как добавить ваш ключ API.", @@ -454,18 +458,23 @@ "uptime": "Аптайм", "pagespeed": "Скорость страницы", "infrastructure": "Инфраструктура", - "distributedUptime": "Распределенный аптайм", + "distributedUptime": "Распределенный Аптайм", "incidents": "Инциденты", "statusPages": "Страницы статуса", "maintenance": "Обслуживание", "integrations": "Интеграции", "settings": "Настройки", "support": "Поддержка", - "discussions": "Обсуждения", - "docs": "Документация", - "changelog": "История изменений", "profile": "Профиль", "password": "Пароль", - "team": "Команда" - } + "team": "Команда", + "logOut": "Выйти", + "discussions": "Обсуждения", + "docs": "Документация", + "changelog": "История изменений" + }, + "navControls": "Управление", + "statusBreadCrumbsStatusPages": "Страницы статуса", + "statusBreadCrumbsDetails": "Подробности", + "uptimeCreateSelectURL": "Введите URL или IP для мониторинга (например, https://example.com/ или 192.168.1.100) и добавьте понятное отображаемое имя, которое будет показано на панели управления." } \ No newline at end of file diff --git a/client/src/locales/tr.json b/client/src/locales/tr.json index 6a9ead23b..5aee7cf51 100644 --- a/client/src/locales/tr.json +++ b/client/src/locales/tr.json @@ -16,6 +16,7 @@ "commonBack": "Geri", "authForgotPasswordTitle": "Parolanızı mı unuttunuz?", "authForgotPasswordResetPassword": "Parola sıfırla", + "authForgotPasswordInstructions": "Endişelenmeyin, size sıfırlama talimatlarını göndereceğiz.", "createPassword": "Parolanızı oluşturun", "createAPassword": "Parola", "authRegisterAlreadyHaveAccount": "Zaten hesabınız var mı?", @@ -69,6 +70,8 @@ "settingsAppearance": "Görünüm", "settingsAppearanceDescription": "Açık ve koyu mod arasında geçiş yapın veya kullanıcı arayüzü dilini değiştirin", "settingsThemeMode": "Tema", + "settingsThemeModeLight": "Açık", + "settingsThemeModeDark": "Koyu", "settingsLanguage": "Dil", "settingsDistributedUptime": "Dağıtılmış çalışma süresi", "settingsDistributedUptimeDescription": "Dağıtılmış çalışma süresi izlemeyi etkinleştirin/devre dışı bırakın.", @@ -83,6 +86,7 @@ "settingsClearAllStatsDialogTitle": "Tüm istatistikleri temizlemek istiyor musunuz?", "settingsClearAllStatsDialogDescription": "Kaldırıldıktan sonra, izleme geçmişi ve istatistikleri geri alınamaz.", "settingsClearAllStatsDialogConfirm": "Evet, tüm istatistikleri temizle", + "settingsClearAllStatsDialogCancel": "İptal", "settingsDemoMonitors": "Demo monitörler", "settingsDemoMonitorsDescription": "Gösterim amaçlı örnek monitörler ekleyin.", "settingsAddDemoMonitors": "Demo monitörler ekleniyor", @@ -289,6 +293,7 @@ "integrationsZapier": "Zapier", "integrationsZapierInfo": "", "commonSave": "Kaydet", + "commonSaving": "Kaydediliyor...", "createYour": "", "createMonitor": "Monitör oluştur", "pause": "Beklet", @@ -389,12 +394,12 @@ "infrastructureMonitorCreated": "", "infrastructureMonitorUpdated": "", "errorInvalidTypeId": "", - "errorInvalidFieldId": "", - "inviteNoTokenFound": "", - "pageSpeedWarning": "", - "pageSpeedLearnMoreLink": "", - "pageSpeedAddApiKey": "", - "update": "", + "pageSpeedWarning": "Uyarı: Google PageSpeed API anahtarı eklemediniz. Bu olmadan, PageSpeed monitörü çalışmayacaktır.", + "pageSpeedLearnMoreLink": "Daha fazla bilgi için tıklayın", + "pageSpeedAddApiKey": "API anahtarınızı nasıl ekleyeceğinizi öğrenin.", + "pageSpeedApiKeyFieldDescription": "Sayfa hızı izlemeyi etkinleştirmek için Google PageSpeed API anahtarınızı girin. Anahtarı güncellemek için Sıfırla'ya tıklayın.", + "pageSpeedApiKeyFieldResetLabel": "API anahtarı ayarlandı. Değiştirmek için Sıfırla'ya tıklayın.", + "reset": "Sıfırla", "invalidFileFormat": "", "invalidFileSize": "", "ClickUpload": "", @@ -489,6 +494,23 @@ "changelog": "Değişiklik Günlüğü", "profile": "Profil", "password": "Şifre", - "team": "Takım" - } + "team": "Takım", + "logOut": "Çıkış" + }, + "navControls": "Kontroller", + "statusBreadCrumbsStatusPages": "Durum Sayfaları", + "statusBreadCrumbsDetails": "Detaylar", + "incidentsPageTitle": "Olaylar", + "passwordPanel": { + "passwordChangedSuccess": "Şifreniz başarıyla değiştirildi.", + "passwordInputIncorrect": "Şifre girişiniz yanlış.", + "currentPassword": "Mevcut şifre", + "enterCurrentPassword": "Mevcut şifrenizi girin", + "newPassword": "Yeni şifre", + "enterNewPassword": "Yeni şifrenizi girin", + "confirmNewPassword": "Yeni şifreyi onaylayın", + "passwordRequirements": "Yeni şifre en az 8 karakter içermeli ve en az bir büyük harf, bir küçük harf, bir rakam ve bir özel karakter içermelidir.", + "saving": "Kaydediliyor..." + }, + "uptimeCreateSelectURL": "İzlenecek URL veya IP adresini girin (örn. https://example.com/ veya 192.168.1.100) ve kontrol panelinde görünecek net bir görüntü adı ekleyin." }