From f7219c19ec2cb304d30cdb2a05ba8306fb2f3a62 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Mon, 17 Jul 2017 10:31:10 +0200 Subject: Fix errors tranlations for clean up --- app/models/clean_up.rb | 2 +- config/locales/clean_ups.en.yml | 2 +- config/locales/clean_ups.fr.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/clean_up.rb b/app/models/clean_up.rb index cdbf6c00a..b1135a155 100644 --- a/app/models/clean_up.rb +++ b/app/models/clean_up.rb @@ -14,7 +14,7 @@ class CleanUp < ActiveRecord::Base def end_date_must_be_greater_that_begin_date if self.end_date && self.date_type == 'between' && self.begin_date >= self.end_date - errors.add(:base, I18n.t('clean_ups.activerecord.errors.invalid_period')) + errors.add(:base, I18n.t('activerecord.errors.models.clean_up.invalid_period')) end end diff --git a/config/locales/clean_ups.en.yml b/config/locales/clean_ups.en.yml index a05750f6d..fcfcfec7b 100644 --- a/config/locales/clean_ups.en.yml +++ b/config/locales/clean_ups.en.yml @@ -24,9 +24,9 @@ en: end_date: "End date of clean up" activerecord: errors: - invalid_period: "Invalid period : the end date must be strictly greater than the begin date" models: clean_up: + invalid_period: "Invalid period : the end date must be strictly greater than the begin date" attributes: date_type: presence: "A clean up must have a date type" diff --git a/config/locales/clean_ups.fr.yml b/config/locales/clean_ups.fr.yml index 77e07591b..e2db82998 100644 --- a/config/locales/clean_ups.fr.yml +++ b/config/locales/clean_ups.fr.yml @@ -23,9 +23,9 @@ fr: end_date: "Date de fin de la purge" activerecord: errors: - invalid_period: "Période invalide : tLa date de fin doit être strictement supérieure à la date de début" models: clean_up: + invalid_period: "Période invalide : La date de fin doit être strictement supérieure à la date de début" attributes: date_type: presence: "Une purge doit avoir un type de renseigné" -- cgit v1.2.3