client/src/components/CreateGroup.js
changeset 171 03334a31130a
parent 170 7da1d5137b0b
child 191 3f71ad81a5a9
--- a/client/src/components/CreateGroup.js	Tue Nov 06 16:19:26 2018 +0100
+++ b/client/src/components/CreateGroup.js	Thu Nov 08 16:03:28 2018 +0100
@@ -1,6 +1,7 @@
 import React, { Component } from 'react';
 import { connect } from 'react-redux';
 import { bindActionCreators } from 'redux';
+import { Trans } from 'react-i18next';
 import '../App.css';
 import Navbar from './Navbar';
 import * as authActions from '../actions/authActions';
@@ -79,22 +80,22 @@
               <div className="col-lg-6 offset-md-5">
                 <div className="panel-login panel panel-default d-flex justify-content-end">
                   <div className="card-header bg-primary w-50">
-                  <h5 className="text-center text-secondary font-weight-bold">Nouveau groupe</h5>
+                  <h5 className="text-center text-secondary font-weight-bold text-capitalize"><Trans i18nKey="create_group.new_group">nouveau groupe</Trans></h5>
                   <form className="mt-3" onSubmit={this.submit.bind(this)}>
                     <div className="form-group mb-2" /*validationState={ errorMessages && ('name' in errorMessages) ? 'error' : null }*/>
-                      <label className="col-from-label text-secondary font-weight-bold mt-2">Nom</label>
+                      <label className="col-from-label text-secondary font-weight-bold mt-2 text-capitalize"><Trans i18nKey="common.name">nom</Trans></label>
                       <input className="form-control bg-secondary text-primary border-0 w-100" type="text" onChange={this.handleInputChange} name="name" placeholder="Entrez un nom de groupe"/>
                       {/* { this.renderErrorMessage(errorMessages, 'name') } */}
                     </div>
                     <div className="form-group mb-2" /*validationState={ errorMessages && ('description' in errorMessages) ? 'error' : null }*/>
-                      <label className="col-form-label text-secondary font-weight-bold mt-2">Description</label>
+                      <label className="col-form-label text-secondary font-weight-bold mt-2 text-capitalize"><Trans i18nKey="common.description">description</Trans></label>
                       <textarea className="form-control bg-secondary text-primary border-0 w-100" type="textarea" onChange={this.handleInputChange} name="description" placeholder="Entrez une description de groupe"></textarea>
                       {/* { this.renderErrorMessage(errorMessages, 'description') } */}
                     </div>
                     {/* { this.renderNonFieldErrors(errorMessages) } */}
                     <div className="text-center">
-                    <button type="submit" value="Submit" className="btn btn-secondary btn-lg text-primary font-weight-bold m-3" disabled={okDisabled} onClick={this.submit}>Créer</button>
-                    <button type="button" className="btn btn-irinotes-form text-muted btn-lg font-weight-bold" onClick={this.cancel}>Annuler</button>
+                    <button type="submit" value="Submit" className="btn btn-secondary btn-lg text-primary font-weight-bold m-3 text-capitalize" disabled={okDisabled} onClick={this.submit}><Trans i18nKey="common.create">Créer</Trans></button>
+                    <button type="button" className="btn btn-irinotes-form text-muted btn-lg font-weight-bold text-capitalize" onClick={this.cancel}><Trans i18nKey="common.cancel">annuler</Trans></button>
                     </div>
                   </form>
                 </div>