diff -r 3f71ad81a5a9 -r e4c2c1919c20 client/src/components/SessionForm.js
--- a/client/src/components/SessionForm.js Tue Dec 04 18:17:56 2018 +0100
+++ b/client/src/components/SessionForm.js Tue Dec 04 18:56:31 2018 +0100
@@ -4,6 +4,8 @@
import * as sessionsActions from '../actions/sessionsActions';
import * as authActions from '../actions/authActions';
import _ from 'lodash';
+import { withNamespaces } from 'react-i18next';
+
class SessionForm extends Component {
@@ -113,13 +115,15 @@
titleEditMode = () => {
+ const t = this.props.t;
+
if (this.state.titleEditMode === false) {
return (
- { this.props.currentSession.title || Espace titre }
+ { this.props.currentSession.title || { t('session_form.empty_title_placeholder') } }
);
}
@@ -133,7 +137,7 @@
type="textarea"
name="title"
defaultValue={ this.props.currentSession.title }
- placeholder="Espace titre"
+ placeholder={ t('session_form.empty_title_placeholder') }
ref={title => this.title = title}
>
@@ -143,13 +147,15 @@
descriptionEditMode = () => {
+ const t = this.props.t;
+
if (this.state.descriptionEditMode === false) {
return (
- { this.props.currentSession.description || Espace description }
+ { this.props.currentSession.description || { t('session_form.empty_description_placeholder') } }
);
}
@@ -163,7 +169,7 @@
type="textarea"
name="description"
defaultValue={ this.props.currentSession.description }
- placeholder="Espace description"
+ placeholder={ t('session_form.empty_description_placeholder') }
ref={desc => this.desc = desc}
>
@@ -214,4 +220,4 @@
}
}
-export default connect(mapStateToProps, mapDispatchToProps)(SessionForm);
+export default withNamespaces()(connect(mapStateToProps, mapDispatchToProps)(SessionForm));