Fix translation missing in inv mailer

This commit is contained in:
Raphael 2010-11-18 12:44:27 -08:00
parent 8c092649f2
commit 61692c1da6
2 changed files with 9 additions and 3 deletions

View file

@ -64,12 +64,13 @@ en:
unlock: "Unlock my account" unlock: "Unlock my account"
invitation: invitation:
subject: "You've been invited to join Diaspora!" subject: "You've been invited 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" accept: "Accept invitation"
ignore: "If you don't want to accept the invitation, please ignore this email." 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." no_account_till: "Your account won't be created until you access the link above and sign up."
inviters:
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."
shared: shared:
links: links:
sign_in: 'Sign in' sign_in: 'Sign in'

View file

@ -102,6 +102,11 @@ describe Invitation do
new_user = Invitation.create_invitee(:from => user, :email => @email, :into => aspect, :message => message) new_user = Invitation.create_invitee(:from => user, :email => @email, :into => aspect, :message => message)
Devise.mailer.deliveries.first.to_s.include?(message).should be_true Devise.mailer.deliveries.first.to_s.include?(message).should be_true
end end
it 'has no translation missing' do
message = "How've you been?"
new_user = Invitation.create_invitee(:from => user, :email => @email, :into => aspect, :message => message)
Devise.mailer.deliveries.first.body.raw_source.match(/(translation_missing.+)/).should be_nil
end
end end
context 'with no inviter' do context 'with no inviter' do
it 'sends an email that includes the right things' do it 'sends an email that includes the right things' do