From 451f6f56d6c22a9b55f8466a271857e31d8052b1 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Mon, 9 Oct 2017 11:07:28 +0200 Subject: Refactoring tables titles for routes --- app/views/referential_lines/show.html.slim | 3 ++- app/views/routes/show.html.slim | 3 ++- config/locales/lines.en.yml | 1 + config/locales/lines.fr.yml | 1 + config/locales/routes.en.yml | 2 ++ config/locales/routes.fr.yml | 2 ++ 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/views/referential_lines/show.html.slim b/app/views/referential_lines/show.html.slim index ffcb9b5e0..d50f51335 100644 --- a/app/views/referential_lines/show.html.slim +++ b/app/views/referential_lines/show.html.slim @@ -1,6 +1,6 @@ / PageHeader = pageheader 'ligne', - @line.name, + t('lines.index.line') + " " + @line.name, '', t('last_update', time: l(@line.updated_at, format: :short)) do @@ -34,6 +34,7 @@ .row .col-lg-12 + .h3 = t('routes.show.itineraries') - if params[:q].present? or @routes.any? .row .col-lg-12 diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim index edc2d254b..be3b526cf 100644 --- a/app/views/routes/show.html.slim +++ b/app/views/routes/show.html.slim @@ -1,6 +1,6 @@ / PageHeader = pageheader 'itineraire', - @route.name, + t('routes.index.itinerarie') + " " + @route.name, '', t('last_update', time: l(@route.updated_at, format: :short)), (policy(@route).edit? ? link_to(t('actions.edit'), edit_referential_line_route_path(@referential, @line, @route), class: 'btn btn-default') : '') do @@ -32,6 +32,7 @@ .row .col-lg-12 + .h3 = t('routes.show.itineraries') - if @route_sp.any? = table_builder_2 @route_sp, [ \ diff --git a/config/locales/lines.en.yml b/config/locales/lines.en.yml index cfeba10ca..9efc9a4cc 100644 --- a/config/locales/lines.en.yml +++ b/config/locales/lines.en.yml @@ -26,6 +26,7 @@ en: index: deactivated: "Disabled line" title: "Lines" + line: "Ligne" name_or_number_or_objectid: "Search by name, short name or ID Codif..." no_networks: "No networks" no_companies: "No companies" diff --git a/config/locales/lines.fr.yml b/config/locales/lines.fr.yml index 134a669ec..4a6106a21 100644 --- a/config/locales/lines.fr.yml +++ b/config/locales/lines.fr.yml @@ -26,6 +26,7 @@ fr: index: deactivated: "Ligne désactivée" title: "Lignes" + line: "Ligne" name_or_number_or_objectid: "Recherche par nom, nom court ou ID Codif..." no_networks: "Aucun réseaux" no_companies: "Aucun transporteurs" diff --git a/config/locales/routes.en.yml b/config/locales/routes.en.yml index 3b1fd85cc..6b8372a85 100644 --- a/config/locales/routes.en.yml +++ b/config/locales/routes.en.yml @@ -39,11 +39,13 @@ en: show: title: "Route %{route}" stop_points: "Stop point on route list" + itineraries: "List of routes" journey_patterns: "Route journey patterns list" no_opposite_route: "No reversed route associated" undefined: "Undefined" index: title: "Routes" + itinerarie: "Route" selection: "Selection" selection_all: "All" edit_boarding_alighting: diff --git a/config/locales/routes.fr.yml b/config/locales/routes.fr.yml index 43c40645d..a396b5f9d 100644 --- a/config/locales/routes.fr.yml +++ b/config/locales/routes.fr.yml @@ -39,11 +39,13 @@ fr: show: title: "Itinéraire %{route} de la ligne %{line}" stop_points: "Liste des arrêts de l'itinéraire" + itineraries: "Liste des itinéraires" journey_patterns: "Liste des missions" no_opposite_route: "Aucun itinéraire associé" undefined: "Non défini" index: title: "Itinéraires" + itinerarie: "Itinéraire" selection: "Sélection" selection_all: "Tous" edit_boarding_alighting: -- cgit v1.2.3 From 841083df63294e2f3ede37382e0c9c5fe0277874 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Wed, 11 Oct 2017 11:44:04 +0200 Subject: fix locales structuration Refs #4698 --- app/views/referential_lines/show.html.slim | 4 ++-- app/views/routes/show.html.slim | 4 ++-- config/locales/lines.en.yml | 5 +++-- config/locales/lines.fr.yml | 4 +++- config/locales/routes.en.yml | 6 +++--- config/locales/routes.fr.yml | 6 +++--- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/views/referential_lines/show.html.slim b/app/views/referential_lines/show.html.slim index d50f51335..55f352bb6 100644 --- a/app/views/referential_lines/show.html.slim +++ b/app/views/referential_lines/show.html.slim @@ -1,6 +1,6 @@ / PageHeader = pageheader 'ligne', - t('lines.index.line') + " " + @line.name, + t('lines.index.line', line: @line.name), '', t('last_update', time: l(@line.updated_at, format: :short)) do @@ -34,7 +34,7 @@ .row .col-lg-12 - .h3 = t('routes.show.itineraries') + .h3 = t('lines.show.routes.title', route: "", line: "") - if params[:q].present? or @routes.any? .row .col-lg-12 diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim index be3b526cf..e62335924 100644 --- a/app/views/routes/show.html.slim +++ b/app/views/routes/show.html.slim @@ -1,6 +1,6 @@ / PageHeader = pageheader 'itineraire', - t('routes.index.itinerarie') + " " + @route.name, + t('routes.index.title', route: @route.name), '', t('last_update', time: l(@route.updated_at, format: :short)), (policy(@route).edit? ? link_to(t('actions.edit'), edit_referential_line_route_path(@referential, @line, @route), class: 'btn btn-default') : '') do @@ -32,7 +32,7 @@ .row .col-lg-12 - .h3 = t('routes.show.itineraries') + .h3 = t('routes.show.stop_areas.title') - if @route_sp.any? = table_builder_2 @route_sp, [ \ diff --git a/config/locales/lines.en.yml b/config/locales/lines.en.yml index 9efc9a4cc..15e08290d 100644 --- a/config/locales/lines.en.yml +++ b/config/locales/lines.en.yml @@ -21,12 +21,13 @@ en: title: "Update line %{line}" show: title: "Line %{line}" - itineraries: "Line's route list" + routes: + title: "Routes list" group_of_lines: "Groups of lines" index: deactivated: "Disabled line" title: "Lines" - line: "Ligne" + line: "Line %{line}" name_or_number_or_objectid: "Search by name, short name or ID Codif..." no_networks: "No networks" no_companies: "No companies" diff --git a/config/locales/lines.fr.yml b/config/locales/lines.fr.yml index 4a6106a21..c459eb51b 100644 --- a/config/locales/lines.fr.yml +++ b/config/locales/lines.fr.yml @@ -21,12 +21,14 @@ fr: title: "Editer la ligne %{line}" show: title: "Ligne %{line}" + routes: + title: "Liste des Itinéraires" itineraries: "Liste des séquences d'arrêts de la ligne" group_of_lines: "Groupes de lignes" index: deactivated: "Ligne désactivée" title: "Lignes" - line: "Ligne" + line: "Ligne %{line}" name_or_number_or_objectid: "Recherche par nom, nom court ou ID Codif..." no_networks: "Aucun réseaux" no_companies: "Aucun transporteurs" diff --git a/config/locales/routes.en.yml b/config/locales/routes.en.yml index 6b8372a85..4437b62b9 100644 --- a/config/locales/routes.en.yml +++ b/config/locales/routes.en.yml @@ -39,13 +39,13 @@ en: show: title: "Route %{route}" stop_points: "Stop point on route list" - itineraries: "List of routes" + stop_areas: + title: "Stop area list" journey_patterns: "Route journey patterns list" no_opposite_route: "No reversed route associated" undefined: "Undefined" index: - title: "Routes" - itinerarie: "Route" + title: "Routes %{route}" selection: "Selection" selection_all: "All" edit_boarding_alighting: diff --git a/config/locales/routes.fr.yml b/config/locales/routes.fr.yml index a396b5f9d..83a96732d 100644 --- a/config/locales/routes.fr.yml +++ b/config/locales/routes.fr.yml @@ -39,13 +39,13 @@ fr: show: title: "Itinéraire %{route} de la ligne %{line}" stop_points: "Liste des arrêts de l'itinéraire" - itineraries: "Liste des itinéraires" + stop_areas: + title: "Liste des arrêts" journey_patterns: "Liste des missions" no_opposite_route: "Aucun itinéraire associé" undefined: "Non défini" index: - title: "Itinéraires" - itinerarie: "Itinéraire" + title: "Itinéraire %{route}" selection: "Sélection" selection_all: "Tous" edit_boarding_alighting: -- cgit v1.2.3 From 3b4563e9f3ed21d98255713cefd2e290c5a364bd Mon Sep 17 00:00:00 2001 From: Guillaume Date: Wed, 11 Oct 2017 16:47:54 +0200 Subject: delete unused variables in referential_lines show view Refs #4698 --- app/views/referential_lines/show.html.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/referential_lines/show.html.slim b/app/views/referential_lines/show.html.slim index 55f352bb6..df3c285ee 100644 --- a/app/views/referential_lines/show.html.slim +++ b/app/views/referential_lines/show.html.slim @@ -34,7 +34,7 @@ .row .col-lg-12 - .h3 = t('lines.show.routes.title', route: "", line: "") + .h3 = t('lines.show.routes.title') - if params[:q].present? or @routes.any? .row .col-lg-12 -- cgit v1.2.3