Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: app strings into msgid #1626

Merged
merged 9 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions benefits/core/migrations/0002_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,17 @@ def load_data(app, *args, **kwargs):
auth_provider=None,
selection_label_template="eligibility/includes/selection-label--mst-courtesy-card.html",
start_template="eligibility/start--mst-courtesy-card.html",
form_title=_("eligibility.pages.confirm.mst_courtesy_card.title"),
form_headline=_("eligibility.pages.confirm.mst_courtesy_card.headline"),
form_blurb=_("eligibility.pages.confirm.mst_courtesy_card.p[0]"),
form_sub_label=_("eligibility.forms.confirm.mst_courtesy_card.fields.sub"),
form_sub_help_text=_("eligibility.forms.confirm.mst_courtesy_card.fields.sub.help_text"),
form_title=_("Confirm your Courtesy Card"),
form_headline=_("Let’s see if we can confirm your eligibility."),
form_blurb=_("Please input your Courtesy Card number and last name below to confirm your eligibility."),
form_sub_label=_("MST Courtesy Card number"),
form_sub_help_text=_("This is a 5-digit number on the front and back of your card."),
form_sub_placeholder="12345",
form_sub_pattern=r"\d{5}",
form_input_mode="numeric",
form_max_length=5,
form_name_label=_("eligibility.forms.confirm.mst_courtesy_card.fields.name"),
form_name_help_text=_("eligibility.forms.confirm.mst_courtesy_card.fields.name.help_text"),
form_name_label=_("last name (as it appears on Courtesy Card)"),
form_name_help_text=_("We use this to help confirm your Courtesy Card."),
form_name_placeholder="Garcia",
form_name_max_length=255,
)
Expand Down
4 changes: 2 additions & 2 deletions benefits/core/templates/core/agency-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
{% load i18n %}

{% block title %}
{% translate "core.pages.agency_index.title" %}
{% translate "Introduction" %}
{% endblock title %}

{% block call-to-action %}
{% url "eligibility:index" as url_continue %}
<a href="{{ url_continue }}" class="btn btn-lg btn-primary">{% translate "core.pages.index.continue" %}</a>
<a href="{{ url_continue }}" class="btn btn-lg btn-primary">{% translate "Get Started" %}</a>
thekaveman marked this conversation as resolved.
Show resolved Hide resolved
{% endblock call-to-action %}
18 changes: 11 additions & 7 deletions benefits/core/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="{% translate "core.pages.help.about.p[0]" %}">
{% blocktranslate trimmed asvar description %}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asvar is the syntax to store the results of a {% blocktranslate %} into a variable: https://docs.djangoproject.com/en/4.2/topics/i18n/translation/#std-templatetag-blocktranslate

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
{% endblocktranslate %}
<meta name="description" content="{{ description }}">
{# djlint:off #}
<title>{% block page-title %}{% endblock page-title %}| {% translate "core.pages.title.suffix" %}</title>
<title>{% block page-title %}{% endblock page-title %}| {% translate "Cal-ITP Benefits" %}</title>
{# djlint:on #}

<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -40,7 +44,7 @@
{% endif %}
<header role="banner" id="header">
<div id="skip-to-content">
<a href="#main-content">{% translate "core.buttons.skip" %}</a>
<a href="#main-content">{% translate "Skip to Main Content" %}</a>
</div>
{% if messages %}
{% for message in messages %}
Expand All @@ -57,8 +61,8 @@
<div id="header-container" class="navbar navbar-expand-sm navbar-dark bg-primary justify-content-between">
<div class="container">
<span class="navbar-brand p-0">
<img class="sm d-lg-none" src="{% static "img/logo-sm.svg" %}" width="90" height="51.3" alt="{% translate "core.logos.small" context "image alt text" %}" />
<img class="lg d-none d-lg-block" src="{% static "img/logo-lg.svg" %}" width="220" height="50" alt="{% translate "core.logos.large" context "image alt text" %}" />
<img class="sm d-lg-none" src="{% static "img/logo-sm.svg" %}" width="90" height="51.3" alt="{% translate "California Integrated Travel Project: Benefits logo (small)" context "image alt text" %}" />
<img class="lg d-none d-lg-block" src="{% static "img/logo-lg.svg" %}" width="220" height="50" alt="{% translate "California Integrated Travel Project: Benefits logo (large)" context "image alt text" %}" />
</span>
<div class="form-inline">{% include "core/includes/lang-selector.html" %}</div>
</div>
Expand Down Expand Up @@ -102,10 +106,10 @@
<div class="container">
<ul class="footer-links m-0 p-0 list-unstyled d-lg-flex gap-lg-4">
<li>
<a class="m-0 ps-5 ps-lg-0" href="{% url "core:help" %}">{% translate "core.buttons.help" %}</a>
<a class="m-0 ps-5 ps-lg-0" href="{% url "core:help" %}">{% translate "Help" %}</a>
</li>
<li>
<a class="m-0 ps-5 ps-lg-0" href="https://cdt.ca.gov/privacy-policy/" target="_blank" rel="noopener noreferrer">{% translate "core.buttons.privacy" %}</a>
<a class="m-0 ps-5 ps-lg-0" href="https://cdt.ca.gov/privacy-policy/" target="_blank" rel="noopener noreferrer">{% translate "Privacy Policy" %}</a>
</li>
</ul>
</div>
Expand Down
140 changes: 102 additions & 38 deletions benefits/core/templates/core/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,138 @@
{% load static %}

{% block page-title %}
{% translate "core.buttons.help" %}
{% translate "Help" %}
{% endblock page-title %}

{% block main-content %}
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 col-10">
<h1 class="text-center">{% translate "core.buttons.help" %}</h1>
<h1 class="text-center">{% translate "Help" %}</h1>
</div>
</div>

<div class="row justify-content-center">
<div class="col-md-8 col-10">
<h2 class="h2-sm pt-4 pt-lg-8" id="what-is-cal-itp">{% translate "core.pages.help.about" %}</h2>
<p class="pt-2 pt-lg-4">{% translate "core.pages.help.about.p[0]" %}</p>
<p class="pt-3 pt-lg-4">{% translate "core.pages.help.about.p[1]" %}</p>
<h2 class="h2-sm pt-4 pt-lg-8" id="what-is-cal-itp">{% translate "What is Cal-ITP Benefits?" %}</h2>
<p class="pt-2 pt-lg-4">
{% blocktranslate trimmed %}
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.
{% endblocktranslate %}
</p>
<p class="pt-3 pt-lg-4">
{% blocktranslate trimmed %}
We partner with local transit agencies, the California Department of Technology, and Login.gov to confirm the
identity of riders who are eligible to receive transit benefits. Once we are able to confirm a rider’s identity and
eligibility, our payment partner Littlepay helps us connect a transit benefit to the rider’s contactless card of
choice.
{% endblocktranslate %}
</p>
<p class="pt-3 pt-lg-4">
{% translate "The Benefits application is Free and Open Source Software (FOSS). You may obtain the source code from" %}
<a href="https://www.github.com/cal-itp/benefits" target="_blank" rel="noopener noreferrer">{% translate "GitHub" %}</a>.
</p>

<h2 class="h2-sm pt-4 pt-lg-8" id="payment-options">{% translate "core.pages.help.payment_options" %}</h2>
<p class="pt-2 pt-lg-4">{% translate "eligibility.pages.start.modal.p[0]" %}</p>
<p class="pt-3 pt-lg-4">{% translate "eligibility.pages.start.modal.p[1]" %}</p>
<h2 class="h2-sm pt-4 pt-lg-8" id="payment-options">{% translate "What kind of credit card can I use?" %}</h2>
<p class="pt-2 pt-lg-4">
{% blocktranslate trimmed %}
Benefits only works with contactless debit or credit cards. We do not currently support mobile wallets or digital
cards, such as Apple Pay, Google Wallet, or Samsung Wallet.
{% endblocktranslate %}
</p>
<p class="pt-3 pt-lg-4">{% translate "The contactless symbol is four curved lines, like this:" %}</p>
<p class="contactless-symbol pt-3">
<img class="icon mx-auto d-block"
width="40"
height="50"
src="{% static 'img/icon/contactless.svg' %}"
alt="{% translate "core.icons.contactless" context "image alt text" %}" />
alt="{% translate "Four curved lines on contactless-enabled cards" context "image alt text" %}" />
</p>
<p class="pt-3 pt-lg-4">{% translate "Your card must include a Visa or Mastercard logo." %}</p>
<p class="pt-3 pt-lg-4">
{% blocktranslate trimmed %}
Don’t have access to a contactless card? You can request a contactless card from your bank, or one of the companies
that offer free contactless prepaid debit cards, such as the Cash App Visa debit card or the Venmo Mastercard debit
card.
{% endblocktranslate %}
</p>
<p class="pt-3 pt-lg-4">{% translate "eligibility.pages.start.modal.p[2]" %}</p>
<p class="pt-3 pt-lg-4">{% translate "eligibility.pages.start.modal.p[3]" %}</p>
{% if agency %}
<p class="pt-3 pt-lg-4">
{% blocktranslate with short_name=agency.short_name website=agency.info_url %}eligibility.pages.start.modal.p[4]{{ short_name }}{{ website }}{% endblocktranslate %}
{% blocktranslate trimmed with short_name=agency.short_name website=agency.info_url %}
You can still get your transit benefit by going through {{ short_name }}’s application process. For updates on
additional options, please check back on this website, or
<a href="{{ website }}" target="_blank" rel="noopener noreferrer">contact {{ short_name }}</a>.
{% endblocktranslate %}
</p>
{% endif %}

<h2 class="h2-sm pt-4 pt-lg-8" id="login-gov">{% translate "eligibility.pages.index.senior.help.sub_headline[0]" %}</h2>
<p class="pt-2 pt-lg-4">{% translate "eligibility.pages.index.senior.help.p[0]" %}</p>
<p class="pt-3 pt-lg-4">{% translate "eligibility.pages.index.senior.help.p[2]" %}</p>
<h2 class="h2-sm pt-4 pt-lg-8" id="login-gov">{% translate "What is Login.gov?" %}</h2>
<p class="pt-2 pt-lg-4">
{% blocktranslate trimmed %}
Login.gov is a service that offers secure and private online access to government programs, such as federal
benefits, services and applications. With a Login.gov account, you can sign into multiple government websites with
the same email address and password.
{% endblocktranslate %}
</p>
<p class="pt-3 pt-lg-4">
{% blocktranslate trimmed %}
For more information on Login.gov, please visit the
<a href="https://login.gov/help/" target="_blank" rel="noopener noreferrer">Login.gov Help Center</a>.
{% endblocktranslate %}
</p>

<h2 class="h2-sm pt-4 pt-lg-8" id="why-login-gov">{% translate "eligibility.pages.index.senior.help.sub_headline[1]" %}</h2>
<p class="pt-2 pt-lg-4">{% translate "eligibility.pages.index.senior.help.p[1]" %}</p>
<h2 class="h2-sm pt-4 pt-lg-8" id="why-login-gov">{% translate "Why is Cal-ITP Benefits using Login.gov?" %}</h2>
<p class="pt-2 pt-lg-4">
{% blocktranslate trimmed %}
Login.gov uses two-factor authentication, and stronger passwords, that meet new National Institute of Standards of
Technology requirements for secure validation and verification. By using Login.gov, you’ll get an extra layer of
security to help protect your account against password compromises.
{% endblocktranslate %}
</p>

<h2 class="h2-sm pt-4 pt-lg-8" id="login-gov-verify">{% translate "core.pages.help.login_gov_verify" %}</h2>
<p class="pt-2 pt-lg-4">{% translate "eligibility.pages.start.senior.help.p[0]" %}</p>
<p class="pt-3 pt-lg-4">{% translate "eligibility.pages.start.senior.help.p[1]" %}</p>
<p class="pt-3 pt-lg-4">{% translate "eligibility.pages.start.senior.help.p[2]" %}</p>
<p class="pt-3 pt-lg-4">{% translate "eligibility.pages.start.senior.help.p[3]" %}</p>
<p class="pt-3 pt-lg-4">{% translate "eligibility.pages.start.senior.help.p[4]" %}</p>
<h2 class="h2-sm pt-4 pt-lg-8" id="login-gov-verify">{% translate "How do I verify my identity on Login.gov?" %}</h2>
<p class="pt-2 pt-lg-4">
{% translate "You will need a state-issued ID to verify your identity with Login.gov, which can be either a driver’s license or non-driver’s license state-issued ID card." %}
</p>
<p class="pt-3 pt-lg-4">
{% translate "You will need to upload a photograph of your state-issued ID and share your address, phone number and other personal information which is then verified against authoritative sources." %}
</p>
<p class="pt-3 pt-lg-4">
{% translate "Login.gov will also need to verify your identity by calling or texting your phone. If Login.gov can’t verify your phone number, you can verify by mail instead." %}
</p>
<p class="pt-3 pt-lg-4">
{% blocktranslate trimmed %}
Please visit the Login.gov help center for
<a href="https://login.gov/help/" target="_blank" rel="noopener noreferrer">more information on identity verification</a>.
{% endblocktranslate %}
</p>

{% if agency and agency.help_template %}
{% include agency.help_template %}
{% endif %}

<h2 class="h2-sm pt-4 pt-lg-8" id="littlepay">{% translate "core.pages.help.littlepay" %}</h2>
<p class="pt-2 pt-lg-4">{% translate "enrollment.pages.index.modal.p[0]" %}</p>
<p class="pt-3 pt-lg-4">{% translate "enrollment.pages.index.modal.p[1]" %}</p>
<h2 class="h2-sm pt-4 pt-lg-8" id="littlepay">{% translate "What is Littlepay?" %}</h2>
<p class="pt-2 pt-lg-4">
{% blocktranslate trimmed %}
Our payment partner, Littlepay, is a secure, end-to-end payment processing platform that allows us to connect your
transit benefit to the contactless card of your choice.
{% endblocktranslate %}
</p>
<p class="pt-3 pt-lg-4">
{% blocktranslate trimmed %}
For more information on Littlepay, please visit the
<a href="https://littlepay.com" target="_blank" rel="noopener noreferrer">Littlepay website</a>.
{% endblocktranslate %}
</p>

<h2 class="h2-sm pt-4 pt-lg-8" id="questions">{% translate "core.pages.help.questions" %}</h2>
<p class="pt-2 pt-lg-4">{% translate "core.pages.help.questions.p[0]" %}</p>
<h2 class="h2-sm pt-4 pt-lg-8" id="questions">{% translate "Questions?" %}</h2>
<p class="pt-2 pt-lg-4">
{% blocktranslate trimmed %}
If you need assistance with this website, please reach out to the customer service team for your local transit
provider.
{% endblocktranslate %}
</p>
</div>
</div>

Expand All @@ -79,18 +152,9 @@ <h2 class="h2-sm pt-4 pt-lg-8" id="questions">{% translate "core.pages.help.ques

<div class="row pt-4 pt-lg-8">
<div class="col-lg-2 offset-lg-10 col-8 offset-2">
{% translate "core.buttons.back" as button_text %}
{% translate "Go Back" as button_text %}
{% include "core/includes/button--origin.html" with button_text=button_text %}
</div>
</div>

<div class="row justify-content-center">
<div class="col-md-8 col-10 mt-4">
<p class="pt-3 pt-lg-4">
{% translate "core.pages.help.foss.text" %}
<a href="https://www.github.com/cal-itp/benefits" target="_blank" rel="noopener noreferrer">{% translate "core.pages.help.foss.link" %}</a>.
</p>
</div>
</div>
</div>
{% endblock main-content %}
2 changes: 1 addition & 1 deletion benefits/core/templates/core/includes/button--origin.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load i18n %}

{% translate "core.buttons.return_home" as default_button_text %}
{% translate "Return Home" as default_button_text %}

<a href="{{ origin }}" class="btn btn-lg btn-primary">{{ button_text | default:default_button_text }}</a>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M14.25 8.24999H5.355L8.0775 4.97999C8.2048 4.82683 8.26605 4.62937 8.24777 4.43105C8.22948 4.23273 8.13316 4.0498 7.98 3.92249C7.82684 3.79519 7.62938 3.73394 7.43106 3.75223C7.23274 3.77051 7.0498 3.86683 6.9225 4.01999L3.1725 8.51999C3.14727 8.55579 3.12471 8.59339 3.105 8.63249C3.105 8.66999 3.105 8.69249 3.0525 8.72999C3.01851 8.81599 3.00071 8.90753 3 8.99999C3.00071 9.09246 3.01851 9.184 3.0525 9.26999C3.0525 9.30749 3.0525 9.32999 3.105 9.36749C3.12471 9.4066 3.14727 9.4442 3.1725 9.47999L6.9225 13.98C6.99302 14.0647 7.08132 14.1327 7.18113 14.1794C7.28095 14.2261 7.38982 14.2502 7.5 14.25C7.67524 14.2503 7.84507 14.1893 7.98 14.0775C8.05594 14.0145 8.11872 13.9372 8.16473 13.8499C8.21075 13.7627 8.2391 13.6672 8.24815 13.569C8.25721 13.4707 8.2468 13.3717 8.21751 13.2775C8.18823 13.1833 8.14065 13.0958 8.0775 13.02L5.355 9.74999H14.25C14.4489 9.74999 14.6397 9.67097 14.7803 9.53032C14.921 9.38967 15 9.1989 15 8.99999C15 8.80108 14.921 8.61031 14.7803 8.46966C14.6397 8.32901 14.4489 8.24999 14.25 8.24999Z" />
</svg>
{% translate "core.buttons.previous_page" %}
{% translate "Previous Page" %}
</a>
</div>
</div>
Expand Down
11 changes: 9 additions & 2 deletions benefits/core/templates/core/includes/help--mst.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{% load i18n %}

<h2 class="pt-8" id="mst-courtesy-card">{% translate "core.pages.help.mst_courtesy_card" %}</h2>
<p class="pt-4">{% translate "core.pages.help.mst_courtesy_card.p[0]" %}</p>
<h2 class="pt-8" id="mst-courtesy-card">{% translate "What is a Courtesy Card?" %}</h2>
<p class="pt-4">
{% blocktranslate trimmed %}
Courtesy Cards are issued by Monterey-Salinas Transit to riders who qualify for a number of reduced fare programs.
This website is a demonstration tool to support the Courtesy Card program. This benefit may need to be renewed in the
future based on the expiration date of the Courtesy Card. Learn more at the
<a href="https://mst.org/riders-guide/how-to-ride/courtesy-card/" target="_blank" rel="noopener noreferrer">MST Riders Guide</a>.
{% endblocktranslate %}
</p>
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
{% load i18n %}

{% block button_text %}
{% translate "core.buttons.senior.signout" %}
{% translate "Sign out of Login.gov" %}
{% endblock button_text %}
Loading