Refactor Breadcrumbs to use translation keys for improved localization

This commit is contained in:
nbgslv
2025-04-14 21:17:33 +03:00
parent 68354aac06
commit cae3d9ed4f
3 changed files with 10 additions and 7 deletions

View File

@@ -62,14 +62,14 @@ const CreateStatusPage = () => {
// Breadcrumbs
const crumbs = [
{ name: "status pages", path: "/status" },
{ name: t("statusPages"), path: "/status" },
];
if (isCreate) {
crumbs.push({ name: "create", path: "/status/create" });
crumbs.push({ name: t("create"), path: "/status/create" });
} else {
crumbs.push(
{ name: "details", path: `/status/uptime/${statusPage?.url}` },
{ name: "configure", path: "" }
{ name: t("details"), path: `/status/uptime/${statusPage?.url}` },
{ name: t("configure"), path: "" }
);
}

View File

@@ -30,8 +30,8 @@ const PublicStatus = () => {
const location = useLocation();
const navigate = useNavigate();
const crumbs = [
{ name: "status pages", path: "/status" },
{ name: "details", path: "" },
{ name: t("statusPages"), path: "/status" },
{ name: t("details"), path: "" },
];
const [statusPage, monitors, isLoading, networkError, fetchStatusPage] =

View File

@@ -375,5 +375,8 @@
"infrastructureMonitorUpdated": "Infrastructure monitor updated successfully!",
"errorInvalidTypeId": "Invalid notification type provided",
"errorInvalidFieldId": "Invalid field ID provided",
"inviteNoTokenFound": "No invite token found"
"inviteNoTokenFound": "No invite token found",
"details": "Details",
"create": "Create",
"statusPages": "Status Pages"
}