From 274b381f3bec5b2df75d486ebef5f35d12119965 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Wed, 30 May 2018 18:43:27 +0200 Subject: [PATCH] :alien: ajoute la traduction pour la sauvegarde --- source/components/PreviousSimulationBanner.js | 23 +++++++++++-------- source/locales/en.yaml | 5 ++-- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/source/components/PreviousSimulationBanner.js b/source/components/PreviousSimulationBanner.js index 3ced8149b..650139f57 100644 --- a/source/components/PreviousSimulationBanner.js +++ b/source/components/PreviousSimulationBanner.js @@ -1,10 +1,12 @@ /* @flow */ +import { compose } from 'ramda' import React from 'react' -import type { SavedSimulation } from '../types/State' -import { loadPreviousSimulation } from '../actions' -import Banner from './Banner' +import { Trans, translate } from 'react-i18next' import { connect } from 'react-redux' -import { Trans } from 'react-i18next' +import { loadPreviousSimulation as loadPreviousSimulationAction } from '../actions' +import Banner from './Banner' + +import type { SavedSimulation } from '../types/State' type ConnectedPropTypes = { previousSimulation: SavedSimulation, @@ -15,19 +17,22 @@ const PreviousSimulationBanner = ({ loadPreviousSimulation }: ConnectedPropTypes) => ( ) -export default connect(({ previousSimulation }) => ({ previousSimulation }), { - loadPreviousSimulation -})(PreviousSimulationBanner) +export default compose( + translate(), + connect(({ previousSimulation }) => ({ previousSimulation }), { + loadPreviousSimulation: loadPreviousSimulationAction + }) +)(PreviousSimulationBanner) diff --git a/source/locales/en.yaml b/source/locales/en.yaml index 4e5c3ced3..e93017efe 100644 --- a/source/locales/en.yaml +++ b/source/locales/en.yaml @@ -1,6 +1,7 @@ enterSalary: Enter a monthly salary -previousSimulationBanner: Your previous simulation data have been saved. -previousSimulationBanner.retrieveButton: Retrieve my last simulation +previousSimulationBanner: + info: Your previous simulation data have been saved. + retrieveButton: Retrieve my last simulation Estimation approximative: This is an estimate defaults: for a permanent (CDI) full-time contract Affiner le calcul: Refine this estimate