diff --git a/client/src/components/design-elements/ResolutionCard.tsx b/client/src/components/design-elements/ResolutionCard.tsx
index 494c10519..d7b145652 100644
--- a/client/src/components/design-elements/ResolutionCard.tsx
+++ b/client/src/components/design-elements/ResolutionCard.tsx
@@ -3,7 +3,7 @@ import Typography from "@mui/material/Typography";
import { BaseBox } from "@/components/design-elements";
import Box from "@mui/material/Box";
import { useTheme } from "@mui/material/styles";
-
+import { useTranslation } from "react-i18next";
export interface ResolutionCardProps {
resolved: boolean;
type?: string;
@@ -21,6 +21,7 @@ export const ResolutionCard = ({
timestampLabel,
durationLabel,
}: ResolutionCardProps) => {
+ const { t } = useTranslation();
const theme = useTheme();
const bg = resolved ? theme.palette.success.light : theme.palette.error.light;
@@ -35,12 +36,12 @@ export const ResolutionCard = ({
}}
>
- Resolution
+ {t("incidents.details.resolutionCard.title")}
- Status:{" "}
+ {t("incidents.details.resolutionCard.resolutionStatus")}:{" "}
{resolved ? "resolved" : "unresolved"}
@@ -48,10 +49,11 @@ export const ResolutionCard = ({
{resolved && (
<>
- Resolution type: {type || "N/A"}
+ {t("incidents.details.resolutionCard.resolutionType")}:{" "}
+ {type || "N/A"}
- Resolved by: {by || "N/A"}
+ {t("incidents.details.resolutionCard.resolvedBy")}: {by || "N/A"}
>
)}
@@ -64,7 +66,7 @@ export const ResolutionCard = ({
)}
- Note: {note || "N/A"}
+ {t("incidents.details.resolutionCard.note")}: {note || "N/A"}
diff --git a/client/src/components/design-elements/Table.tsx b/client/src/components/design-elements/Table.tsx
index a59e7dedc..08eb588f6 100644
--- a/client/src/components/design-elements/Table.tsx
+++ b/client/src/components/design-elements/Table.tsx
@@ -375,7 +375,7 @@ const EmptyView = () => {
borderRadius: theme.shape.borderRadius,
}}
>
- {t("monitors.common.table.empty")}
+ {t("common.table.empty")}
);
};
diff --git a/client/src/components/inputs/Checkbox.tsx b/client/src/components/inputs/Checkbox.tsx
index 308209234..518f2dc4f 100644
--- a/client/src/components/inputs/Checkbox.tsx
+++ b/client/src/components/inputs/Checkbox.tsx
@@ -25,7 +25,6 @@ export const CheckboxInput = forwardRef(
icon={}
checkedIcon={}
sx={{
- padding: 0,
color: theme.palette.text.secondary,
"&.Mui-checked": {
color: theme.palette.primary.main,
diff --git a/client/src/components/inputs/SwitchLogout.tsx b/client/src/components/inputs/SwitchLogout.tsx
index 82be79a03..0dbd64c11 100644
--- a/client/src/components/inputs/SwitchLogout.tsx
+++ b/client/src/components/inputs/SwitchLogout.tsx
@@ -6,8 +6,10 @@ import { usePost } from "@/hooks/UseApi";
import { useNavigate } from "react-router";
import { useTheme } from "@mui/material/styles";
import { Tooltip } from "@/components/design-elements";
+import { useTranslation } from "react-i18next";
export const LogoutSwitch = () => {
+ const { t } = useTranslation();
const dispatch = useAppDispatch();
const { post } = usePost();
const navigate = useNavigate();
@@ -20,7 +22,7 @@ export const LogoutSwitch = () => {
};
return (
-
+
{
},
"&:hover svg path, &:hover svg line, &:hover svg polyline, &:hover svg rect, &:hover svg circle":
{
- stroke: theme.palette.primary.main,
+ stroke: theme.palette.primary.main,
},
}}
>
diff --git a/client/src/components/inputs/SwitchSettings.tsx b/client/src/components/inputs/SwitchSettings.tsx
index 6cf7a72e8..6b2b03782 100644
--- a/client/src/components/inputs/SwitchSettings.tsx
+++ b/client/src/components/inputs/SwitchSettings.tsx
@@ -10,6 +10,7 @@ import { useMemo, useState } from "react";
import { useTheme } from "@mui/material/styles";
import { Tooltip } from "@/components/design-elements";
import { config } from "@/config/index";
+import { useTranslation } from "react-i18next";
const DEPLOYMENT_MODE = config.DEPLOYMENT_MODE;
const IS_SAAS = DEPLOYMENT_MODE === "saas";
@@ -18,6 +19,7 @@ export const SettingsSwitch = () => {
const theme = useTheme();
const [anchorEl, setAnchorEl] = useState(null);
const open = Boolean(anchorEl);
+ const { t } = useTranslation();
const handleOpen = (event: React.MouseEvent) => {
setAnchorEl(event.currentTarget);
@@ -69,7 +71,7 @@ export const SettingsSwitch = () => {
return (
<>
-
+
{
+ const { t } = useTranslation();
const navigate = useNavigate();
const dispatch = useAppDispatch();
const theme = useTheme();
@@ -49,7 +51,7 @@ export const TeamSwitch = () => {
return (
<>
-
+
{
};
return (
-
+
{
+ const { t } = useTranslation();
return (
{statusPage?.name}
@@ -25,7 +27,9 @@ export const NameHeader = ({
sx={{ display: "inline-flex" }}
>
- Public link
+
+ {t("statusPage.details.nameHeader.publicLink")}
+
diff --git a/client/src/components/status-pages/StatusHeader.tsx b/client/src/components/status-pages/StatusHeader.tsx
index 79f0f5566..c0edfd81a 100644
--- a/client/src/components/status-pages/StatusHeader.tsx
+++ b/client/src/components/status-pages/StatusHeader.tsx
@@ -4,6 +4,7 @@ import Stack from "@mui/material/Stack";
import { getStatusPageHeaderConfig } from "@/utils/MonitorUtils";
import type { IStatusPageWithMonitors } from "@/types/status-page";
import { useTheme } from "@mui/material/styles";
+import { useTranslation } from "react-i18next";
export const StatusHeader = ({
statusPage,
@@ -11,7 +12,8 @@ export const StatusHeader = ({
statusPage: IStatusPageWithMonitors;
}) => {
const theme = useTheme();
- const headerConfig = getStatusPageHeaderConfig(statusPage?.monitors || []);
+ const { t } = useTranslation();
+ const headerConfig = getStatusPageHeaderConfig(statusPage?.monitors || [], t);
return (
[] = [
{
id: "monitorName",
- content: t("incidentsTableMonitorName"),
+ content: t("common.table.headers.monitor"),
render: (row) => {
return row.metadata?.monitorId?.name || "N/A";
},
@@ -53,7 +53,7 @@ export const ChecksTable = ({
},
{
id: "date",
- content: "Date and time",
+ content: t("checks.table.headers.dateTime"),
render: (row) => {
return formatDateWithTz(
row.createdAt,
@@ -64,7 +64,7 @@ export const ChecksTable = ({
},
{
id: "statusCode",
- content: "Status code",
+ content: t("checks.table.headers.statusCode"),
render: (row) => {
const code = row.httpStatusCode;
const value =
@@ -74,7 +74,7 @@ export const ChecksTable = ({
},
{
id: "message",
- content: "Message",
+ content: t("checks.table.headers.message"),
render: (row) => {
return row.message || "N/A";
},
diff --git a/client/src/pages/incidents/IncidentDetails.tsx b/client/src/pages/incidents/IncidentDetails.tsx
index a06bd54a8..6c3d00549 100644
--- a/client/src/pages/incidents/IncidentDetails.tsx
+++ b/client/src/pages/incidents/IncidentDetails.tsx
@@ -2,6 +2,7 @@ import { BasePage, StatBox } from "@/components/design-elements";
import ResolutionCard from "@/components/design-elements/ResolutionCard";
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
+
import { useTheme } from "@mui/material/styles";
import { useNavigate, useParams } from "react-router";
import { useGet } from "@/hooks/UseApi";
@@ -12,9 +13,11 @@ import { useAppSelector } from "@/hooks/AppHooks";
import prettyMilliseconds from "pretty-ms";
import { getMonitorPath } from "@/utils/MonitorUtils";
import type { MonitorType } from "@/types/monitor";
+import { useTranslation } from "react-i18next";
const IncidentDetailsPage = () => {
const theme = useTheme();
+ const { t } = useTranslation();
const { id } = useParams<{ id: string }>();
const uiTimezone = useAppSelector((state: any) => state.ui.timezone);
const navigate = useNavigate();
@@ -36,12 +39,12 @@ const IncidentDetailsPage = () => {
- Incident Details
+ {t("incidents.title")}
{
const type = incident.monitorId.type as MonitorType;
@@ -51,7 +54,7 @@ const IncidentDetailsPage = () => {
}}
/>
{
)}
/>
{
"ddd, MMMM D, YYYY, HH:mm A",
uiTimezone
)
- : "Ongoing"
+ : t("monitors.common.stats.ongoing")
}
/>
@@ -79,12 +82,12 @@ const IncidentDetailsPage = () => {
note={incident.resolutionNote}
timestampLabel={
incident.resolved && incident.endedAt
- ? `Resolved at: ${formatDateWithTz(
+ ? `${t("incidents.details.resolutionCard.resolvedAt")}: ${formatDateWithTz(
incident.endedAt,
"ddd, MMMM D, YYYY, HH:mm A",
uiTimezone
)}`
- : `Ongoing since: ${formatDateWithTz(
+ : `${t("incidents.details.resolutionCard.ongoingSince")}: ${formatDateWithTz(
incident.startedAt,
"ddd, MMMM D, YYYY, HH:mm A",
uiTimezone
diff --git a/client/src/pages/incidents/IncidentTable.tsx b/client/src/pages/incidents/IncidentTable.tsx
index 66fadcc90..304acb6bf 100644
--- a/client/src/pages/incidents/IncidentTable.tsx
+++ b/client/src/pages/incidents/IncidentTable.tsx
@@ -1,4 +1,9 @@
-import { Table, Pagination, ValueLabel, StatusLabel } from "@/components/design-elements";
+import {
+ Table,
+ Pagination,
+ ValueLabel,
+ StatusLabel,
+} from "@/components/design-elements";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";
import { Button } from "@/components/inputs";
@@ -37,14 +42,14 @@ export const IncidentTable = ({
const headers: Header[] = [
{
id: "name",
- content: t("incidentsTableMonitorName"),
+ content: t("common.table.headers.monitor"),
render: (row) => {
return row.monitorId?.name || "N/A";
},
},
{
id: "start",
- content: "Incident start",
+ content: t("incidents.table.headers.start"),
render: (row) => {
return formatDateWithTz(
row.startedAt,
@@ -55,7 +60,7 @@ export const IncidentTable = ({
},
{
id: "end",
- content: "Incident end",
+ content: t("incidents.table.headers.end"),
render: (row) => {
return row.endedAt
? formatDateWithTz(
@@ -68,7 +73,7 @@ export const IncidentTable = ({
},
{
id: "status",
- content: "Current monitor status",
+ content: t("incidents.table.headers.monitorStatus"),
render: (row) => {
const status = row.monitorId?.status;
return status ? (
@@ -80,7 +85,7 @@ export const IncidentTable = ({
},
{
id: "resolved",
- content: "Resolved",
+ content: t("incidents.table.headers.resolved"),
render: (row) => {
return (
{
return row.resolutionType || "N/A";
},
},
{
id: "resolvedBy",
- content: "Resolved by",
+ content: t("incidents.table.headers.resolvedBy"),
render: (row) => {
return row.resolvedBy?.email || "N/A";
},
},
{
id: "actions",
- content: "Actions",
+ content: t("common.table.headers.actions"),
render: (row) => {
return row.resolved ? null : (
);
},
diff --git a/client/src/pages/infrastructure/InfraMonitorsTable.tsx b/client/src/pages/infrastructure/InfraMonitorsTable.tsx
index 2277e1810..2b266ecd3 100644
--- a/client/src/pages/infrastructure/InfraMonitorsTable.tsx
+++ b/client/src/pages/infrastructure/InfraMonitorsTable.tsx
@@ -168,7 +168,7 @@ export const InfraMonitorsTable = ({
onClick={(e) => handleSort(e, "name")}
sx={{ cursor: "pointer" }}
>
- {t("monitors.common.table.headers.name")}
+ {t("common.table.headers.name")}
{renderSortIcon(sortField === "name")}
),
@@ -186,7 +186,7 @@ export const InfraMonitorsTable = ({
onClick={(e) => handleSort(e, "status")}
sx={{ cursor: "pointer" }}
>
- {t("monitors.common.table.headers.status")}
+ {t("common.table.headers.status")}
{renderSortIcon(sortField === "status")}
),
@@ -196,7 +196,7 @@ export const InfraMonitorsTable = ({
},
{
id: "cpu",
- content: t("monitors.common.table.headers.cpu"),
+ content: t("monitors.infrastructure.table.headers.cpu"),
render: (row) => {
const cpuUsage =
(row.latestChecks?.[0]?.system?.cpu?.usage_percent || 0) * 100;
@@ -205,7 +205,7 @@ export const InfraMonitorsTable = ({
},
{
id: "memory",
- content: t("monitors.common.table.headers.memory"),
+ content: t("monitors.infrastructure.table.headers.memory"),
render: (row) => {
const memoryUsage =
(row.latestChecks?.[0]?.system?.memory?.usage_percent || 0) * 100;
@@ -214,7 +214,7 @@ export const InfraMonitorsTable = ({
},
{
id: "disk",
- content: t("monitors.common.table.headers.disk"),
+ content: t("monitors.infrastructure.table.headers.disk"),
render: (row) => {
const totalDiskUsage = row.latestChecks?.[0]?.system?.disk?.reduce(
(acc, disk) => acc + disk.usage_percent,
@@ -228,7 +228,7 @@ export const InfraMonitorsTable = ({
{
id: "actions",
- content: t("monitors.common.table.headers.actions"),
+ content: t("common.table.headers.actions"),
render: (row) => {
return ;
},
diff --git a/client/src/pages/maintenance/Maintenance.tsx b/client/src/pages/maintenance/Maintenance.tsx
index 31649d82c..41a2b9437 100644
--- a/client/src/pages/maintenance/Maintenance.tsx
+++ b/client/src/pages/maintenance/Maintenance.tsx
@@ -82,14 +82,14 @@ const MaintenancePage = () => {
const headers: Header[] = [
{
id: "name",
- content: "Name",
+ content: t("common.table.headers.name"),
render: (row) => {
return {row?.name};
},
},
{
id: "active",
- content: "Active",
+ content: t("common.table.headers.active"),
render: (row) => {
const active = row.isActive ? "Yes" : "No";
return {active};
@@ -97,7 +97,7 @@ const MaintenancePage = () => {
},
{
id: "repeat",
- content: "Repeat",
+ content: t("maintenanceWindow.table.headers.repeat"),
render: (row) => {
const active = row.repeat ? row.repeat : "No";
return {active};
@@ -105,7 +105,7 @@ const MaintenancePage = () => {
},
{
id: "actions",
- content: t("actions"),
+ content: t("common.table.headers.actions"),
render: (row) => {
return ;
},
@@ -124,11 +124,11 @@ const MaintenancePage = () => {
items={maintenance}
bullets={t("maintenanceWindow.fallback.checks", { returnObjects: true })}
actionLink="/maintenance/create"
- actionButtonText={t("createMaintenanceWindow")}
+ actionButtonText={t("maintenanceWindow.fallback.actionButton")}
>
{
/>
diff --git a/client/src/pages/notification-channels/NotificationChannels.tsx b/client/src/pages/notification-channels/NotificationChannels.tsx
index b89f71fc5..7dde5a2a1 100644
--- a/client/src/pages/notification-channels/NotificationChannels.tsx
+++ b/client/src/pages/notification-channels/NotificationChannels.tsx
@@ -91,14 +91,14 @@ const NotificationChannelsPage = () => {
const headers: Header[] = [
{
id: "name",
- content: t("monitors.common.table.headers.name"),
+ content: t("common.table.headers.name"),
render: (row) => {
return {row?.name};
},
},
{
id: "active",
- content: t("monitors.common.table.headers.active"),
+ content: t("common.table.headers.active"),
render: (row) => {
const active = row.isActive
? t("common.buttons.yes")
@@ -108,7 +108,7 @@ const NotificationChannelsPage = () => {
},
{
id: "type",
- content: "Type",
+ content: t("common.table.headers.type"),
render: (row) => {
return (
{row?.type}
@@ -117,7 +117,7 @@ const NotificationChannelsPage = () => {
},
{
id: "actions",
- content: t("monitors.common.table.headers.actions"),
+ content: t("common.table.headers.actions"),
render: (row) => {
return ;
},
diff --git a/client/src/pages/pagespeed/PageSpeedMonitorTable.tsx b/client/src/pages/pagespeed/PageSpeedMonitorTable.tsx
index 62302b331..5d2d0fb1c 100644
--- a/client/src/pages/pagespeed/PageSpeedMonitorTable.tsx
+++ b/client/src/pages/pagespeed/PageSpeedMonitorTable.tsx
@@ -170,7 +170,7 @@ export const PageSpeedMonitorTable = ({
onClick={(e) => handleSort(e, "name")}
sx={{ cursor: "pointer" }}
>
- {t("monitors.common.table.headers.name")}
+ {t("common.table.headers.name")}
{renderSortIcon(sortField === "name")}
),
@@ -189,7 +189,7 @@ export const PageSpeedMonitorTable = ({
onClick={(e) => handleSort(e, "status")}
sx={{ cursor: "pointer" }}
>
- {t("monitors.common.table.headers.status")}
+ {t("common.table.headers.status")}
{renderSortIcon(sortField === "status")}
),
@@ -199,7 +199,7 @@ export const PageSpeedMonitorTable = ({
},
{
id: "histogram",
- content: t("monitors.common.table.headers.pageSpeedScore"),
+ content: t("monitors.pageSpeed.table.headers.pageSpeedScore"),
render: (row) => {
return (
@@ -214,7 +214,7 @@ export const PageSpeedMonitorTable = ({
{
id: "actions",
- content: t("monitors.common.table.headers.actions"),
+ content: t("common.table.headers.actions"),
render: (row) => {
return ;
},
diff --git a/client/src/pages/status-page/StatusPageForm.tsx b/client/src/pages/status-page/StatusPageForm.tsx
index 1d784be8b..9ec694222 100644
--- a/client/src/pages/status-page/StatusPageForm.tsx
+++ b/client/src/pages/status-page/StatusPageForm.tsx
@@ -66,8 +66,8 @@ export const StatusPageForm = ({
return (
(
- {t("settingsSave")}
+ {t("common.buttons.save")}
diff --git a/client/src/pages/status-page/StatusPageTable.tsx b/client/src/pages/status-page/StatusPageTable.tsx
index 4104d11e6..c2e0cbb19 100644
--- a/client/src/pages/status-page/StatusPageTable.tsx
+++ b/client/src/pages/status-page/StatusPageTable.tsx
@@ -72,14 +72,14 @@ export const StatusPageTable = ({
const headers: Header[] = [
{
id: "name",
- content: "Name",
+ content: t("common.table.headers.name"),
render: (row) => {
return {row?.name};
},
},
{
id: "published",
- content: "Published",
+ content: t("statusPage.table.headers.published"),
render: (row) => {
const published = row.isPublished ? "Yes" : "No";
return {published};
@@ -87,7 +87,7 @@ export const StatusPageTable = ({
},
{
id: "url",
- content: "Public URL",
+ content: t("statusPage.table.headers.publicUrl"),
render: (row) => {
return (
{row?.url}
@@ -96,7 +96,7 @@ export const StatusPageTable = ({
},
{
id: "actions",
- content: t("actions"),
+ content: t("common.table.headers.actions"),
render: (row) => {
return ;
},
diff --git a/client/src/pages/status-page/StatusPages.tsx b/client/src/pages/status-page/StatusPages.tsx
index da19a3c85..a8cb3282c 100644
--- a/client/src/pages/status-page/StatusPages.tsx
+++ b/client/src/pages/status-page/StatusPages.tsx
@@ -73,8 +73,8 @@ const StatusPages = () => {
/>