From 6f19ef3bc64e876223141fbc1e2bbbcab57ed28c Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Thu, 20 Feb 2014 10:43:17 -0300 Subject: [PATCH] Translate person notifier mail --- app/models/person_notifier.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/person_notifier.rb b/app/models/person_notifier.rb index a3d3263..54cebbb 100644 --- a/app/models/person_notifier.rb +++ b/app/models/person_notifier.rb @@ -26,7 +26,9 @@ class PersonNotifier if @person.notification_time && @person.notification_time > 0 from = @person.last_notification || DateTime.now - @person.notification_time.hours notifications = @person.tracked_notifications.find(:all, :conditions => ["created_at > ?", from]) - Mailer::deliver_content_summary(@person, notifications) unless notifications.empty? + Noosfero.with_locale @person.environment.default_language do + Mailer::deliver_content_summary(@person, notifications) unless notifications.empty? + end @person.settings[:last_notification] = DateTime.now @person.save! end -- libgit2 0.21.2