From d0c6da104082a9279daac7d732c1f32a5e830117 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Tue, 27 Mar 2018 22:48:14 -0700 Subject: Refs #6156 Update english journey pattern translations --- .../journey_patterns/components/ConfirmModal.js | 8 ++++---- .../journey_patterns/components/CreateModal.js | 12 ++++++------ app/javascript/journey_patterns/components/EditModal.js | 16 ++++++++-------- .../journey_patterns/components/JourneyPattern.js | 8 ++++---- .../journey_patterns/components/JourneyPatterns.js | 12 ++++++------ app/javascript/journey_patterns/components/Navigate.js | 3 ++- config/locales/journey_patterns.en.yml | 11 ++++++++++- config/locales/journey_patterns.fr.yml | 10 ++++++++++ 8 files changed, 50 insertions(+), 30 deletions(-) diff --git a/app/javascript/journey_patterns/components/ConfirmModal.js b/app/javascript/journey_patterns/components/ConfirmModal.js index ccd0a9384..fdf32649f 100644 --- a/app/javascript/journey_patterns/components/ConfirmModal.js +++ b/app/javascript/journey_patterns/components/ConfirmModal.js @@ -9,11 +9,11 @@ export default function ConfirmModal({dispatch, modal, onModalAccept, onModalCan
-

Confirmation

+

{I18n.t('journey_patterns.show.confirmation')}

-

Vous vous apprêtez à changer de page. Voulez-vous valider vos modifications avant cela ?

+

{I18n.t('journey_patterns.show.confirm_page_change')}

@@ -23,7 +23,7 @@ export default function ConfirmModal({dispatch, modal, onModalAccept, onModalCan type='button' onClick={() => { onModalCancel(modal.confirmModal.callback) }} > - Ne pas valider + {I18n.t('cancel')}
diff --git a/app/javascript/journey_patterns/components/CreateModal.js b/app/javascript/journey_patterns/components/CreateModal.js index a6c1b608a..36b5740dc 100644 --- a/app/javascript/journey_patterns/components/CreateModal.js +++ b/app/javascript/journey_patterns/components/CreateModal.js @@ -38,14 +38,14 @@ export default class CreateModal extends Component {
-

Ajouter une mission

+

{I18n.t('journey_patterns.actions.new')}

{(this.props.modal.type == 'create') && (
- +
- +
- + - Annuler + {I18n.t('cancel')}
diff --git a/app/javascript/journey_patterns/components/EditModal.js b/app/javascript/journey_patterns/components/EditModal.js index c960cb41c..1960849fb 100644 --- a/app/javascript/journey_patterns/components/EditModal.js +++ b/app/javascript/journey_patterns/components/EditModal.js @@ -18,12 +18,12 @@ export default class EditModal extends Component { if (this.props.editMode) { return (

- Editer la mission + {I18n.t('journey_patterns.actions.edit')} {this.props.modal.type == 'edit' && "{this.props.modal.modalProps.journeyPattern.name}"}

) } else { - return

Informations

+ return

{I18n.t('journey_patterns.show.informations')}

} } @@ -41,7 +41,7 @@ export default class EditModal extends Component {
- +
- +
- +
- + - Annuler + {I18n.t('cancel')}
} diff --git a/app/javascript/journey_patterns/components/JourneyPattern.js b/app/javascript/journey_patterns/components/JourneyPattern.js index 15d8b6db4..e912b7660 100644 --- a/app/javascript/journey_patterns/components/JourneyPattern.js +++ b/app/javascript/journey_patterns/components/JourneyPattern.js @@ -23,7 +23,7 @@ export default class JourneyPattern extends Component{ let vjURL = routeURL + '/vehicle_journeys?jp=' + jpOid return ( - Horaires des courses + {I18n.t('journey_patterns.journey_pattern.vehicle_journey_at_stops')} ) } @@ -143,7 +143,7 @@ export default class JourneyPattern extends Component{
{this.props.value.object_id ? this.props.value.short_id : '-'}
{this.props.value.registration_number}
-
{actions.getChecked(this.props.value.stop_points).length} arrêt(s)
+
{I18n.t('journey_patterns.show.stop_points_count', {count: actions.getChecked(this.props.value.stop_points).length})}
{this.hasFeature('costs_in_journey_patterns') &&
{this.totalDistance} @@ -171,7 +171,7 @@ export default class JourneyPattern extends Component{ data-toggle='modal' data-target='#JourneyPatternModal' > - {this.props.editMode ? 'Editer' : 'Consulter'} + {this.props.editMode ? I18n.t('actions.edit') : I18n.t('actions.show')}
  • @@ -187,7 +187,7 @@ export default class JourneyPattern extends Component{ this.props.onDeleteJourneyPattern(this.props.index)} } > - Supprimer + {I18n.t('actions.destroy')}
  • diff --git a/app/javascript/journey_patterns/components/JourneyPatterns.js b/app/javascript/journey_patterns/components/JourneyPatterns.js index 930acb390..91c783189 100644 --- a/app/javascript/journey_patterns/components/JourneyPatterns.js +++ b/app/javascript/journey_patterns/components/JourneyPatterns.js @@ -84,14 +84,14 @@ export default class JourneyPatterns extends Component {
    {(this.props.status.fetchSuccess == false) && (
    - Erreur : - la récupération des missions a rencontré un problème. Rechargez la page pour tenter de corriger le problème + {I18n.t('error')} : + {I18n.t('journeys_patterns.journey_pattern.fetching_error')}
    )} { _.some(this.props.journeyPatterns, 'errors') && (
    - Erreur : + {I18n.t('error')} : {this.props.journeyPatterns.map((jp, index) => jp.errors && jp.errors.map((err, i) => { return ( @@ -107,9 +107,9 @@ export default class JourneyPatterns extends Component {
    0) ? '' : ' no_result')}>
    -
    ID Mission
    -
    Code mission
    -
    Nb arrêts
    +
    {I18n.t('objectid')}
    +
    {I18n.attribute_name('journey_pattern', 'registration_number')}
    +
    {I18n.attribute_name('journey_pattern', 'stop_points')}
    { this.hasFeature('costs_in_journey_patterns') &&
    {I18n.attribute_name('journey_pattern', 'full_journey_time')}
    diff --git a/app/javascript/journey_patterns/components/Navigate.js b/app/javascript/journey_patterns/components/Navigate.js index 78f324a7d..9e454da5e 100644 --- a/app/javascript/journey_patterns/components/Navigate.js +++ b/app/javascript/journey_patterns/components/Navigate.js @@ -1,5 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' +import capitalize from 'lodash/capitalize' import actions from '../actions' export default function Navigate({ dispatch, journeyPatterns, pagination, status }) { @@ -17,7 +18,7 @@ export default function Navigate({ dispatch, journeyPatterns, pagination, status
    - Liste des missions {firstItemOnPage} à {(lastItemOnPage < pagination.totalCount) ? lastItemOnPage : pagination.totalCount} sur {pagination.totalCount} + {I18n.t('will_paginate.page_entries_info.multi_page', { model: capitalize(I18n.model_name('journey_pattern', { plural: true })), from: firstItemOnPage, to: lastItemOnPage, count: pagination.totalCount})} { e.preventDefault() }}> diff --git a/config/locales/journey_patterns.en.yml b/config/locales/journey_patterns.en.yml index d480e144d..70ae94dd9 100644 --- a/config/locales/journey_patterns.en.yml +++ b/config/locales/journey_patterns.en.yml @@ -1,6 +1,7 @@ en: journey_patterns: journey_pattern: + fetching_error: "There has been a problem fetching the data. Please reload the page to try again." from_to: "From '%{departure}' to '%{arrival}'" stop_count: "%{count}/%{route_count} stops" vehicle_journeys_count: "Vehicle journeys: %{count}" @@ -19,6 +20,13 @@ en: show: title: "Journey Pattern %{journey_pattern}" stop_points: "Stop point on journey pattern list" + stop_points_count: + none: '%{count} stop areas' + one: '%{count} stop area' + other: '%{count} stop areas' + informations: Informations + confirmation: Confimation + confirm_page_change: You are about to change page. Would you like to save your work before that ? index: title: "Journey Patterns of %{route}" form: @@ -50,7 +58,8 @@ en: creator_id: "Created by" full_journey_time: Full journey commercial_journey_time: Commercial journey - + stop_points: Nb stop areas + checksum: Checksum formtastic: titles: journey_pattern: diff --git a/config/locales/journey_patterns.fr.yml b/config/locales/journey_patterns.fr.yml index 32c1f3f97..10653a02d 100644 --- a/config/locales/journey_patterns.fr.yml +++ b/config/locales/journey_patterns.fr.yml @@ -1,6 +1,7 @@ fr: journey_patterns: journey_pattern: + fetching_error: "La récupération des courses a rencontré un problème. Rechargez la page pour tenter de corriger le problème." from_to: "De '%{departure}' à '%{arrival}'" stop_count: "%{count}/%{route_count} arrêts" vehicle_journeys_count: "Courses: %{count}" @@ -19,6 +20,13 @@ fr: show: title: "Mission %{journey_pattern}" stop_points: "Liste des arrêts de la mission" + stop_points_count: + none: '%{count} arrêt' + one: '%{count} arrêt' + other: '%{count} arrêts' + informations: Informations + confirmation: Confimation + confirm_page_change: Vous vous apprêtez à changer de page. Voulez-vous valider vos modifications avant cela ? index: title: "Missions de %{route}" form: @@ -50,6 +58,8 @@ fr: creator_id: "Créé par" full_journey_time: Parcours complet commercial_journey_time: Parcours commercial + stop_points: Nb arrêts + checksum: Signature métier formtastic: titles: journey_pattern: -- cgit v1.2.3 From 1aaa07157292e5a02bca5217ed5c18e352803ae6 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Tue, 27 Mar 2018 22:54:28 -0700 Subject: Refs #6156 Update will_pagination yml file --- config/locales/will_paginate.en.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/locales/will_paginate.en.yml b/config/locales/will_paginate.en.yml index 29b8fe2bf..563ea7d29 100644 --- a/config/locales/will_paginate.en.yml +++ b/config/locales/will_paginate.en.yml @@ -32,11 +32,11 @@ en: single_page: zero: "No item found" one: "1 %{model} shown" - other: "%{model} 1 to %{count} of %{count}" + other: "%{model} 1 to %{count} out of %{count}" single_page_html: zero: "No item found" one: "1 %{model} shown" - other: "%{model} 1 to %{count} of %{count}" + other: "%{model} 1 to %{count} out of %{count}" - multi_page: "%{model} %{from} to %{to} of %{count}" - multi_page_html: "%{model} %{from} to %{to} of %{count}" + multi_page: "%{model} list %{from} to %{to} out of %{count}" + multi_page_html: "%{model} list %{from} to %{to} out of %{count}" \ No newline at end of file -- cgit v1.2.3 From 9af9d272090c1086422fbb6d3af928c35166f619 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Tue, 27 Mar 2018 23:44:03 -0700 Subject: Refs #6156 Add will paginate for JP --- config/locales/will_paginate.en.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/locales/will_paginate.en.yml b/config/locales/will_paginate.en.yml index 563ea7d29..e3b6769ba 100644 --- a/config/locales/will_paginate.en.yml +++ b/config/locales/will_paginate.en.yml @@ -39,4 +39,8 @@ en: other: "%{model} 1 to %{count} out of %{count}" multi_page: "%{model} list %{from} to %{to} out of %{count}" - multi_page_html: "%{model} list %{from} to %{to} out of %{count}" \ No newline at end of file +<<<<<<< Updated upstream + multi_page_html: "%{model} list %{from} to %{to} out of %{count}" +======= + multi_page_html: "%{model} list %{from} to %{to} out of %{count}" +>>>>>>> Stashed changes -- cgit v1.2.3 From b2f4a4b5a69663606dbd12b68da8bf79a5b69b79 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Thu, 29 Mar 2018 11:15:04 -0700 Subject: Refs #6156 Fix typo --- config/locales/will_paginate.en.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config/locales/will_paginate.en.yml b/config/locales/will_paginate.en.yml index e3b6769ba..8f3189675 100644 --- a/config/locales/will_paginate.en.yml +++ b/config/locales/will_paginate.en.yml @@ -39,8 +39,4 @@ en: other: "%{model} 1 to %{count} out of %{count}" multi_page: "%{model} list %{from} to %{to} out of %{count}" -<<<<<<< Updated upstream multi_page_html: "%{model} list %{from} to %{to} out of %{count}" -======= - multi_page_html: "%{model} list %{from} to %{to} out of %{count}" ->>>>>>> Stashed changes -- cgit v1.2.3