strings
This commit is contained in:
1 parent
22f7d002fd
commit
c9dea5c0ae
23 files changed
+315
-131
No files matched your search
@@ -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 = ({
|
||||
}}
|
||||
>
|
||||
<Typography variant="h6" color="textPrimary">
|
||||
Resolution
|
||||
{t("incidents.details.resolutionCard.title")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Stack spacing={3} padding={6}>
|
||||
<Typography variant="body2" color="textPrimary">
|
||||
Status:{" "}
|
||||
{t("incidents.details.resolutionCard.resolutionStatus")}:{" "}
|
||||
<span style={{ color: bg }}>
|
||||
{resolved ? "resolved" : "unresolved"}
|
||||
</span>
|
||||
@@ -48,10 +49,11 @@ export const ResolutionCard = ({
|
||||
{resolved && (
|
||||
<>
|
||||
<Typography variant="body2" color="textPrimary">
|
||||
Resolution type: {type || "N/A"}
|
||||
{t("incidents.details.resolutionCard.resolutionType")}:{" "}
|
||||
{type || "N/A"}
|
||||
</Typography>
|
||||
<Typography variant="body2" color="textPrimary">
|
||||
Resolved by: {by || "N/A"}
|
||||
{t("incidents.details.resolutionCard.resolvedBy")}: {by || "N/A"}
|
||||
</Typography>
|
||||
</>
|
||||
)}
|
||||
@@ -64,7 +66,7 @@ export const ResolutionCard = ({
|
||||
</Typography>
|
||||
)}
|
||||
<Typography variant="body2" color="textSecondary">
|
||||
Note: {note || "N/A"}
|
||||
{t("incidents.details.resolutionCard.note")}: {note || "N/A"}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</BaseBox>
|
||||
|
||||
@@ -375,7 +375,7 @@ const EmptyView = () => {
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
}}
|
||||
>
|
||||
<Typography>{t("monitors.common.table.empty")}</Typography>
|
||||
<Typography>{t("common.table.empty")}</Typography>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
@@ -25,7 +25,6 @@ export const CheckboxInput = forwardRef<HTMLInputElement, CheckboxInputProps>(
|
||||
icon={<Square size={16} strokeWidth={1.5} />}
|
||||
checkedIcon={<SquareCheck size={16} strokeWidth={1.5} />}
|
||||
sx={{
|
||||
padding: 0,
|
||||
color: theme.palette.text.secondary,
|
||||
"&.Mui-checked": {
|
||||
color: theme.palette.primary.main,
|
||||
|
||||
@@ -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 (
|
||||
<Tooltip title="Logout" placement="top">
|
||||
<Tooltip title={t("common.tooltips.logout")} placement="top">
|
||||
<IconButton
|
||||
onClick={handleClick}
|
||||
sx={{
|
||||
@@ -29,7 +31,7 @@ export const LogoutSwitch = () => {
|
||||
},
|
||||
"&: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,
|
||||
},
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -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 | HTMLElement>(null);
|
||||
const open = Boolean(anchorEl);
|
||||
const { t } = useTranslation();
|
||||
|
||||
const handleOpen = (event: React.MouseEvent<HTMLElement>) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
@@ -69,7 +71,7 @@ export const SettingsSwitch = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tooltip title="Settings" placement="top">
|
||||
<Tooltip title={t("common.tooltips.settings")} placement="top">
|
||||
<IconButton
|
||||
onClick={handleOpen}
|
||||
sx={{
|
||||
|
||||
@@ -13,8 +13,10 @@ import { useNavigate } from "react-router";
|
||||
import { useGet } from "@/hooks/UseApi";
|
||||
import type { ApiResponse } from "@/hooks/UseApi";
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export const TeamSwitch = () => {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const dispatch = useAppDispatch();
|
||||
const theme = useTheme();
|
||||
@@ -49,7 +51,7 @@ export const TeamSwitch = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tooltip title="Teams" placement="top">
|
||||
<Tooltip title={t("common.tooltips.teams")} placement="top">
|
||||
<IconButton
|
||||
onClick={handleOpen}
|
||||
sx={{
|
||||
|
||||
@@ -17,7 +17,7 @@ export const ThemeSwitch = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<Tooltip title={t("common.buttons.toggleTheme")} placement="top">
|
||||
<Tooltip title={t("common.tooltips.toggleTheme")} placement="top">
|
||||
<IconButton
|
||||
id="theme-toggle"
|
||||
onClick={handleChange}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Stack from "@mui/material/Stack";
|
||||
import { ExternalLink } from "lucide-react";
|
||||
import Link from "@mui/material/Link";
|
||||
import { config } from "@/config/index";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import type { IStatusPageWithMonitors } from "@/types/status-page";
|
||||
const HOST = config.HOST;
|
||||
@@ -12,6 +13,7 @@ export const NameHeader = ({
|
||||
}: {
|
||||
statusPage: IStatusPageWithMonitors;
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Stack direction={"row"} alignItems={"flex-end"} spacing={4}>
|
||||
<Typography variant="h1">{statusPage?.name}</Typography>
|
||||
@@ -25,7 +27,9 @@ export const NameHeader = ({
|
||||
sx={{ display: "inline-flex" }}
|
||||
>
|
||||
<Stack direction="row" alignItems="center" spacing={1}>
|
||||
<Typography>Public link</Typography>
|
||||
<Typography>
|
||||
{t("statusPage.details.nameHeader.publicLink")}
|
||||
</Typography>
|
||||
<ExternalLink size={16} strokeWidth={1.5} />
|
||||
</Stack>
|
||||
</Link>
|
||||
|
||||
@@ -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 (
|
||||
<Stack
|
||||
|
||||
Reference in new issue
Block a user