From 3f707b95e5175c67409f43f6bc6ce5a8c72e121c Mon Sep 17 00:00:00 2001 From: Mael Date: Mon, 9 Apr 2018 11:38:28 +0200 Subject: [PATCH] :alien: Traduction du formulaire de retour --- source/components/Satisfaction.js | 26 ++++++++++++++++++++------ source/containers/App.dev.js | 1 - source/locales/en.yaml | 6 ++++++ 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/source/components/Satisfaction.js b/source/components/Satisfaction.js index 050f3d571..ee62e7670 100644 --- a/source/components/Satisfaction.js +++ b/source/components/Satisfaction.js @@ -3,14 +3,19 @@ import HoverDecorator from './HoverDecorator' import 'whatwg-fetch' import { connect } from 'react-redux' import './Satisfaction.css' - +import { Trans, translate } from 'react-i18next' import ReactPiwik from './Tracker' +import PropTypes from 'prop-types' @connect(state => ({ sessionId: state.sessionId, textColourOnWhite: state.themeColours.textColourOnWhite })) +@translate() export default class Satisfaction extends Component { + static contextTypes = { + i18n: PropTypes.object.isRequired + } state = { answer: false, message: null, @@ -50,6 +55,7 @@ export default class Satisfaction extends Component { } render() { let { answer, message, address, messageSent } = this.state, + { i18n } = this.context, validMessage = (typeof message == 'string' && message.length > 4) || (typeof address == 'string' && address.length > 4), @@ -62,7 +68,11 @@ export default class Satisfaction extends Component { if (!answer) return (
-

Vous êtes satisfait du simulateur ?

+

+ + Vous êtes satisfait du simulateur ? + +

)} -

+

+ Pour recevoir une réponse, laissez-nous votre adresse ou{' '} + - envoyez-nous directement un mail{' '} + + {' '}envoyez-nous directement un mail{' '} +