diff options
| author | Robert | 2017-10-16 15:17:27 +0200 | 
|---|---|---|
| committer | Robert | 2017-10-16 15:17:27 +0200 | 
| commit | 17e7984c97561b6230fc357234c61a1869146c02 (patch) | |
| tree | ae5bf77c854d9a6c4d03294125839a29d3088ce0 | |
| parent | 3d69e36539cee8796f9da2a981ba3c6b5e535e9f (diff) | |
| parent | 59038e7a772f88cd9f22891b50d96e4236c04515 (diff) | |
| download | chouette-core-17e7984c97561b6230fc357234c61a1869146c02.tar.bz2 | |
Merge branch 'master' of github.com:af83/stif-boiv
| -rw-r--r-- | app/models/route_control/stop_points_in_journey_pattern.rb | 2 | ||||
| -rw-r--r-- | config/locales/compliance_controls.en.yml | 261 | ||||
| -rw-r--r-- | config/locales/compliance_controls.fr.yml | 186 | ||||
| -rw-r--r-- | spec/lib/compliance_control_set_copier_spec.rb | 6 | 
4 files changed, 256 insertions, 199 deletions
| diff --git a/app/models/route_control/stop_points_in_journey_pattern.rb b/app/models/route_control/stop_points_in_journey_pattern.rb index 400bef5ef..c0c13e65a 100644 --- a/app/models/route_control/stop_points_in_journey_pattern.rb +++ b/app/models/route_control/stop_points_in_journey_pattern.rb @@ -1,6 +1,6 @@  module RouteControl    class StopPointsInJourneyPattern < ComplianceControl -    def self.default_code; "3-Route-6" end +    def self.default_code; "3-Route-8" end    end  end diff --git a/config/locales/compliance_controls.en.yml b/config/locales/compliance_controls.en.yml index 02235be33..1b8199a57 100644 --- a/config/locales/compliance_controls.en.yml +++ b/config/locales/compliance_controls.en.yml @@ -3,6 +3,7 @@ en:      min_max_values: "the minimum (%{min}) is not supposed to be greater than the maximum (%{max})"      errors:        incoherent_control_sets: "Impossible to assign a control to a set (id: %{direct_set_name}) differing from the one of its group (id: %{indirect_set_name})" +      mandatory_control_type: "A control type must be selected"      show:        title: "Compliance control"      index: @@ -11,113 +12,169 @@ en:        title: "Add a new compliance control"      edit:        title: "Update compliance control" -    route: -      zdl_stop_area: -        messages: -          3_route_1: "The route with % objectid connect the stop points % % et % % which belong to the same ZDL" -        description: "Two stop points which belong to the same ZDL cannot follow one another in a route" -      opposite_route: -        messages: -          3_route_2: "The route with % objectid references an incoherent oppposite route %" -        description: | -          "If the route has an opposite route, it must : -            - reference the opposite route -            - have an opposite route in relation with the tested route" -      journey_pattern: -        messages: -          3_route_3: "The route with % objectid doesn't have any journey pattern" -        description: "A route must have at least one journey pattern" -      duplicates: -        messages: -          3_route_4: "The route with % objectid is identical with another route %" -        description: "2 routes cannot connect the same stop points with the same order and the same boarding and alighting characteristics" -      opposite_route_terminus: -        messages: -          3_route_5: "The route with % objectid has a first stop from the % ZDL whereas its oppoite route's last stop is from the ZDL %" -        description: "Deux itinéraires en aller/retour doivent desservir les mêmes terminus" -      minimum_length: -        messages: -          3_route_6: "The route with % objectid does not connect enough stop points (required 2 stop points)" -        description: "A route must have at least 2 stop points" -      omnibus_journey_pattern: -        messages: -          3_route_9: "The route with % objectid does not have a journey pattern that connect all of its stop points" -        description: "A journey pattern of a route should connect all of a route's stop points" -      unactivated_stop_point: -        messages: -          3_route_10: "L'itinéraire % référence un arrêt (ZDEp) désactivé % (%)" -        description: "Les arrêts d'un itinéraire ne doivent pas être désactivés" -    journey_pattern: -      duplicates: -        messages: -          3_journeypattern_1: "The journey pattern with objectid % is identical with another one %" -        description: "Two journey patterns belonging to the same line must not connect the same stop points in the same order" -      vehicle_journey: -        messages: -          3_journeypattern_2: "The journey pattern with % objectid doesn't have any vehicle journey" -        description: "A journey pattern must have at least one vehicle journey" -    vehicle_journey: -      waiting_time: -        messages: -          3_vehiclejourney_1: "On the following vehicle journey %, the waiting time % a this stop point % (%) is greater than the threshold (%)" -        description: "The waiting time at a specific stop point cannot be too big" -      speed: -        messages: -          3_vehiclejourney_2_1: "On the following vehicle journey %, the computed speed % between the stop points % (%) and % (%) is greater than the threshold (%)" -          3_vehiclejourney_2_2: "On the following vehicle journey %, the computed speed % between the stop points % (%) and % (%) is smaller than the threshold (%)" -        description: "The speed between 2 stop points should be confined between two thresholds" -      delta: -        messages: -          3_vehiclejourney_3: "The travel time on the vehicle journey with % objectid between the stop points % (%) and % (% is too far off % the average waiting on the journey pattern" -        description: "The travel time between two following stop points must be close to all the vehicle journey of a journey pattern" -      time_table: -        messages: -          3_vehiclejourney_4: "The vehicle journey with % objectid does not have a timetable" -        description: "A vehicle journey must have at least one timetable" -      vehicle_journey_at_stops: -        messages: -          3_vehiclejourney_5_1: "The vehicle journey with % objectid has an arrival time % greater than the departure time % at the stop point % (%)" -          3_vehiclejourney_5_2: "The vehicle journey with % objectid has an departure time % at stop point % (%) greater than the arrival % at the next stop point" -        description: "The arrival time of a stop point must be smaller than the departure time of this stop point AND the departure time of the stop points must be in chronological order" -    routing_constraint_zone: -      vehicle_journey_at_stops: -        messages: -          3_itl_1: "The Routing Constraint Zone % references an unactivated stop point (ZDEp) % (%)" -        description: "The stop points of a Routing Constraint Zone must be activated" -      maximum_length: -        messages: -          3_itl_2: "The Routing Constraint Zone % covers all the stop points of its related route : % %." -        description: "A Routing Constraint Zone cannot cover all the stop points of a route" -      minimum_length: -        messages: -          3_itl_3: "The Routing Constraint Zone % has less than 2 stop points" -        description: "A Routing Constraint Zone must have at least 2 stop points" -    line: -      route: -        messages: -          3_line_1: "On line : % (%), no route has an opposite route" -        description: "The routes of a line must have an opposite route" -    generic: -      content: -        messages: -          3_generic_1: "% : the % attribute value (%) does not respect the following pattern : %" -        description: "The object attribute must respect a patten (regular expression)" -      min_max: -        messages: -          3_generic_2_1: "% : the % attributes's value (%) is greater than the authorized maximum value : %" -          3_generic_2_2: "% : the % attributes's value (%) is smaller than the authorized minimum value %" -        description: "The numeric value of an attribute must be contained between 2 values" -      uniqueness: -        messages: -          3_generic_3: "% : the % attribute's value (%) of % is in conflict with : %" -        description: "The attribute's value must be unique compared to the other objects ofthe same type (related to the same line)" +    route_control/zdl_stop_area: +      messages: +        3_route_1: "The route with %{source_objectid} objectid connect the stop points %{target_0_label} (%{target_0_objectid}) and %{target_1_label} (%{target_1_objectid}) which belong to the same ZDL" +      description: "Two stop points which belong to the same ZDL cannot follow one another in a route" +    route_control/opposite_route: +      messages: +        3_route_2: "The route with %{source_objectid} objectid references an incoherent oppposite route %{target_0_objectid}" +      description: | +        "If the route has an opposite route, it must : +          - reference the opposite route +          - have an opposite route in relation with the tested route" +    route_control/journey_pattern: +      messages: +        3_route_3: "The route with %{source_objectid} objectid doesn't have any journey pattern" +      description: "A route must have at least one journey pattern" +    route_control/duplicates: +      messages: +        3_route_4: "The route with %{source_objectid} objectid is identical with another route %{target_0_objectid}" +      description: "2 routes cannot connect the same stop points with the same order and the same boarding and alighting characteristics" +    route_control/opposite_route_terminus: +      messages: +        3_route_5: "The route with %{source_objectid} objectid has a first stop from the %{target_0_label} ZDL whereas its oppoite route's last stop is from the ZDL %{target_1_label}" +      description: "Deux itinéraires en aller/retour doivent desservir les mêmes terminus" +    route_control/minimum_length: +      messages: +        3_route_6: "The route with %{source_objectid} objectid does not connect enough stop points (required 2 stop points)" +      description: "A route must have at least 2 stop points" +    route_control/stop_points_in_journey_pattern: +      messages: +        3_route_8: "The stop point %{target_0_label} (%{target_0_objectid}) of the route %{source_objectid} is not used by any journey pattern" +      description: "The stop points of a route must be used by at least one journey pattern" +    route_control/omnibus_journey_pattern: +      messages: +        3_route_9: "The route with %{source_objectid} objectid does not have a journey pattern that connect all of its stop points" +      description: "A journey pattern of a route should connect all of a route's stop points" +    route_control/unactivated_stop_point: +      messages: +        3_route_10: "L'itinéraire %{source_objectid} référence un arrêt (ZDEp) désactivé %{target_0_label} (%{target_0_objectid})" +      description: "Les arrêts d'un itinéraire ne doivent pas être désactivés" +    journey_pattern_control/duplicates: +      messages: +        3_journeypattern_1: "The journey pattern with objectid %{source_objectid} is identical with another one %{target_0_objectid}" +      description: "Two journey patterns belonging to the same line must not connect the same stop points in the same order" +    journey_pattern_control/vehicle_journey: +      messages: +        3_journeypattern_2: "The journey pattern with %{source_objectid} objectid doesn't have any vehicle journey" +      description: "A journey pattern must have at least one vehicle journey" +    vehicle_journey_control/waiting_time: +      messages: +        3_vehiclejourney_1: "On the following vehicle journey %{source_objectid}, the waiting time %{error_value} a this stop point %{target_0_label} (%{target_0_objectid}) is greater than the threshold (%{reference_value})" +      description: "The waiting time at a specific stop point cannot be too big" +    vehicle_journey_control/speed: +      messages: +        3_vehiclejourney_2_1: "On the following vehicle journey %{source_objectid}, the computed speed %{error_value} between the stop points %{target_0_label} (%{target_0_objectid}) and %{target_1_label} (%{target_1_objectid}) is greater than the threshold (%{reference_value})" +        3_vehiclejourney_2_2: "On the following vehicle journey %{source_objectid}, the computed speed %{error_value} between the stop points %{target_0_label} (%{target_0_objectid}) and %{target_1_label} (%{target_1_objectid}) is smaller than the threshold (%{reference_value})" +      description: "The speed between 2 stop points should be confined between thresholds" +    vehicle_journey_control/delta: +      messages: +        3_vehiclejourney_3: "The travel time on the vehicle journey with %{source_objectid} objectid between the stop points %{target_0_label} (%{target_0_objectid}) and %{target_1_label} (%{target_1_objectid}) is too far off %{error_value} the average waiting on the journey pattern" +      description: "The travel time between two following stop points must be close to all the vehicle journey of a journey pattern" +    vehicle_journey_control/time_table: +      messages: +        3_vehiclejourney_4: "The vehicle journey with %{source_objectid} objectid does not have a timetable" +      description: "A vehicle journey must have at least one timetable" +    vehicle_journey_control/vehicle_journey_at_stops: +      messages: +        3_vehiclejourney_5_1: "The vehicle journey with %{source_objectid} objectid has an arrival time %{error_value} greater than the departure time %{reference_value} at the stop point %{target_0_label} (%{target_0_objectid})" +        3_vehiclejourney_5_2: "The vehicle journey with %{source_objectid} objectid has an departure time %{error_value} at stop point %{target_0_label} (%{target_0_objectid}) greater than the arrival % at the next stop point" +      description: "The arrival time of a stop point must be smaller than the departure time of this stop point AND the departure time of the stop points must be in chronological order" +    routing_constraint_zone_control/vehicle_journey_at_stops: +      messages: +        3_routingconstraint_1: "The Routing Constraint Zone %{source_objectid} references an unactivated stop point (ZDEp) %{target_0_label} (%{target_0_objectid})" +      description: "The stop points of a Routing Constraint Zone must be activated" +    routing_constraint_zone_control/maximum_length: +      messages: +        3_routingconstraint_2: "The Routing Constraint Zone %{source_objectid} covers all the stop points of its related route : %{target_0_objectid}." +      description: "A Routing Constraint Zone cannot cover all the stop points of a route" +    routing_constraint_zone_control/minimum_length: +      messages: +        3_routingconstraint_3: "The Routing Constraint Zone %{source_objectid} has less than 2 stop points" +      description: "A Routing Constraint Zone must have at least 2 stop points" +    line_control/route: +      messages: +        3_line_1: "On line :%{source_label} (%{source_objectid}), no route has an opposite route" +      description: "The routes of a line must have an opposite route" +    generic_attribute_control/pattern: +      messages: +        3_generic_1: "%{source_objectid} : the %{source_label} attribute value (%{error_value}) does not respect the following pattern : %{reference_value}" +      description: "The object attribute must respect a patten (regular expression)" +    generic_attribute_control/min_max: +      messages: +        3_generic_2_1: "%{source_objectid}  : the %{source_label} attributes's value (%{error_value}) is greater than the authorized maximum value : %{reference_value}" +        3_generic_2_2: "%{source_objectid}  : the %{source_label} attributes's value (%{error_value}) is smaller than the authorized minimum value %{reference_value}" +      description: "The numeric value of an attribute must be contained between 2 values" +    generic_attribute_control/uniqueness: +      messages: +        3_generic_3: "%{source_objectid}  : the %{source_label} attribute's value (%{error_value}) is in conflict with : %{reference_value}" +      description: "The attribute's value must be unique compared to the other objects ofthe same type (related to the same line)" +        shape_control: +      3_shape_1: "Tracé %{source_objectid} : le tracé passe trop loin de l'arrêt %{target_0_label} (%{target_0_objectid}) : %{error_value} > %{reference_value}" +      3_shape_2: "Tracé %{source_objectid} : le tracé n'est pas défini entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})" +      3_shape_3: "Le tracé de l'itinéraire %{source_objectid} est en écart avec la voirie sur %{error_value} sections"    activerecord:      models: -      one: "compliance control" -      other: "compliance controls" +      compliance_control: +        one: "compliance control" +        other: "compliance controls" +      route_control/zdl_stop_area: +        one: "Two stop points which belong to the same ZDL cannot follow one another in a route" +      route_control/opposite_route: +        one: "Check of the opposite route" +      route_control/journey_pattern: +        one: "Presence of journey patterns" +      route_control/duplicates: +        one: "Check of route duplicates" +      route_control/opposite_route_terminus: +        one: "Check of last stop point of the opposite route" +      route_control/minimum_length: +        one: "A route must have at least 2 stop points" +      route_control/omnibus_journey_pattern: +        one: "A journey pattern of a route should connect all of a route's stop points" +      route_control/unactivated_stop_points: +        one: "Route and unactivated stop point" +      route_control/stop_points_in_journey_pattern: +        one: "The stop points of a route must be used by at least one journey pattern" +      journey_pattern_control/duplicates: +        one: "Journey patterns duplicates in a line" +      journey_pattern_control/vehicle_journey: +        one: "Presence of vehicle journeys" +      vehicle_journey_control/waiting_time: +        one: "The wating time at a stop point should'nt be too long" +      vehicle_journey_control/speed: +        one: "The speed between 2 stop points should be confined between thresholds" +      vehicle_journey_control/delta: +        one: "The travel time between two following stop points must be close to all the vehicle journey of a journey pattern" +      vehicle_journey_control/time_table: +        one: "A vehicle journey must have at least one timetable" +      vehicle_journey_control/vehicle_journey_at_stops: +        one: "Incresing chronology of the vehicle journey at stops" +      routing_constraint_zone_control/vehicle_journey_at_stops: +        one: "Incresing chronology of the vehicle journey at stops" +      routing_constraint_zone_control/maximum_length: +        one: "Maximum length of s routing contraint zone" +      routing_constraint_zone_control/minimum_length: +        one: "Minimum length of s routing contraint zone" +      routing_constraint_zone_control/unactivated_stop_point: +        one: "Unactivated stop points" +      line_control/route: +        one: "The routes of a line must have an opposite route" +      generic_attribute_control/pattern: +        one: "Attribute pattern of an object in a line" +      generic_attribute_control/min_max: +        one: "Min, max values of numeric fields" +      generic_attribute_control/uniqueness: +        one: "Attribute uniqueness of an object in a line" +      attributes:        compliance_control:          name: "Name"          criticity: "Criticity"          comment: "Comment"          code: "Code" +        compliance_control_block: "Control Block" +        minimum: "Minimum" +        maximum: "Maximum" +        target: "Target"
\ No newline at end of file diff --git a/config/locales/compliance_controls.fr.yml b/config/locales/compliance_controls.fr.yml index ce9d15cab..2038b9eb7 100644 --- a/config/locales/compliance_controls.fr.yml +++ b/config/locales/compliance_controls.fr.yml @@ -14,106 +14,106 @@ fr:        title: "Sélectionner un type de contrôle"      route_control/zdl_stop_area:        messages: -        3_route_1: "L'itinéraire % dessert successivement les arrêts % % et % % de la même zone de lieu" +        3_route_1: "L'itinéraire %{source_objectid} dessert successivement les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) de la même zone de lieu"        description: "Deux arrêts d’une même ZDL ne peuvent pas se succéder dans un itinéraire"      route_control/opposite_route:        messages: -        3_route_2: "L'itinéraire % référence un itinéraire retour % incohérent" +        3_route_2: "L'itinéraire %{source_objectid} référence un itinéraire retour %{target_0_objectid} incohérent"        description: |          "Si l'itinéraire référence un itinéraire inverse, celui-ci doit :            - référencer l'itinéraire inverse            - avoir un sens opposé à l'itinéraire testé" +    route_control/journey_pattern: +      messages: +        3_route_3: "L'itinéraire %{source_objectid} n'a pas de mission" +      description: "Un itinéraire doit avoir au moins une mission" +    route_control/duplicates: +      messages: +        3_route_4: "L'itinéraire %{source_objectid} est identique à l'itinéraire %{target_0_objectid}" +      description: "2 itinéraires ne doivent pas desservir strictement les mêmes arrêts dans le même ordre avec les mêmes critères de monté/descente" +    route_control/opposite_route_terminus: +      messages: +        3_route_5: "L'itinéraire %{source_objectid} dessert au départ un arrêt de la ZDL %{target_0_label} alors que l'itinéraire inverse dessert à l'arrivée un arrêt de la ZDL %{target_1_label}" +      description: "Deux itinéraires en aller/retour doivent desservir les mêmes terminus" +    route_control/minimum_length: +      messages: +        3_route_6: "L'itinéraire %{source_objectid} ne dessert pas assez d'arrêts (minimum 2 requis)" +      description: "Un itinéraire doit référencer au moins 2 arrêts"      route_control/stop_points_in_journey_pattern: -      zeze: "" -    route_control: -      journey_pattern: -        messages: -          3_route_3: "L'itinéraire % n'a pas de mission" -        description: "Un itinéraire doit avoir au moins une mission" -      duplicates: -        messages: -          3_route_4: "L'itinéraire % est identique à l'itinéraire %" -        description: "2 itinéraires ne doivent pas desservir strictement les mêmes arrêts dans le même ordre avec les mêmes critères de monté/descente" -      opposite_route_terminus: -        messages: -          3_route_5: "L'itinéraire % dessert au départ un arrêt de la ZDL % alors que l'itinéraire inverse dessert à l'arrivée un arrêt de la ZDL %" -        description: "Deux itinéraires en aller/retour doivent desservir les mêmes terminus" -      minimum_length: -        messages: -          3_route_6: "L'itinéraire % ne dessert pas assez d'arrêts (minimum 2 requis)" -        description: "Un itinéraire doit référencer au moins 2 arrêts" -      omnibus_journey_pattern: -        messages: -          3_route_9: "L'itinéraire % n'a aucune mission desservant l'ensemble de ses arrêts" -        description: "Une mission de l'itinéraire devrait desservir l'ensemble des arrêts de celui-ci" -      unactivated_stop_point: -        messages: -          3_route_10: "L'itinéraire % référence un arrêt (ZDEp) désactivé % (%)" -        description: "Les arrêts d'un itinéraire ne doivent pas être désactivés" -    journey_pattern: -      duplicates: -        messages: -          3_journeypattern_1: "La mission % est identique à la mission %" -        description: "Deux missions de la même ligne ne doivent pas desservir les mêmes arrêts dans le même ordre" -      vehicle_journey: -        messages: -          3_journeypattern_2: "La mission % n'a pas de course" -        description: "Une mission doit avoir au moins une course" -    vehicle_journey: -      waiting_time: -        messages: -          3_vehiclejourney_1: "Sur la course %, le temps d'attente % à l'arrêt % (%) est supérieur au seuil toléré (%)" -        description: "La durée d’attente à un arrêt ne doit pas être trop grande" -      speed: -        messages: -          3_vehiclejourney_2_1: "Sur la course %, la vitesse calculée % entre les arrêts % (%) et % (%) est supérieur au seuil toléré (%)" -          3_vehiclejourney_2_2: "Sur la course %, la vitesse calculée % entre les arrêts % (%) et % (%) est inférieur au seuil toléré (%)" -        description: "La vitesse entre deux arrêts doit être dans une fourchette paramétrable" -      delta: -        messages: -          3_vehiclejourney_3: "Le temps de parcours sur la course % entre les arrêts % (%) et % (% s'écarte de % du temps moyen constaté sur la mission" -        description: "Les temps de parcours entre 2 arrêts successifs doivent être similaires pour toutes les courses d’une même mission" -      time_table: -        messages: -          3_vehiclejourney_4: "La course % n'a pas de calendrier d'application" -        description: "Une course doit avoir au moins un calendrier d’application" -      vehicle_journey_at_stops: -        messages: -          3_vehiclejourney_5_1: "La course % a un horaire d'arrivé % supérieur à l'horaire de départ % à l'arrêt {nomArrêt} (%)" -          3_vehiclejourney_5_2: "La course % a un horaire de départ % à l'arrêt {nomArrêt} (%) supérieur à l'horaire d'arrivé % à l'arrêt suivant" -        description: "L'horaire d'arrivée à un arrêt doit être antérieur à l'horaire de départ de cet arrêt ET les horaires de départ aux arrêts doivent être dans l'ordre chronologique croissant." -    routing_constraint_zone: -      vehicle_journey_at_stops: -        messages: -          3_itl_1: "L'ITL % référence un arrêt (ZDEp) désactivé % (%)" -        description: "Les arrêts d'une ITL ne doivent pas être désactivés" -      maximum_length: -        messages: -          3_itl_2: "L'ITL % couvre tous les arrêts de l'itinéraire %." -        description: "Une ITL ne peut pas couvrir l'ensemble des arrêts de l'itinéraire" -      minimum_length: -        messages: -          3_itl_3: "L'ITL % n'a pas suffisament d'arrêts (minimum 2 arrêts requis)" -        description: "Une ITL doit référencer au moins 2 arrêts" -    line: -      route: -        messages: -          3_line_1: "Sur la ligne % (%), aucun itinéraire n'a d'itinéraire inverse" -        description: "Les itinéraires d'une ligne doivent être associés en aller/retour" -    generic: -      content: -        messages: -          3_generic_1: "% : l'attribut % à une valeur % qui ne respecte pas le motif %" -        description: "l'attribut de l'objet doit respecter un motif (expression régulière)" -      min_max: -        messages: -          3_generic_2_1: "% : l'attribut % à une valeur % supérieure à la valeur maximale autorisée %" -          3_generic_2_2: "% : l'attribut % à une valeur % inférieure à la valeur minimale autorisée %" -        description: "La valeur numérique de l'attribut doit rester comprise entre 2 valeurs" -      uniqueness: -        messages: -          3_generic_3: "La valeur de l'attribut doit être unique au sein des objets de la ligne" -        description: "% : l'attribut % de % à une valeur % en conflit avec %" +      messages: +        3_route_8: "l'arrêt %{target_0_label} (%{target_0_objectid}) de l'itinéraire %{source_objectid} n'est desservi par aucune mission" +      description: "Les arrêts de l'itinéraire doivent être desservis par au moins une mission" +    route_control/omnibus_journey_pattern: +      messages: +        3_route_9: "L'itinéraire %{source_objectid} n'a aucune mission desservant l'ensemble de ses arrêts" +      description: "Une mission de l'itinéraire devrait desservir l'ensemble des arrêts de celui-ci" +    route_control/unactivated_stop_point: +      messages: +        3_route_10: "L'itinéraire %{source_objectid} référence un arrêt (ZDEp) désactivé %{target_0_label} (%{target_0_objectid})" +      description: "Les arrêts d'un itinéraire ne doivent pas être désactivés" +    journey_pattern_control/duplicates: +      messages: +        3_journeypattern_1: "La mission %{source_objectid} est identique à la mission %{target_0_objectid}" +      description: "Deux missions de la même ligne ne doivent pas desservir les mêmes arrêts dans le même ordre" +    journey_pattern_control/vehicle_journey: +      messages: +        3_journeypattern_2: "La mission %{source_objectid} n'a pas de course" +      description: "Une mission doit avoir au moins une course" +    vehicle_journey_control/waiting_time: +      messages: +        3_vehiclejourney_1: "Sur la course %{source_objectid}, le temps d'attente %{error_value} à l'arrêt %{target_0_label} (%{target_0_objectid}) est supérieur au seuil toléré (%{reference_value})" +      description: "La durée d’attente à un arrêt ne doit pas être trop grande" +    vehicle_journey_control/speed: +      messages: +        3_vehiclejourney_2_1: "Sur la course %{source_objectid}, la vitesse calculée %{error_value} entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) est supérieur au seuil toléré (%{reference_value})" +        3_vehiclejourney_2_2: "Sur la course %{source_objectid}, la vitesse calculée %{error_value} entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) est inférieur au seuil toléré (%{reference_value})" +      description: "La vitesse entre deux arrêts doit être dans une fourchette paramétrable" +    vehicle_journey_control/delta: +      messages: +        3_vehiclejourney_3: "Le temps de parcours sur la course %{source_objectid} entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid}) s'écarte de %{error_value} du temps moyen constaté sur la mission" +      description: "Les temps de parcours entre 2 arrêts successifs doivent être similaires pour toutes les courses d’une même mission" +    vehicle_journey_control/time_table: +      messages: +        3_vehiclejourney_4: "La course %{source_objectid} n'a pas de calendrier d'application" +      description: "Une course doit avoir au moins un calendrier d’application" +    vehicle_journey_control/vehicle_journey_at_stops: +      messages: +        3_vehiclejourney_5_1: "La course %{source_objectid} a un horaire d'arrivé %{error_value} supérieur à l'horaire de départ %{reference_value} à l'arrêt %{target_0_label} (%{target_0_objectid})" +        3_vehiclejourney_5_2: "La course %{source_objectid} a un horaire de départ %{error_value} à l'arrêt %{target_0_label} (%{target_0_objectid}) supérieur à l'horaire d'arrivé % à l'arrêt suivant" +      description: "L'horaire d'arrivée à un arrêt doit être antérieur à l'horaire de départ de cet arrêt ET les horaires de départ aux arrêts doivent être dans l'ordre chronologique croissant." +    routing_constraint_zone_control/vehicle_journey_at_stops: +      messages: +        3_routingconstraint_1: "L'ITL %{source_objectid} référence un arrêt (ZDEp) désactivé %{target_0_label} (%{target_0_objectid})" +      description: "Les arrêts d'une ITL ne doivent pas être désactivés" +    routing_constraint_zone_control/maximum_length: +      messages: +        3_routingconstraint_2: "L'ITL %{source_objectid} couvre tous les arrêts de l'itinéraire %{target_0_objectid}." +      description: "Une ITL ne peut pas couvrir l'ensemble des arrêts de l'itinéraire" +    routing_constraint_zone_control/minimum_length: +      messages: +        3_routingconstraint_3: "L'ITL %{source_objectid} n'a pas suffisament d'arrêts (minimum 2 arrêts requis)" +      description: "Une ITL doit référencer au moins 2 arrêts" +    line_control/route: +      messages: +        3_line_1: "Sur la ligne %{source_label} (%{source_objectid}), aucun itinéraire n'a d'itinéraire inverse" +      description: "Les itinéraires d'une ligne doivent être associés en aller/retour" +    generic_attribute_control/pattern: +      messages: +        3_generic_1: "%{source_objectid} : l'attribut % à une valeur %{error_value} qui ne respecte pas le motif %{reference_value}" +      description: "l'attribut de l'objet doit respecter un motif (expression régulière)" +    generic_attribute_control/min_max: +      messages: +        3_generic_2_1: "%{source_objectid} : l'attribut %{source_label} à une valeur %{error_value} supérieure à la valeur maximale autorisée %{reference_value}" +        3_generic_2_2: "%{source_objectid} : l'attribut %{source_label} à une valeur %{error_value} inférieure à la valeur minimale autorisée %{reference_value}" +      description: "La valeur numérique de l'attribut doit rester comprise entre 2 valeurs" +    generic_attribute_control/uniqueness: +      messages: +        3_generic_3: "%{source_objectid} : l'attribut %{source_label} à une valeur %{error_value}en conflit avec %{reference_value}" +      description: "La valeur de l'attribut doit être unique au sein des objets de la ligne" +    shape_control: +      3_shape_1: "Tracé %{source_objectid} : le tracé passe trop loin de l'arrêt %{target_0_label} (%{target_0_objectid}) : %{error_value} > %{reference_value}" +      3_shape_2: "Tracé %{source_objectid} : le tracé n'est pas défini entre les arrêts %{target_0_label} (%{target_0_objectid}) et %{target_1_label} (%{target_1_objectid})" +      3_shape_3: "Le tracé de l'itinéraire %{source_objectid} est en écart avec la voirie sur %{error_value} sections"    activerecord:      models:        compliance_control: @@ -177,4 +177,4 @@ fr:          compliance_control_block: "Groupe de contrôle"          minimum: "Minimum"          maximum: "Maximum" -        target: "Cible" +        target: "Cible"
\ No newline at end of file diff --git a/spec/lib/compliance_control_set_copier_spec.rb b/spec/lib/compliance_control_set_copier_spec.rb index 3cecc44d1..a9e576cf7 100644 --- a/spec/lib/compliance_control_set_copier_spec.rb +++ b/spec/lib/compliance_control_set_copier_spec.rb @@ -26,7 +26,7 @@ RSpec.describe ComplianceControlSetCopier do            3.times.map{ |_| create :compliance_control_block, compliance_control_set: cc_set }          }          let!(:direct_ccs){ -          3.times.map{ |n| create :compliance_control, compliance_control_set: cc_set, name: "direct #{n.succ}" } +          3.times.map{ |n| create :compliance_control, compliance_control_set: cc_set, name: "direct #{n.succ}", code: "direct-#{n.succ}" }          }          # Needed to check we do not dulicate a node (compliance_control) twice          let!(:indirect_ccs){ @@ -36,7 +36,7 @@ RSpec.describe ComplianceControlSetCopier do              cc.update compliance_control_block_id: cc_block.id            end            cc_blox.each_with_index.map{ | cc_block, n | -            create(:compliance_control, compliance_control_set: cc_set, compliance_control_block: cc_block, name: "indirect #{n.succ}") +            create(:compliance_control, compliance_control_set: cc_set, compliance_control_block: cc_block, name: "indirect #{n.succ}", code: "indirect-#{n.succ}")            }          } @@ -94,7 +94,7 @@ RSpec.describe ComplianceControlSetCopier do            # Control/Check            att_names = %w{  control_attributes code criticity comment origin_code }            expected  = control.attributes.values_at(*att_names) << mk_name(control.name) -          actual    = cck.attributes.values_at(*(att_names << 'name'))  +          actual    = cck.attributes.values_at(*(att_names << 'name'))            expect( actual ).to eq( expected ) | 
