Merge pull request #4929 from santosgabriel/develop
fix bug #4832 select language for email content when invite a friend
This commit is contained in:
commit
441cc062f8
3 changed files with 7 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -41,6 +41,11 @@ describe EmailInviter do
|
|||
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'
|
||||
|
|
|
|||
Loading…
Reference in a new issue