diff --git a/app/models/form/sales/questions/buyer_interview.rb b/app/models/form/sales/questions/buyer_interview.rb index cd9939d53..445648145 100644 --- a/app/models/form/sales/questions/buyer_interview.rb +++ b/app/models/form/sales/questions/buyer_interview.rb @@ -5,7 +5,7 @@ class Form::Sales::Questions::BuyerInterview < ::Form::Question @check_answer_label = "#{joint_purchase ? 'Buyers' : 'Buyer'} interviewed in person?" @header = "#{joint_purchase ? 'Were the buyers' : 'Was the buyer'} interviewed for any of the answers you will provide on this log?" @type = "radio" - @hint_text = "You should still try to answer all questions even if the #{joint_purchase ? "buyers weren’t" : "buyer wasn’t"} interviewed in person" + @hint_text = "You should still try to answer all questions even if the #{joint_purchase ? 'buyers weren’t' : 'buyer wasn’t'} interviewed in person" @answer_options = ANSWER_OPTIONS @question_number = 18 end diff --git a/app/models/validations/sales/financial_validations.rb b/app/models/validations/sales/financial_validations.rb index 538d07691..9ad34a38b 100644 --- a/app/models/validations/sales/financial_validations.rb +++ b/app/models/validations/sales/financial_validations.rb @@ -48,7 +48,7 @@ module Validations::Sales::FinancialValidations return unless record.stairbought && record.stairowned if record.stairbought > record.stairowned - record.errors.add :stairowned, I18n.t("validations.financial.staircasing.percentage_bought_must_be_greater_than_percentage_owned", persons: record.joint_purchase? ? "buyers" : "buyer") + record.errors.add :stairowned, I18n.t("validations.financial.staircasing.percentage_bought_must_be_greater_than_percentage_owned", buyer_possessive: record.joint_purchase? ? "buyers" : "buyer") end end @@ -125,9 +125,9 @@ module Validations::Sales::FinancialValidations if record.equity > record.stairowned - record.stairbought formatted_equity = sprintf("%g", record.equity) - record.errors.add :equity, I18n.t("validations.financial.equity.over_stairowned_minus_stairbought", equity: formatted_equity, staircase_difference: record.stairowned - record.stairbought, person_owns: record.joint_purchase? ? "buyers own" : "buyer owns") - record.errors.add :stairowned, I18n.t("validations.financial.equity.over_stairowned_minus_stairbought", equity: formatted_equity, staircase_difference: record.stairowned - record.stairbought, person_owns: record.joint_purchase? ? "buyers own" : "buyer owns") - record.errors.add :stairbought, I18n.t("validations.financial.equity.over_stairowned_minus_stairbought", equity: formatted_equity, staircase_difference: record.stairowned - record.stairbought, person_owns: record.joint_purchase? ? "buyers own" : "buyer owns") + record.errors.add :equity, I18n.t("validations.financial.equity.over_stairowned_minus_stairbought", equity: formatted_equity, staircase_difference: record.stairowned - record.stairbought, buyer_owns: record.joint_purchase? ? "buyers own" : "buyer owns") + record.errors.add :stairowned, I18n.t("validations.financial.equity.over_stairowned_minus_stairbought", equity: formatted_equity, staircase_difference: record.stairowned - record.stairbought, buyer_owns: record.joint_purchase? ? "buyers own" : "buyer owns") + record.errors.add :stairbought, I18n.t("validations.financial.equity.over_stairowned_minus_stairbought", equity: formatted_equity, staircase_difference: record.stairowned - record.stairbought, buyer_owns: record.joint_purchase? ? "buyers own" : "buyer owns") end end diff --git a/app/models/validations/sales/property_validations.rb b/app/models/validations/sales/property_validations.rb index 93da36f5d..64660753c 100644 --- a/app/models/validations/sales/property_validations.rb +++ b/app/models/validations/sales/property_validations.rb @@ -4,10 +4,10 @@ module Validations::Sales::PropertyValidations return unless record.ppostcode_full.present? && record.postcode_full.present? if record.discounted_ownership_sale? && record.ppostcode_full != record.postcode_full - record.errors.add :postcode_full, I18n.t("validations.property.postcode.must_match_previous", persons: record.joint_purchase? ? "Buyers‘" : "Buyer‘s") - record.errors.add :ppostcode_full, I18n.t("validations.property.postcode.must_match_previous", persons: record.joint_purchase? ? "Buyers‘" : "Buyer‘s") - record.errors.add :ownershipsch, I18n.t("validations.property.postcode.must_match_previous", persons: record.joint_purchase? ? "Buyers‘" : "Buyer‘s") - record.errors.add :uprn, I18n.t("validations.property.postcode.must_match_previous", persons: record.joint_purchase? ? "Buyers‘" : "Buyer‘s") + record.errors.add :postcode_full, I18n.t("validations.property.postcode.must_match_previous", buyer_possessive: record.joint_purchase? ? "Buyers‘" : "Buyer‘s") + record.errors.add :ppostcode_full, I18n.t("validations.property.postcode.must_match_previous", buyer_possessive: record.joint_purchase? ? "Buyers‘" : "Buyer‘s") + record.errors.add :ownershipsch, I18n.t("validations.property.postcode.must_match_previous", buyer_possessive: record.joint_purchase? ? "Buyers‘" : "Buyer‘s") + record.errors.add :uprn, I18n.t("validations.property.postcode.must_match_previous", buyer_possessive: record.joint_purchase? ? "Buyers‘" : "Buyer‘s") end end diff --git a/config/locales/en.yml b/config/locales/en.yml index 4603ad9c2..25e28547e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -350,7 +350,7 @@ en: proptype: bedsits_have_max_one_bedroom: "Answer cannot be 'Bedsit' if the property has 2 or more bedrooms" postcode: - must_match_previous: "%{persons} last accommodation and discounted ownership postcodes must match" + must_match_previous: "%{buyer_possessive} last accommodation and discounted ownership postcodes must match" financial: tshortfall: @@ -428,7 +428,7 @@ en: not_provided: "Enter how much rent and other charges the household pays %{period}" cash_discount_invalid: "Cash discount must be £0 - £999,999" staircasing: - percentage_bought_must_be_greater_than_percentage_owned: "Total percentage %{persons} now owns must be more than percentage bought in this transaction" + percentage_bought_must_be_greater_than_percentage_owned: "Total percentage %{buyer_possessive} now owns must be more than percentage bought in this transaction" percentage_bought_must_be_at_least_threshold: "The minimum increase in equity while staircasing is %{threshold}%" percentage_bought_equal_percentage_owned: "The percentage bought is %{stairbought}% and the percentage owned in total is %{stairowned}%. These figures cannot be the same." monthly_leasehold_charges: @@ -436,7 +436,7 @@ en: equity: under_min: "The minimum initial equity stake for this type of shared ownership sale is %{min_equity}%" over_max: "The maximum initial equity stake is %{max_equity}%" - over_stairowned_minus_stairbought: "The initial equity stake is %{equity}% and the percentage owned in total minus the percentage bought is %{staircase_difference}%. In a staircasing transaction, the equity stake purchased cannot be larger than the percentage the %{person_owns} minus the percentage bought." + over_stairowned_minus_stairbought: "The initial equity stake is %{equity}% and the percentage owned in total minus the percentage bought is %{staircase_difference}%. In a staircasing transaction, the equity stake purchased cannot be larger than the percentage the %{buyer_owns} minus the percentage bought." mortgage: "Mortgage value cannot be £0 if a mortgage was used for the purchase of this property" shared_ownership_deposit: "The %{mortgage_deposit_and_discount_error_fields} added together is %{mortgage_deposit_and_discount_total}. The value times the equity percentage is %{value_times_equity}. These figures should be the same"