Skip to content

Commit

Permalink
Merge branch 'develop' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiehumphries committed Jan 18, 2024
2 parents 882619a + bb04097 commit de619ff
Show file tree
Hide file tree
Showing 14 changed files with 234 additions and 124 deletions.
60 changes: 30 additions & 30 deletions help_to_heat/frontdoor/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@
"label": _("No"),
},
{
"value": "I don't know",
"label": _("I don't know"),
"value": "I do not know",
"label": _("I do not know"),
},
)
epc_validation_options_map = epc_display_options_map + (
Expand Down Expand Up @@ -335,21 +335,21 @@
"Solid walls": _("Solid walls"),
"Cavity walls": _("Cavity walls"),
"Mix of solid and cavity walls": _("Mix of solid and cavity walls"),
"I don't see my option listed": _("I don't see my option listed"),
"I don't know": _("I don't know"),
"I do not see my option listed": _("I do not see my option listed"),
"I do not know": _("I do not know"),
},
"wall_insulation": {
"Yes they are all insulated": _("Yes they are all insulated"),
"Some are insulated, some are not": _("Some are insulated, some are not"),
"No they are not insulated": _("No they are not insulated"),
"I don't know": _("I don't know"),
"I do not know": _("I do not know"),
},
"loft": {
"Yes, I have a loft that hasn't been converted into a room": _(
"Yes, I have a loft that hasn't been converted into a room"
"Yes, I have a loft that has not been converted into a room": _(
"Yes, I have a loft that has not been converted into a room"
),
"No, I don't have a loft or my loft has been converted into a room": _(
"No, I don't have a loft or my loft has been converted into a room"
"No, I do not have a loft or my loft has been converted into a room": _(
"No, I do not have a loft or my loft has been converted into a room"
),
},
"loft_access": {
Expand All @@ -358,13 +358,13 @@
"No loft": _("No loft"),
},
"loft_insulation": {
"Yes, there is at least 270mm of insulation in my loft": _(
"Yes, there is at least 270mm of insulation in my loft"
"I have more than 100mm of loft insulation": _(
"I have more than 100mm of loft insulation"
),
"No, there is less than 270mm of insulation in my loft": _(
"No, there is less than 270mm of insulation in my loft"
"I have up to 100mm of loft insulation": _(
"I have up to 100mm of loft insulation"
),
"I don't know": _("I don't know"),
"I do not know": _("I do not know"),
"No loft": _("No loft"),
},
}
Expand Down Expand Up @@ -467,16 +467,16 @@
"label": _("Mix of solid and cavity walls"),
},
{
"value": "I don't see my option listed",
"label": _("I don't see my option listed"),
"value": "I do not see my option listed",
"label": _("I do not see my option listed"),
"hint": _(
"Other wall types could include cob walls, timber framed, system built, steel framed or other "
"non-traditional build types"
),
},
{
"value": "I don't know",
"label": _("I don't know"),
"value": "I do not know",
"label": _("I do not know"),
},
)
wall_insulation_options_map = (
Expand All @@ -493,18 +493,18 @@
"label": _("No they are not insulated"),
},
{
"value": "I don't know",
"label": _("I don't know"),
"value": "I do not know",
"label": _("I do not know"),
},
)
loft_options_map = (
{
"value": "Yes, I have a loft that hasn't been converted into a room",
"label": _("Yes, I have a loft that hasn't been converted into a room"),
"value": "Yes, I have a loft that has not been converted into a room",
"label": _("Yes, I have a loft that has not been converted into a room"),
},
{
"value": "No, I don't have a loft or my loft has been converted into a room",
"label": _("No, I don't have a loft or my loft has been converted into a room"),
"value": "No, I do not have a loft or my loft has been converted into a room",
"label": _("No, I do not have a loft or my loft has been converted into a room"),
},
)
loft_access_options_map = (
Expand Down Expand Up @@ -584,16 +584,16 @@
epc_rating_options = ("A", "B", "C", "D", "E", "F", "G", "H", "Not found")
loft_insulation_options_map = (
{
"value": "Yes, there is at least 270mm of insulation in my loft",
"label": _("Yes, there is at least 270mm of insulation in my loft"),
"value": "I have more than 100mm of loft insulation",
"label": _("I have more than 100mm of loft insulation"),
},
{
"value": "No, there is less than 270mm of insulation in my loft",
"label": _("No, there is less than 270mm of insulation in my loft"),
"value": "I have up to 100mm of loft insulation",
"label": _("I have up to 100mm of loft insulation"),
},
{
"value": "I don't know",
"label": _("I don't know"),
"value": "I do not know",
"label": _("I do not know"),
},
)
loft_insulation_validation_options_map = loft_insulation_options_map + (
Expand Down
10 changes: 5 additions & 5 deletions help_to_heat/frontdoor/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@
"rrn": _("Select your address"),
"town_or_city": _("Enter your Town or city"),
"council_tax_band": _("Enter the Council Tax Band of the property"),
"accept_suggested_epc": _("Select if your EPC rating is correct or not, or that you don’t know"),
"accept_suggested_epc": _("Select if your EPC rating is correct or not, or that you do not know"),
"benefits": _("Select if anyone in your household is receiving any benefits listed below"),
"household_income": _("Select your household income"),
"property_type": _("Select your property type"),
"property_subtype": _("Select your property type"),
"number_of_bedrooms": _("Select the number of bedrooms the property has"),
"wall_type": _("Select the type of walls the property has"),
"wall_insulation": _("Select if the walls of the property are insulated or not, or if you don’t know"),
"wall_insulation": _("Select if the walls of the property are insulated or not, or if you do not know"),
"loft": _("Select if you have a loft that has been converted into a room or not"),
"loft_access": _("Select whether or not you have access to the loft"),
"loft_insulation": _("Select whether or not your loft is fully insulated"),
Expand Down Expand Up @@ -638,7 +638,7 @@ def get_context(self, *args, **kwargs):
def save_data(self, request, session_id, page_name, *args, **kwargs):
data = request.POST.dict()
loft = data.get("loft")
if loft == "No, I don't have a loft or my loft has been converted into a room":
if loft == "No, I do not have a loft or my loft has been converted into a room":
data["loft_access"] = "No loft"
data["loft_insulation"] = "No loft"
data = interface.api.session.save_answer(session_id, page_name, data)
Expand All @@ -647,7 +647,7 @@ def save_data(self, request, session_id, page_name, *args, **kwargs):
def handle_post(self, request, session_id, page_name, data, is_change_page):
prev_page_name, next_page_name = get_prev_next_page_name(page_name)
loft = data.get("loft")
if loft == "No, I don't have a loft or my loft has been converted into a room":
if loft == "No, I do not have a loft or my loft has been converted into a room":
next_page_name = "summary"
return redirect("frontdoor:page", session_id=session_id, page_name=next_page_name)

Expand All @@ -666,7 +666,7 @@ def get_context(self, *args, **kwargs):
def get_prev_next_urls(self, session_id, page_name):
loft_data = interface.api.session.get_answer(session_id, "loft")

if loft_data.get("loft", None) == "Yes, I have a loft that hasn't been converted into a room":
if loft_data.get("loft", None) == "Yes, I have a loft that has not been converted into a room":
_, next_page_url = get_prev_next_urls(session_id, page_name)
prev_page_url = reverse("frontdoor:page", kwargs=dict(session_id=session_id, page_name="loft-access"))
return prev_page_url, next_page_url
Expand Down
Binary file modified help_to_heat/locale/cy/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit de619ff

Please sign in to comment.