Skip to content

Commit

Permalink
Merge pull request #4929 from santosgabriel/develop
Browse files Browse the repository at this point in the history
fix bug #4832 select language for email content when invite a friend
  • Loading branch information
jhass committed Apr 15, 2014
2 parents 07ae7d7 + f6c0648 commit 441cc06
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Expand Up @@ -26,6 +26,7 @@ Read more in [#4249](https://github.com/diaspora/diaspora/pull/4249) and [#4883]
* SPV: Improve padding and interaction counts [#4426](https://github.com/diaspora/diaspora/pull/4426)

## Bug fixes
* Fix email body language when invite a friend [#4832](https://github.com/diaspora/diaspora/issues/4832)
* Improve time agos by updating the plugin [#4280](https://github.com/diaspora/diaspora/issues/4280)
* Do not add a space after adding a mention [#4767](https://github.com/diaspora/diaspora/issues/4767)
* Fix active user statistics by saving a last seen timestamp for users [#4734](https://github.com/diaspora/diaspora/issues/4734)
Expand Down
1 change: 1 addition & 0 deletions lib/email_inviter.rb
Expand Up @@ -2,6 +2,7 @@ class EmailInviter
attr_accessor :emails, :message, :inviter, :locale

def initialize(emails, inviter, options={})
options = options.symbolize_keys
self.message = options[:message]
self.locale = options.fetch(:locale, 'en')
self.inviter = inviter
Expand Down
5 changes: 5 additions & 0 deletions spec/lib/email_inviter_spec.rb
Expand Up @@ -41,6 +41,11 @@
inviter.locale.should == 'en'
end

it 'should symbolize keys' do
inviter = EmailInviter.new(@emails, @user, 'locale' => 'es')
inviter.locale.should == 'es'
end

it 'listens to the langauge option' do
inviter = EmailInviter.new(@emails, @user, :locale => 'es')
inviter.locale.should == 'es'
Expand Down

0 comments on commit 441cc06

Please sign in to comment.