From a4bfd43f600f833b6b57221b064d15059d450ad8 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Tue, 5 Apr 2022 17:37:30 +0000 Subject: [PATCH 01/11] refactor(help): remove links to core:payment_options and view/template Change the one on the enrollment index to point to core:help. --- benefits/core/templates/core/base.html | 1 - .../core/templates/core/payment-options.html | 20 ------------------- benefits/core/urls.py | 1 - benefits/core/views.py | 16 +-------------- benefits/enrollment/views.py | 4 +--- 5 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 benefits/core/templates/core/payment-options.html diff --git a/benefits/core/templates/core/base.html b/benefits/core/templates/core/base.html index 8ff05d23f..fcbbbdb6e 100644 --- a/benefits/core/templates/core/base.html +++ b/benefits/core/templates/core/base.html @@ -65,7 +65,6 @@
diff --git a/benefits/core/templates/core/payment-options.html b/benefits/core/templates/core/payment-options.html deleted file mode 100644 index c938ff06c..000000000 --- a/benefits/core/templates/core/payment-options.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "core/page.html" %} -{% load i18n %} -{% load static %} -{% block paragraph_content %} -

{% translate "core.pages.payment_options.p[0]" %}

-

- {% translate -

-

{% translate "core.pages.payment_options.p[1]" %}:

-
    -
  • {% translate "core.pages.payment_options.options.creditcard" %}
  • -
  • {% translate "core.pages.payment_options.options.debitcard" %}
  • -
-

{% translate "core.pages.payment_options.p[2]" %}

-

{% translate "core.pages.payment_options.p[3]" %} - Cash App Visa Debit Card - {% translate "core.pages.payment_options.or" %} - Venmo Mastercard Debit Card.

-

{% translate "core.pages.payment_options.p[4]" %}

-{% endblock %} diff --git a/benefits/core/urls.py b/benefits/core/urls.py index 0d799ff85..23ba7c702 100644 --- a/benefits/core/urls.py +++ b/benefits/core/urls.py @@ -46,6 +46,5 @@ def to_url(self, agency): urlpatterns = [ path("", views.index, name="index"), path("help", views.help, name="help"), - path("payment-options", views.payment_options, name="payment_options"), path("", views.agency_index, name="agency_index"), ] diff --git a/benefits/core/views.py b/benefits/core/views.py index 5e9030a78..3eda36b8d 100644 --- a/benefits/core/views.py +++ b/benefits/core/views.py @@ -5,7 +5,7 @@ from django.template import loader from django.template.response import TemplateResponse from django.urls import reverse -from django.utils.translation import pgettext, gettext as _ +from django.utils.translation import gettext as _ from . import middleware, models, session, viewmodels @@ -90,20 +90,6 @@ def help(request): return TemplateResponse(request, "core/help.html", page.context_dict()) -@middleware.pageview_decorator -def payment_options(request): - """View handler for the Payment Options page.""" - page = viewmodels.Page( - title=_("core.buttons.payment_options"), - icon=viewmodels.Icon("bankcard", pgettext("image alt text", "core.icons.bankcard")), - content_title=_("core.buttons.payment_options"), - buttons=viewmodels.Button.home(request, text=_("core.buttons.back")), - noimage=True, - ) - - return TemplateResponse(request, "core/payment-options.html", page.context_dict()) - - @middleware.pageview_decorator def bad_request(request, exception, template_name="400.html"): """View handler for HTTP 400 Bad Request responses.""" diff --git a/benefits/enrollment/views.py b/benefits/enrollment/views.py index 6db1c0141..dfbd882ef 100644 --- a/benefits/enrollment/views.py +++ b/benefits/enrollment/views.py @@ -36,9 +36,7 @@ def _index(request): viewmodels.Button.primary( text=_("enrollment.buttons.payment_partner"), id=tokenize_button, url=f"#{tokenize_button}" ), - viewmodels.Button.link( - classes="btn-sm", text=_("enrollment.buttons.payment_options"), url=reverse("core:payment_options") - ), + viewmodels.Button.link(classes="btn-sm", text=_("enrollment.buttons.payment_options"), url=reverse("core:help")), ], ) context = {} From d27c4fbe47a94736dd65bdd580f19017a07fc531 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Tue, 5 Apr 2022 21:00:40 +0000 Subject: [PATCH 02/11] refactor(help): update core/help.html to have specific sections Remove the paragraphs from being specified on the viewmodel since they won't be used. --- benefits/core/templates/core/help.html | 36 ++++++++++++ benefits/core/views.py | 1 - benefits/locale/en/LC_MESSAGES/django.po | 71 +++++++++++++++++++++-- benefits/locale/es/LC_MESSAGES/django.po | 72 ++++++++++++++++++++++-- 4 files changed, 168 insertions(+), 12 deletions(-) diff --git a/benefits/core/templates/core/help.html b/benefits/core/templates/core/help.html index 9e5e191c7..7afa4b287 100644 --- a/benefits/core/templates/core/help.html +++ b/benefits/core/templates/core/help.html @@ -1,7 +1,43 @@ {% extends "core/page.html" %} {% load i18n %} +{% load static %} {% block container_content %} + +{% block icon_title %} {{ block.super }} +{% endblock %} + +

{% translate "core.pages.help.header[0]" %}

+

{% translate "core.pages.help.header[0].p[0]" %}

+

{% translate "core.pages.help.header[0].p[1]" %}

+ +

{% translate "core.pages.help.header[1]" %}

+

{% translate "core.pages.help.header[1].p[0]" %}

+ +

+ {% translate +

+ +

{% translate "core.pages.help.header[1].p[1]" %}

+

{% translate "core.pages.help.header[1].p[2]" %}

+

{% translate "core.pages.help.header[1].p[3]" %}

+ +

{% translate "core.pages.help.header[2]" %}

+

{% translate "core.pages.help.header[2].p[0]" %}

+

{% translate "core.pages.help.header[2].p[1]" %}

+

{% translate "core.pages.help.header[2].p[2]" %}

+ +

{% translate "core.pages.help.header[3]" %}

+

{% translate "core.pages.help.header[3].p[0]" %}

+

{% translate "core.pages.help.header[3].p[1]" %}

+ +

{% translate "core.pages.help.header[4]" %}

+

{% translate "core.pages.help.header[4].p[0]" %}

+ +{% block buttons %} +{{ block.super }} +{% endblock %} +

{% translate "core.pages.help.foss.text" %} {% translate "core.pages.help.foss.link" %}. diff --git a/benefits/core/views.py b/benefits/core/views.py index 3eda36b8d..a0e5f7c8c 100644 --- a/benefits/core/views.py +++ b/benefits/core/views.py @@ -81,7 +81,6 @@ def help(request): page = viewmodels.Page( title=_("core.buttons.help"), content_title=_("core.buttons.help"), - paragraphs=[_("core.pages.help.p[0]"), _("core.pages.help.p[1]")], buttons=buttons, classes="text-lg-center", noimage=True, diff --git a/benefits/locale/en/LC_MESSAGES/django.po b/benefits/locale/en/LC_MESSAGES/django.po index 0c2bdedd0..000ced248 100644 --- a/benefits/locale/en/LC_MESSAGES/django.po +++ b/benefits/locale/en/LC_MESSAGES/django.po @@ -13,13 +13,74 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +msgid "core.pages.help.header[0]" +msgstr "What is CAL-ITP Benefits?" + #: benefits/core/templates/core/base.html:9 benefits/core/views.py:91 -msgid "core.pages.help.p[0]" +msgid "core.pages.help.header[0].p[0]" +msgstr "" +"The Benefits tool is provided by California Integrated Travel Project " +"(Cal-ITP), which is a new program from the California Department of " +"Transportation dedicated to making travel simpler and cost effective for all." + +msgid "core.pages.help.header[0].p[1]" msgstr "" -"Cal-ITP is a new project from the California Department of Transportation. " -"We partner with the California DMV to confirm age for age-based discounts. " -"We partner with Littlepay to attach your discount to your bank card so that " -"when you pay for your transit ride, you get your discount automatically." +"We partner with the California DMV to confirm age for age-based discounts and " +"local transporation agencies to confirm specific discount programs. Once verified, " +"discounts are attached to your bank card through our payment partner, Littlepay so " +"that when you pay for your transit ride, you get your discount automatically." + +msgid "core.pages.help.header[1]" +msgstr "Payment options" + +msgid "core.pages.help.header[1].p[0]" +msgstr "In order to activate your discount, you need a bank card that has the " +"contactless symbol on it. The contactless symbol is four curved lines that looks like this:" + +msgid "core.pages.help.header[1].p[1]" +msgstr "A contactless bank card can be a credit card or a debit card and must " +"include a Visa or Mastercard logo." + +msgid "core.pages.help.header[1].p[2]" +msgstr "We are working to add additional options for people who do not have access " +"to a bank card. However, you can still get your discount by going through your " +"local transit provider's application process." + +msgid "core.pages.help.header[1].p[3]" +msgstr "For updates on additional options, please check back on this website, or " +"get in touch with your local transit provider." + +msgid "core.pages.help.header[2]" +msgstr "What is Login.gov?" + +msgid "core.pages.help.header[2].p[0]" +msgstr "Login.gov is a secure way to sign in to participating government agencies. " +"You can use your Login.gov account to access all of the benefits offered through Cal-ITP." + +msgid "core.pages.help.header[2].p[1]" +msgstr "Creating an account is simple. You will need an email address and method for " +"authenticating your account—which will use either a landline, mobile phone, or " +"backup codes that must be printed or written down." + +msgid "core.pages.help.header[2].p[2]" +msgstr "For more information on Login.gov, check out their website." + +msgid "core.pages.help.header[3]" +msgstr "What is Littlepay?" + +msgid "core.pages.help.header[3].p[0]" +msgstr "Our payment partner, Littlepay is a secure, end-to-end payment processing " +"platform that allows us to seamlessly attach your transit discount to your bank card." + +msgid "core.pages.help.header[3].p[1]" +msgstr "For more information on Littlepay, check out their website." + +msgid "core.pages.help.header[4]" +msgstr "Questions?" + +msgid "core.pages.help.header[4].p[0]" +msgstr "If you need assistance with this website, please reach out to the customer " +"service team for your local transit provider." #: benefits/core/templates/core/base.html:24 msgid "core.buttons.skip" diff --git a/benefits/locale/es/LC_MESSAGES/django.po b/benefits/locale/es/LC_MESSAGES/django.po index 93e186b89..1f15a9421 100644 --- a/benefits/locale/es/LC_MESSAGES/django.po +++ b/benefits/locale/es/LC_MESSAGES/django.po @@ -13,14 +13,74 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +msgid "core.pages.help.header[0]" +msgstr "TODO: What is CAL-ITP Benefits?" + #: benefits/core/templates/core/base.html:9 benefits/core/views.py:91 -msgid "core.pages.help.p[0]" +msgid "core.pages.help.header[0].p[0]" +msgstr "" +"TODO: The Benefits tool is provided by California Integrated Travel Project " +"(Cal-ITP), which is a new program from the California Department of " +"Transportation dedicated to making travel simpler and cost effective for all." + +msgid "core.pages.help.header[0].p[1]" msgstr "" -"Cal-ITP es un nuevo proyecto del Departamento de Transporte de California. " -"Nos asociamos con el DMV de California para confirmar la edad para los " -"descuentos. Nos asociamos con Littlepay para conectar el descuento con su " -"tarjeta bancaria y así, cuando pague el transporte público, obtenga su " -"descuento automáticamente." +"TODO: We partner with the California DMV to confirm age for age-based discounts and " +"local transporation agencies to confirm specific discount programs. Once verified, " +"discounts are attached to your bank card through our payment partner, Littlepay so " +"that when you pay for your transit ride, you get your discount automatically." + +msgid "core.pages.help.header[1]" +msgstr "TODO: Payment options" + +msgid "core.pages.help.header[1].p[0]" +msgstr "TODO: In order to activate your discount, you need a bank card that has the " +"contactless symbol on it. The contactless symbol is four curved lines that looks like this:" + +msgid "core.pages.help.header[1].p[1]" +msgstr "TODO: A contactless bank card can be a credit card or a debit card and must " +"include a Visa or Mastercard logo." + +msgid "core.pages.help.header[1].p[2]" +msgstr "TODO: We are working to add additional options for people who do not have access " +"to a bank card. However, you can still get your discount by going through your " +"local transit provider's application process." + +msgid "core.pages.help.header[1].p[3]" +msgstr "TODO: For updates on additional options, please check back on this website, or " +"get in touch with your local transit provider." + +msgid "core.pages.help.header[2]" +msgstr "TODO: What is Login.gov?" + +msgid "core.pages.help.header[2].p[0]" +msgstr "TODO: Login.gov is a secure way to sign in to participating government agencies. " +"You can use your Login.gov account to access all of the benefits offered through Cal-ITP." + +msgid "core.pages.help.header[2].p[1]" +msgstr "TODO: Creating an account is simple. You will need an email address and method for " +"authenticating your account—which will use either a landline, mobile phone, or " +"backup codes that must be printed or written down." + +msgid "core.pages.help.header[2].p[2]" +msgstr "TODO: For more information on Login.gov, check out their website." + +msgid "core.pages.help.header[3]" +msgstr "TODO: What is Littlepay?" + +msgid "core.pages.help.header[3].p[0]" +msgstr "TODO: Our payment partner, Littlepay is a secure, end-to-end payment processing " +"platform that allows us to seamlessly attach your transit discount to your bank card." + +msgid "core.pages.help.header[3].p[1]" +msgstr "TODO: For more information on Littlepay, check out their website." + +msgid "core.pages.help.header[4]" +msgstr "TODO: Questions?" + +msgid "core.pages.help.header[4].p[0]" +msgstr "TODO: If you need assistance with this website, please reach out to the customer " +"service team for your local transit provider." #: benefits/core/templates/core/base.html:24 msgid "core.buttons.skip" From fdfff80b7675fa839f7460109af01f41fa12a470 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Wed, 6 Apr 2022 14:10:11 +0000 Subject: [PATCH 03/11] feat(help): add links for certain messages using blocktranslate --- benefits/core/templates/core/help.html | 4 ++-- benefits/locale/en/LC_MESSAGES/django.po | 8 ++++---- benefits/locale/es/LC_MESSAGES/django.po | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/benefits/core/templates/core/help.html b/benefits/core/templates/core/help.html index 7afa4b287..73cd3044e 100644 --- a/benefits/core/templates/core/help.html +++ b/benefits/core/templates/core/help.html @@ -25,11 +25,11 @@

{% translate "core.pages.help.header[1]" %}

{% translate "core.pages.help.header[2]" %}

{% translate "core.pages.help.header[2].p[0]" %}

{% translate "core.pages.help.header[2].p[1]" %}

-

{% translate "core.pages.help.header[2].p[2]" %}

+

{% blocktranslate with website="https://login.gov"%}core.pages.help.header[2].p[2]{{ website }}{% endblocktranslate %}

{% translate "core.pages.help.header[3]" %}

{% translate "core.pages.help.header[3].p[0]" %}

-

{% translate "core.pages.help.header[3].p[1]" %}

+

{% blocktranslate with website="https://littlepay.com" %}core.pages.help.header[3].p[1]{{ website }}{% endblocktranslate %}

{% translate "core.pages.help.header[4]" %}

{% translate "core.pages.help.header[4].p[0]" %}

diff --git a/benefits/locale/en/LC_MESSAGES/django.po b/benefits/locale/en/LC_MESSAGES/django.po index 000ced248..073532b67 100644 --- a/benefits/locale/en/LC_MESSAGES/django.po +++ b/benefits/locale/en/LC_MESSAGES/django.po @@ -62,8 +62,8 @@ msgstr "Creating an account is simple. You will need an email address and method "authenticating your account—which will use either a landline, mobile phone, or " "backup codes that must be printed or written down." -msgid "core.pages.help.header[2].p[2]" -msgstr "For more information on Login.gov, check out their website." +msgid "core.pages.help.header[2].p[2]%(website)s" +msgstr "For more information on Login.gov, check out their website." msgid "core.pages.help.header[3]" msgstr "What is Littlepay?" @@ -72,8 +72,8 @@ msgid "core.pages.help.header[3].p[0]" msgstr "Our payment partner, Littlepay is a secure, end-to-end payment processing " "platform that allows us to seamlessly attach your transit discount to your bank card." -msgid "core.pages.help.header[3].p[1]" -msgstr "For more information on Littlepay, check out their website." +msgid "core.pages.help.header[3].p[1]%(website)s" +msgstr "For more information on Littlepay, check out their website." msgid "core.pages.help.header[4]" msgstr "Questions?" diff --git a/benefits/locale/es/LC_MESSAGES/django.po b/benefits/locale/es/LC_MESSAGES/django.po index 1f15a9421..5a5ab84bf 100644 --- a/benefits/locale/es/LC_MESSAGES/django.po +++ b/benefits/locale/es/LC_MESSAGES/django.po @@ -62,8 +62,8 @@ msgstr "TODO: Creating an account is simple. You will need an email address and "authenticating your account—which will use either a landline, mobile phone, or " "backup codes that must be printed or written down." -msgid "core.pages.help.header[2].p[2]" -msgstr "TODO: For more information on Login.gov, check out their website." +msgid "core.pages.help.header[2].p[2]%(website)s" +msgstr "TODO: For more information on Login.gov, check out their website." msgid "core.pages.help.header[3]" msgstr "TODO: What is Littlepay?" @@ -72,8 +72,8 @@ msgid "core.pages.help.header[3].p[0]" msgstr "TODO: Our payment partner, Littlepay is a secure, end-to-end payment processing " "platform that allows us to seamlessly attach your transit discount to your bank card." -msgid "core.pages.help.header[3].p[1]" -msgstr "TODO: For more information on Littlepay, check out their website." +msgid "core.pages.help.header[3].p[1]%(website)s" +msgstr "TODO: For more information on Littlepay, check out their website." msgid "core.pages.help.header[4]" msgstr "TODO: Questions?" From 3002bfaea95151513ca7259dda56ce82e9fb6839 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Wed, 6 Apr 2022 14:43:23 +0000 Subject: [PATCH 04/11] refactor(tests): remove Payment Options tests that no longer apply --- tests/cypress/specs/ui/index.spec.js | 4 ---- .../cypress/specs/ui/payment-options.spec.js | 22 ------------------- 2 files changed, 26 deletions(-) delete mode 100644 tests/cypress/specs/ui/payment-options.spec.js diff --git a/tests/cypress/specs/ui/index.spec.js b/tests/cypress/specs/ui/index.spec.js index 1fe2ddcde..7239d79ab 100644 --- a/tests/cypress/specs/ui/index.spec.js +++ b/tests/cypress/specs/ui/index.spec.js @@ -27,10 +27,6 @@ describe("Index page spec", () => { }); }); - it("Has a payment options page link", () => { - cy.contains("Payment Options"); - }); - it("Has a help page link", () => { cy.contains("Help"); }); diff --git a/tests/cypress/specs/ui/payment-options.spec.js b/tests/cypress/specs/ui/payment-options.spec.js deleted file mode 100644 index 36f6055a6..000000000 --- a/tests/cypress/specs/ui/payment-options.spec.js +++ /dev/null @@ -1,22 +0,0 @@ -describe("Payment Options page spec", () => { - beforeEach(() => { - cy.visit("/"); - cy.contains("Payment Options").click(); - }); - - it("Clicking on Payment Options takes user to Payment Options", () => { - cy.location("pathname").should("eq", "/payment-options"); - }); - - it("Contains a back link", () => { - cy.contains("Go back").then(($e) => { - expect($e).attr("href").eql("/"); - }); - }); - - it("Allows user to go back", () => { - cy.contains("Go back").click(); - - cy.location("pathname").should("eq", "/"); - }); -}); From 05192399c77e850f1f3be151f2588b12016aca5b Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Thu, 7 Apr 2022 19:29:34 +0000 Subject: [PATCH 05/11] feat(tests): add UI tests for new Help page sections --- tests/cypress/specs/ui/help.spec.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/cypress/specs/ui/help.spec.js b/tests/cypress/specs/ui/help.spec.js index d06b34e79..122288297 100644 --- a/tests/cypress/specs/ui/help.spec.js +++ b/tests/cypress/specs/ui/help.spec.js @@ -47,4 +47,22 @@ describe("Help page spec", () => { cy.should("not.contain", otherAgency.fields.long_name); cy.should("not.contain", otherAgency.fields.phone); }); + + it("Has headers that all have ids to be used for anchor links", () => { + cy.contains("Help").click(); + + cy.get("h2").each(($el, index, $list) => { + cy.wrap($el[0].attributes).its("id").should("exist"); + }); + }); + + it("Has the expected headers", () => { + cy.contains("Help").click(); + + cy.get("h2").contains("What is CAL-ITP Benefits?"); + cy.get("h2").contains("Payment options"); + cy.get("h2").contains("What is Login.gov?"); + cy.get("h2").contains("What is Littlepay?"); + cy.get("h2").contains("Questions?"); + }); }); From fd40a2c6bf691e4f810a4f9bb17d889effc2a131 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Thu, 7 Apr 2022 23:23:31 +0000 Subject: [PATCH 06/11] feat(help/styles): make help.html override parent 'main_content' block This is to center the title and adjust the margins to better match the Figma mockup. --- benefits/core/templates/core/help.html | 7 +++++++ benefits/static/css/styles.css | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/benefits/core/templates/core/help.html b/benefits/core/templates/core/help.html index 73cd3044e..3619c6c22 100644 --- a/benefits/core/templates/core/help.html +++ b/benefits/core/templates/core/help.html @@ -1,6 +1,10 @@ {% extends "core/page.html" %} {% load i18n %} {% load static %} + +{% block main_content%} +
+
{% block container_content %} {% block icon_title %} @@ -42,4 +46,7 @@

{% translate "core.pages.help.header[4]" %}

{% translate "core.pages.help.foss.text" %} {% translate "core.pages.help.foss.link" %}.

+{% endblock %} +
+
{% endblock %} diff --git a/benefits/static/css/styles.css b/benefits/static/css/styles.css index 8b810a8bf..6415b061a 100644 --- a/benefits/static/css/styles.css +++ b/benefits/static/css/styles.css @@ -259,6 +259,25 @@ footer .footer-links a { margin-bottom: 1rem; } +.container.content.help { + margin-top: 4rem; +} + +.container.content.help h1 { + text-align: center; + margin-top: 5.5rem; + margin-bottom: 4rem; +} + +.container.content.help h2 { + margin-bottom: 3rem; + margin-top: 3rem; +} + +.container.content.help p { + margin-bottom: 2rem; +} + .container.content h1 ~ p:nth-last-of-type(1) { margin-bottom: 2rem; } From 3e57711f54937ff8551e880cc3f882dbade995a8 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Fri, 8 Apr 2022 00:10:49 +0000 Subject: [PATCH 07/11] fix(copy): change Cal-ITP to use correct casing --- benefits/locale/en/LC_MESSAGES/django.po | 2 +- benefits/locale/es/LC_MESSAGES/django.po | 2 +- tests/cypress/specs/ui/help.spec.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benefits/locale/en/LC_MESSAGES/django.po b/benefits/locale/en/LC_MESSAGES/django.po index 073532b67..8be00a183 100644 --- a/benefits/locale/en/LC_MESSAGES/django.po +++ b/benefits/locale/en/LC_MESSAGES/django.po @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" msgid "core.pages.help.header[0]" -msgstr "What is CAL-ITP Benefits?" +msgstr "What is Cal-ITP Benefits?" #: benefits/core/templates/core/base.html:9 benefits/core/views.py:91 msgid "core.pages.help.header[0].p[0]" diff --git a/benefits/locale/es/LC_MESSAGES/django.po b/benefits/locale/es/LC_MESSAGES/django.po index 5a5ab84bf..a753daed4 100644 --- a/benefits/locale/es/LC_MESSAGES/django.po +++ b/benefits/locale/es/LC_MESSAGES/django.po @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" msgid "core.pages.help.header[0]" -msgstr "TODO: What is CAL-ITP Benefits?" +msgstr "TODO: What is Cal-ITP Benefits?" #: benefits/core/templates/core/base.html:9 benefits/core/views.py:91 msgid "core.pages.help.header[0].p[0]" diff --git a/tests/cypress/specs/ui/help.spec.js b/tests/cypress/specs/ui/help.spec.js index 122288297..19cb4cfac 100644 --- a/tests/cypress/specs/ui/help.spec.js +++ b/tests/cypress/specs/ui/help.spec.js @@ -59,7 +59,7 @@ describe("Help page spec", () => { it("Has the expected headers", () => { cy.contains("Help").click(); - cy.get("h2").contains("What is CAL-ITP Benefits?"); + cy.get("h2").contains("What is Cal-ITP Benefits?"); cy.get("h2").contains("Payment options"); cy.get("h2").contains("What is Login.gov?"); cy.get("h2").contains("What is Littlepay?"); From acefd33f2a35799983bc259fe0d1d8bab3e5630c Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Fri, 8 Apr 2022 16:55:32 +0000 Subject: [PATCH 08/11] chore(templates): replace use of parent block with exact HTML instead --- benefits/core/templates/core/help.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/benefits/core/templates/core/help.html b/benefits/core/templates/core/help.html index 3619c6c22..ec3fabaa7 100644 --- a/benefits/core/templates/core/help.html +++ b/benefits/core/templates/core/help.html @@ -7,9 +7,7 @@
{% block container_content %} -{% block icon_title %} -{{ block.super }} -{% endblock %} +

{{ page.content_title }}

{% translate "core.pages.help.header[0]" %}

{% translate "core.pages.help.header[0].p[0]" %}

From 4f5abf0432b6c9d91bcc218c85387306410c8ed1 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Fri, 8 Apr 2022 17:39:04 +0000 Subject: [PATCH 09/11] refactor(i18n): rename with more descriptive msgids for help sections --- benefits/core/templates/core/help.html | 34 ++++++++++++------------ benefits/locale/en/LC_MESSAGES/django.po | 34 ++++++++++++------------ benefits/locale/es/LC_MESSAGES/django.po | 34 ++++++++++++------------ 3 files changed, 51 insertions(+), 51 deletions(-) diff --git a/benefits/core/templates/core/help.html b/benefits/core/templates/core/help.html index ec3fabaa7..af8f7b657 100644 --- a/benefits/core/templates/core/help.html +++ b/benefits/core/templates/core/help.html @@ -9,32 +9,32 @@

{{ page.content_title }}

-

{% translate "core.pages.help.header[0]" %}

-

{% translate "core.pages.help.header[0].p[0]" %}

-

{% translate "core.pages.help.header[0].p[1]" %}

+

{% translate "core.pages.help.about" %}

+

{% translate "core.pages.help.about.p[0]" %}

+

{% translate "core.pages.help.about.p[1]" %}

-

{% translate "core.pages.help.header[1]" %}

-

{% translate "core.pages.help.header[1].p[0]" %}

+

{% translate "core.pages.help.payment_options" %}

+

{% translate "core.pages.help.payment_options.p[0]" %}

{% translate

-

{% translate "core.pages.help.header[1].p[1]" %}

-

{% translate "core.pages.help.header[1].p[2]" %}

-

{% translate "core.pages.help.header[1].p[3]" %}

+

{% translate "core.pages.help.payment_options.p[1]" %}

+

{% translate "core.pages.help.payment_options.p[2]" %}

+

{% translate "core.pages.help.payment_options.p[3]" %}

-

{% translate "core.pages.help.header[2]" %}

-

{% translate "core.pages.help.header[2].p[0]" %}

-

{% translate "core.pages.help.header[2].p[1]" %}

-

{% blocktranslate with website="https://login.gov"%}core.pages.help.header[2].p[2]{{ website }}{% endblocktranslate %}

+

{% translate "core.pages.help.login_gov" %}

+

{% translate "core.pages.help.login_gov.p[0]" %}

+

{% translate "core.pages.help.login_gov.p[1]" %}

+

{% blocktranslate with website="https://login.gov"%}core.pages.help.login_gov.p[2]{{ website }}{% endblocktranslate %}

-

{% translate "core.pages.help.header[3]" %}

-

{% translate "core.pages.help.header[3].p[0]" %}

-

{% blocktranslate with website="https://littlepay.com" %}core.pages.help.header[3].p[1]{{ website }}{% endblocktranslate %}

+

{% translate "core.pages.help.littlepay" %}

+

{% translate "core.pages.help.littlepay.p[0]" %}

+

{% blocktranslate with website="https://littlepay.com" %}core.pages.help.littlepay.p[1]{{ website }}{% endblocktranslate %}

-

{% translate "core.pages.help.header[4]" %}

-

{% translate "core.pages.help.header[4].p[0]" %}

+

{% translate "core.pages.help.questions" %}

+

{% translate "core.pages.help.questions.p[0]" %}

{% block buttons %} {{ block.super }} diff --git a/benefits/locale/en/LC_MESSAGES/django.po b/benefits/locale/en/LC_MESSAGES/django.po index 8be00a183..b85e57de6 100644 --- a/benefits/locale/en/LC_MESSAGES/django.po +++ b/benefits/locale/en/LC_MESSAGES/django.po @@ -13,72 +13,72 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "core.pages.help.header[0]" +msgid "core.pages.help.about" msgstr "What is Cal-ITP Benefits?" #: benefits/core/templates/core/base.html:9 benefits/core/views.py:91 -msgid "core.pages.help.header[0].p[0]" +msgid "core.pages.help.about.p[0]" msgstr "" "The Benefits tool is provided by California Integrated Travel Project " "(Cal-ITP), which is a new program from the California Department of " "Transportation dedicated to making travel simpler and cost effective for all." -msgid "core.pages.help.header[0].p[1]" +msgid "core.pages.help.about.p[1]" msgstr "" "We partner with the California DMV to confirm age for age-based discounts and " "local transporation agencies to confirm specific discount programs. Once verified, " "discounts are attached to your bank card through our payment partner, Littlepay so " "that when you pay for your transit ride, you get your discount automatically." -msgid "core.pages.help.header[1]" +msgid "core.pages.help.payment_options" msgstr "Payment options" -msgid "core.pages.help.header[1].p[0]" +msgid "core.pages.help.payment_options.p[0]" msgstr "In order to activate your discount, you need a bank card that has the " "contactless symbol on it. The contactless symbol is four curved lines that looks like this:" -msgid "core.pages.help.header[1].p[1]" +msgid "core.pages.help.payment_options.p[1]" msgstr "A contactless bank card can be a credit card or a debit card and must " "include a Visa or Mastercard logo." -msgid "core.pages.help.header[1].p[2]" +msgid "core.pages.help.payment_options.p[2]" msgstr "We are working to add additional options for people who do not have access " "to a bank card. However, you can still get your discount by going through your " "local transit provider's application process." -msgid "core.pages.help.header[1].p[3]" +msgid "core.pages.help.payment_options.p[3]" msgstr "For updates on additional options, please check back on this website, or " "get in touch with your local transit provider." -msgid "core.pages.help.header[2]" +msgid "core.pages.help.login_gov" msgstr "What is Login.gov?" -msgid "core.pages.help.header[2].p[0]" +msgid "core.pages.help.login_gov.p[0]" msgstr "Login.gov is a secure way to sign in to participating government agencies. " "You can use your Login.gov account to access all of the benefits offered through Cal-ITP." -msgid "core.pages.help.header[2].p[1]" +msgid "core.pages.help.login_gov.p[1]" msgstr "Creating an account is simple. You will need an email address and method for " "authenticating your account—which will use either a landline, mobile phone, or " "backup codes that must be printed or written down." -msgid "core.pages.help.header[2].p[2]%(website)s" +msgid "core.pages.help.login_gov.p[2]%(website)s" msgstr "For more information on Login.gov, check out their website." -msgid "core.pages.help.header[3]" +msgid "core.pages.help.littlepay" msgstr "What is Littlepay?" -msgid "core.pages.help.header[3].p[0]" +msgid "core.pages.help.littlepay.p[0]" msgstr "Our payment partner, Littlepay is a secure, end-to-end payment processing " "platform that allows us to seamlessly attach your transit discount to your bank card." -msgid "core.pages.help.header[3].p[1]%(website)s" +msgid "core.pages.help.littlepay.p[1]%(website)s" msgstr "For more information on Littlepay, check out their website." -msgid "core.pages.help.header[4]" +msgid "core.pages.help.questions" msgstr "Questions?" -msgid "core.pages.help.header[4].p[0]" +msgid "core.pages.help.questions.p[0]" msgstr "If you need assistance with this website, please reach out to the customer " "service team for your local transit provider." diff --git a/benefits/locale/es/LC_MESSAGES/django.po b/benefits/locale/es/LC_MESSAGES/django.po index a753daed4..f6f773302 100644 --- a/benefits/locale/es/LC_MESSAGES/django.po +++ b/benefits/locale/es/LC_MESSAGES/django.po @@ -13,72 +13,72 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -msgid "core.pages.help.header[0]" +msgid "core.pages.help.about" msgstr "TODO: What is Cal-ITP Benefits?" #: benefits/core/templates/core/base.html:9 benefits/core/views.py:91 -msgid "core.pages.help.header[0].p[0]" +msgid "core.pages.help.about.p[0]" msgstr "" "TODO: The Benefits tool is provided by California Integrated Travel Project " "(Cal-ITP), which is a new program from the California Department of " "Transportation dedicated to making travel simpler and cost effective for all." -msgid "core.pages.help.header[0].p[1]" +msgid "core.pages.help.about.p[1]" msgstr "" "TODO: We partner with the California DMV to confirm age for age-based discounts and " "local transporation agencies to confirm specific discount programs. Once verified, " "discounts are attached to your bank card through our payment partner, Littlepay so " "that when you pay for your transit ride, you get your discount automatically." -msgid "core.pages.help.header[1]" +msgid "core.pages.help.payment_options" msgstr "TODO: Payment options" -msgid "core.pages.help.header[1].p[0]" +msgid "core.pages.help.payment_options.p[0]" msgstr "TODO: In order to activate your discount, you need a bank card that has the " "contactless symbol on it. The contactless symbol is four curved lines that looks like this:" -msgid "core.pages.help.header[1].p[1]" +msgid "core.pages.help.payment_options.p[1]" msgstr "TODO: A contactless bank card can be a credit card or a debit card and must " "include a Visa or Mastercard logo." -msgid "core.pages.help.header[1].p[2]" +msgid "core.pages.help.payment_options.p[2]" msgstr "TODO: We are working to add additional options for people who do not have access " "to a bank card. However, you can still get your discount by going through your " "local transit provider's application process." -msgid "core.pages.help.header[1].p[3]" +msgid "core.pages.help.payment_options.p[3]" msgstr "TODO: For updates on additional options, please check back on this website, or " "get in touch with your local transit provider." -msgid "core.pages.help.header[2]" +msgid "core.pages.help.login_gov" msgstr "TODO: What is Login.gov?" -msgid "core.pages.help.header[2].p[0]" +msgid "core.pages.help.login_gov.p[0]" msgstr "TODO: Login.gov is a secure way to sign in to participating government agencies. " "You can use your Login.gov account to access all of the benefits offered through Cal-ITP." -msgid "core.pages.help.header[2].p[1]" +msgid "core.pages.help.login_gov.p[1]" msgstr "TODO: Creating an account is simple. You will need an email address and method for " "authenticating your account—which will use either a landline, mobile phone, or " "backup codes that must be printed or written down." -msgid "core.pages.help.header[2].p[2]%(website)s" +msgid "core.pages.help.login_gov.p[2]%(website)s" msgstr "TODO: For more information on Login.gov, check out their website." -msgid "core.pages.help.header[3]" +msgid "core.pages.help.littlepay" msgstr "TODO: What is Littlepay?" -msgid "core.pages.help.header[3].p[0]" +msgid "core.pages.help.littlepay.p[0]" msgstr "TODO: Our payment partner, Littlepay is a secure, end-to-end payment processing " "platform that allows us to seamlessly attach your transit discount to your bank card." -msgid "core.pages.help.header[3].p[1]%(website)s" +msgid "core.pages.help.littlepay.p[1]%(website)s" msgstr "TODO: For more information on Littlepay, check out their website." -msgid "core.pages.help.header[4]" +msgid "core.pages.help.questions" msgstr "TODO: Questions?" -msgid "core.pages.help.header[4].p[0]" +msgid "core.pages.help.questions.p[0]" msgstr "TODO: If you need assistance with this website, please reach out to the customer " "service team for your local transit provider." From 40aad2de196324eece49137fd20f60c621909dc4 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Fri, 8 Apr 2022 21:51:13 +0000 Subject: [PATCH 10/11] refactor: make link on Enrollment success page go to anchor link --- benefits/enrollment/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/benefits/enrollment/views.py b/benefits/enrollment/views.py index dfbd882ef..fec8fe1c3 100644 --- a/benefits/enrollment/views.py +++ b/benefits/enrollment/views.py @@ -25,6 +25,7 @@ def _index(request): tokenize_retry_form = forms.CardTokenizeFailForm("enrollment:retry") tokenize_success_form = forms.CardTokenizeSuccessForm(auto_id=True, label_suffix="") + help_page = reverse("core:help") page = viewmodels.Page( title=_("enrollment.pages.index.title"), content_title=_("enrollment.pages.index.content_title"), @@ -36,7 +37,9 @@ def _index(request): viewmodels.Button.primary( text=_("enrollment.buttons.payment_partner"), id=tokenize_button, url=f"#{tokenize_button}" ), - viewmodels.Button.link(classes="btn-sm", text=_("enrollment.buttons.payment_options"), url=reverse("core:help")), + viewmodels.Button.link( + classes="btn-sm", text=_("enrollment.buttons.payment_options"), url=f"{help_page}#payment-options" + ), ], ) context = {} From 715faa5d1bc72a481a8a3b0834d944fce187c114 Mon Sep 17 00:00:00 2001 From: Angela Tran Date: Fri, 8 Apr 2022 22:16:38 +0000 Subject: [PATCH 11/11] chore(links): make sure external sites open in new tab --- benefits/locale/en/LC_MESSAGES/django.po | 6 ++++-- benefits/locale/es/LC_MESSAGES/django.po | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/benefits/locale/en/LC_MESSAGES/django.po b/benefits/locale/en/LC_MESSAGES/django.po index b85e57de6..9156705c1 100644 --- a/benefits/locale/en/LC_MESSAGES/django.po +++ b/benefits/locale/en/LC_MESSAGES/django.po @@ -63,7 +63,8 @@ msgstr "Creating an account is simple. You will need an email address and method "backup codes that must be printed or written down." msgid "core.pages.help.login_gov.p[2]%(website)s" -msgstr "For more information on Login.gov, check out their website." +msgstr "For more information on Login.gov, check out " +"their website." msgid "core.pages.help.littlepay" msgstr "What is Littlepay?" @@ -73,7 +74,8 @@ msgstr "Our payment partner, Littlepay is a secure, end-to-end payment processin "platform that allows us to seamlessly attach your transit discount to your bank card." msgid "core.pages.help.littlepay.p[1]%(website)s" -msgstr "For more information on Littlepay, check out their website." +msgstr "For more information on Littlepay, check out " +"their website." msgid "core.pages.help.questions" msgstr "Questions?" diff --git a/benefits/locale/es/LC_MESSAGES/django.po b/benefits/locale/es/LC_MESSAGES/django.po index f6f773302..706e99366 100644 --- a/benefits/locale/es/LC_MESSAGES/django.po +++ b/benefits/locale/es/LC_MESSAGES/django.po @@ -63,7 +63,8 @@ msgstr "TODO: Creating an account is simple. You will need an email address and "backup codes that must be printed or written down." msgid "core.pages.help.login_gov.p[2]%(website)s" -msgstr "TODO: For more information on Login.gov, check out their website." +msgstr "TODO: " +"For more information on Login.gov, check out their website." msgid "core.pages.help.littlepay" msgstr "TODO: What is Littlepay?" @@ -73,7 +74,8 @@ msgstr "TODO: Our payment partner, Littlepay is a secure, end-to-end payment pro "platform that allows us to seamlessly attach your transit discount to your bank card." msgid "core.pages.help.littlepay.p[1]%(website)s" -msgstr "TODO: For more information on Littlepay, check out their website." +msgstr "TODO: " +"For more information on Littlepay, check out their website." msgid "core.pages.help.questions" msgstr "TODO: Questions?"