From 874bbc785b2bf0e3471199ddd82bdc57d55554d5 Mon Sep 17 00:00:00 2001 From: Laurent Bossavit Date: Tue, 27 Mar 2018 18:56:23 +0200 Subject: [PATCH] :alien: Typo --- source/components/conversation/Input.js | 8 +++++++- source/locales/en.yaml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/source/components/conversation/Input.js b/source/components/conversation/Input.js index a5fb2844d..0d4d7606b 100644 --- a/source/components/conversation/Input.js +++ b/source/components/conversation/Input.js @@ -1,4 +1,5 @@ import React, { Component } from 'react' +import PropTypes from 'prop-types' import { FormDecorator } from './FormDecorator' import classnames from 'classnames' import { toPairs } from 'ramda' @@ -7,6 +8,9 @@ import SendButton from './SendButton' @FormDecorator('input') export default class Input extends Component { + static contextTypes = { + i18n: PropTypes.object.isRequired + } state = { lastValue: '' } @@ -20,7 +24,9 @@ export default class Input extends Component { answerSuffix = valueType.suffix, suffixed = answerSuffix != null, inputError = dirty && error, - submitDisabled = !dirty || inputError + submitDisabled = !dirty || inputError, + { i18n } = this.context + attributes['placeholder'] = i18n.t(attributes['placeholder']); return ( diff --git a/source/locales/en.yaml b/source/locales/en.yaml index 8bd2ce19a..18fbd60d9 100644 --- a/source/locales/en.yaml +++ b/source/locales/en.yaml @@ -18,7 +18,7 @@ Entrée: Enter À propos: About (fr) Mode plein écran: Full screen first: Your first estimate is now available! -lastQ: One last question ! +lastQ: One last question! questionsLeft: Fewer than <1>{{nbQuestions}} questions to go… radio_Oui: Yes radio_Non: No