From 2f895a1ee52922565b7ca1a0c00defe68f40aebd Mon Sep 17 00:00:00 2001 From: Zog Date: Mon, 12 Feb 2018 09:33:53 +0100 Subject: Refs #5888; Fix I18n in JS --- app/javascript/time_tables/components/ConfirmModal.js | 10 +++++----- app/javascript/time_tables/components/ErrorModal.js | 6 +++--- app/javascript/time_tables/components/Metas.js | 12 ++++++------ app/javascript/time_tables/components/PeriodForm.js | 14 +++++++------- app/javascript/time_tables/components/TagsSelect2.js | 2 +- app/javascript/time_tables/components/Timetable.js | 8 ++++---- 6 files changed, 26 insertions(+), 26 deletions(-) (limited to 'app/javascript/time_tables/components') diff --git a/app/javascript/time_tables/components/ConfirmModal.js b/app/javascript/time_tables/components/ConfirmModal.js index 845e7ed1b..4e8583bc0 100644 --- a/app/javascript/time_tables/components/ConfirmModal.js +++ b/app/javascript/time_tables/components/ConfirmModal.js @@ -9,11 +9,11 @@ export default function ConfirmModal({dispatch, modal, onModalAccept, onModalCan
-

{I18n.time_tables.edit.confirm_modal.title}

+

{I18n.t('time_tables.edit.confirm_modal.title')}

-

{I18n.time_tables.edit.confirm_modal.message}

+

{I18n.t('time_tables.edit.confirm_modal.message')}

@@ -23,7 +23,7 @@ export default function ConfirmModal({dispatch, modal, onModalAccept, onModalCan type='button' onClick={() => { onModalCancel(modal.confirmModal.callback) }} > - {I18n.cancel} + {I18n.t('cancel')}
@@ -49,4 +49,4 @@ ConfirmModal.propTypes = { 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 543177e54..8af12f1d1 100644 --- a/app/javascript/time_tables/components/ErrorModal.js +++ b/app/javascript/time_tables/components/ErrorModal.js @@ -10,7 +10,7 @@ export default function ErrorModal({dispatch, modal, onModalClose}, {I18n}) {
-

{I18n.time_tables.edit.error_modal.title}

+

{I18n.t('time_tables.edit.error_modal.title')}

@@ -24,7 +24,7 @@ export default function ErrorModal({dispatch, modal, onModalClose}, {I18n}) { type='button' onClick={() => { onModalClose() }} > - {I18n.back} + {I18n.t('back')}
@@ -41,4 +41,4 @@ ErrorModal.propTypes = { 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 3c6848d27..08a6e26fe 100644 --- a/app/javascript/time_tables/components/Metas.js +++ b/app/javascript/time_tables/components/Metas.js @@ -13,7 +13,7 @@ export default function Metas({metas, onUpdateDayTypes, onUpdateComment, onUpdat {/* comment (name) */}
- +
@@ -124,7 +124,7 @@ export default function PeriodForm({modal, timetable, metas, onOpenAddPeriodForm className='btn btn-outline-primary' onClick={onOpenAddPeriodForm} > - {I18n.time_tables.actions.add_period} + {I18n.t('time_tables.actions.add_period')}
} @@ -132,7 +132,7 @@ export default function PeriodForm({modal, timetable, metas, onOpenAddPeriodForm
- ) + ) } PeriodForm.propTypes = { @@ -147,4 +147,4 @@ PeriodForm.propTypes = { PeriodForm.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 dc3739d58..43cf59fdf 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.time_tables.edit.select2.tag.placeholder, + placeholder: this.context.I18n.t('time_tables.edit.select2.tag.placeholder'), ajax: { url: origin + path + '/tags.json', dataType: 'json', diff --git a/app/javascript/time_tables/components/Timetable.js b/app/javascript/time_tables/components/Timetable.js index c44f2a134..991f31435 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 {
-
{this.context.I18n.time_tables.synthesis}
+
{this.context.I18n.t('time_tables.edit.synthesis')}
-
{this.context.I18n.time_tables.edit.day_types}
-
{this.context.I18n.time_tables.edit.periods}
-
{this.context.I18n.time_tables.edit.exceptions}
+
{this.context.I18n.t('time_tables.edit.day_types')}
+
{this.context.I18n.t('time_tables.edit.periods')}
+
{this.context.I18n.t('time_tables.edit.exceptions')}
-- cgit v1.2.3