refinerycms-i18n 0.9.8.5 → 0.9.8.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gemspec.rb +1 -1
- data/lib/refinery/i18n.rb +10 -3
- metadata +4 -4
data/lib/gemspec.rb
CHANGED
data/lib/refinery/i18n.rb
CHANGED
@@ -48,11 +48,11 @@ module Refinery
|
|
48
48
|
protected :find_or_set_locale
|
49
49
|
}
|
50
50
|
end
|
51
|
-
|
51
|
+
|
52
52
|
config.after_initialize do
|
53
53
|
::Refinery::I18n.setup! if defined?(RefinerySetting) and RefinerySetting.table_exists?
|
54
54
|
end
|
55
|
-
|
55
|
+
|
56
56
|
end
|
57
57
|
|
58
58
|
class << self
|
@@ -85,11 +85,18 @@ module Refinery
|
|
85
85
|
|
86
86
|
def current_locale=(locale)
|
87
87
|
@current_locale = locale.to_sym
|
88
|
-
|
88
|
+
value = {
|
89
89
|
:value => locale.to_sym,
|
90
90
|
:scoping => 'refinery',
|
91
91
|
:callback_proc_as_string => %q{::Refinery::I18n.setup!}
|
92
92
|
}
|
93
|
+
# handles a change in Refinery API
|
94
|
+
if RefinerySetting.methods.map(&:to_sym).include?(:set)
|
95
|
+
RefinerySetting.set(:i18n_translation_current_locale, value)
|
96
|
+
else
|
97
|
+
RefinerySetting[:i18n_translation_current_locale] = value
|
98
|
+
end
|
99
|
+
|
93
100
|
::I18n.locale = locale.to_sym
|
94
101
|
end
|
95
102
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-i18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 43
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
9
|
- 8
|
10
|
-
-
|
11
|
-
version: 0.9.8.
|
10
|
+
- 6
|
11
|
+
version: 0.9.8.6
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Resolve Digital
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-09-
|
19
|
+
date: 2010-09-08 00:00:00 +12:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|