Browse Source

Rename variable question to sentence_fragment for clarity

pull/2674/head
Manny Dinssa 2 years ago
parent
commit
8e91abc2b7
  1. 4
      app/services/bulk_upload/lettings/year2024/row_parser.rb
  2. 2
      config/locales/en.yml

4
app/services/bulk_upload/lettings/year2024/row_parser.rb

@ -924,12 +924,12 @@ private
}.partition { |field, _| public_send(field).blank? }.map(&:to_h)
blank_charge_fields.each do |field, charge|
errors.add(field, I18n.t("validations.financial.charges.missing_charges", question: charge))
errors.add(field, I18n.t("validations.financial.charges.missing_charges", sentence_fragment: charge))
end
other_charge_fields.each do |field, _charge|
blank_charge_fields.each do |_blank_field, blank_charge|
errors.add(field, I18n.t("validations.financial.charges.missing_charges", question: blank_charge))
errors.add(field, I18n.t("validations.financial.charges.missing_charges", sentence_fragment: blank_charge))
end
end
end

2
config/locales/en.yml

@ -443,7 +443,7 @@ en:
above_hard_max: "Rent is higher than the absolute maximum expected for a property of this type based on this period."
charges:
complete_1_of_3: "Answer either the ‘household rent and charges’ question or ‘is this accommodation a care home‘, or select ‘no’ for ‘does the household pay rent or charges for the accommodation?’"
missing_charges: "Please enter the %{question}. If there is no %{question}, please enter '0'."
missing_charges: "Please enter the %{sentence_fragment}. If there is no %{sentence_fragment}, please enter '0'."
tcharge:
under_10: "Enter a total charge that is at least £10.00 per week."
less_than_shortfall: "The total charge must be more than the outstanding amount."

Loading…
Cancel
Save