diff options
| author | jpl | 2017-07-04 16:09:51 +0200 | 
|---|---|---|
| committer | jpl | 2017-07-04 16:10:05 +0200 | 
| commit | 758264a532f84b5820db56a698ccf7910de81107 (patch) | |
| tree | 77f3926e2969e00af27b97861d3bd2b32d97c657 | |
| parent | e9f0dc0a0a5ede199158c6b035e192c555621894 (diff) | |
| download | chouette-core-758264a532f84b5820db56a698ccf7910de81107.tar.bz2 | |
Refs #3961: updating wording
25 files changed, 39 insertions, 31 deletions
| diff --git a/app/helpers/newapplication_helper.rb b/app/helpers/newapplication_helper.rb index 3d43e9fc7..edcad76c3 100644 --- a/app/helpers/newapplication_helper.rb +++ b/app/helpers/newapplication_helper.rb @@ -16,7 +16,7 @@ module NewapplicationHelper          end          columns.map do |k, v| -          if ["ID Codif", "Oid", "OiD", "ID Reflex", "Arrêt de départ", "Arrêt d'arrivée", "Période de validité englobante", "Période englobante", "Nombre de courses associées", "Journées d'application", "Arrêts de l'itinéraire", "Arrêts inclus dans l'ITL"].include? k +          if ["ID Codifligne", "Oid", "OiD", "ID", "ID Reflex", "Arrêt de départ", "Arrêt d'arrivée", "Période de validité englobante", "Période englobante", "Nombre de courses associées", "Journées d'application", "Arrêts de l'itinéraire", "Arrêts inclus dans l'ITL"].include? k              hcont << content_tag(:th, k)            else              hcont << content_tag(:th, sortable_columns(collection, k)) diff --git a/app/views/referential_companies/index.html.slim b/app/views/referential_companies/index.html.slim index 7a033fb5f..85d1d416d 100644 --- a/app/views/referential_companies/index.html.slim +++ b/app/views/referential_companies/index.html.slim @@ -1,7 +1,7 @@  / PageHeader  = pageheader 'map-marker',               t('companies.index.title'), -             'Lorem ipsum dolor sit amet', +             '',               '',               (policy(Chouette::Company).create? ? link_to(t('companies.actions.new'), new_referential_company_path(@referential), class: 'btn btn-default') : '') @@ -23,7 +23,7 @@        .row          .col-lg-12            = table_builder @companies, -            { 'ID Codif' => Proc.new { |n| n.try(:objectid).try(:local_id) }, +            { 'ID Codifligne' => Proc.new { |n| n.try(:objectid).try(:local_id) },              :name => 'name', :phone => 'phone', :email => 'email', :url => 'url' },              [:show, :edit, :delete],              [], diff --git a/app/views/referential_companies/show.html.slim b/app/views/referential_companies/show.html.slim index ae89c1444..177ce2d69 100644 --- a/app/views/referential_companies/show.html.slim +++ b/app/views/referential_companies/show.html.slim @@ -22,7 +22,7 @@      .row        .col-lg-6.col-md-6.col-sm-12.col-xs-12          = definition_list t('metadatas'), -          { 'ID Codif' => @company.try(:objectid).try(:local_id), +          { t('id_codif') => @company.try(:objectid).try(:local_id),              Chouette::Company.human_attribute_name(:phone) => @company.phone,              Chouette::Company.human_attribute_name(:email) => @company.email,              Chouette::Company.human_attribute_name(:url) => @company.url } diff --git a/app/views/referential_lines/_filters.html.slim b/app/views/referential_lines/_filters.html.slim index 93d449507..379d6234f 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 -      = f.search_field :name_or_objectid_cont, class: 'form-control', placeholder: "Indiquez un nom d'itinéraire ou un OiD..." +      = f.search_field :name_or_objectid_cont, class: 'form-control', placeholder: "Indiquez un nom d'itinéraire ou un ID..."        span.input-group-btn          button.btn.btn-default#search-btn type='submit'            span.fa.fa-search diff --git a/app/views/referential_lines/show.html.slim b/app/views/referential_lines/show.html.slim index db99381d3..0bb6d9032 100644 --- a/app/views/referential_lines/show.html.slim +++ b/app/views/referential_lines/show.html.slim @@ -29,7 +29,7 @@      .row        .col-lg-6.col-md-6.col-sm-12.col-xs-12          = definition_list t('metadatas'), -          {  'ID Codif' => @line.objectid.local_id, +          {  t('id_codif') => @line.objectid.local_id,               'Activé' => (@line.deactivated? ? t('false') : t('true')),               @line.human_attribute_name(:network) => (@line.network.nil? ? t('lines.index.unset') : link_to(@line.network.name, [@referential, @line.network]) ),               @line.human_attribute_name(:company) => (@line.company.nil? ? t('lines.index.unset') : link_to(@line.company.name, [@referential, @line.company]) ), @@ -52,7 +52,7 @@            .row              .col-lg-12                = table_builder @routes, -                { 'OiD' => Proc.new { |n| n.objectid.local_id }, +                { 'ID' => Proc.new { |n| n.objectid.local_id },                    :name => 'name',                    :published_name => 'published_name',                    :wayback => 'wayback_text', diff --git a/app/views/referential_networks/index.html.slim b/app/views/referential_networks/index.html.slim index 38ffb836a..d6c52d352 100644 --- a/app/views/referential_networks/index.html.slim +++ b/app/views/referential_networks/index.html.slim @@ -23,11 +23,11 @@        .row          .col-lg-12            = table_builder @networks, -            { 'ID Codif' => Proc.new { |n| n.try(:objectid).try(:local_id) }, :name => 'name' }, +            { 'ID Codifligne' => Proc.new { |n| n.try(:objectid).try(:local_id) }, :name => 'name' },              [:show, :edit, :delete],              [],              'table has-search' - +                  = new_pagination @networks, 'pull-right'      - unless @networks.any? diff --git a/app/views/referential_networks/show.html.slim b/app/views/referential_networks/show.html.slim index 3a195b342..59bdd0dee 100644 --- a/app/views/referential_networks/show.html.slim +++ b/app/views/referential_networks/show.html.slim @@ -22,4 +22,4 @@      .row        .col-lg-6.col-md-6.col-sm-12.col-xs-12          = definition_list t('metadatas'), -          { 'ID Codif' => @network.try(:objectid).try(:local_id) } +          { t('id_codif') => @network.try(:objectid).try(:local_id) } diff --git a/app/views/routes/show.html.slim b/app/views/routes/show.html.slim index 92a5080ae..eee19d85a 100644 --- a/app/views/routes/show.html.slim +++ b/app/views/routes/show.html.slim @@ -1,7 +1,7 @@  / PageHeader  = pageheader 'map-marker',               @route.name, -             'Lorem ipsum dolor sit amet', +             '',               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 @@ -21,7 +21,7 @@      .row        .col-lg-6.col-md-6.col-sm-12.col-xs-12          = definition_list t('metadatas'), -          { 'OiD' => @route.try(:objectid).try(:local_id), +          { t('id_codif') => @route.try(:objectid).try(:local_id),              t('activerecord.attributes.route.published_name') => (@route.published_name ? @route.published_name : '-'),              @route.human_attribute_name(:wayback) => (@route.wayback ? @route.wayback_text : '-' ),              @route.human_attribute_name(:opposite_route) => (@route.opposite_route ? @route.opposite_route.name : '-') } diff --git a/app/views/routing_constraint_zones/_filters.html.slim b/app/views/routing_constraint_zones/_filters.html.slim index 07d351b1f..433dde4ab 100644 --- a/app/views/routing_constraint_zones/_filters.html.slim +++ b/app/views/routing_constraint_zones/_filters.html.slim @@ -1,7 +1,7 @@  = search_form_for @q, url: referential_line_routing_constraint_zones_path(@referential, @line), class: 'form form-filter' do |f|    .ffg-row      .input-group.search_bar -      = f.search_field :name_or_objectid_cont, class: 'form-control', placeholder: "Indiquez un nom d'ITL ou un OiD..." +      = f.search_field :name_or_objectid_cont, class: 'form-control', placeholder: "Indiquez un nom d'ITL ou un ID..."        span.input-group-btn          button.btn.btn-default#search-btn type='submit'            span.fa.fa-search diff --git a/app/views/routing_constraint_zones/index.html.slim b/app/views/routing_constraint_zones/index.html.slim index 248efedb4..596ea9e91 100644 --- a/app/views/routing_constraint_zones/index.html.slim +++ b/app/views/routing_constraint_zones/index.html.slim @@ -17,7 +17,7 @@        .row          .col-lg-12            = table_builder @routing_constraint_zones, -            { 'Oid' => Proc.new { |n| n.try(:objectid).try(:local_id) }, +            { 'ID' => Proc.new { |n| n.try(:objectid).try(:local_id) },                :name => 'name', :stop_points_count => 'stop_points_count',                :route => 'route_name' },              [:show, :edit, :delete], diff --git a/app/views/stop_areas/index.html.slim b/app/views/stop_areas/index.html.slim index 27c9372ac..338e7e878 100644 --- a/app/views/stop_areas/index.html.slim +++ b/app/views/stop_areas/index.html.slim @@ -1,7 +1,7 @@  / PageHeader  = pageheader 'map-marker',               t('stop_areas.index.title'), -             'Lorem ipsum dolor sit amet', +             '',               '',               (policy(Chouette::StopArea).create? ? link_to(t('stop_areas.actions.new'), new_stop_area_referential_stop_area_path(@stop_area_referential), class: 'btn btn-primary') : '') @@ -16,7 +16,6 @@      - if @stop_areas.any?        .row          .col-lg-12 -          p = t('activerecord.attributes.stop_point.deleted_at')            = table_builder @stop_areas,              { 'ID Reflex' => Proc.new { |n| n.try(:user_objectid) }, :name => 'name', :registration_number => 'registration_number', :deleted_at => Proc.new{|s| s.deleted_at ? t('false') : t('true')},              :zip_code => 'zip_code', :city_name => 'city_name', :area_type => Proc.new{|s| (s.area_type.nil? ? '-' : t("enumerize.stop_area.area_type.#{s.try(:area_type)}"))} }, diff --git a/app/views/stop_areas/show.html.slim b/app/views/stop_areas/show.html.slim index bdf7b61a5..0427554ef 100644 --- a/app/views/stop_areas/show.html.slim +++ b/app/views/stop_areas/show.html.slim @@ -22,7 +22,7 @@          = definition_list t('metadatas'),            { @stop_area.human_attribute_name(:stop_area_type) => t("area_types.label.#{@stop_area.stop_area_type}"),              @stop_area.human_attribute_name(:registration_number) => @stop_area.registration_number, -            'Code Reflex' => @stop_area.user_objectid, +            t('id_reflex') => @stop_area.user_objectid,              'Coordonnées' => geo_data(@stop_area, @stop_area_referential),              @stop_area.human_attribute_name(:zip_code) => @stop_area.zip_code,              @stop_area.human_attribute_name(:city_name) => @stop_area.city_name, diff --git a/app/views/time_tables/index.html.slim b/app/views/time_tables/index.html.slim index 402b09b98..a0b9e4380 100644 --- a/app/views/time_tables/index.html.slim +++ b/app/views/time_tables/index.html.slim @@ -15,7 +15,7 @@        .row          .col-lg-12            = table_builder @time_tables, -            { 'OiD' => Proc.new { |n| n.objectid.local_id }, :color => Proc.new{|tt| tt.color ? content_tag(:span, '', class: 'fa fa-circle', style: "color:#{tt.color}") : '-' }, :comment => 'comment',  +            { 'ID' => Proc.new { |n| n.objectid.local_id }, :color => Proc.new{|tt| tt.color ? content_tag(:span, '', class: 'fa fa-circle', style: "color:#{tt.color}") : '-' }, :comment => 'comment',                 "Période englobante" => Proc.new{ |tt| tt.bounding_dates.empty? ? '-' : t('bounding_dates', debut: l(tt.bounding_dates.min), end: l(tt.bounding_dates.max)) },                "Nombre de courses associées" => Proc.new{ |tt| tt.vehicle_journeys.count },                "Journées d'application" => Proc.new{ |tt| (%w(monday tuesday wednesday thursday friday saturday sunday).collect{|d| tt.send(d) ? t("calendars.days.#{d}") : '' }).reject{|a| a.empty?}.join(', ').html_safe }, diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim index 37c396b46..bb8b71ab2 100644 --- a/app/views/workbenches/show.html.slim +++ b/app/views/workbenches/show.html.slim @@ -7,7 +7,7 @@    / Below is secundary actions & optional contents (filters, ...)    .row.mb-sm      .col-lg-12.text-right -      = link_to Import.model_name.human.pluralize.capitalize, workbench_imports_path(@workbench), class: 'btn btn-primary' +      = link_to t('actions.import'), workbench_imports_path(@workbench), class: 'btn btn-primary'        - if policy(Referential).create?          = link_to t('actions.add'), new_referential_path(workbench_id: @workbench), class: 'btn btn-primary' @@ -43,6 +43,7 @@                  ), \                  TableBuilderHelper::Column.new( \                    key: :lines, \ +                  name: 'Nb lignes', \                    attribute: Proc.new {|w| w.lines.count} \                  ), \                  TableBuilderHelper::Column.new( \ diff --git a/config/locales/actions.en.yml b/config/locales/actions.en.yml index fe4d3d4e5..cffd04fcf 100644 --- a/config/locales/actions.en.yml +++ b/config/locales/actions.en.yml @@ -15,6 +15,7 @@ en:      sync: 'Synchronize'      combine: 'Combine'      actualize: 'Actualize' +    import: 'Import'    or: "or"    cancel: "Cancel"    search_hint: "Type in a search term" diff --git a/config/locales/actions.fr.yml b/config/locales/actions.fr.yml index ae0537ebb..86e72088a 100644 --- a/config/locales/actions.fr.yml +++ b/config/locales/actions.fr.yml @@ -5,8 +5,8 @@ fr:      delete: 'Supprimer'      search: "Chercher"      submit: "Valider" -    add: 'Ajouter' -    new: 'Ajouter' +    add: 'Créer' +    new: 'Créer'      show: 'Consulter'      archive: 'Conserver'      unarchive: 'Déconserver' @@ -16,6 +16,7 @@ fr:      sync: 'Synchroniser'      combine: 'Combiner'      actualize: 'Actualiser' +    import: 'Importer'    or: "ou"    cancel: "Annuler"    search_hint: "Entrez un texte à rechercher" diff --git a/config/locales/companies.en.yml b/config/locales/companies.en.yml index ac11a896a..301f4d68d 100644 --- a/config/locales/companies.en.yml +++ b/config/locales/companies.en.yml @@ -15,7 +15,7 @@ en:      index:        title: "Companies"        name: "Search by name..." -      name_or_objectid: "Search by name or by objectid..." +      name_or_objectid: "Search by name or by Codifligne ID..."        advanced_search: "Advanced search"    activerecord:      models: diff --git a/config/locales/companies.fr.yml b/config/locales/companies.fr.yml index e582736c9..58fcc2ed7 100644 --- a/config/locales/companies.fr.yml +++ b/config/locales/companies.fr.yml @@ -15,7 +15,7 @@ fr:      index:        title: "Transporteurs"        name: "Recherche par nom..." -      name_or_objectid: "Recherche par nom ou objectid..." +      name_or_objectid: "Recherche par nom ou ID Codifligne..."        advanced_search: "Recherche avancée"    activerecord:      models: diff --git a/config/locales/en.yml b/config/locales/en.yml index 3f6a68f8d..0a6002175 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -20,3 +20,7 @@ en:    validity_range: '%{debut} > %{end}'    bounding_dates: '%{debut} > %{end}'    metadatas: 'Informations' + +  id_codif: 'Codifligne ID' +  id_reflex: 'Reflex ID' +  objectid: 'ID' diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 49d1c5bb7..782844ba4 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -20,3 +20,6 @@ fr:    validity_range: '%{debut} > %{end}'    bounding_dates: '%{debut} > %{end}'    metadatas: 'Informations' + +  id_codif: 'ID Codifligne' +  id_reflex: 'ID Reflex' diff --git a/config/locales/networks.en.yml b/config/locales/networks.en.yml index a5962e2a6..86be535e4 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 objectid..." +      name_or_objectid: "Search by name or by Codifligne ID..."        advanced_search: "Advanced search"    activerecord:      models: diff --git a/config/locales/networks.fr.yml b/config/locales/networks.fr.yml index 99fd2ac95..30d061968 100644 --- a/config/locales/networks.fr.yml +++ b/config/locales/networks.fr.yml @@ -15,7 +15,7 @@ fr:      index:        title: "Réseaux"        name: "Recherche par nom..." -      name_or_objectid: "Recherche par nom ou objectid..." +      name_or_objectid: "Recherche par nom ou ID Codifligne..."        advanced_search: "Recherche avancée"    activerecord:      models: diff --git a/config/locales/routing_constraint_zones.fr.yml b/config/locales/routing_constraint_zones.fr.yml index 4faff6606..65cd03de9 100644 --- a/config/locales/routing_constraint_zones.fr.yml +++ b/config/locales/routing_constraint_zones.fr.yml @@ -9,7 +9,6 @@ fr:          line: Ligne associée          created_at: "Créé le"          updated_at: "Edité le" -        objectid: Object ID          stop_points_count: Nombre d'arrêts          route: Itinéraire associé          route_id: Itinéraire associé diff --git a/config/locales/stop_areas.fr.yml b/config/locales/stop_areas.fr.yml index 60ab3fa3d..3e49cdf7c 100644 --- a/config/locales/stop_areas.fr.yml +++ b/config/locales/stop_areas.fr.yml @@ -90,7 +90,7 @@ fr:          published_name: "Nom public"          deleted: "Supprimé"          deleted_at: "Activé" -        comment: "Description" +        comment: "Commentaire"          stop_area_type: "Type d'arrêt"          area_type: "Type d'arrêt"          nearest_topic_name: "Point d'intérêt le plus proche" diff --git a/spec/features/workbenches_permissions_spec.rb b/spec/features/workbenches_permissions_spec.rb index 962ffdedc..d58293538 100644 --- a/spec/features/workbenches_permissions_spec.rb +++ b/spec/features/workbenches_permissions_spec.rb @@ -18,20 +18,20 @@ describe 'Workbenches', type: :feature do      context 'on show view' do        let( :path ){ workbench_path(workbench) } -      context 'if present → ' do  +      context 'if present → ' do          let( :permission ){ true }          it 'shows the corresponding button' do            expected_href = new_referential_path(workbench_id: workbench) -          expect( page ).to have_link('Ajouter', href: expected_href)  +          expect( page ).to have_link('Créer', href: expected_href)          end        end -      context 'if absent → ' do  +      context 'if absent → ' do          let( :permission ){ false }          it 'does not show the corresponding button' do -          expect( page ).not_to have_link('Ajouter')  +          expect( page ).not_to have_link('Créer')          end        end        # let!(:ready_referential) { create :referential, workbench: workbench, metadatas: referential_metadatas, ready: true, organisation: @user.organisation } | 
