diff --git a/public/locales/cs/translation.json b/public/locales/cs/translation.json
index 61902282..b79d3b0b 100644
--- a/public/locales/cs/translation.json
+++ b/public/locales/cs/translation.json
@@ -1,4 +1,8 @@
{
+ "user": {
+ "logout": "Odhlásit se",
+ "changePassword": "Změnit heslo"
+ },
"categories": {
"systems": "Systémy",
"trees": "Poruchové stromy",
@@ -30,6 +34,10 @@
"gateType": "Typ hradla",
"noSystemError": "Na panelu Navigační panel vyberte možnost Systém"
},
+ "deleteFtaModal": {
+ "title": "Smazat strom poruch",
+ "explanation": "Smazáním stromu chyb se smaže celá stromová struktura. Pokračovat ve smazání stromu?"
+ },
"newFmeaModal": {
"title": "FMEA agregáty",
"namePlaceholder": "Název FMEA",
@@ -38,7 +46,8 @@
},
"diagramSidePanel": {
"cutsetToggleToolTip": "Přepnout do pohledu řezu",
- "minimumOperationalHours": "Min. provozní doba"
+ "minimumOperationalHours": "Min. provozní doba",
+ "diagramOptions": "Možnosti diagramu"
},
"faultEventScenariosTable": {
"cutset": "Řez",
@@ -95,6 +104,12 @@
"created": "Vytvořeno",
"operationalHours": "Doba provozu"
},
+ "systemComponentMenu": {
+ "editComponent": "Upravit komponentu",
+ "notSelected": "Není vybrána žádná komponenta",
+ "functions": "Funkce",
+ "linkedComponent": "Propojená komponenta"
+ },
"faultEventMenu": {
"eventName": "Název události",
"criticality": "Kritičnost",
diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json
index eab16cf5..2b400595 100644
--- a/public/locales/en/translation.json
+++ b/public/locales/en/translation.json
@@ -1,4 +1,8 @@
{
+ "user": {
+ "logout": "Logout",
+ "changePassword": "Change password"
+ },
"categories": {
"systems": "Systems",
"trees": "Fault trees",
@@ -30,6 +34,10 @@
"gateType": "Gate type",
"noSystemError": "Select the System from the Navbar"
},
+ "deleteFtaModal": {
+ "title": "Delete Fault Tree",
+ "explanation": "Deleting fault tree will delete the whole tree structure. Proceed to delete the tree?"
+ },
"newFmeaModal": {
"title": "FMEA Aggregates",
"namePlaceholder": "FMEA Name",
@@ -38,7 +46,8 @@
},
"diagramSidePanel": {
"cutsetToggleToolTip": "Switch to cutsets view",
- "minimumOperationalHours": "Min. operational hours"
+ "minimumOperationalHours": "Min. operational hours",
+ "diagramOptions": "Diagram Options"
},
"faultEventScenariosTable": {
"cutset": "Cutset",
@@ -95,6 +104,12 @@
"created": "Created",
"operationalHours": "Operational Hours"
},
+ "systemComponentMenu": {
+ "editComponent": "Edit Component",
+ "notSelected": "No component selected",
+ "functions": "Functions",
+ "linkedComponent": "Linked Component"
+ },
"faultEventMenu": {
"eventName": "Event name",
"criticality": "Criticality",
diff --git a/src/components/appBar/AppBar.tsx b/src/components/appBar/AppBar.tsx
index 860fd3b8..d9435244 100644
--- a/src/components/appBar/AppBar.tsx
+++ b/src/components/appBar/AppBar.tsx
@@ -108,9 +108,9 @@ const AppBar = ({ title, showBackButton = false, topPanelHeight }: Props) => {
{loggedUser.roles && loggedUser.roles.indexOf("ROLE_ADMIN") >= 0 && (
)}
- {!isUsingOidcAuth() && }
+ {!isUsingOidcAuth() && }
-
+
);
diff --git a/src/components/dashboard/content/list/DashboardFaultTreeList.tsx b/src/components/dashboard/content/list/DashboardFaultTreeList.tsx
index edaf61e8..d3397f6b 100644
--- a/src/components/dashboard/content/list/DashboardFaultTreeList.tsx
+++ b/src/components/dashboard/content/list/DashboardFaultTreeList.tsx
@@ -22,9 +22,12 @@ import { Link as RouterLink } from "react-router-dom";
import { extractFragment } from "@services/utils/uriIdentifierUtils";
import { ROUTES } from "@utils/constants";
import { contextMenuDefaultAnchor, ElementContextMenuAnchor } from "@utils/contextMenu";
+import { useTranslation } from "react-i18next";
const DashboardFaultTreeList = () => {
const { classes } = useStyles();
+ const { t } = useTranslation();
+
const [faultTrees, , , removeTree] = useFaultTrees();
const [contextMenuSelectedTree, setContextMenuSelectedTree] = useState(null);
@@ -39,9 +42,8 @@ const DashboardFaultTreeList = () => {
const handleDelete = (treeToDelete: FaultTree) => {
showConfirmDialog({
- title: "Delete Fault Tree",
- explanation:
- "Deleting fault tree will delete the whole tree structure. Events will remain. Proceed to delete the tree?",
+ title: t("deleteFtaModal.title"),
+ explanation: t("deleteFtaModal.explanation"),
onConfirm: () => {
removeTree(treeToDelete);
},
diff --git a/src/components/dashboard/content/list/FaultTreeOverview.tsx b/src/components/dashboard/content/list/FaultTreeOverview.tsx
index 69fd9cac..6ef2bb19 100644
--- a/src/components/dashboard/content/list/FaultTreeOverview.tsx
+++ b/src/components/dashboard/content/list/FaultTreeOverview.tsx
@@ -76,9 +76,8 @@ const FaultTreeOverview = () => {
const handleDelete = (treeToDelete: FaultTree) => {
showConfirmDialog({
- title: "Delete Fault Tree",
- explanation:
- "Deleting fault tree will delete the whole tree structure. Events will remain. Proceed to delete the tree?",
+ title: t("deleteFtaModal.title"),
+ explanation: t("deleteFtaModal.explanation"),
onConfirm: () => {
removeTree(treeToDelete);
},
diff --git a/src/components/editor/faultTree/menu/faultEvent/FaultEventMenu.tsx b/src/components/editor/faultTree/menu/faultEvent/FaultEventMenu.tsx
index dbcdd897..07a8148e 100644
--- a/src/components/editor/faultTree/menu/faultEvent/FaultEventMenu.tsx
+++ b/src/components/editor/faultTree/menu/faultEvent/FaultEventMenu.tsx
@@ -518,10 +518,6 @@ const FaultEventMenu = ({ selectedShapeToolData, onEventUpdated, refreshTree, ro
-
-
setFailureModeDialogOpen(false)}
diff --git a/src/components/editor/menu/DiagramOptions.tsx b/src/components/editor/menu/DiagramOptions.tsx
index 58484596..11e7635f 100644
--- a/src/components/editor/menu/DiagramOptions.tsx
+++ b/src/components/editor/menu/DiagramOptions.tsx
@@ -30,7 +30,7 @@ const DiagramOptions = ({
return (
- Diagram Options
+ {t("diagramSidePanel.diagramOptions")}
diff --git a/src/components/editor/system/menu/SystemContextMenu.tsx b/src/components/editor/system/menu/SystemContextMenu.tsx
index 4dd7fef7..73827477 100644
--- a/src/components/editor/system/menu/SystemContextMenu.tsx
+++ b/src/components/editor/system/menu/SystemContextMenu.tsx
@@ -1,6 +1,7 @@
import * as React from "react";
import { Menu, MenuItem } from "@mui/material";
import { ElementContextMenuAnchor } from "@utils/contextMenu";
+import { useTranslation } from "react-i18next";
interface Props {
anchorPosition: ElementContextMenuAnchor;
@@ -10,6 +11,7 @@ interface Props {
}
const SystemContextMenu = ({ anchorPosition, onClose, onEditClick, onDelete }: Props) => {
+ const { t } = useTranslation();
const handleEditClick = () => {
onClose();
onEditClick();
@@ -36,10 +38,10 @@ const SystemContextMenu = ({ anchorPosition, onClose, onEditClick, onDelete }: P
}
>
);
diff --git a/src/components/editor/system/menu/component/ComponentSidebarMenu.tsx b/src/components/editor/system/menu/component/ComponentSidebarMenu.tsx
index e4f282b7..f1ad1976 100644
--- a/src/components/editor/system/menu/component/ComponentSidebarMenu.tsx
+++ b/src/components/editor/system/menu/component/ComponentSidebarMenu.tsx
@@ -13,6 +13,7 @@ import ControlledAutocomplete from "@components/materialui/ControlledAutocomplet
import { useForm } from "react-hook-form";
import { FailureModeProvider } from "@hooks/useFailureModes";
import { simplifyReferences } from "@utils/utils";
+import { useTranslation } from "react-i18next";
interface Props {
component: Component;
@@ -22,6 +23,7 @@ interface Props {
const ComponentSidebarMenu = ({ component, onComponentUpdated, systemComponents }: Props) => {
const [showSnackbar] = useSnackbar();
+ const { t } = useTranslation();
const allowedComponents = filter(flatten([systemComponents]), (o) => o.iri !== component?.iri);
@@ -61,13 +63,13 @@ const ComponentSidebarMenu = ({ component, onComponentUpdated, systemComponents
return (
- Edit Component
+ {t("systemComponentMenu.editComponent")}
{component ? (
) : (
- No component selected
+ {t("systemComponentMenu.notSelected")}
)}
@@ -75,7 +77,7 @@ const ComponentSidebarMenu = ({ component, onComponentUpdated, systemComponents
{component && (
- Functions
+ {t("systemComponentMenu.functions")}
@@ -90,7 +92,7 @@ const ComponentSidebarMenu = ({ component, onComponentUpdated, systemComponents
{component && (
- Linked Component
+ {t("systemComponentMenu.linkedComponent")}
{
+ const { t } = useTranslation();
const [contextMenuSelectedTree, setContextMenuSelectedTree] = useState(null);
const [contextMenuAnchor, setContextMenuAnchor] = useState(contextMenuDefaultAnchor);
@@ -32,9 +34,8 @@ const FaultTreeListItem = ({ faultTree, onClick }: Props) => {
const handleDelete = (treeToDelete: FaultTree) => {
showConfirmDialog({
- title: "Delete Fault Tree",
- explanation:
- "Deleting fault tree will delete the whole tree structure. Events will remain. Proceed to delete the tree?",
+ title: t("deleteFtaModal.title"),
+ explanation: t("deleteFtaModal.explanation"),
onConfirm: () => {
removeTree(treeToDelete);
},
diff --git a/src/components/table/FaultTreeTableHead.tsx b/src/components/table/FaultTreeTableHead.tsx
index c497b0fc..40606ee5 100644
--- a/src/components/table/FaultTreeTableHead.tsx
+++ b/src/components/table/FaultTreeTableHead.tsx
@@ -2,6 +2,7 @@ import React, { FC } from "react";
import { TableCell, TableRow, Box, TableSortLabel } from "@mui/material";
import FilterListIcon from "@mui/icons-material/FilterList";
import useStyles from "./FaultTreeOverviewTable.styles";
+import { useTranslation } from "react-i18next";
interface FaultTreeTableHeadProps {
sortConfig: { key: string; direction: "asc" | "desc" };
@@ -12,13 +13,13 @@ interface FaultTreeTableHeadProps {
const FaultTreeTableHead: FC = ({ sortConfig, onSortChange, onFilterClick, filterValues }) => {
const { classes } = useStyles();
-
+ const { t } = useTranslation();
return (
onFilterClick(e, "label")} style={{ cursor: "pointer", marginRight: "8px" }}>
- FHA Label
+ {t("faultTreeOverviewTable.name")}
{filterValues.label && }
= ({ sortConfig, onSortCha
/>
- Aircraft Type
+ {t("faultTreeOverviewTable.aircraftType")}
onFilterClick(e, "snsLabel")} style={{ cursor: "pointer" }}>
- SNS Label
+ {t("faultTreeOverviewTable.sns")}
{filterValues.snsLabel && }
= ({ sortConfig, onSortCha
/>
- Calculated Failure Rate
- FHA Based Failure Rate
- Required Failure Rate
- Last Modified
+ {t("faultTreeOverviewTable.calculatedFailureRate")}
+ {t("faultTreeOverviewTable.fhaBasedFailureRate")}
+ {t("faultTreeOverviewTable.requiredFailureRate")}
+ {t("faultTreeOverviewTable.lastModified")}
- Created
+ {t("faultTreeOverviewTable.created")}
= ({ sortConfig, onSortCha
/>
- Last Editor
+ {t("faultTreeOverviewTable.lastEditor")}
);
};