Skip to content

Commit 8c79dc7

Browse files
committed
Merge changes from main
2 parents e72cbe3 + 95efae6 commit 8c79dc7

File tree

9 files changed

+547
-136
lines changed

9 files changed

+547
-136
lines changed

app/categories/constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def __str__(self):
380380
PUBLIC_LAW = Category(
381381
title=_("Legal action against police and public organisations"),
382382
description=_(
383-
"Includes schools, the police, government, prisons, NHS, the council."
383+
"Includes police, government, prisons, NHS, the council, care facilities and schools."
384384
),
385385
article_category_name="Public",
386386
chs_code="publiclaw",

app/categories/discrimination/forms.py

+34-25
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
from wtforms.validators import InputRequired
66
from app.categories.x_cat.forms import AreYouUnder18Form
77
from app.categories.constants import DISCRIMINATION
8+
from flask_babel import lazy_gettext as _
89

910

1011
class DiscriminationQuestionForm(QuestionForm):
1112
category = DISCRIMINATION
1213

1314

1415
class DiscriminationWhereForm(DiscriminationQuestionForm):
15-
title = "Where did the discrimination happen?"
16+
title = _("Where did the discrimination happen?")
1617

1718
next_step_mapping = {
1819
"*": "categories.discrimination.why",
@@ -22,31 +23,37 @@ class DiscriminationWhereForm(DiscriminationQuestionForm):
2223
question = SelectMultipleField(
2324
title,
2425
widget=CategoryCheckboxInput(
25-
show_divider=True, hint_text="You can select more than one."
26+
show_divider=True, hint_text=_("You can select more than one.")
2627
),
27-
validators=[InputRequired(message="Select where the discrimination happened")],
28+
validators=[
29+
InputRequired(message=_("Select where the discrimination happened"))
30+
],
2831
choices=[
29-
("work", "Work - including colleagues, employer or employment agency"),
30-
("school", "School, college, university or other education setting"),
32+
("work", _("Work - including colleagues, employer or employment agency")),
33+
("school", _("School, college, university or other education setting")),
3134
(
3235
"business",
33-
"Businesses or services - such as a shop, restaurant, train, hotel, bank, law firm",
36+
_(
37+
"Businesses or services - such as a shop, restaurant, train, hotel, bank, law firm"
38+
),
3439
),
35-
("healthcare", "Health or care - such as a hospital or care home"),
36-
("housing", "Housing - such as a landlord or estate agent"),
40+
("healthcare", _("Health or care - such as a hospital or care home")),
41+
("housing", _("Housing - such as a landlord or estate agent")),
3742
(
3843
"public",
39-
"Public services and authorities - such as the police, social services, council or local authority, jobcentre, government",
44+
_(
45+
"Public services and authorities - such as the police, social services, council or local authority, jobcentre, government"
46+
),
4047
),
41-
("club", "Clubs and associations - such as a sports club"),
48+
("club", _("Clubs and associations - such as a sports club")),
4249
("", ""),
43-
("notsure", "I’m not sure"),
50+
("notsure", _("I’m not sure")),
4451
],
4552
)
4653

4754

4855
class DiscriminationWhyForm(DiscriminationQuestionForm):
49-
title = "Why were you discriminated against?"
56+
title = _("Why were you discriminated against?")
5057

5158
next_step_mapping = {
5259
"*": "categories.discrimination.age",
@@ -57,37 +64,39 @@ class DiscriminationWhyForm(DiscriminationQuestionForm):
5764
title,
5865
widget=CategoryCheckboxInput(
5966
show_divider=True,
60-
hint_text="You can select more than one.",
67+
hint_text=_("You can select more than one."),
6168
behaviour="exclusive",
6269
),
6370
validators=[
64-
InputRequired(message="Select why you were discriminated against"),
71+
InputRequired(message=_("Select why you were discriminated against")),
6572
ExclusiveValue(
6673
exclusive_value="none",
67-
message="Select why you were discriminated against, or select ‘None of these’",
74+
message=_(
75+
"Select why you were discriminated against, or select ‘None of these’"
76+
),
6877
),
6978
],
7079
choices=[
71-
("race", "Race, colour, ethnicity, nationality"),
72-
("sex", "Sex (male or female)"),
73-
("disability", "Disability, health condition, mental health condition"),
74-
("religion", "Religion, belief, lack of religion"),
75-
("age", "Age"),
76-
("pregnancy", "Pregnancy or being a mother"),
80+
("race", _("Race, colour, ethnicity, nationality")),
81+
("sex", _("Sex (male or female)")),
82+
("disability", _("Disability, health condition, mental health condition")),
83+
("religion", _("Religion, belief, lack of religion")),
84+
("age", _("Age")),
85+
("pregnancy", _("Pregnancy or being a mother")),
7786
(
7887
"sexualorientation",
79-
"Sexual orientation - gay, bisexual, other sexuality",
88+
_("Sexual orientation - gay, bisexual, other sexuality"),
8089
),
8190
(
8291
"gender",
83-
"Gender reassignment, being transgender, non-binary or gender-fluid",
92+
_("Gender reassignment, being transgender, non-binary or gender-fluid"),
8493
),
8594
(
8695
"marriage",
87-
"Married status - being married, in a civil partnership",
96+
_("Married status - being married, in a civil partnership"),
8897
),
8998
("", ""),
90-
("none", "None of these"),
99+
("none", _("None of these")),
91100
],
92101
)
93102

app/categories/widgets.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from govuk_frontend_wtf.wtforms_widgets import GovRadioInput, GovCheckboxesInput
2+
from flask_babel import lazy_gettext as _
23

34

45
class CategoryInputField:
@@ -38,7 +39,7 @@ def map_gov_params(self, field, **kwargs):
3839

3940
# Add divider if enabled and there are enough items
4041
if self.show_divider and len(items) >= 2:
41-
items[-2]["divider"] = "or"
42+
items[-2]["divider"] = _("or")
4243

4344
# Handle pre-selected answer if present
4445
if field.data:

app/means_test/forms/benefits.py

+1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ class AdditionalBenefitsForm(BaseMeansTestForm):
201201
)
202202
total_other_benefit = MoneyIntervalField(
203203
label=_("If Yes, total amount of benefits not listed above"),
204+
hint_text=_("For example, £32.18 per week"),
204205
exclude_intervals=["per_month"],
205206
widget=MoneyIntervalWidget(),
206207
validators=[

app/templates/categories/components/cannot-find-your-problem.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
{% if category %}: {{ category }}
66
{% endif %}
77
</p>
8-
<a class="govuk-link govuk-link--no-visited-state" href="{{ url }}">Next steps to get help</a>
8+
<a class="govuk-link govuk-link--no-visited-state" href="{{ url }}">{% trans %}Next steps to get help{% endtrans %}</a>
99
</div>
1010
{% endmacro %}

app/templates/categories/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
<div class="govuk-grid-row">
1313
<div class="govuk-grid-column-two-thirds">
14-
<h1 class="govuk-heading-xl govuk-!-margin-bottom-6">Find problems covered by legal aid</h1>
14+
<h1 class="govuk-heading-xl govuk-!-margin-bottom-6">{{ title }}</h1>
1515

16-
<p class="govuk-body-l">These are the problems covered by legal aid. Choose the problem you need help with.</p>
16+
<p class="govuk-body-l">{% trans %}These are the problems covered by legal aid. Choose the problem you need help with.{% endtrans %}</p>
1717

1818
<div class="govuk-!-margin-top-8">
1919
{% for category, next_page in listing %}

app/templates/means_test/additional-benefits.html

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{% extends "means_test/form-page.html" %}
22

3+
{% block formDescription %}
4+
<p class="govuk-body-l">
5+
{% trans %}You’ll need to provide evidence of the financial information you’ve given us through this service.{% endtrans %}
6+
</p>
7+
{% endblock %}
8+
39
{% block form %}
410

511
{{ form.csrf_token }}

0 commit comments

Comments
 (0)