flame-r18n 2.0.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flame/r18n/initialization.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b7d001944f9fef5e69d11ad22da551cb97eeadc
|
4
|
+
data.tar.gz: 3bcd0bf0b1c0ca1efe7f3ec1c654c0370b9922cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef0821ee8537a20fdb64165d1b7b3ca8c6a9e7e5297c3c7394f069286a0313cc86ed4cd55843b549f57461f5a26c74c21146dcec329080b582871df631cbe328
|
7
|
+
data.tar.gz: 176715bf76a7a9fdcc9019770f244a9e208137f91794fbd37e271952a0eb7fc0dea157b23e37fa25dc5ea3aa9f62f1f1c079005315259af7b21e25c41254237c
|
@@ -34,7 +34,15 @@ module Flame
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def preferred_locale
|
37
|
-
|
37
|
+
locale_param || session[:locale]
|
38
|
+
end
|
39
|
+
|
40
|
+
def locale_param
|
41
|
+
params[:locale] if available_locale_codes.include?(params[:locale])
|
42
|
+
end
|
43
|
+
|
44
|
+
def available_locale_codes
|
45
|
+
::R18n.available_locales.map(&:code)
|
38
46
|
end
|
39
47
|
|
40
48
|
def load_r18n
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flame-r18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Popov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flame
|