Skip to content

Commit

Permalink
Home, Agency Index: Use new EN/ES copy with 1 new agency variable (#1499
Browse files Browse the repository at this point in the history
)
  • Loading branch information
machikoyasuda authored Jul 7, 2023
2 parents 5c418d5 + da83af5 commit 34b17a1
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 12 deletions.
3 changes: 2 additions & 1 deletion benefits/core/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2 on 2023-07-06 23:16
# Generated by Django 4.2.2 on 2023-07-06 23:24

from django.db import migrations, models
import django.db.models.deletion
Expand Down Expand Up @@ -122,6 +122,7 @@ class Migration(migrations.Migration):
("active", models.BooleanField(default=False)),
("jws_signing_alg", models.TextField()),
("eligibility_index_intro", models.TextField()),
("transit_type", models.TextField()),
("eligibility_types", models.ManyToManyField(to="core.eligibilitytype")),
("eligibility_verifiers", models.ManyToManyField(to="core.eligibilityverifier")),
(
Expand Down
2 changes: 2 additions & 0 deletions benefits/core/migrations/0002_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ def load_data(app, *args, **kwargs):
jws_signing_alg=os.environ.get("MST_AGENCY_JWS_SIGNING_ALG", "RS256"),
payment_processor=mst_payment_processor,
eligibility_index_intro=_("eligibility.pages.index.p[0].mst"),
transit_type=_("agency.variables.mst.transit_type"),
)
mst_agency.eligibility_types.set([mst_senior_type, mst_veteran_type, mst_courtesy_card_type])
mst_agency.eligibility_verifiers.set([mst_oauth_claims_verifier, mst_veteran_verifier, mst_courtesy_card_verifier])
Expand All @@ -339,6 +340,7 @@ def load_data(app, *args, **kwargs):
jws_signing_alg=os.environ.get("SACRT_AGENCY_JWS_SIGNING_ALG", "RS256"),
payment_processor=sacrt_payment_processor,
eligibility_index_intro=_("eligibility.pages.index.p[0].sacrt"),
transit_type=_("agency.variables.sacrt.transit_type"),
)
sacrt_agency.eligibility_types.set([sacrt_senior_type])
sacrt_agency.eligibility_verifiers.set([sacrt_oauth_claims_verifier])
Expand Down
1 change: 1 addition & 0 deletions benefits/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ class TransitAgency(models.Model):
# The JWS-compatible signing algorithm
jws_signing_alg = models.TextField()
eligibility_index_intro = models.TextField()
transit_type = models.TextField()

def __str__(self):
return self.long_name
Expand Down
4 changes: 2 additions & 2 deletions benefits/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def agency_index(request, agency):

page = viewmodels.Page(
title=_("core.pages.agency_index.title"),
headline=_("core.pages.agency_index.headline%(transit_agency_short_name)s")
% {"transit_agency_short_name": agency.short_name},
headline=_("core.pages.agency_index.headline%(transit_agency_short_name_and_type)s")
% {"transit_agency_short_name_and_type": " ".join([agency.short_name, _(agency.transit_type)])},
button=button,
)

Expand Down
17 changes: 12 additions & 5 deletions benefits/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,18 @@ msgstr ""
"You can tap your credit or debit card when you board an MST bus, and your "
"discounted fare will automatically apply every time you ride. "

msgid "agency.variables.mst.transit_type"
msgstr "bus"

msgid "eligibility.pages.index.p[0].sacrt"
msgstr ""
"You can tap your credit or debit card when you board SacRT public "
"transportation, and your discounted fare will automatically apply every time "
"you ride. "

msgid "agency.variables.sacrt.transit_type"
msgstr "light rail"

msgid "core.pages.help.about.p[0]"
msgstr ""
"The Benefits tool is provided by California Integrated Travel Project (Cal-"
Expand Down Expand Up @@ -392,7 +398,8 @@ msgstr ""
"JavaScript. Please enable JavaScript for this website and"

msgid "core.pages.landing.h2"
msgstr "Your benefit applies every time you tap to ride"
msgstr ""
"Cal-ITP Benefits connects your transit benefit to your contactless card"

msgid "core.pages.logged_out.headline[0]"
msgstr "You have successfully logged out."
Expand Down Expand Up @@ -453,7 +460,7 @@ msgid "core.pages.index.title"
msgstr "Choose Provider"

msgid "core.pages.index.headline"
msgstr "Connect your transit benefit to your contactless card"
msgstr "Get reduced fare on public transportation when you tap to ride"

msgid "core.pages.index.button"
msgstr "Choose your Provider"
Expand All @@ -465,10 +472,10 @@ msgid "core.pages.agency_index.title"
msgstr "Introduction"

#, python-format
msgid "core.pages.agency_index.headline%(transit_agency_short_name)s"
msgid "core.pages.agency_index.headline%(transit_agency_short_name_and_type)s"
msgstr ""
"Connect your %(transit_agency_short_name)s transit benefit to your "
"contactless card"
"Get reduced fare on %(transit_agency_short_name_and_type)s when you tap to "
"ride"

msgid "core.buttons.back"
msgstr "Go Back"
Expand Down
15 changes: 11 additions & 4 deletions benefits/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,18 @@ msgstr ""
"Puede acercar su tarjeta de crédito o débito cuando aborde un autobús de MST "
"y su tarifa con descuento se aplicará automáticamente cada vez que viaje. "

msgid "agency.variables.mst.transit_type"
msgstr "TODO: bus"

msgid "eligibility.pages.index.p[0].sacrt"
msgstr ""
"Puede acercar su tarjeta de crédito o débito cuando aborde el transporte "
"público SacRT y su tarifa con descuento se aplicará automáticamente cada vez "
"que viaje. "

msgid "agency.variables.sacrt.transit_type"
msgstr "TODO: light rail"

msgid "core.pages.help.about.p[0]"
msgstr ""
"La herramienta de Beneficios es proporcionada por California Integrated "
Expand Down Expand Up @@ -468,7 +474,8 @@ msgid "core.pages.index.title"
msgstr "Elija Proveedor"

msgid "core.pages.index.headline"
msgstr "Conecte su beneficio del transporte a su tarjeta de sin contacto"
msgstr ""
"Obtenga una tarifa reducida en el transporte público cuando toque para viajar"

msgid "core.pages.index.button"
msgstr "Elija su Proveedor"
Expand All @@ -480,10 +487,10 @@ msgid "core.pages.agency_index.title"
msgstr "Introducción"

#, python-format
msgid "core.pages.agency_index.headline%(transit_agency_short_name)s"
msgid "core.pages.agency_index.headline%(transit_agency_short_name_and_type)s"
msgstr ""
"Conecte su beneficio del transporte de %(transit_agency_short_name)s a su "
"tarjeta de sin contacto"
"Obtenga una tarifa reducida en el transporte público "
"%(transit_agency_short_name_and_type)s a cuando toque para viajar"

msgid "core.buttons.back"
msgstr "Regresar a la Página Principal"
Expand Down

0 comments on commit 34b17a1

Please sign in to comment.