diff options
7 files changed, 16 insertions, 44 deletions
diff --git a/app/javascript/time_tables/components/ConfirmModal.js b/app/javascript/time_tables/components/ConfirmModal.js index 4e8583bc0..e4219348d 100644 --- a/app/javascript/time_tables/components/ConfirmModal.js +++ b/app/javascript/time_tables/components/ConfirmModal.js @@ -2,7 +2,7 @@ import React from 'react' import PropTypes from 'prop-types' -export default function ConfirmModal({dispatch, modal, onModalAccept, onModalCancel, timetable, metas}, {I18n}) { +export default function ConfirmModal({dispatch, modal, onModalAccept, onModalCancel, timetable, metas}) { return ( <div className={'modal fade ' + ((modal.type == 'confirm') ? 'in' : '')} id='ConfirmModal'> <div className='modal-container'> @@ -45,8 +45,4 @@ ConfirmModal.propTypes = { modal: PropTypes.object.isRequired, onModalAccept: PropTypes.func.isRequired, onModalCancel: PropTypes.func.isRequired -} - -ConfirmModal.contextTypes = { - I18n: PropTypes.object -} +}
\ No newline at end of file diff --git a/app/javascript/time_tables/components/ErrorModal.js b/app/javascript/time_tables/components/ErrorModal.js index 8af12f1d1..a512d28fd 100644 --- a/app/javascript/time_tables/components/ErrorModal.js +++ b/app/javascript/time_tables/components/ErrorModal.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import actions from '../actions' -export default function ErrorModal({dispatch, modal, onModalClose}, {I18n}) { +export default function ErrorModal({dispatch, modal, onModalClose}) { return ( <div className={'modal fade ' + ((modal.type == 'error') ? 'in' : '')} id='ErrorModal'> <div className='modal-container'> @@ -37,8 +37,4 @@ export default function ErrorModal({dispatch, modal, onModalClose}, {I18n}) { ErrorModal.propTypes = { modal: PropTypes.object.isRequired, onModalClose: PropTypes.func.isRequired -} - -ErrorModal.contextTypes = { - I18n: PropTypes.object -} +}
\ No newline at end of file diff --git a/app/javascript/time_tables/components/Metas.js b/app/javascript/time_tables/components/Metas.js index 08a6e26fe..d9746a379 100644 --- a/app/javascript/time_tables/components/Metas.js +++ b/app/javascript/time_tables/components/Metas.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types' import actions from '../actions' import TagsSelect2 from './TagsSelect2' -export default function Metas({metas, onUpdateDayTypes, onUpdateComment, onUpdateColor, onSelect2Tags, onUnselect2Tags}, {I18n}) { +export default function Metas({metas, onUpdateDayTypes, onUpdateComment, onUpdateColor, onSelect2Tags, onUnselect2Tags}) { let colorList = ["", "#9B9B9B", "#FFA070", "#C67300", "#7F551B", "#41CCE3", "#09B09C", "#3655D7", "#6321A0", "#E796C6", "#DD2DAA"] return ( <div className='form-horizontal'> @@ -134,8 +134,4 @@ Metas.propTypes = { onUpdateColor: PropTypes.func.isRequired, onSelect2Tags: PropTypes.func.isRequired, onUnselect2Tags: PropTypes.func.isRequired -} - -Metas.contextTypes = { - I18n: PropTypes.object -} +}
\ No newline at end of file diff --git a/app/javascript/time_tables/components/PeriodForm.js b/app/javascript/time_tables/components/PeriodForm.js index d17a246f7..36ed6cfdf 100644 --- a/app/javascript/time_tables/components/PeriodForm.js +++ b/app/javascript/time_tables/components/PeriodForm.js @@ -33,7 +33,7 @@ const makeYearsOptions = (yearSelected) => { return arr } -export default function PeriodForm({modal, timetable, metas, onOpenAddPeriodForm, onClosePeriodForm, onUpdatePeriodForm, onValidatePeriodForm}, {I18n}) { +export default function PeriodForm({modal, timetable, metas, onOpenAddPeriodForm, onClosePeriodForm, onUpdatePeriodForm, onValidatePeriodForm}) { return ( <div className="container-fluid"> <div className="row"> @@ -143,8 +143,4 @@ PeriodForm.propTypes = { onUpdatePeriodForm: PropTypes.func.isRequired, onValidatePeriodForm: PropTypes.func.isRequired, timetable: PropTypes.object.isRequired -} - -PeriodForm.contextTypes = { - I18n: PropTypes.object -} +}
\ No newline at end of file diff --git a/app/javascript/time_tables/components/PeriodManager.js b/app/javascript/time_tables/components/PeriodManager.js index 6b817fe73..6871d0b9b 100644 --- a/app/javascript/time_tables/components/PeriodManager.js +++ b/app/javascript/time_tables/components/PeriodManager.js @@ -55,7 +55,7 @@ export default class PeriodManager extends Component { type='button' onClick={() => this.props.onOpenEditPeriodForm(this.props.value, this.props.index)} > - Modifier + {I18n.t('actions.edit')} </button> </li> <li className='delete-action'> @@ -64,7 +64,7 @@ export default class PeriodManager extends Component { onClick={() => this.props.onDeletePeriod(this.props.index, this.props.metas.day_types)} > <span className='fa fa-trash'></span> - Supprimer + {I18n.t('actions.destroy')} </button> </li> </ul> @@ -79,8 +79,4 @@ PeriodManager.propTypes = { currentDate: PropTypes.object.isRequired, onDeletePeriod: PropTypes.func.isRequired, onOpenEditPeriodForm: PropTypes.func.isRequired -} - -PeriodManager.contextTypes = { - I18n: PropTypes.object }
\ No newline at end of file diff --git a/app/javascript/time_tables/components/TagsSelect2.js b/app/javascript/time_tables/components/TagsSelect2.js index 43cf59fdf..dd8d6e9c0 100644 --- a/app/javascript/time_tables/components/TagsSelect2.js +++ b/app/javascript/time_tables/components/TagsSelect2.js @@ -40,7 +40,7 @@ export default class TagsSelect2 extends Component { allowClear: true, theme: 'bootstrap', width: '100%', - placeholder: this.context.I18n.t('time_tables.edit.select2.tag.placeholder'), + placeholder: I18n.t('time_tables.edit.select2.tag.placeholder'), ajax: { url: origin + path + '/tags.json', dataType: 'json', @@ -74,8 +74,4 @@ export default class TagsSelect2 extends Component { const formatRepo = (props) => { if(props.name) return props.name -} - -TagsSelect2.contextTypes = { - I18n: PropTypes.object }
\ No newline at end of file diff --git a/app/javascript/time_tables/components/Timetable.js b/app/javascript/time_tables/components/Timetable.js index 991f31435..3779fa2d0 100644 --- a/app/javascript/time_tables/components/Timetable.js +++ b/app/javascript/time_tables/components/Timetable.js @@ -31,11 +31,11 @@ export default class Timetable extends Component { <div className="table table-2entries mb-sm"> <div className="t2e-head w20"> <div className="th"> - <div className="strong">{this.context.I18n.t('time_tables.edit.synthesis')}</div> + <div className="strong">{I18n.t('time_tables.edit.synthesis')}</div> </div> - <div className="td"><span>{this.context.I18n.t('time_tables.edit.day_types')}</span></div> - <div className="td"><span>{this.context.I18n.t('time_tables.edit.periods')}</span></div> - <div className="td"><span>{this.context.I18n.t('time_tables.edit.exceptions')}</span></div> + <div className="td"><span>{I18n.t('time_tables.edit.day_types')}</span></div> + <div className="td"><span>{I18n.t('time_tables.edit.periods')}</span></div> + <div className="td"><span>{I18n.t('time_tables.edit.exceptions')}</span></div> </div> <div className="t2e-item-list w80"> <div> @@ -109,8 +109,4 @@ Timetable.propTypes = { onDeletePeriod: PropTypes.func.isRequired, onExcludeDateFromPeriod: PropTypes.func.isRequired, onIncludeDateInPeriod: PropTypes.func.isRequired -} - -Timetable.contextTypes = { - I18n: PropTypes.object -} +}
\ No newline at end of file |
