From fb8494074b69a0c0b7105865a980cd070e18ed09 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Mon, 30 Jan 2023 10:02:52 +0000 Subject: [PATCH] feat: more copy updates --- app/models/form/sales/questions/household_wheelchair_check.rb | 2 +- app/models/validations/sales/financial_validations.rb | 4 ++-- config/locales/en.yml | 4 +++- spec/models/validations/sales/financial_validations_spec.rb | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/models/form/sales/questions/household_wheelchair_check.rb b/app/models/form/sales/questions/household_wheelchair_check.rb index f2c15b9ac..14a3e92f6 100644 --- a/app/models/form/sales/questions/household_wheelchair_check.rb +++ b/app/models/form/sales/questions/household_wheelchair_check.rb @@ -3,7 +3,7 @@ class Form::Sales::Questions::HouseholdWheelchairCheck < ::Form::Question super @id = "wheel_value_check" @check_answer_label = "Does anyone in the household use a wheelchair?" - @header = "Are you sure? You said previously that somebody in household uses a wheelchair" + @header = "Is this right? Earlier, you said someone in the household uses a wheelchair" @type = "interruption_screen" @answer_options = { "0" => { "value" => "Yes" }, diff --git a/app/models/validations/sales/financial_validations.rb b/app/models/validations/sales/financial_validations.rb index 116ecf301..c9e91247d 100644 --- a/app/models/validations/sales/financial_validations.rb +++ b/app/models/validations/sales/financial_validations.rb @@ -5,9 +5,9 @@ module Validations::Sales::FinancialValidations def validate_income1(record) if record.ecstat1 && record.income1 && record.ownershipsch == 1 if record.london_property? - record.errors.add :income1, I18n.t("validations.financial.income1.over_hard_max", hard_max: 90_000) if record.income1 > 90_000 + record.errors.add :income1, I18n.t("validations.financial.income1.over_hard_max.inside_london") if record.income1 > 90_000 elsif record.income1 > 80_000 - record.errors.add :income1, I18n.t("validations.financial.income1.over_hard_max", hard_max: 80_000) + record.errors.add :income1, I18n.t("validations.financial.income1.over_hard_max.outside_london") end end end diff --git a/config/locales/en.yml b/config/locales/en.yml index 574d9a4a2..b95de8b0e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -214,7 +214,9 @@ en: freq_missing: "Select how often the household receives income" earnings_missing: "Enter how much income the household has in total" income1: - over_hard_max: "Income must be lower than £%{hard_max}" + over_hard_max: + outside_london: "Income maximum under £80,000 for properties outside London local authorities" + inside_london: "Income maximum £90,000 for properties within London local authorities" negative_currency: "Enter an amount above 0" rent: less_than_shortfall: "Enter an amount that is more than the shortfall in basic rent" diff --git a/spec/models/validations/sales/financial_validations_spec.rb b/spec/models/validations/sales/financial_validations_spec.rb index 7b5b8868b..c84c00260 100644 --- a/spec/models/validations/sales/financial_validations_spec.rb +++ b/spec/models/validations/sales/financial_validations_spec.rb @@ -16,7 +16,7 @@ RSpec.describe Validations::Sales::FinancialValidations do record.ecstat1 = ecstat financial_validator.validate_income1(record) expect(record.errors["income1"]) - .to include(match I18n.t("validations.financial.income1.over_hard_max", hard_max: 80_000)) + .to include(match I18n.t("validations.financial.income1.over_hard_max.outside_london")) end end @@ -40,7 +40,7 @@ RSpec.describe Validations::Sales::FinancialValidations do record.ecstat1 = ecstat financial_validator.validate_income1(record) expect(record.errors["income1"]) - .to include(match I18n.t("validations.financial.income1.over_hard_max", hard_max: 90_000)) + .to include(match I18n.t("validations.financial.income1.over_hard_max.inside_london")) end end