Skip to content

Commit

Permalink
Support new GTFS validation rule
Browse files Browse the repository at this point in the history
See [UnusableTrip](etalab/transport-validator#211).
  • Loading branch information
ptitfred committed Jan 15, 2025
1 parent 8b462be commit fa4281a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<p>
<%= dgettext("validations-explanations", "UnusableTrip") %>
</p>
<table class="table">
<tr>
<th><%= dgettext("validations-explanations", "Object type") %></th>
<th><%= dgettext("validations-explanations", "Object ID") %></th>
</tr>

<%= for issue <- @issues do %>
<tr>
<td><%= issue["object_type"] %></td>
<td><%= issue["object_id"] %></td>
</tr>
<% end %>
</table>
3 changes: 2 additions & 1 deletion apps/transport/lib/transport_web/views/resource_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ defmodule TransportWeb.ResourceView do
"MissingId" => "_missing_id_issue.html",
"MissingName" => "_missing_name_issue.html",
"SubFolder" => "_subfolder_issue.html",
"NegativeStopDuration" => "_negative_stop_duration_issue.html"
"NegativeStopDuration" => "_negative_stop_duration_issue.html",
"UnusableTrip" => "_unusable_trip.html"
},
Transport.Validators.GTFSTransport.issue_type(issues.entries),
"_generic_issue.html"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,7 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "Details for debugging purposes"
msgstr ""

#, elixir-autogen, elixir-format
msgid "UnusableTrip"
msgstr "Trip with too many stops."
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,7 @@ msgstr "Emplacement inconnu"
#, elixir-autogen, elixir-format
msgid "Details for debugging purposes"
msgstr "Détails à fin de débogage"

#, elixir-autogen, elixir-format
msgid "UnusableTrip"
msgstr "Trip avec trop peu d’arrêts."
4 changes: 4 additions & 0 deletions apps/transport/priv/gettext/validations-explanations.pot
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,7 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "Details for debugging purposes"
msgstr ""

#, elixir-autogen, elixir-format
msgid "UnusableTrip"
msgstr ""

0 comments on commit fa4281a

Please sign in to comment.