diff --git a/src/components/Consumption/ConsumptionView.tsx b/src/components/Consumption/ConsumptionView.tsx index cc245ff0451a921af2cdd741bf3817ea5cf68bae..4515ce4d4e729eb89fcc3fe5595aaff218bded43 100644 --- a/src/components/Consumption/ConsumptionView.tsx +++ b/src/components/Consumption/ConsumptionView.tsx @@ -27,6 +27,7 @@ import { useAppDispatch, useAppSelector } from 'store/hooks' import { openPartnersModal, setCustomPopup } from 'store/modal/modal.slice' import { isLastDateReached } from 'utils/date' import { + getFluidName, getKonnectorUpdateError, getPartnerKey, getTodayDate, @@ -75,6 +76,11 @@ const ConsumptionView = ({ fluidType }: { fluidType: FluidType }) => { ? `${currentFluidStatus.lastDataDate.toLocaleString() + fluidType}` : '' + const getTitleKey = (fluidType: FluidType): string => { + if (fluidType === FluidType.MULTIFLUID) return 'common.title_consumption' + return `common.title_consumption_${getFluidName(fluidType)}` + } + const handleCloseReleaseNoteModal = useCallback(() => { setOpenReleaseNoteModal(false) dispatch( @@ -198,8 +204,8 @@ const ConsumptionView = ({ fluidType }: { fluidType: FluidType }) => { return ( <> - <CozyBar titleKey="common.title_consumption" /> - <Header desktopTitleKey="common.title_consumption"> + <CozyBar titleKey={getTitleKey(fluidType)} /> + <Header desktopTitleKey={getTitleKey(fluidType)}> <DateNavigator disableNext={isLastDateReached(selectedDate, currentTimeStep)} disablePrev={disablePrev} diff --git a/src/locales/fr.json b/src/locales/fr.json index 95b49a62f6969af9804ac77dbb322b2ddbadb78f..3dae8dc9b90d374d1c2962f74dce561933b95fd1 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -2,6 +2,9 @@ "common": { "title_app": "Ecolyo", "title_consumption": "Conso", + "title_consumption_electricity": "Conso électrique", + "title_consumption_gas": "Conso de gaz", + "title_consumption_water": "Conso d'eau", "title_challenge": "Défis", "title_quiz": "Quiz", "title_exploration": "Exploration",