isomorfeus-i18n 2.0.12 → 2.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 613b908acba7262dd04c55944edbc6a7a1fa6894830d68135b081881dd0de42c
4
- data.tar.gz: aebd94835a822df83c9f0aa1577f18a7972cd15d5cebd14e4941d02b1db87cce
3
+ metadata.gz: ea585a5bea7705cbbe044ced0b6d36d2c5abcea25ce7d769b9cd6f23c24c2cbc
4
+ data.tar.gz: f348a005aa131e9fe8ccf2c79ddf8360be8afe29bcff99ee397a716229838aba
5
5
  SHA512:
6
- metadata.gz: e33f49c37958b98a9cc7adb87a2e776b8ce2f1f4b1dfaf9636b3bdbbc6a4f1db444ea6d836f43cf6d4a74f8847d09142a34220227bb07ac947a85924298aaa3c
7
- data.tar.gz: 7a466fe08c657c1db9b3afba3f4a3a8851a831d7ff23489c9af7c89a57f2d546d1ccbf94205182edd7a6383403a5bb0448bd6d060f1b27d06a45f387824a1e3e
6
+ metadata.gz: 6a6270eef401a5b9876ef8d8bebac278866715accc7bc5e0ab22c1e72171670145e911d2ec008c3ffd568e93a251ec5c80ca9b2f55437c79fb67f3ba63b4445c
7
+ data.tar.gz: 6e58bf7de6ae186ec8f70fcd68b2de0a582e8d48981c76a3642a3dca42a9d74882b7d76239b7a5713e0df3a59855da2f1192915138e68d2492411508c3556553
@@ -18,12 +18,13 @@ module Isomorfeus
18
18
  'domain' => FastGettext.text_domain }
19
19
  response_agent.agent_result['data']['locale'] = if Isomorfeus.available_locales.include?(locale)
20
20
  locale
21
- else
22
- FastGettext.locale
23
- end
21
+ else
22
+ FastGettext.locale
23
+ end
24
24
  else
25
25
  response_agent.agent_result[domain] = {}
26
26
  begin
27
+ Isomorfeus::I18n::Init.init if Isomorfeus.development?
27
28
  FastGettext.with_domain(domain) do
28
29
  response_agent.request[domain].each_key do |locale|
29
30
  response_agent.agent_result[domain][locale] = {}
@@ -32,6 +32,20 @@ module Isomorfeus
32
32
  end
33
33
  end
34
34
 
35
+ def reload_from_server
36
+ Isomorfeus::Transport.promise_send_path('Isomorfeus::I18n::Handler::LocaleHandler', :init, Isomorfeus.negotiated_locale).then do |agent|
37
+ if agent.processed
38
+ agent.result
39
+ else
40
+ agent.processed = true
41
+ if agent.response.key?(:error)
42
+ Isomorfeus.raise_error(message: agent.response[:error])
43
+ end
44
+ Isomorfeus.store.dispatch(type: 'I18N_STATE', set_state: agent.response[:data])
45
+ end
46
+ end
47
+ end
48
+
35
49
  def initialized?
36
50
  @initialized
37
51
  end
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module I18n
3
- VERSION = '2.0.12'
3
+ VERSION = '2.0.13'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.12
4
+ version: 2.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.14.7
103
+ version: 0.14.8
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.14.7
110
+ version: 0.14.8
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: isomorfeus-preact
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 10.6.23
117
+ version: 10.6.24
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 10.6.23
124
+ version: 10.6.24
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: isomorfeus-redux
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -142,42 +142,42 @@ dependencies:
142
142
  requirements:
143
143
  - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: 2.0.12
145
+ version: 2.0.13
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - '='
151
151
  - !ruby/object:Gem::Version
152
- version: 2.0.12
152
+ version: 2.0.13
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: isomorfeus-data
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - '='
158
158
  - !ruby/object:Gem::Version
159
- version: 2.0.12
159
+ version: 2.0.13
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - '='
165
165
  - !ruby/object:Gem::Version
166
- version: 2.0.12
166
+ version: 2.0.13
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: isomorfeus
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - '='
172
172
  - !ruby/object:Gem::Version
173
- version: 2.0.12
173
+ version: 2.0.13
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - '='
179
179
  - !ruby/object:Gem::Version
180
- version: 2.0.12
180
+ version: 2.0.13
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: rake
183
183
  requirement: !ruby/object:Gem::Requirement