diff --git a/app/mailers/email_reply.rb b/app/mailers/email_reply.rb index 5c9869a..fac0088 100644 --- a/app/mailers/email_reply.rb +++ b/app/mailers/email_reply.rb @@ -8,8 +8,7 @@ class EmailReply < ActionMailer::Base mail( :to => user.email, - :subject => "[#{Rails.application.name}] Reply from " << - "#{comment.user.username} on #{comment.story.title}" + :subject => I18n.t('mailers.email_reply.replysubject', :appname => "#{Rails.application.name}", :author => "#{comment.user.username}", :story => "#{comment.story.title}") ) end @@ -19,8 +18,7 @@ class EmailReply < ActionMailer::Base mail( :to => user.email, - :subject => "[#{Rails.application.name}] Mention from " << - "#{comment.user.username} on #{comment.story.title}" + :subject => I18n.t('mailers.email_reply.mentionsubject', :appname => "#{Rails.application.name}", :author => "#{comment.user.username}", :story => "#{comment.story.title}") ) end end diff --git a/config/locales/en.yml b/config/locales/en.yml index a06eb50..9d2b0d3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -6,10 +6,13 @@ en: formats: default: "%Y-%m-%d %H:%M:%S" mailers: - invitation_mailer: - subject: "[%{appname}] You have been invited to %{appname}" email_message: subject: "[%{appname}] Private Message from %{author}: %{subject}" + email_reply: + replysubject: "[%{appname}] Reply from %{author} on %{story}" + mentionsubject: "[%{appname}] Mention from %{author} on %{story}" + invitation_mailer: + subject: "[%{appname}] You have been invited to %{appname}" models: comment: commentcannotbeblank: "A comment cannot be blank." diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 1c86167..e78089d 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -18,10 +18,13 @@ fr: formats: default: "%d-%m-%Y %H:%M:%S" mailers: - invitation_mailer: - subject: "[%{appname}] Vous avez été invité au %{appname}" email_message: subject: "[%{appname}] Message privé de %{author} : %{subject}" + email_reply: + replysubject: "[%{appname}] Réponse de %{author} sur %{story}" + mentionsubject: "[%{appname}] %{author} vous a mentionné dans %{story}" + invitation_mailer: + subject: "[%{appname}] Vous avez été invité au %{appname}" models: comment: commentcannotbeblank: "Un commentaire ne peut pas être vide."