remote_i18n_extension 1.0.2 → 1.0.3
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.
- checksums.yaml +4 -4
- data/lib/remote_i18n_extension/version.rb +1 -1
- data/lib/remote_i18n_extension.rb +8 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbfead53f2922c6db1f2df6d05a7b559c044146734b8e97874e405ea6d36e83a
|
4
|
+
data.tar.gz: 582d40cb9a7a420bc35bf2fdaf356132e78afc4ab1bae81acc4ae91561a75bb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fef49f91bf9442607df91841b5f5ea8e32544d61fbf2da0aa3f550fa4e4733a14b374e198d157575f380c548bb4fc0f6260b00455283a4657ec5feb4506fd2a4
|
7
|
+
data.tar.gz: 8176c1fd2449279e9aca1f4a860f9cc85402c627ecc00cb490717b2a5210a676747c4a882a076c727a938a8aeb220e224b0df0bb5e9f070480af82641f9d28d2
|
@@ -2,10 +2,11 @@ require 'i18n'
|
|
2
2
|
require_relative 'remote_i18n_extension/backend/remote'
|
3
3
|
|
4
4
|
module RemoteI18nExtension
|
5
|
-
I18n.backend = I18n::Backend::Chain.new(
|
6
|
-
|
7
|
-
|
8
|
-
)
|
5
|
+
# I18n.backend = I18n::Backend::Chain.new(
|
6
|
+
# RemoteI18nExtension::Backend::Remote.new,
|
7
|
+
# I18n::Backend::Simple.new
|
8
|
+
# )
|
9
|
+
I18n.backend = RemoteI18nExtension::Backend::Remote.new
|
9
10
|
|
10
11
|
class << self
|
11
12
|
attr_reader :load_path, :available_locales, :locale
|
@@ -17,14 +18,17 @@ module RemoteI18nExtension
|
|
17
18
|
|
18
19
|
def locale=(locale)
|
19
20
|
I18n.locale = locale || :en
|
21
|
+
@locale = I18n.load_path
|
20
22
|
end
|
21
23
|
|
22
24
|
def load_path=(paths_array)
|
23
25
|
I18n.load_path += paths_array
|
26
|
+
@load_path = I18n.load_path
|
24
27
|
end
|
25
28
|
|
26
29
|
def available_locales=(locales_array)
|
27
30
|
I18n.available_locales = locales_array ? locales_array : [:en]
|
31
|
+
@available_locales = I18n.load_path
|
28
32
|
end
|
29
33
|
|
30
34
|
def translate(*args)
|