From f04d4420053dc995bad52b5b87ff7f15e302c2b3 Mon Sep 17 00:00:00 2001
From: cedricnjanga
Date: Wed, 4 Apr 2018 14:52:43 -0700
Subject: Refs #6370 Add some more translations
---
 app/javascript/vehicle_journeys/components/Filters.js     |  4 ++--
 .../components/tools/select2s/CompanySelect2.js           |  2 +-
 .../components/tools/select2s/MissionSelect2.js           |  2 +-
 .../components/tools/select2s/TimetableSelect2.js         |  2 +-
 .../components/tools/select2s/VJSelect2.js                |  2 +-
 .../vehicle_journeys/components/tools/select2s/fr.js      |  9 ---------
 .../components/tools/select2s/language.js                 |  9 +++++++++
 app/views/lines/_filters.html.slim                        |  4 ++--
 app/views/referential_lines/_filters.html.slim            |  6 +++---
 app/views/referential_vehicle_journeys/_filters.html.slim |  4 ++--
 app/views/routes/show.html.slim                           |  2 +-
 app/views/stop_areas/_filters.html.slim                   |  4 ++--
 app/views/stop_areas/index.html.slim                      |  2 +-
 app/views/vehicle_journeys/index.html.slim                |  2 +-
 config/locales/calendars.en.yml                           |  2 +-
 config/locales/companies.en.yml                           |  2 +-
 config/locales/line_referentials.en.yml                   |  2 +-
 config/locales/lines.en.yml                               |  8 +++++---
 config/locales/lines.fr.yml                               |  4 +++-
 config/locales/networks.en.yml                            |  2 +-
 config/locales/routes.en.yml                              |  2 +-
 config/locales/routes.fr.yml                              |  2 +-
 config/locales/select2.en.yml                             | 15 +++++++++++++++
 config/locales/select2.fr.yml                             | 15 +++++++++++++++
 config/locales/stop_area_referentials.en.yml              |  2 +-
 config/locales/stop_areas.en.yml                          | 10 +++++-----
 config/locales/stop_points.en.yml                         |  4 ++--
 config/locales/vehicle_journeys.en.yml                    |  4 ++--
 28 files changed, 81 insertions(+), 47 deletions(-)
 delete mode 100644 app/javascript/vehicle_journeys/components/tools/select2s/fr.js
 create mode 100644 app/javascript/vehicle_journeys/components/tools/select2s/language.js
 create mode 100644 config/locales/select2.en.yml
 create mode 100644 config/locales/select2.fr.yml
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
              onResetFilters(e, pagination)}>
-              Effacer
+              {I18n.t('actions.erase')}
             
              onFilter(e, pagination)}>
-              Filtrer
+              {I18n.t('actions.filter')}
             
           
         
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')
+}
diff --git a/app/views/lines/_filters.html.slim b/app/views/lines/_filters.html.slim
index da0539bd0..f745d10a4 100644
--- a/app/views/lines/_filters.html.slim
+++ b/app/views/lines/_filters.html.slim
@@ -44,5 +44,5 @@
 
 
   .actions
-    = link_to 'Effacer', @workbench, class: 'btn btn-link'
-    = f.submit 'Filtrer', class: 'btn btn-default'
+    = link_to t('actions.erase'), @workbench, class: 'btn btn-link'
+    = f.submit t('actions.filter'), class: 'btn btn-default'
diff --git a/app/views/referential_lines/_filters.html.slim b/app/views/referential_lines/_filters.html.slim
index 501f61c16..15db0e33e 100644
--- a/app/views/referential_lines/_filters.html.slim
+++ b/app/views/referential_lines/_filters.html.slim
@@ -1,7 +1,7 @@
 = search_form_for @q, url: referential_line_path(@referential, @line), class: 'form form-filter' do |f|
   .ffg-row
     .input-group.search_bar class=filter_item_class(params[:q], :name_or_objectid_cont)
-      = f.search_field :name_or_objectid_cont, class: 'form-control', placeholder: "Indiquez un nom d'itinéraire ou un ID..."
+      = f.search_field :name_or_objectid_cont, class: 'form-control', placeholder: t('.name_or_objectid_cont')
       span.input-group-btn
         button.btn.btn-default#search-btn type='submit'
           span.fa.fa-search
@@ -12,5 +12,5 @@
       = f.input :wayback_eq_any, class: 'form-control', collection: Chouette::Route.wayback.values, as: :check_boxes, label: false, required: false, wrapper_html: { class: 'checkbox_list'}, label_method: lambda{|l| ("" + t("enumerize.route.wayback.#{l}") + "").html_safe}
 
   .actions
-    = link_to 'Effacer', referential_line_path(@referential, @line), class: 'btn btn-link'
-    = f.submit 'Filtrer', class: 'btn btn-default'
+    = link_to t('actions.erase'), referential_line_path(@referential, @line), class: 'btn btn-link'
+    = f.submit t('actions.filter'), class: 'btn btn-default'
diff --git a/app/views/referential_vehicle_journeys/_filters.html.slim b/app/views/referential_vehicle_journeys/_filters.html.slim
index f1fbdb5d8..f9fa4fcf7 100644
--- a/app/views/referential_vehicle_journeys/_filters.html.slim
+++ b/app/views/referential_vehicle_journeys/_filters.html.slim
@@ -68,5 +68,5 @@
 
 
   .actions
-    = link_to 'Effacer', referential_vehicle_journeys_path(@referential), class: 'btn btn-link'
-    = f.submit 'Filtrer', class: 'btn btn-default'
+    = link_to t('actions.erase'), referential_vehicle_journeys_path(@referential), class: 'btn btn-link'
+    = f.submit t('actions.filter'), class: 'btn btn-default'
diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim
index d2e750fb0..d4571c173 100644
--- a/app/views/routes/show.html.slim
+++ b/app/views/routes/show.html.slim
@@ -34,7 +34,7 @@
                 end \
               ), \
               TableBuilderHelper::Column.new( \
-                key: :deleted_at, \
+                name: Chouette::Line.tmf('activated'), \
                 attribute: Proc.new { |s| line_status(s.try(:stop_area).deleted_at) } \
               ), \
               TableBuilderHelper::Column.new( \
diff --git a/app/views/stop_areas/_filters.html.slim b/app/views/stop_areas/_filters.html.slim
index a32638567..c698eaaa5 100644
--- a/app/views/stop_areas/_filters.html.slim
+++ b/app/views/stop_areas/_filters.html.slim
@@ -41,5 +41,5 @@
             input_html: { checked: @status.try(:[], :deactivated) }
 
   .actions
-    = link_to 'Effacer', @workbench, class: 'btn btn-link'
-    = f.submit 'Filtrer', class: 'btn btn-default'
+    = link_to t('actions.erase'), @workbench, class: 'btn btn-link'
+    = f.submit t('actions.filter'), class: 'btn btn-default'
diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim
index 587efbdaa..fbdb54e02 100644
--- a/app/views/stop_areas/index.html.slim
+++ b/app/views/stop_areas/index.html.slim
@@ -32,7 +32,7 @@
                 attribute: 'registration_number' \
               ), \
               TableBuilderHelper::Column.new( \
-                name: t('activerecord.attributes.stop_area.state'), \
+                name: Chouette::StopArea.tmf('state'), \
                 attribute: Proc.new { |s| stop_area_status(s) } \
               ), \
               TableBuilderHelper::Column.new( \
diff --git a/app/views/vehicle_journeys/index.html.slim b/app/views/vehicle_journeys/index.html.slim
index c92fb7bae..7fcee545f 100644
--- a/app/views/vehicle_journeys/index.html.slim
+++ b/app/views/vehicle_journeys/index.html.slim
@@ -7,7 +7,7 @@
       - if has_feature? :purchase_windows
         = link_to I18n.t("purchase_windows.index.title"), [@referential, :purchase_windows], class: 'btn btn-primary sticky-action', target: :blank
       - if @route.opposite_route.present?
-        = link_to(t('routes.actions.opposite_route_timetable'), [@referential, @route.line, @route.opposite_route, :vehicle_journeys], class: 'btn btn-primary sticky-action')
+        = link_to(t('routes.actions.reversed_vehicle_journey'), [@referential, @route.line, @route.opposite_route, :vehicle_journeys], class: 'btn btn-primary sticky-action')
 
 
 .page_content
diff --git a/config/locales/calendars.en.yml b/config/locales/calendars.en.yml
index 3d16e7c05..696ae2734 100644
--- a/config/locales/calendars.en.yml
+++ b/config/locales/calendars.en.yml
@@ -69,7 +69,7 @@ en:
         date_ranges: Date ranges
         dates: Dates
         shared: Shared
-        organisation: Organisation
+        organisation: Organization
         monday: "Monday"
         tuesday: "Tuesday"
         wednesday: "Wednesday"
diff --git a/config/locales/companies.en.yml b/config/locales/companies.en.yml
index becb087b1..f2b19bc19 100644
--- a/config/locales/companies.en.yml
+++ b/config/locales/companies.en.yml
@@ -16,7 +16,7 @@ en:
     index:
       title: "Companies"
       name: "Search by name..."
-      name_or_objectid: "Search by name or by Codifligne ID..."
+      name_or_objectid: "Search by name or by ID..."
       advanced_search: "Advanced search"
   activerecord:
     models:
diff --git a/config/locales/line_referentials.en.yml b/config/locales/line_referentials.en.yml
index 5663ed691..18ff28c24 100644
--- a/config/locales/line_referentials.en.yml
+++ b/config/locales/line_referentials.en.yml
@@ -7,7 +7,7 @@ en:
     edit:
       title: "Edit %{name} referential"
     show:
-      title: "iLICO synchronization"
+      title: Line referential
       synchronized: Synchronized
       status: Status
       message: Message
diff --git a/config/locales/lines.en.yml b/config/locales/lines.en.yml
index e61013725..1cd5150db 100644
--- a/config/locales/lines.en.yml
+++ b/config/locales/lines.en.yml
@@ -1,6 +1,5 @@
 en:
   lines: &en_lines
-    search_no_results: "No line matching your query"
     actions:
       new: "Add a new line"
       edit: "Edit this line"
@@ -20,6 +19,8 @@ en:
       show: 'Show'
       show_network: 'Show network'
       show_company: 'Show company'
+    filters:
+      name_or_objectid_cont: "Search by name or objectid"
     new:
       title: "Add a new line"
     create:
@@ -33,11 +34,12 @@ en:
       routes:
         title: "Routes list"
       group_of_lines: "Groups of lines"
+      search_no_results: "No line matching your query"
     index:
       deactivated: "Disabled line"
       title: "Lines"
       line: "Line %{line}"
-      name_or_number_or_objectid: "Search by name, short name or ID Codif..."
+      name_or_number_or_objectid: "Search by name, short name or ID..."
       no_networks: "No networks"
       no_companies: "No companies"
       no_group_of_lines: "No group of lines"
@@ -115,7 +117,7 @@ en:
         creator_id: "Created by"
         footnotes: "Footnotes"
         stable_id: External permanent idenifier"
-        state: State
+        state: Status
         activated: Activated
         deactivated: Deactivated
   formtastic:
diff --git a/config/locales/lines.fr.yml b/config/locales/lines.fr.yml
index d3069f1d1..058238710 100644
--- a/config/locales/lines.fr.yml
+++ b/config/locales/lines.fr.yml
@@ -1,6 +1,5 @@
 fr:
   lines: &fr_lines
-    search_no_results: "Aucune ligne ne correspond à votre recherche"
     actions:
       new: "Ajouter une ligne"
       edit: "Editer cette ligne"
@@ -20,6 +19,8 @@ fr:
       show: 'Consulter'
       show_network: 'Voir le réseau'
       show_company: 'Voir le transporteur principal'
+    filters:
+      name_or_objectid_cont: "Indiquez un nom d'itinéraire ou un ID..."
     new:
       title: "Ajouter une ligne"
     create:
@@ -34,6 +35,7 @@ fr:
         title: "Liste des Itinéraires"
       itineraries: "Liste des séquences d'arrêts de la ligne"
       group_of_lines: "Groupes de lignes"
+      search_no_results: "Aucune ligne ne correspond à votre recherche"
     index:
       deactivated: "Ligne désactivée"
       title: "Lignes"
diff --git a/config/locales/networks.en.yml b/config/locales/networks.en.yml
index 94a8d9df0..2046a30ae 100644
--- a/config/locales/networks.en.yml
+++ b/config/locales/networks.en.yml
@@ -15,7 +15,7 @@ en:
     index:
       title: "Networks"
       name: "Search by name..."
-      name_or_objectid: "Search by name or by Codifligne ID..."
+      name_or_objectid: "Search by name or by ID..."
       advanced_search: "Advanced search"
   activerecord:
     models:
diff --git a/config/locales/routes.en.yml b/config/locales/routes.en.yml
index 58869b895..66805e050 100644
--- a/config/locales/routes.en.yml
+++ b/config/locales/routes.en.yml
@@ -15,7 +15,7 @@ en:
       export_hub_all: "Export HUB routes"
       add_stop_point: "Add stop point"
       new_stop_point: "Create new stop"
-      opposite_route_timetable: "Timetable back"
+      reversed_vehicle_journey: "Reversed vehicle journeys"
     new:
       title: "Add a new route"
     edit:
diff --git a/config/locales/routes.fr.yml b/config/locales/routes.fr.yml
index ddf706794..01f957496 100644
--- a/config/locales/routes.fr.yml
+++ b/config/locales/routes.fr.yml
@@ -15,7 +15,7 @@ fr:
       export_hub_all: "Export HUB des itinéraires"
       add_stop_point: "Ajouter un arrêt"
       new_stop_point: "Créer un arrêt pour l'ajouter"
-      opposite_route_timetable: "Horaires retour"
+      reversed_vehicle_journey: "Horaires retour"
     new:
       title: "Ajouter un itinéraire"
     edit:
diff --git a/config/locales/select2.en.yml b/config/locales/select2.en.yml
new file mode 100644
index 000000000..308540af0
--- /dev/null
+++ b/config/locales/select2.en.yml
@@ -0,0 +1,15 @@
+en:
+  select2:
+    error_loading: The results cannot be loaded.
+    input_too_long:
+      one: Remove %{count} letter
+      other: Remove %{count} letters
+    input_too_short:
+      one: Type %{count} letter
+      other: Type %{count} letters
+    loading_more: Loading more…
+    maximum_selected:
+      one: You can select %{count} element
+      other: You can select %{count} elements
+    no_results: No Results
+    searching: Searching...
diff --git a/config/locales/select2.fr.yml b/config/locales/select2.fr.yml
new file mode 100644
index 000000000..4a37a3d78
--- /dev/null
+++ b/config/locales/select2.fr.yml
@@ -0,0 +1,15 @@
+fr:
+  select2:
+    error_loading: Les résultats ne peuvent pas être chargés.
+    input_too_long:
+      one: Supprimez %{count} caractère
+      other: Supprimez %{count} caractères
+    input_too_short:
+      one: Saisissez %{count} caractère
+      other: Saisissez %{count} caractères
+    loading_more: Chargement de résultats supplémentaires…
+    maximum_selected:
+      one: Vous pouvez sélectionner %{count} élément
+      other: Vous pouvez sélectionner %{count} élément
+    no_results: Aucun résultat trouvé
+    searching: Recherche en cours...
\ No newline at end of file
diff --git a/config/locales/stop_area_referentials.en.yml b/config/locales/stop_area_referentials.en.yml
index 11baf67e2..9d49d7c5d 100644
--- a/config/locales/stop_area_referentials.en.yml
+++ b/config/locales/stop_area_referentials.en.yml
@@ -4,7 +4,7 @@ en:
       sync: "Launch a new reflex synchronization"
       cancel_sync: "Cancel reflex synchronization"
     show:
-      title: 'Synchronization iCAR'
+      title: 'Stop area referential'
   activerecord:
     models:
       stop_area_referential:
diff --git a/config/locales/stop_areas.en.yml b/config/locales/stop_areas.en.yml
index ddb2d940c..1da4b58b4 100644
--- a/config/locales/stop_areas.en.yml
+++ b/config/locales/stop_areas.en.yml
@@ -48,9 +48,9 @@ en:
       export_hub_physical: "Export HUB physical"
     filters:
       name_or_objectid: "Search by name or by objectid..."
-      zip_code: Type a zip code...
-      city_name: Type a city name...
-      area_type: Type an area type...
+      zip_code: Enter a zip code...
+      city_name: Enter a city name...
+      area_type: Enter an area type...
     new:
       title: "Add a new stop"
     update:
@@ -70,7 +70,7 @@ en:
       stop_managment: "Parent-child relations"
       access_managment: "Access Points and Links managment"
       access_points: "Access Points"
-      not_editable: "Le type d'arrêt est non modifiable"
+      not_editable: "The area type is not editable"
       state:
         active: Active
         deactivated: Deactivated
@@ -148,7 +148,7 @@ en:
         zip_code: "Zip code"
         city_name: "City"
         waiting_time: Waiting time (minutes)
-        state: State
+        state: Status
   formtastic:
     titles:
       stop_area:
diff --git a/config/locales/stop_points.en.yml b/config/locales/stop_points.en.yml
index 72e138270..76e142ba1 100644
--- a/config/locales/stop_points.en.yml
+++ b/config/locales/stop_points.en.yml
@@ -43,8 +43,8 @@ en:
         created_at: Created
         updated_at: Updated
         deleted_at: "Activated"
-        for_boarding: "For boarding"
-        for_alighting: "For alighting"
+        for_boarding: "Boarding"
+        for_alighting: "Alighting"
         area_type: "Area type"
         city_name: "City name"
         zip_code: "Zip code"
diff --git a/config/locales/vehicle_journeys.en.yml b/config/locales/vehicle_journeys.en.yml
index 79e805ee8..12d8d0da4 100644
--- a/config/locales/vehicle_journeys.en.yml
+++ b/config/locales/vehicle_journeys.en.yml
@@ -3,8 +3,8 @@ en:
     vehicle_journeys_matrix:
       filters:
         id: Filter by ID...
-        timetable: Filter by journey pattern...
-        timetable: Filter by timetable...
+        journey_pattern: Filter by journey pattern...
+        timetable: Filter by timetable...          
       cancel_selection: "Cancel Selection"
       fetching_error: "There has been a problem fetching the data. Please reload the page to try again."
       line_routes: "Line's routes"
-- 
cgit v1.2.3