diff options
Diffstat (limited to 'app/javascript')
7 files changed, 15 insertions, 15 deletions
diff --git a/app/javascript/vehicle_journeys/components/Filters.js b/app/javascript/vehicle_journeys/components/Filters.js index ae3ab3476..93fe015a8 100644 --- a/app/javascript/vehicle_journeys/components/Filters.js +++ b/app/javascript/vehicle_journeys/components/Filters.js @@ -145,12 +145,12 @@ export default function Filters({filters, pagination, missions, onFilter, onRese <span className='btn btn-link' onClick={(e) => onResetFilters(e, pagination)}> - Effacer + {I18n.t('actions.erase')} </span> <span className='btn btn-default' onClick={(e) => onFilter(e, pagination)}> - Filtrer + {I18n.t('actions.filter')} </span> </div> </div> diff --git a/app/javascript/vehicle_journeys/components/tools/select2s/CompanySelect2.js b/app/javascript/vehicle_journeys/components/tools/select2s/CompanySelect2.js index b7e9691c1..60ad439b8 100644 --- a/app/javascript/vehicle_journeys/components/tools/select2s/CompanySelect2.js +++ b/app/javascript/vehicle_journeys/components/tools/select2s/CompanySelect2.js @@ -31,7 +31,7 @@ export default class BSelect4 extends Component { theme: 'bootstrap', width: '100%', placeholder: I18n.t('vehicle_journeys.vehicle_journeys_matrix.affect_company'), - language: require('./fr'), + language: require('./language'), ajax: { url: origin + path + '/companies.json' + '?line_id=' + line, dataType: 'json', diff --git a/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js b/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js index 96b34125d..cec39ab4e 100644 --- a/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js +++ b/app/javascript/vehicle_journeys/components/tools/select2s/MissionSelect2.js @@ -75,7 +75,7 @@ export default class BSelect4 extends Component { escapeMarkup: function (markup) { return markup; }, templateResult: formatRepo, placeholder: I18n.t('vehicle_journeys.vehicle_journeys_matrix.filters.journey_pattern'), - language: require('./fr'), + language: require('./language'), allowClear: false, escapeMarkup: function (markup) { return markup; }, } diff --git a/app/javascript/vehicle_journeys/components/tools/select2s/TimetableSelect2.js b/app/javascript/vehicle_journeys/components/tools/select2s/TimetableSelect2.js index 9a345b464..d5aad20d0 100644 --- a/app/javascript/vehicle_journeys/components/tools/select2s/TimetableSelect2.js +++ b/app/javascript/vehicle_journeys/components/tools/select2s/TimetableSelect2.js @@ -27,7 +27,7 @@ export default class BSelect4 extends Component { theme: 'bootstrap', width: '100%', placeholder: I18n.t('vehicle_journeys.vehicle_journeys_matrix.filters.timetable'), - language: require('./fr'), + language: require('./language'), ajax: { url: origin + path + this.props.chunkURL, dataType: 'json', diff --git a/app/javascript/vehicle_journeys/components/tools/select2s/VJSelect2.js b/app/javascript/vehicle_journeys/components/tools/select2s/VJSelect2.js index f5881cef7..50a941b6d 100644 --- a/app/javascript/vehicle_journeys/components/tools/select2s/VJSelect2.js +++ b/app/javascript/vehicle_journeys/components/tools/select2s/VJSelect2.js @@ -27,7 +27,7 @@ export default class BSelect4b extends Component { theme: 'bootstrap', placeholder: I18n.t('vehicle_journeys.vehicle_journeys_matrix.filters.id'), width: '100%', - language: require('./fr'), + language: require('./language'), ajax: { url: origin + path + '/vehicle_journeys.json', dataType: 'json', diff --git a/app/javascript/vehicle_journeys/components/tools/select2s/fr.js b/app/javascript/vehicle_journeys/components/tools/select2s/fr.js deleted file mode 100644 index 20154d412..000000000 --- a/app/javascript/vehicle_journeys/components/tools/select2s/fr.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - errorLoading:function(){return"Les résultats ne peuvent pas être chargés."}, - inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n}, - inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n}, - loadingMore:function(){return"Chargement de résultats supplémentaires…"}, - maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t}, - noResults:function(){return"Aucun résultat trouvé"}, - searching:function(){return"Recherche en cours…"} -} diff --git a/app/javascript/vehicle_journeys/components/tools/select2s/language.js b/app/javascript/vehicle_journeys/components/tools/select2s/language.js new file mode 100644 index 000000000..9d587f96e --- /dev/null +++ b/app/javascript/vehicle_journeys/components/tools/select2s/language.js @@ -0,0 +1,9 @@ +module.exports = { + errorLoading: () => I18n.t('select2.error_loading'), + inputTooLong: (e) => I18n.t('select2.input_too_short', { count: e.input.length - e.maximum}), + inputTooShort: (e) => I18n.t('select2.input_too_long', { count: e.minimum - e.input.length }), + loadingMore: () => I18n.t('select2.loading_more'), + maximumSelected: (e) => I18n.t('select2.maximum_selected', {count: e.maximum}), + noResults: () => I18n.t('select2.no_results'), + searching: () => I18n.t('select2.searching') +} |
