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 +1 -0
- data/Gemfile.lock +1 -1
- data/Readme.md +1 -1
- data/gemfiles/rails.2.gemfile.lock +1 -1
- data/gemfiles/rails.3.gemfile.lock +1 -1
- data/lib/fast_gettext/storage.rb +2 -2
- data/lib/fast_gettext/version.rb +1 -1
- data/spec/fast_gettext/storage_spec.rb +1 -1
- metadata +3 -3
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.
|
data/Gemfile.lock
CHANGED
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']
|
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
|
|
data/lib/fast_gettext/storage.rb
CHANGED
@@ -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
|
130
|
+
def set_locale(new_locale)
|
131
131
|
new_locale = best_locale_in(new_locale)
|
132
|
-
self._locale = new_locale
|
132
|
+
self._locale = new_locale
|
133
133
|
locale
|
134
134
|
end
|
135
135
|
|
data/lib/fast_gettext/version.rb
CHANGED
@@ -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'
|
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.
|
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: -
|
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: -
|
127
|
+
hash: -2722134200546875497
|
128
128
|
none: false
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project:
|