Browse Source

Update translations

pull/2272/head
Kat 2 years ago
parent
commit
dd3871bd17
  1. 2
      app/models/form/sales/questions/buyer_interview.rb
  2. 8
      app/models/validations/sales/financial_validations.rb
  3. 8
      app/models/validations/sales/property_validations.rb
  4. 6
      config/locales/en.yml

2
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?" @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?" @header = "#{joint_purchase ? 'Were the buyers' : 'Was the buyer'} interviewed for any of the answers you will provide on this log?"
@type = "radio" @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 @answer_options = ANSWER_OPTIONS
@question_number = 18 @question_number = 18
end end

8
app/models/validations/sales/financial_validations.rb

@ -48,7 +48,7 @@ module Validations::Sales::FinancialValidations
return unless record.stairbought && record.stairowned return unless record.stairbought && record.stairowned
if 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
end end
@ -125,9 +125,9 @@ module Validations::Sales::FinancialValidations
if record.equity > record.stairowned - record.stairbought if record.equity > record.stairowned - record.stairbought
formatted_equity = sprintf("%g", record.equity) 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 :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, 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, 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, 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, buyer_owns: record.joint_purchase? ? "buyers own" : "buyer owns")
end end
end end

8
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? return unless record.ppostcode_full.present? && record.postcode_full.present?
if record.discounted_ownership_sale? && record.ppostcode_full != record.postcode_full 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 :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", persons: 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", persons: 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", persons: 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
end end

6
config/locales/en.yml

@ -350,7 +350,7 @@ en:
proptype: proptype:
bedsits_have_max_one_bedroom: "Answer cannot be 'Bedsit' if the property has 2 or more bedrooms" bedsits_have_max_one_bedroom: "Answer cannot be 'Bedsit' if the property has 2 or more bedrooms"
postcode: 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: financial:
tshortfall: tshortfall:
@ -428,7 +428,7 @@ en:
not_provided: "Enter how much rent and other charges the household pays %{period}" not_provided: "Enter how much rent and other charges the household pays %{period}"
cash_discount_invalid: "Cash discount must be £0 - £999,999" cash_discount_invalid: "Cash discount must be £0 - £999,999"
staircasing: 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_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." 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: monthly_leasehold_charges:
@ -436,7 +436,7 @@ en:
equity: equity:
under_min: "The minimum initial equity stake for this type of shared ownership sale is %{min_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_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" 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" 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"

Loading…
Cancel
Save