From 80eb90570e1bdaff3065c3f862a5538b3774c61f Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Wed, 25 Jan 2023 15:58:32 +0000 Subject: [PATCH] feat: update i18n --- app/models/validations/sales/sale_information_validations.rb | 4 ++-- config/locales/en.yml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/validations/sales/sale_information_validations.rb b/app/models/validations/sales/sale_information_validations.rb index 874ebfc73..aa6cbe484 100644 --- a/app/models/validations/sales/sale_information_validations.rb +++ b/app/models/validations/sales/sale_information_validations.rb @@ -19,8 +19,8 @@ module Validations::Sales::SaleInformationValidations return unless record.exdate && record.saledate if record.exdate > record.saledate - record.errors.add :exdate, "Exchange date must be before completion date" - record.errors.add :saledate, "Exchange date must be before completion date" + record.errors.add :exdate, I18n.t("validations.sale_information.completion_exchange.exchange_before_completion") + record.errors.add :saledate, I18n.t("validations.sale_information.completion_exchange.completion_after_exchange") end end diff --git a/config/locales/en.yml b/config/locales/en.yml index f44004d77..f525a62df 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -419,6 +419,9 @@ en: property_type_bedsit: "Bedsit bedroom maximum 1" previous_property_type: property_type_bedsit: "A bedsit can not have more than 1 bedroom" + completion_exchange: + exchange_before_completion: "Exchange date must be before completion date" + completion_after_exchange: "Completion date must be after exchange date" soft_validations: net_income: