translate missing string for hat request

This commit is contained in:
Carl Chenet 2018-10-20 13:28:32 +02:00
parent 2e0697d4a3
commit 2f495bba7d
3 changed files with 9 additions and 4 deletions

View file

@ -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!

View file

@ -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: "<span class=\"hat hat_%{hat}\" title=\"Granted by %{inviteuser} on %{invitedate}\""
moderation:
storyeditedby: "Your story has been edited by "

View file

@ -48,6 +48,9 @@ fr:
slayeddragon: "le dragon a été terrassé"
metooerror: "Merci de voter pour le commentaire à la place."
hat:
grantsubject: "Votre chapeau %{hat} a été approuvé"
grantbody: "Vous pouvez maintenant porter ce chapeau quand vous commentez.\n\nCeci est un message automatique."
rejectsubject: "Votre demande du chapeau %{hat} a été rejetée"
grantedby: "<span class=\"hat hat_%{hat}\" title=\"Accordé par %{inviteuser} le %{invitedate}\""
moderation:
storyeditedby: "Votre info a été éditée par "