fast_gettext 0.6.12 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,4 @@
1
+ 0.7.0 -- set_locale resets to default locale if none of the available locales was tried to set
1
2
  0.6.0 -- plurals use singular translations as fallack e.g. you translated 'Axis' then n_('Axis','Axis',1) would return the translation for 'Axis' if no plural translation was found
2
3
  0.4.14 -- "" is translated as "", not as gettext meta information
3
4
  0.4.0 -- pluralisation_rules is no longer stored in each repository, only retrived. Added Chain and Logger repository.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fast_gettext (0.6.12)
4
+ fast_gettext (0.7.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/Readme.md CHANGED
@@ -127,7 +127,7 @@ since it runs in a different thread then e.g. controllers, so set them inside yo
127
127
  def set_locale
128
128
  FastGettext.available_locales = ['de','en',...]
129
129
  FastGettext.text_domain = 'frontend'
130
- FastGettext.set_locale(params[:locale] || session[:locale] || request.env['HTTP_ACCEPT_LANGUAGE'], :reset_on_unknown => true)
130
+ FastGettext.set_locale(params[:locale] || session[:locale] || request.env['HTTP_ACCEPT_LANGUAGE'])
131
131
  session[:locale] = I18n.locale = FastGettext.locale
132
132
  end
133
133
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/fast_gettext
3
3
  specs:
4
- fast_gettext (0.6.11)
4
+ fast_gettext (0.7.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/mgrosser/code/tools/fast_gettext
3
3
  specs:
4
- fast_gettext (0.6.11)
4
+ fast_gettext (0.7.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -127,9 +127,9 @@ module FastGettext
127
127
  # for chaining: puts set_locale('xx') == 'xx' ? 'applied' : 'rejected'
128
128
  # returns the current locale, not the one that was supplied
129
129
  # like locale=(), whoes behavior cannot be changed
130
- def set_locale(new_locale, options={})
130
+ def set_locale(new_locale)
131
131
  new_locale = best_locale_in(new_locale)
132
- self._locale = new_locale if new_locale || options[:reset_on_unknown]
132
+ self._locale = new_locale
133
133
  locale
134
134
  end
135
135
 
@@ -1,3 +1,3 @@
1
1
  module FastGettext
2
- VERSION = Version = '0.6.12'
2
+ VERSION = Version = '0.7.0'
3
3
  end
@@ -171,7 +171,7 @@ describe 'Storage' do
171
171
  it "set_locale resets to default with :reset_on_unknown" do
172
172
  self.locale = 'de'
173
173
  self.available_locales = ['fr']
174
- self.set_locale('en', :reset_on_unknown => true).should == 'fr'
174
+ self.set_locale('en').should == 'fr'
175
175
  end
176
176
 
177
177
  {
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: fast_gettext
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.6.12
5
+ version: 0.7.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Michael Grosser
@@ -115,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  segments:
117
117
  - 0
118
- hash: -4485904871753900151
118
+ hash: -2722134200546875497
119
119
  none: false
120
120
  required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  requirements:
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  segments:
126
126
  - 0
127
- hash: -4485904871753900151
127
+ hash: -2722134200546875497
128
128
  none: false
129
129
  requirements: []
130
130
  rubyforge_project: