refinerycms-i18n 0.9.9.13 → 0.9.9.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/config/locales/{ja.yml → jp.yml} +1 -1
- data/lib/gemspec.rb +1 -1
- data/lib/refinery/i18n.rb +7 -12
- metadata +3 -3
data/lib/gemspec.rb
CHANGED
data/lib/refinery/i18n.rb
CHANGED
|
@@ -30,12 +30,12 @@ module Refinery
|
|
|
30
30
|
::I18n.locale = ::Refinery::I18n.current_locale
|
|
31
31
|
|
|
32
32
|
if ::Refinery::I18n.has_locale?(locale = params[:locale].try(:to_sym))
|
|
33
|
-
|
|
33
|
+
::I18n.locale = locale
|
|
34
34
|
elsif locale.present? and locale != ::Refinery::I18n.default_frontend_locale
|
|
35
|
-
params[:locale] =
|
|
35
|
+
params[:locale] = ::I18n.locale = ::Refinery::I18n.default_frontend_locale
|
|
36
36
|
redirect_to(params, :notice => "The locale '#{locale}' is not supported.") and return
|
|
37
37
|
else
|
|
38
|
-
|
|
38
|
+
::I18n.locale = ::Refinery::I18n.default_frontend_locale
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -127,14 +127,8 @@ module Refinery
|
|
|
127
127
|
end
|
|
128
128
|
|
|
129
129
|
def current_frontend_locale
|
|
130
|
-
if
|
|
131
|
-
|
|
132
|
-
Thread.current[:globalize_locale]
|
|
133
|
-
else
|
|
134
|
-
::Refinery::I18n.default_frontend_locale
|
|
135
|
-
end
|
|
136
|
-
elsif ::I18n.locale.present? && ::I18n.locale.to_s != ::Refinery::I18n.default_frontend_locale.to_s
|
|
137
|
-
::I18n.locale
|
|
130
|
+
if Globalize.locale.present? && Globalize.locale.to_s != ::Refinery::I18n.default_frontend_locale.to_s
|
|
131
|
+
Globalize.locale
|
|
138
132
|
elsif ::Refinery::I18n.default_frontend_locale.present?
|
|
139
133
|
::Refinery::I18n.default_frontend_locale
|
|
140
134
|
else
|
|
@@ -208,7 +202,8 @@ module Refinery
|
|
|
208
202
|
:el => 'Ελληνικά',
|
|
209
203
|
:rs => 'Srpski',
|
|
210
204
|
:cs => 'Česky',
|
|
211
|
-
:sk => 'Slovenský'
|
|
205
|
+
:sk => 'Slovenský',
|
|
206
|
+
:jp => '日本語'
|
|
212
207
|
}
|
|
213
208
|
end
|
|
214
209
|
end
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: refinerycms-i18n
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.9.9.
|
|
5
|
+
version: 0.9.9.14
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Resolve Digital
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-03-
|
|
13
|
+
date: 2011-03-15 00:00:00 +13:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
@@ -87,7 +87,7 @@ files:
|
|
|
87
87
|
- config/locales/id.yml
|
|
88
88
|
- config/locales/is.yml
|
|
89
89
|
- config/locales/it.yml
|
|
90
|
-
- config/locales/
|
|
90
|
+
- config/locales/jp.yml
|
|
91
91
|
- config/locales/ko.yml
|
|
92
92
|
- config/locales/lo.yml
|
|
93
93
|
- config/locales/lt.yml
|