👽 ajoute la traduction pour la sauvegarde
parent
e480b129d0
commit
274b381f3b
|
@ -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) => (
|
||||
<Banner hidden={!previousSimulation}>
|
||||
<Trans key="previousSimulationBanner">
|
||||
<Trans i18nKey="previousSimulationBanner.info">
|
||||
Votre précédente simulation a été automatiquement sauvegardée.
|
||||
</Trans>
|
||||
<button
|
||||
className="unstyledButton linkButton"
|
||||
onClick={loadPreviousSimulation}>
|
||||
<Trans key="previousSimulationBanner.retrieveButton">
|
||||
<Trans i18nKey="previousSimulationBanner.retrieveButton">
|
||||
Retrouver ma dernière simulation
|
||||
</Trans>
|
||||
</button>
|
||||
</Banner>
|
||||
)
|
||||
|
||||
export default connect(({ previousSimulation }) => ({ previousSimulation }), {
|
||||
loadPreviousSimulation
|
||||
})(PreviousSimulationBanner)
|
||||
export default compose(
|
||||
translate(),
|
||||
connect(({ previousSimulation }) => ({ previousSimulation }), {
|
||||
loadPreviousSimulation: loadPreviousSimulationAction
|
||||
})
|
||||
)(PreviousSimulationBanner)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue