just found the mailer... :)

This commit is contained in:
MrZYX 2010-11-07 22:46:06 +01:00 committed by Jonne Hass
parent 9ceb3e2fd1
commit 0a363a73b0
10 changed files with 67 additions and 41 deletions

View file

@ -46,6 +46,6 @@
= image_tag '/images/diaspora_white.png' = image_tag '/images/diaspora_white.png'
#container #container
%p %p
Welcome #{@resource.email}! = t('devise.mailer.welcome', :email => @resource.email)
%p You can confirm your account through the link below: %p = t('.you_can_confirm')
%p= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token), :class => "large_text" %p= link_to t('.confirm'), confirmation_url(@resource, :confirmation_token => @resource.confirmation_token), :class => "large_text"

View file

@ -47,20 +47,20 @@
#container #container
- @invs = @resource.invitations_to_me - @invs = @resource.invitations_to_me
%p %p
Hello #{@resource.email}! = t('devise.mailer.welcome', :email => @resource.email)
%p %p
- if @invs.count == 1 - if @invs.count == 1
= @invs.first.real_name + " (#{@invs.first.diaspora_handle})" + " has" = t('.has_invited_you', :name => @invs.first.real_name + " (#{@invs.first.diaspora_handle})")
- else - else
= (@invs.map{|inv| inv.from.real_name + " (#{inv.from.diaspora_handle})"}.join(",") + " have") = t('.have_invited_you', :names => (@invs.map{|inv| inv.from.real_name + " (#{inv.from.diaspora_handle})"}.join(",")))
= "invited you to join Diaspora at #{root_url}, you can accept it through the link below." = t('.accept_at', :url => root_url)
- @invs.each do |inv| - @invs.each do |inv|
- if inv.message - if inv.message
= "#{inv.from.real_name}:" = "#{inv.from.real_name}:"
= "\"#{inv.message}\"" = "\"#{inv.message}\""
%p %p
%p= link_to 'Accept invitation', accept_invitation_url(@resource, :invitation_token => @resource.invitation_token), :class => "large_text" %p= link_to t('.accept'), accept_invitation_url(@resource, :invitation_token => @resource.invitation_token), :class => "large_text"
%p.small %p.small
If you don't want to accept the invitation, please ignore this email. = t('.ignore')
%br/ %br/
Your account won't be created until you access the link above and sign up. = t('.no_account_till')

View file

@ -46,8 +46,8 @@
= image_tag '/images/diaspora_white.png' = image_tag '/images/diaspora_white.png'
#container #container
%p %p
Hello #{@resource.email}! = t('devise.mailer.hello', :email => @resource.email)
%p Someone has requested a link to change your password, and you can do this through the link below. %p = t('.someone_requested')
%p= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token), :class => "large_text" %p= link_to t('.change'), edit_password_url(@resource, :reset_password_token => @resource.reset_password_token), :class => "large_text"
%p Your password won't change until you access the link above and create a new one. %p = t('.wont_change')
%p.small If you didn't request this, please ignore this email. %p.small = t('.ignore')

View file

@ -46,7 +46,7 @@
= image_tag '/images/diaspora_white.png' = image_tag '/images/diaspora_white.png'
#container #container
%p %p
Hello #{@resource.email}! = t('devise.mailer.hello', :email => @resource.email)
%p Your account has been locked due to an excessive amount of unsuccessful sign in attempts. %p = t('.account_locked')
%p Click the link below to unlock your account: %p = t('.click_to_unlock')
%p= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token), :class => "large_text" %p= link_to t('.unlock'), unlock_url(@resource, :unlock_token => @resource.unlock_token), :class => "large_text"

View file

@ -46,14 +46,14 @@
= image_tag attachments['diaspora_white_on_grey.png'].url, :alt => "DIASPORA" = image_tag attachments['diaspora_white_on_grey.png'].url, :alt => "DIASPORA"
#container #container
%p %p
Hello #{@receiver.profile.first_name}! = t('notifier.hello', => :name)
%p %p
= "#{@sender.real_name} (#{@sender.diaspora_handle})" = "#{@sender.real_name} (#{@sender.diaspora_handle})"
just sent you a friend request on Diaspora* = t('.just_sent_you')
You should really think about checking it out. = t('.try_it_out')
%br %br
= link_to "sign in here", new_user_session_url = link_to t('.sign_in'), new_user_session_url
%br %br
love, = t('notifier.love'),
%br %br
the diaspora email robot = t('notifier.diaspora')

View file

@ -1,9 +1,9 @@
= "hey #{@receiver.profile.first_name}," = t('notifier.hello', :name => @receiver.profile.first_name)
= "#{@sender.real_name} (#{@sender.diaspora_handle})" = "#{@sender.real_name} (#{@sender.diaspora_handle})"
just sent you a friend request on Diaspora* = t('notifier.new_request.just_sent_you')
You should really think about checking it out. = t('notifier.new_request.try_it_out')
= "sign in here: #{new_user_session_url}" = "#{t('notifier.new_request.sign_in')}: #{new_user_session_url}"
love, = t('notifier.love')
the diaspora email robot = t('notifier.diaspora')

View file

@ -46,14 +46,14 @@
= image_tag attachments['diaspora_white_on_grey.png'].url, :alt => "DIASPORA" = image_tag attachments['diaspora_white_on_grey.png'].url, :alt => "DIASPORA"
#container #container
%p %p
Hello #{@receiver.profile.first_name}! = t('notifier.hello', :name => @receiver.profile.first_name
%p %p
= "#{@sender.real_name} (#{@sender.diaspora_handle})" = "#{@sender.real_name} (#{@sender.diaspora_handle})"
has accepted your friend request. They are now in your = t('.accepted')
= link_to @aspect.name, aspect_url(@aspect) = link_to @aspect.name, aspect_url(@aspect)
aspect. = t('.aspect')
%br %br
love, = t('notifier.love')
%br %br
the diaspora email robot = t('notifier.diaspora')

View file

@ -1,9 +1,9 @@
= "hey #{@receiver.profile.first_name}," = t('notifier.hello', :name => @receiver.profile.first_name
= "#{@sender.real_name} (#{@sender.diaspora_handle})" = "#{@sender.real_name} (#{@sender.diaspora_handle})"
has accepted your friend request. They are now in your = t('notifier.request_accepted.accepted')
= "#{@aspect.name} asepct.\n" = "#{@aspect.name} #{t('notifier.request_accepted.aspect')}\n"
= "#{aspect_url(@aspect)}" = "#{aspect_url(@aspect)}"
love, \n = "#{t('notifier.love')} \n"
the diaspora email robot = t('notifier.diaspora')

View file

@ -21,6 +21,7 @@ en:
password: 'Password' password: 'Password'
sign_in: 'Sign in' sign_in: 'Sign in'
have_a_problem: "Have a problem? Find an answer here" have_a_problem: "Have a problem? Find an answer here"
remember_me: "Remember me"
signed_in: 'Signed in successfully.' signed_in: 'Signed in successfully.'
signed_out: 'Signed out successfully.' signed_out: 'Signed out successfully.'
passwords: passwords:
@ -44,14 +45,31 @@ en:
invitation_token_invalid: 'The invitation token provided is not valid!' invitation_token_invalid: 'The invitation token provided is not valid!'
updated: 'Your password was set successfully. You are now signed in.' updated: 'Your password was set successfully. You are now signed in.'
mailer: mailer:
welcome: "Welcome %{email}!"
hello: "Hello %{email}!"
confirmation_instructions: confirmation_instructions:
subject: 'Confirmation instructions' subject: 'Confirmation instructions'
you_can_confirm: "You can confirm your account through the link below:"
confirm: "Confirm my account"
reset_password_instructions: reset_password_instructions:
subject: 'Reset password instructions' subject: 'Reset password instructions'
someone_requested: "Someone has requested a link to change your password, and you can do this through the link below."
change: "Change my password"
wont_change: "Your password won't change until you access the link above and create a new one."
ignore: "If you didn't request this, please ignore this email."
unlock_instructions: unlock_instructions:
subject: 'Unlock Instructions' subject: 'Unlock Instructions'
account_locked: "Your account has been locked due to an excessive amount of unsuccessful sign in attempts."
click_to_unlock: "Click the link below to unlock your account:"
unlock: "Unlock my account"
invitation: invitation:
subject: 'A friend wants you to join Diaspora!' subject: 'A friend wants you to join Diaspora!'
has_invited_you: "%{name} has invited you to join Diaspora"
have_invited_you: "%{names} have invited you to join Diaspora"
accept_at: ", at %{url}, you can accept it through the link below."
accept: "Accept invitation"
ignore: "If you don't want to accept the invitation, please ignore this email."
no_account_till: "Your account won't be created until you access the link above and sign up."
shared: shared:
links: links:
sign_in: 'Sign in' sign_in: 'Sign in'

View file

@ -312,9 +312,17 @@ en:
helper: helper:
home: "Home" home: "Home"
notifier: notifier:
hello: "Hello %{name}!"
love: "love,"
diaspora: "the diaspora email robot"
new_request: new_request:
subject: "new Diaspora* friend request from %{from}" subject: "new Diaspora* friend request from %{from}"
just_sent_you: "just sent you a friend request on Diaspora*"
try_it_out: "You should really think about checking it out."
sign_in: "sign in here"
request_accepted: request_accepted:
subject: "%{name} has accepted your friend request on Diaspora*" subject: "%{name} has accepted your friend request on Diaspora*"
accepted: "has accepted your friend request. They are now in your"
aspect: "aspect."
date: date:
order: [:month, :day, :year] order: [:month, :day, :year]