Commit 6f19ef3bc64e876223141fbc1e2bbbcab57ed28c

Authored by Victor Costa
1 parent ad152df4

Translate person notifier mail

(ActionItem2694)
Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
app/models/person_notifier.rb
@@ -26,7 +26,9 @@ class PersonNotifier @@ -26,7 +26,9 @@ class PersonNotifier
26 if @person.notification_time && @person.notification_time > 0 26 if @person.notification_time && @person.notification_time > 0
27 from = @person.last_notification || DateTime.now - @person.notification_time.hours 27 from = @person.last_notification || DateTime.now - @person.notification_time.hours
28 notifications = @person.tracked_notifications.find(:all, :conditions => ["created_at > ?", from]) 28 notifications = @person.tracked_notifications.find(:all, :conditions => ["created_at > ?", from])
29 - Mailer::deliver_content_summary(@person, notifications) unless notifications.empty? 29 + Noosfero.with_locale @person.environment.default_language do
  30 + Mailer::deliver_content_summary(@person, notifications) unless notifications.empty?
  31 + end
30 @person.settings[:last_notification] = DateTime.now 32 @person.settings[:last_notification] = DateTime.now
31 @person.save! 33 @person.save!
32 end 34 end