From 1a0c9f5983b63eff1f17aa96e4e1f4dc502004c1 Mon Sep 17 00:00:00 2001 From: Lukas Matt Date: Sat, 22 Mar 2014 21:03:27 +0100 Subject: [PATCH] Make report-type translatable --- app/mailers/report_mailer.rb | 5 +++-- config/locales/diaspora/en.yml | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/mailers/report_mailer.rb b/app/mailers/report_mailer.rb index a9223c752..4a9b639a9 100644 --- a/app/mailers/report_mailer.rb +++ b/app/mailers/report_mailer.rb @@ -2,10 +2,11 @@ class ReportMailer < ActionMailer::Base default :from => AppConfig.mail.sender_address def new_report(type, id) + report_type = I18n.t('notifier.report_email.type.' + type) resource = { - :subject => I18n.t('notifier.report_email.subject', :type => type), + :subject => I18n.t('notifier.report_email.subject', :type => report_type), :url => report_index_url, - :type => type, + :type => report_type, :id => id } Role.admins.each do |role| diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 7b8ac5e08..3401ec951 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -737,6 +737,9 @@ en: subject: "Please activate your new email address %{unconfirmed_email}" click_link: "To activate your new email address %{unconfirmed_email}, please follow this link:" report_email: + type: + post: "post" + comment: "comment" subject: "A new %{type} was marked as offensive" body: |- Hello,