diff --git a/public/locales/en/translations.json b/public/locales/en/translations.json index 5ad41ec..f8ca6b4 100644 --- a/public/locales/en/translations.json +++ b/public/locales/en/translations.json @@ -18,6 +18,7 @@ "About": "About" }, "Session": { + "Title": "Sessions", "Session": "Session", "Active": "Active", "StartDate": "Start date", diff --git a/public/locales/ro/translations.json b/public/locales/ro/translations.json index 11a79d5..2e93f20 100644 --- a/public/locales/ro/translations.json +++ b/public/locales/ro/translations.json @@ -9,6 +9,7 @@ "About": "Despre" }, "Session": { + "Title": "Sesiuni", "Session": "Sesiune", "Active": "Activă", "StartDate": "Dată pornire", diff --git a/src/features/session/components/SessionListComponent.js b/src/features/session/components/SessionListComponent.js index e751a62..acc23f7 100644 --- a/src/features/session/components/SessionListComponent.js +++ b/src/features/session/components/SessionListComponent.js @@ -8,6 +8,7 @@ import ExpandMoreIcon from "@material-ui/icons/ExpandMore"; import PropTypes from "prop-types"; import SessionSummary from "./SessionSummary"; import Spinner from "../../../components/common/Spinner"; +import { useTranslation } from "react-i18next"; const useStyles = makeStyles((theme) => ({ root: { @@ -21,10 +22,11 @@ const useStyles = makeStyles((theme) => ({ const SessionListComponent = ({ sessions }) => { const classes = useStyles(); + const { t } = useTranslation(); return (
-

Sessions

+

{t("Session.Title")}

{sessions.loading ? ( ) : ( diff --git a/src/features/session/components/SessionSummary.js b/src/features/session/components/SessionSummary.js index 5fb2a5b..83b840b 100644 --- a/src/features/session/components/SessionSummary.js +++ b/src/features/session/components/SessionSummary.js @@ -25,7 +25,7 @@ const SessionSummary = ({ session }) => { {`${t("Session.Session")}: `} {session.sessionId} - + {`${t("Session.Active")}: `} {session.active ? ( @@ -33,7 +33,7 @@ const SessionSummary = ({ session }) => { )} - + {`${t("Session.StartDate")}: `} {t("DATE_FORMAT", { @@ -42,7 +42,17 @@ const SessionSummary = ({ session }) => { + + {`${t("Session.RunningTime")}: `} + {session.runningTime} + + + {`${t("Session.Host")}: `} + {session.hostName} + + + {`${t("Session.StopDate")}: `} {session.stopDate @@ -55,16 +65,6 @@ const SessionSummary = ({ session }) => { : "---"} - - - {`${t("Session.RunningTime")}: `} - {session.runningTime} - - - - {`${t("Session.Host")}: `} - {session.hostName} - );