From ae36ee8a9270540cea2b0bea70b0f7c46a1818ef Mon Sep 17 00:00:00 2001 From: Zog Date: Wed, 7 Feb 2018 09:23:20 +0100 Subject: Refs #4126 @6h; Add i18n to JS --- .../vehicle_journeys/components/ConfirmModal.js | 6 +++--- app/javascript/vehicle_journeys/components/Filters.js | 18 +++++++++--------- .../vehicle_journeys/components/VehicleJourney.js | 10 +++++----- .../vehicle_journeys/components/VehicleJourneys.js | 18 +++++++++--------- .../components/tools/EditVehicleJourney.js | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/vehicle_journeys/components/ConfirmModal.js b/app/javascript/vehicle_journeys/components/ConfirmModal.js index 3bfc852fb..75e8a3932 100644 --- a/app/javascript/vehicle_journeys/components/ConfirmModal.js +++ b/app/javascript/vehicle_journeys/components/ConfirmModal.js @@ -7,7 +7,7 @@ export default function ConfirmModal({dispatch, modal, onModalAccept, onModalCan
-

Voulez-vous valider vos modifications avant de changer de page?

+

{I18n.t('vehicle_journeys.vehicle_journeys_matrix.modal_confirm')}

) -} +} ConfirmModal.propTypes = { vehicleJourneys: PropTypes.array.isRequired, modal: PropTypes.object.isRequired, onModalAccept: PropTypes.func.isRequired, onModalCancel: PropTypes.func.isRequired -} \ No newline at end of file +} diff --git a/app/javascript/vehicle_journeys/components/Filters.js b/app/javascript/vehicle_journeys/components/Filters.js index 2bd912e3e..f8697c930 100644 --- a/app/javascript/vehicle_journeys/components/Filters.js +++ b/app/javascript/vehicle_journeys/components/Filters.js @@ -46,10 +46,10 @@ export default function Filters({filters, pagination, missions, onFilter, onRese
{/* Plage horaire */}
- +
- +
- +
- +
@@ -122,7 +122,7 @@ export default function Filters({filters, pagination, missions, onFilter, onRese
{/* Switch avec/sans calendrier */}
- +
diff --git a/app/javascript/vehicle_journeys/components/VehicleJourney.js b/app/javascript/vehicle_journeys/components/VehicleJourney.js index 99a458f50..4a9432231 100644 --- a/app/javascript/vehicle_journeys/components/VehicleJourney.js +++ b/app/javascript/vehicle_journeys/components/VehicleJourney.js @@ -23,7 +23,7 @@ export default class VehicleJourney extends Component { let ttURL = refURL + '/time_tables/' + tt.id return ( - + ) } @@ -32,7 +32,7 @@ export default class VehicleJourney extends Component { let ttURL = refURL + '/purchase_windows/' + tt.id return ( - + ) } @@ -65,7 +65,7 @@ export default class VehicleJourney extends Component { } >
{this.props.value.short_id || '-'}
-
{this.props.value.published_journey_name && this.props.value.published_journey_name != "non renseigné" ? this.props.value.published_journey_name : '-'}
+
{this.props.value.published_journey_name && this.props.value.published_journey_name != I18n.t('undefined') ? this.props.value.published_journey_name : '-'}
{this.props.value.journey_pattern.short_id || '-'}
{this.props.value.company ? this.props.value.company.name : '-'}
@@ -100,7 +100,7 @@ export default class VehicleJourney extends Component {
{this.props.filters.toggleArrivals && -
+
}
-
+
{(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.tc("error")} + {I18n.t("vehicle_journeys.vehicle_journeys_matrix.fetching_error")}
)} { this.vehicleJourneysList().errors && this.vehicleJourneysList().errors.length && _.some(this.vehicleJourneysList(), 'errors') && (
- Erreur : + {I18n.tc("error")} {this.vehicleJourneysList().map((vj, index) => vj.errors && vj.errors.map((err, i) => { return ( @@ -129,12 +129,12 @@ export default class VehicleJourneys extends Component {
0) ? '' : ' no_result')}>
-
ID course
-
Nom course
-
ID mission
-
Transporteur
-
Calendriers
- { this.hasFeature('purchase_windows') &&
Calendriers Commerciaux
} +
{I18n.attribute_name("vehicle_journey", "id")}
+
{I18n.attribute_name("vehicle_journey", "name")}
+
{I18n.attribute_name("vehicle_journey", "journey_pattern_id")}
+
{I18n.model_name("company")}
+
{I18n.model_name("time_table", "plural": true)}
+ { this.hasFeature('purchase_windows') &&
{I18n.model_name("purchase_window", "plural": true)}
}
{this.stopPoints().map((sp, i) =>{ return ( diff --git a/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js b/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js index f6a0e3c61..bcfd4eb41 100644 --- a/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js +++ b/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js @@ -128,7 +128,7 @@ export default class EditVehicleJourney extends Component {
-- cgit v1.2.3 From c20f034b60d39a4bcb56cd61f3fa314c64a8736c Mon Sep 17 00:00:00 2001 From: Zog Date: Wed, 7 Feb 2018 11:12:04 +0100 Subject: Refs #4126 @2h; Add more translations --- app/javascript/vehicle_journeys/components/Navigate.js | 5 ++--- .../vehicle_journeys/components/ToggleArrivals.js | 2 +- app/javascript/vehicle_journeys/components/Tools.js | 4 ++-- .../components/tools/EditVehicleJourney.js | 18 +++++++++--------- .../components/tools/VehicleJourneyInfoButton.js | 4 ++-- 5 files changed, 16 insertions(+), 17 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/vehicle_journeys/components/Navigate.js b/app/javascript/vehicle_journeys/components/Navigate.js index 0158b8392..24843babc 100644 --- a/app/javascript/vehicle_journeys/components/Navigate.js +++ b/app/javascript/vehicle_journeys/components/Navigate.js @@ -17,8 +17,7 @@ export default function Navigate({ dispatch, vehicleJourneys, pagination, status if(status.fetchSuccess == true) { return (
- Liste des horaires {minVJ} à {maxVJ} sur {pagination.totalCount} - + {I18n.t("vehicle_journeys.vehicle_journeys_matrix.pagination", {minVJ, maxVJ, total:pagination.totalCount})}
{e.preventDefault()}}> + {I18n.t('vehicle_journeys.vehicle_journeys_matrix.selected_journeys', {count: actions.getSelected(vehicleJourneys).length})} +
) } diff --git a/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js b/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js index bcfd4eb41..d3c01f154 100644 --- a/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js +++ b/app/javascript/vehicle_journeys/components/tools/EditVehicleJourney.js @@ -59,7 +59,7 @@ export default class EditVehicleJourney extends Component {
-

Informations

+

{I18n.t('vehicle_journeys.form.infos')}

×
@@ -69,7 +69,7 @@ export default class EditVehicleJourney extends Component {
- +
- +
- +
- +
- +
- +
- + +
- +
) } } -- cgit v1.2.3