diff --git a/app/models/hat_request.rb b/app/models/hat_request.rb index 4cc0c6d..41bcb9c 100644 --- a/app/models/hat_request.rb +++ b/app/models/hat_request.rb @@ -20,9 +20,8 @@ class HatRequest < ActiveRecord::Base m = Message.new m.author_user_id = user.id m.recipient_user_id = self.user_id - m.subject = "Your hat \"#{self.hat}\" has been approved" - m.body = "This hat may now be worn when commenting.\n\n" + - "This is an automated message." + m.subject = I18n.t 'models.hat.grantsubject', :hat => "#{self.hat}" + m.body = raw(I18n.t 'models.hat.grantbody') m.save! self.destroy @@ -34,7 +33,7 @@ class HatRequest < ActiveRecord::Base m = Message.new m.author_user_id = user.id m.recipient_user_id = self.user_id - m.subject = "Your request for hat \"#{self.hat}\" has been rejected" + m.subject = I18n.t 'models.hat.rejectsubject', :hat => "#{self.hat}" m.body = reason m.save! diff --git a/config/locales/en.yml b/config/locales/en.yml index aba13c0..5c113e0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -26,6 +26,9 @@ en: slayeddragon: "slayed dragon" metooerror: "Please just upvote the parent post instead." hat: + grantsubject: "Your hat %{hat} has been approved" + grantbody: "This hat may now be worn when commenting.\n\nThis is an automated message." + rejectsubject: "Your request for hat %{hat} has been rejected" grantedby: "