Skip to content
Extraits de code Groupes Projets
Valider 3c089506 rédigé par MrZYX's avatar MrZYX
Parcourir les fichiers

localize emails

parent 8639e089
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -30,8 +30,10 @@ class Notifier < ActionMailer::Base ...@@ -30,8 +30,10 @@ class Notifier < ActionMailer::Base
attachments.inline['logo_caps.png'] = ATTACHMENT attachments.inline['logo_caps.png'] = ATTACHMENT
mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>", I18n.with_locale(@receiver.language) do
:subject => I18n.t('notifier.new_request.subject', :from => @sender.name), :host => AppConfig[:pod_uri].host) mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>",
:subject => I18n.t('notifier.new_request.subject', :from => @sender.name), :host => AppConfig[:pod_uri].host)
end
end end
def request_accepted(recipient_id, sender_id) def request_accepted(recipient_id, sender_id)
...@@ -42,8 +44,10 @@ class Notifier < ActionMailer::Base ...@@ -42,8 +44,10 @@ class Notifier < ActionMailer::Base
attachments.inline['logo_caps.png'] = ATTACHMENT attachments.inline['logo_caps.png'] = ATTACHMENT
mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>", I18n.with_locale(@receiver.language) do
:subject => I18n.t('notifier.request_accepted.subject', :name => @sender.name), :host => AppConfig[:pod_uri].host) mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>",
:subject => I18n.t('notifier.request_accepted.subject', :name => @sender.name), :host => AppConfig[:pod_uri].host)
end
end end
def mentioned(recipient_id, sender_id, target_id) def mentioned(recipient_id, sender_id, target_id)
...@@ -55,8 +59,10 @@ class Notifier < ActionMailer::Base ...@@ -55,8 +59,10 @@ class Notifier < ActionMailer::Base
attachments.inline['logo_caps.png'] = ATTACHMENT attachments.inline['logo_caps.png'] = ATTACHMENT
mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>", I18n.with_locale(@receiver.language) do
:subject => I18n.t('notifier.mentioned.subject', :name => @sender.name), :host => AppConfig[:pod_uri].host) mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>",
:subject => I18n.t('notifier.mentioned.subject', :name => @sender.name), :host => AppConfig[:pod_uri].host)
end
end end
def comment_on_post(recipient_id, sender_id, comment_id) def comment_on_post(recipient_id, sender_id, comment_id)
...@@ -68,8 +74,10 @@ class Notifier < ActionMailer::Base ...@@ -68,8 +74,10 @@ class Notifier < ActionMailer::Base
attachments.inline['logo_caps.png'] = ATTACHMENT attachments.inline['logo_caps.png'] = ATTACHMENT
mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>", I18n.with_locale(@receiver.language) do
:subject => I18n.t('notifier.comment_on_post.subject', :name => @sender.name), :host => AppConfig[:pod_uri].host) mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>",
:subject => I18n.t('notifier.comment_on_post.subject', :name => @sender.name), :host => AppConfig[:pod_uri].host)
end
end end
def also_commented(recipient_id, sender_id, comment_id) def also_commented(recipient_id, sender_id, comment_id)
...@@ -83,8 +91,10 @@ class Notifier < ActionMailer::Base ...@@ -83,8 +91,10 @@ class Notifier < ActionMailer::Base
attachments.inline['logo_caps.png'] = ATTACHMENT attachments.inline['logo_caps.png'] = ATTACHMENT
mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>", I18n.with_locale(@receiver.language) do
:subject => I18n.t('notifier.also_commented.subject', :name => @sender.name, :post_author => @post_author_name ), :host => AppConfig[:pod_uri].host) mail(:to => "\"#{@receiver.name}\" <#{@receiver.email}>",
:subject => I18n.t('notifier.also_commented.subject', :name => @sender.name, :post_author => @post_author_name ), :host => AppConfig[:pod_uri].host)
end
end end
private private
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter