diff --git a/typescript/frontend-marios2/src/components/ForgotPassword.tsx b/typescript/frontend-marios2/src/components/ForgotPassword.tsx
index c53ffe8e5..12700f2f1 100644
--- a/typescript/frontend-marios2/src/components/ForgotPassword.tsx
+++ b/typescript/frontend-marios2/src/components/ForgotPassword.tsx
@@ -19,6 +19,7 @@ import LockOutlinedIcon from '@mui/icons-material/LockOutlined';
import axiosConfig from 'src/Resources/axiosConfig';
import { useNavigate } from 'react-router-dom';
import routes from 'src/Resources/routes.json';
+import { FormattedMessage, useIntl } from 'react-intl';
interface ForgotPasswordPromps {
resetPassword: () => void;
@@ -29,6 +30,7 @@ function ForgotPassword() {
const [loading, setLoading] = useState(false);
const [open, setOpen] = useState(false);
const [errorModalOpen, setErrorModalOpen] = useState(false);
+ const intl = useIntl();
const theme = useTheme();
const context = useContext(UserContext);
@@ -105,7 +107,7 @@ function ForgotPassword() {
- Provide your username
+
- Submit
+
- Username is wrong. Please try again.
+
@@ -216,7 +218,7 @@ function ForgotPassword() {
}}
>
- Mail sent successfully.
+
diff --git a/typescript/frontend-marios2/src/components/ResetPassword.tsx b/typescript/frontend-marios2/src/components/ResetPassword.tsx
index f4023ac17..7928ab76a 100644
--- a/typescript/frontend-marios2/src/components/ResetPassword.tsx
+++ b/typescript/frontend-marios2/src/components/ResetPassword.tsx
@@ -18,12 +18,14 @@ import { TokenContext } from 'src/contexts/tokenContext';
import { useNavigate } from 'react-router-dom';
import Avatar from '@mui/material/Avatar';
import LockOutlinedIcon from '@mui/icons-material/LockOutlined';
+import { FormattedMessage, useIntl } from 'react-intl';
function ResetPassword() {
const [username, setUsername] = useState('');
const [loading, setLoading] = useState(false);
const [rememberMe, setRememberMe] = useState(false);
const [open, setOpen] = useState(false);
+ const intl = useIntl();
const theme = useTheme();
const context = useContext(UserContext);
const navigate = useNavigate();
@@ -102,7 +104,7 @@ function ResetPassword() {
- Reset Password
+
- Passwords do not match
+
)}
@@ -164,7 +166,7 @@ function ResetPassword() {
color="primary"
onClick={handleSubmit}
>
- Submit
+
- Reset Password failed. Please try again.
+
diff --git a/typescript/frontend-marios2/src/components/SetNewPassword.tsx b/typescript/frontend-marios2/src/components/SetNewPassword.tsx
index 3d53c5bc5..cf9de7e73 100644
--- a/typescript/frontend-marios2/src/components/SetNewPassword.tsx
+++ b/typescript/frontend-marios2/src/components/SetNewPassword.tsx
@@ -18,12 +18,14 @@ import { TokenContext } from 'src/contexts/tokenContext';
import { useNavigate } from 'react-router-dom';
import Avatar from '@mui/material/Avatar';
import LockOutlinedIcon from '@mui/icons-material/LockOutlined';
+import { FormattedMessage, useIntl } from 'react-intl';
function SetNewPassword() {
const [username, setUsername] = useState('');
const [loading, setLoading] = useState(false);
const [rememberMe, setRememberMe] = useState(false);
const [open, setOpen] = useState(false);
+ const intl = useIntl();
const theme = useTheme();
const context = useContext(UserContext);
const navigate = useNavigate();
@@ -103,7 +105,7 @@ function SetNewPassword() {
- Set New Password
+
- Passwords do not match
+
)}
@@ -165,7 +167,7 @@ function SetNewPassword() {
color="primary"
onClick={handleSubmit}
>
- Submit
+
- Setting new password failed. Please try again.
+
diff --git a/typescript/frontend-marios2/src/components/login.tsx b/typescript/frontend-marios2/src/components/login.tsx
index 48d047c31..bc0f2ffa9 100644
--- a/typescript/frontend-marios2/src/components/login.tsx
+++ b/typescript/frontend-marios2/src/components/login.tsx
@@ -25,6 +25,7 @@ import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';
import CheckBoxIcon from '@mui/icons-material/CheckBox';
import routes from 'src/Resources/routes.json';
import { ProductIdContext } from '../contexts/ProductIdContextProvider';
+import { FormattedMessage, useIntl } from 'react-intl';
function Login() {
const [username, setUsername] = useState('');
@@ -34,6 +35,7 @@ function Login() {
const [open, setOpen] = useState(false);
const [error, setError] = useState(false);
+ const intl = useIntl();
const theme = useTheme();
const context = useContext(UserContext);
const {
@@ -147,7 +149,7 @@ function Login() {
- Sign in
+
}
- label="Remember me"
+ label={}
/>
{loading && (
@@ -253,7 +255,7 @@ function Login() {
}}
>
- Login failed. Please try again.
+
@@ -281,7 +283,7 @@ function Login() {
onForgotPassword();
}}
>
- Forgot password?
+
diff --git a/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryView.tsx b/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryView.tsx
index b4441fa3b..62a780dc4 100644
--- a/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryView.tsx
+++ b/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryView.tsx
@@ -87,10 +87,10 @@ function BatteryView(props: BatteryViewProps) {
style={{ color: 'black', fontWeight: 'bold' }}
mt={2}
>
- Unable to communicate with the installation
+
- Please wait or refresh the page
+
)}
@@ -111,10 +111,10 @@ function BatteryView(props: BatteryViewProps) {
style={{ color: 'black', fontWeight: 'bold' }}
mt={2}
>
- Battery service is not available at the moment
+
- Please wait or refresh the page
+
)}
@@ -229,24 +229,24 @@ function BatteryView(props: BatteryViewProps) {
- Battery
- Firmware
- Power
- Battery Voltage
- SoC
- Temperature
+
+
+
+
+
+
{product === 0 ? (
- Warnings
+
) : (
- Min Cell Voltage
+
)}
{product === 0 ? (
- Alarms
+
) : (
- Max Cell Voltage
+
)}
{(product === 3 || product === 4) && (
- Voltage Difference
+
)}
diff --git a/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSalidomo.tsx b/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSalidomo.tsx
index 030cc890e..12a238d91 100644
--- a/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSalidomo.tsx
+++ b/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSalidomo.tsx
@@ -85,10 +85,10 @@ function BatteryViewSalidomo(props: BatteryViewProps) {
style={{ color: 'black', fontWeight: 'bold' }}
mt={2}
>
- Unable to communicate with the installation
+
- Please wait or refresh the page
+
)}
@@ -109,10 +109,10 @@ function BatteryViewSalidomo(props: BatteryViewProps) {
style={{ color: 'black', fontWeight: 'bold' }}
mt={2}
>
- Battery service is not available at the moment
+
- Please wait or refresh the page
+
)}
@@ -209,14 +209,14 @@ function BatteryViewSalidomo(props: BatteryViewProps) {
- Battery
- Firmware
- Power
- Voltage
- SoC
- Temperature
- Warnings
- Alarms
+
+
+
+
+
+
+
+
diff --git a/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSodioHome.tsx b/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSodioHome.tsx
index fb3e221d3..6c5a1eb4b 100644
--- a/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSodioHome.tsx
+++ b/typescript/frontend-marios2/src/content/dashboards/BatteryView/BatteryViewSodioHome.tsx
@@ -87,10 +87,10 @@ function BatteryViewSodioHome(props: BatteryViewSodioHomeProps) {
style={{ color: 'black', fontWeight: 'bold' }}
mt={2}
>
- Unable to communicate with the installation
+
- Please wait or refresh the page
+
)}
@@ -111,10 +111,10 @@ function BatteryViewSodioHome(props: BatteryViewSodioHomeProps) {
style={{ color: 'black', fontWeight: 'bold' }}
mt={2}
>
- Battery service is not available at the moment
+
- Please wait or refresh the page
+
)}
@@ -195,12 +195,12 @@ function BatteryViewSodioHome(props: BatteryViewSodioHomeProps) {
- Battery
- Power
- Battery Voltage
- Current
- SoC
- SoH
+
+
+
+
+
+
{/*Daily Charge Energy*/}
{/*Daily Discharge Energy*/}
diff --git a/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStats.tsx b/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStats.tsx
index 35be8866e..a27540f2a 100644
--- a/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStats.tsx
+++ b/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStats.tsx
@@ -295,7 +295,7 @@ function MainStats(props: MainStatsProps) {
>
- Fetching data...
+
)}
diff --git a/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStatsSalidomo.tsx b/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStatsSalidomo.tsx
index fbe4fe728..1b8b5ea36 100644
--- a/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStatsSalidomo.tsx
+++ b/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStatsSalidomo.tsx
@@ -294,7 +294,7 @@ function MainStatsSalidomo(props: MainStatsProps) {
>
- Fetching data...
+
)}
diff --git a/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStatsSodioHome.tsx b/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStatsSodioHome.tsx
index 598eedc77..e08a436ef 100644
--- a/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStatsSodioHome.tsx
+++ b/typescript/frontend-marios2/src/content/dashboards/BatteryView/MainStatsSodioHome.tsx
@@ -302,7 +302,7 @@ function MainStatsSodioHome(props: MainStatsSodioHomeProps) {
>
- Fetching data...
+
)}
diff --git a/typescript/frontend-marios2/src/content/dashboards/Configuration/Configuration.tsx b/typescript/frontend-marios2/src/content/dashboards/Configuration/Configuration.tsx
index eee0f1849..8bdf1a24a 100644
--- a/typescript/frontend-marios2/src/content/dashboards/Configuration/Configuration.tsx
+++ b/typescript/frontend-marios2/src/content/dashboards/Configuration/Configuration.tsx
@@ -19,7 +19,7 @@ import {
} from '@mui/material';
import React, { useContext, useState } from 'react';
-import { FormattedMessage } from 'react-intl';
+import { FormattedMessage, useIntl } from 'react-intl';
import Button from '@mui/material/Button';
import { Close as CloseIcon } from '@mui/icons-material';
import MenuItem from '@mui/material/MenuItem';
@@ -40,6 +40,7 @@ interface ConfigurationProps {
}
function Configuration(props: ConfigurationProps) {
+ const intl = useIntl();
if (props.values === null) {
return null;
}
@@ -137,7 +138,7 @@ function Configuration(props: ConfigurationProps) {
props.values.EssControl.Mode === 'CalibrationCharge'
) {
setDateSelectionError(
- 'You cannot change the date while the installation is in Calibration Charge Mode'
+ intl.formatMessage({ id: 'cannotChangeDateCalibration' })
);
setErrorDateModalOpen(true);
return;
@@ -146,7 +147,7 @@ function Configuration(props: ConfigurationProps) {
dayjs(formValues.calibrationChargeDate).isBefore(dayjs())
) {
//console.log('asked for', dayjs(formValues.calibrationChargeDate));
- setDateSelectionError('You must specify a future date');
+ setDateSelectionError(intl.formatMessage({ id: 'mustSpecifyFutureDate' }));
setErrorDateModalOpen(true);
return;
} else {
@@ -458,7 +459,7 @@ function Configuration(props: ConfigurationProps) {
helperText={
errors.minimumSoC ? (
- Value should be between 0-100%
+ {intl.formatMessage({ id: 'valueBetween0And100' })}
) : (
''
@@ -592,7 +593,7 @@ function Configuration(props: ConfigurationProps) {
helperText={
errors.gridSetPoint ? (
- Please provide a valid number
+ {intl.formatMessage({ id: 'pleaseProvideValidNumber' })}
) : (
''
@@ -804,7 +805,7 @@ function Configuration(props: ConfigurationProps) {
alignItems: 'center'
}}
>
- Successfully applied configuration file
+
- An error has occurred
+
{
+ const intl = useIntl();
const [isRowHovered, setHoveredRow] = useState(-1);
const navigate = useNavigate();
const [selectedInstallation, setSelectedInstallation] = useState(-1);
@@ -202,7 +203,7 @@ const FlatInstallationView = (props: FlatInstallationViewProps) => {
>
setSearchTerm(e.target.value)}
fullWidth
@@ -226,7 +227,7 @@ const FlatInstallationView = (props: FlatInstallationViewProps) => {