From 0df7f79183e06d27ed1f25aeafa2867017e12e7d Mon Sep 17 00:00:00 2001 From: Cristen Jones Date: Thu, 12 Nov 2026 23:03:47 -0500 Subject: [PATCH 1/2] Revert "Update hardcoded CR-Foxboro fare info in Trip Planner (#3005)" --- lib/fares/fare_info.ex | 6 +++--- lib/fares/format.ex | 1 - test/fares/fare_info_test.exs | 13 ------------- test/fares/format_test.exs | 5 ----- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/lib/fares/fare_info.ex b/lib/fares/fare_info.ex index 7e451a206c..77f48463fe 100644 --- a/lib/fares/fare_info.ex +++ b/lib/fares/fare_info.ex @@ -176,7 +176,7 @@ defmodule Fares.FareInfo do monthly: "257.00", monthly_reduced: "124.00" }, - %{mode: :foxboro, round_trip: "WorldCup"}, + %{mode: :foxboro, round_trip: "20.00"}, %{ mode: :subway, charlie_card_price: "2.40", @@ -792,7 +792,7 @@ defmodule Fares.FareInfo do ] end - def mapper(%{mode: :foxboro, round_trip: "WorldCup"}) do + def mapper(%{mode: :foxboro, round_trip: round_trip}) do [ %Fare{ mode: :commuter_rail, @@ -800,7 +800,7 @@ defmodule Fares.FareInfo do duration: :round_trip, media: [:mticket, :special_event, :cash], reduced: nil, - cents: "WorldCup" + cents: dollars_to_cents(round_trip) } ] end diff --git a/lib/fares/format.ex b/lib/fares/format.ex index 41fea14442..5c4e98698c 100644 --- a/lib/fares/format.ex +++ b/lib/fares/format.ex @@ -15,7 +15,6 @@ defmodule Fares.Format do @spec price(Fare.t() | non_neg_integer | nil) :: String.t() def price(nil), do: "" def price(%Fare{cents: +0.0}), do: ~t"Free" - def price("WorldCup"), do: ~t(Special ticket required) def price(%Fare{cents: cents}), do: price(cents) def price(0), do: ~t"Free" def price(cents), do: (cents / 100) |> Cldr.Number.to_string!(currency: "USD") diff --git a/test/fares/fare_info_test.exs b/test/fares/fare_info_test.exs index 8f0e06afd6..e97858d806 100644 --- a/test/fares/fare_info_test.exs +++ b/test/fares/fare_info_test.exs @@ -269,19 +269,6 @@ defmodule Fares.FareInfoTest do cents: 500 } in fares end - - test "maps the World Cup special event trains" do - fares = mapper(%{mode: :foxboro, round_trip: "WorldCup"}) - - assert %Fares.Fare{ - mode: :commuter_rail, - name: :foxboro, - duration: :round_trip, - media: [:mticket, :special_event, :cash], - reduced: nil, - cents: "WorldCup" - } in fares - end end describe "mticket_price/1" do diff --git a/test/fares/format_test.exs b/test/fares/format_test.exs index d3a7e88ab0..a7d54964fb 100644 --- a/test/fares/format_test.exs +++ b/test/fares/format_test.exs @@ -1,7 +1,6 @@ defmodule Fares.FormatTest do use ExUnit.Case, async: true use ExUnitProperties - use Dotcom.Gettext.Sigils import Fares.Format import Test.Support.Factories.Routes.Route @@ -17,10 +16,6 @@ defmodule Fares.FormatTest do test "returns empty string when fare is nil" do assert price(nil) == "" end - - test "returns appropriate string when WorldCup is the price" do - assert price("WorldCup") == ~t(Special ticket required) - end end describe "media/1" do From db222aca58e5f8208530d484e309f974eff99af3 Mon Sep 17 00:00:00 2001 From: Cristen Jones Date: Thu, 12 Nov 2026 23:09:28 -0500 Subject: [PATCH 2/2] fixup: adjust translations --- priv/gettext/dotcom.pot | 5 ----- priv/gettext/en/LC_MESSAGES/dotcom.po | 5 ----- priv/gettext/es/LC_MESSAGES/dotcom.po | 5 ----- priv/gettext/fr-FR/LC_MESSAGES/dotcom.po | 5 ----- priv/gettext/ht/LC_MESSAGES/dotcom.po | 5 ----- priv/gettext/pt-BR/LC_MESSAGES/dotcom.po | 5 ----- priv/gettext/vi/LC_MESSAGES/dotcom.po | 5 ----- priv/gettext/zh-CN/LC_MESSAGES/dotcom.po | 5 ----- priv/gettext/zh-TW/LC_MESSAGES/dotcom.po | 5 ----- 9 files changed, 45 deletions(-) diff --git a/priv/gettext/dotcom.pot b/priv/gettext/dotcom.pot index 344c7e651f..1d848731e6 100644 --- a/priv/gettext/dotcom.pot +++ b/priv/gettext/dotcom.pot @@ -3873,11 +3873,6 @@ msgstr "" msgid "Special Event Ticket" msgstr "" -#: lib/fares/format.ex -#, elixir-autogen, elixir-format -msgid "Special ticket required" -msgstr "" - #: lib/dotcom_web/live/subway_alerts_live.ex #, elixir-autogen, elixir-format msgid "Station & Service Alerts" diff --git a/priv/gettext/en/LC_MESSAGES/dotcom.po b/priv/gettext/en/LC_MESSAGES/dotcom.po index ec7c8335b9..d4784aca34 100644 --- a/priv/gettext/en/LC_MESSAGES/dotcom.po +++ b/priv/gettext/en/LC_MESSAGES/dotcom.po @@ -3873,11 +3873,6 @@ msgstr "" msgid "Special Event Ticket" msgstr "" -#: lib/fares/format.ex -#, elixir-autogen, elixir-format -msgid "Special ticket required" -msgstr "" - #: lib/dotcom_web/live/subway_alerts_live.ex #, elixir-autogen, elixir-format msgid "Station & Service Alerts" diff --git a/priv/gettext/es/LC_MESSAGES/dotcom.po b/priv/gettext/es/LC_MESSAGES/dotcom.po index 0ca5b3dd79..4b3e3099eb 100644 --- a/priv/gettext/es/LC_MESSAGES/dotcom.po +++ b/priv/gettext/es/LC_MESSAGES/dotcom.po @@ -3890,11 +3890,6 @@ msgstr "Dirección sur" msgid "Special Event Ticket" msgstr "Boleto de Eventos Especiales" -#: lib/fares/format.ex -#, elixir-autogen, elixir-format -msgid "Special ticket required" -msgstr "Se requiere boleto especial" - #: lib/dotcom_web/live/subway_alerts_live.ex #, elixir-autogen, elixir-format msgid "Station & Service Alerts" diff --git a/priv/gettext/fr-FR/LC_MESSAGES/dotcom.po b/priv/gettext/fr-FR/LC_MESSAGES/dotcom.po index 9fde525886..f4d0c9ea22 100644 --- a/priv/gettext/fr-FR/LC_MESSAGES/dotcom.po +++ b/priv/gettext/fr-FR/LC_MESSAGES/dotcom.po @@ -3891,11 +3891,6 @@ msgstr "Direction sud" msgid "Special Event Ticket" msgstr "Poste d’événement spécial" -#: lib/fares/format.ex -#, elixir-autogen, elixir-format -msgid "Special ticket required" -msgstr "Poste spécial requis" - #: lib/dotcom_web/live/subway_alerts_live.ex #, elixir-autogen, elixir-format msgid "Station & Service Alerts" diff --git a/priv/gettext/ht/LC_MESSAGES/dotcom.po b/priv/gettext/ht/LC_MESSAGES/dotcom.po index 271726b4f9..b9cfdc47be 100644 --- a/priv/gettext/ht/LC_MESSAGES/dotcom.po +++ b/priv/gettext/ht/LC_MESSAGES/dotcom.po @@ -3880,11 +3880,6 @@ msgstr "Direksyon sid" msgid "Special Event Ticket" msgstr "Tikè pou evènman espesyal" -#: lib/fares/format.ex -#, elixir-autogen, elixir-format -msgid "Special ticket required" -msgstr "Tikè espesyal obligatwa" - #: lib/dotcom_web/live/subway_alerts_live.ex #, elixir-autogen, elixir-format msgid "Station & Service Alerts" diff --git a/priv/gettext/pt-BR/LC_MESSAGES/dotcom.po b/priv/gettext/pt-BR/LC_MESSAGES/dotcom.po index f64856bcf9..927b62a4e8 100644 --- a/priv/gettext/pt-BR/LC_MESSAGES/dotcom.po +++ b/priv/gettext/pt-BR/LC_MESSAGES/dotcom.po @@ -3887,11 +3887,6 @@ msgstr "Sentido sul" msgid "Special Event Ticket" msgstr "Evento Especial" -#: lib/fares/format.ex -#, elixir-autogen, elixir-format -msgid "Special ticket required" -msgstr "É necessário um requisito especial." - #: lib/dotcom_web/live/subway_alerts_live.ex #, elixir-autogen, elixir-format msgid "Station & Service Alerts" diff --git a/priv/gettext/vi/LC_MESSAGES/dotcom.po b/priv/gettext/vi/LC_MESSAGES/dotcom.po index 914bd91b8f..973e736163 100644 --- a/priv/gettext/vi/LC_MESSAGES/dotcom.po +++ b/priv/gettext/vi/LC_MESSAGES/dotcom.po @@ -3882,11 +3882,6 @@ msgstr "Hướng Nam" msgid "Special Event Ticket" msgstr "Special Event vé" -#: lib/fares/format.ex -#, elixir-autogen, elixir-format -msgid "Special ticket required" -msgstr "Yêu cầu vé đặc biệt" - #: lib/dotcom_web/live/subway_alerts_live.ex #, elixir-autogen, elixir-format msgid "Station & Service Alerts" diff --git a/priv/gettext/zh-CN/LC_MESSAGES/dotcom.po b/priv/gettext/zh-CN/LC_MESSAGES/dotcom.po index 9a1b9ef592..93f2be9d3b 100644 --- a/priv/gettext/zh-CN/LC_MESSAGES/dotcom.po +++ b/priv/gettext/zh-CN/LC_MESSAGES/dotcom.po @@ -3867,11 +3867,6 @@ msgstr "南行" msgid "Special Event Ticket" msgstr "特别活动车票" -#: lib/fares/format.ex -#, elixir-autogen, elixir-format -msgid "Special ticket required" -msgstr "需要特殊车票" - #: lib/dotcom_web/live/subway_alerts_live.ex #, elixir-autogen, elixir-format msgid "Station & Service Alerts" diff --git a/priv/gettext/zh-TW/LC_MESSAGES/dotcom.po b/priv/gettext/zh-TW/LC_MESSAGES/dotcom.po index 9f47166396..bd392c2745 100644 --- a/priv/gettext/zh-TW/LC_MESSAGES/dotcom.po +++ b/priv/gettext/zh-TW/LC_MESSAGES/dotcom.po @@ -3867,11 +3867,6 @@ msgstr "南行" msgid "Special Event Ticket" msgstr "特別活動車票" -#: lib/fares/format.ex -#, elixir-autogen, elixir-format -msgid "Special ticket required" -msgstr "需要特殊車票" - #: lib/dotcom_web/live/subway_alerts_live.ex #, elixir-autogen, elixir-format msgid "Station & Service Alerts"