From 16b6913e00b9a527853604972bf6eb74908c368c Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Wed, 25 Jan 2023 16:04:35 +0000 Subject: [PATCH] feat: update i18n --- app/models/validations/sales/sale_information_validations.rb | 4 ++-- config/locales/en.yml | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/validations/sales/sale_information_validations.rb b/app/models/validations/sales/sale_information_validations.rb index ff6677a25..8e0a56684 100644 --- a/app/models/validations/sales/sale_information_validations.rb +++ b/app/models/validations/sales/sale_information_validations.rb @@ -11,8 +11,8 @@ module Validations::Sales::SaleInformationValidations return if record.exdate.blank? || record.hodate.blank? unless record.exdate > record.hodate - record.errors.add :exdate, I18n.t("validations.sale_information.handover_before_exchange") - record.errors.add :hodate,I18n.t("validations.sale_information.handover_before_exchange") + record.errors.add :exdate, I18n.t("validations.sale_information.handover_exchange.exchange_after_handover") + record.errors.add :hodate,I18n.t("validations.sale_information.handover_exchange.exchange_after_handover") end end diff --git a/config/locales/en.yml b/config/locales/en.yml index f64d0c443..4d2d35999 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -417,7 +417,9 @@ en: property_type_bedsit: "Bedsit bedroom maximum 1" previous_property_type: property_type_bedsit: "A bedsit can not have more than 1 bedroom" - handover_before_exchange: "Practical completion or handover date must be before exchange date" + handover_exchange: + handover_before_exchange: "Practical completion or handover date must be before exchange date" + exchange_after_handover: "Exchange date must be after practical completion or handover date" soft_validations: net_income: