isomorfeus-i18n 2.0.11 → 2.0.15

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: d002b992f26be143f247b1443986d96a7f83005667069d1d2b8a448d21e7947d
4
- data.tar.gz: 64e017a696a6b0e507fcb5993b0686b0999184c0baf4dd8ea5254d65b0458691
3
+ metadata.gz: 3107273bcba894911e0ff7b9448cb335d291cd4e9363092b4c2f5462712676f8
4
+ data.tar.gz: bde2bfcf50da72b5339a1960dead6648f18bebeba7806a43a912f3ca557a55fe
5
5
  SHA512:
6
- metadata.gz: 791ef3d52d452536de39d7f4e7575ba348231fb21d3cb9c0c506bcd9c467df2cb692eeeb2df5ce0cd2871886c9317cb02354132aafded8ee4d36ce19c5edfccc
7
- data.tar.gz: 29027a78469dc1d5637bd8dc6374b799c5518095ecab291024ec221d82887cce8254585bca65ce1683807f921c391dfd1be540c3b5c919e274d3553562d2ec1a
6
+ metadata.gz: 07ec07c611c637aa2af682b05f985614ca82681b235f2a3b76b0ed7925f06e9391267388b982017424145ce38ca53db71e19103b352424470e5dce433f1a5ab6
7
+ data.tar.gz: 0a90502be7d265d2cd243f78779ff120ccddf0c176f22b4ab72fd4f900d5be21874f5a9ba20b70e7bc843b9028010176072adb6b7ae98e284de08e5d168c4f30
@@ -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] = {}
@@ -18,13 +18,7 @@ module Isomorfeus
18
18
 
19
19
  def init_from_server
20
20
  Isomorfeus::Transport.promise_send_path('Isomorfeus::I18n::Handler::LocaleHandler', :init, Isomorfeus.negotiated_locale).then do |agent|
21
- if agent.processed
22
- agent.result
23
- else
24
- agent.processed = true
25
- if agent.response.key?(:error)
26
- Isomorfeus.raise_error(message: agent.response[:error])
27
- end
21
+ agent.process do
28
22
  @initializing = false
29
23
  Isomorfeus.store.dispatch(type: 'I18N_LOAD', data: agent.response[:data])
30
24
  @initialized = true
@@ -32,6 +26,14 @@ module Isomorfeus
32
26
  end
33
27
  end
34
28
 
29
+ def reload_from_server
30
+ Isomorfeus::Transport.promise_send_path('Isomorfeus::I18n::Handler::LocaleHandler', :init, Isomorfeus.negotiated_locale).then do |agent|
31
+ agent.process do
32
+ Isomorfeus.store.dispatch(type: 'I18N_STATE', set_state: agent.response[:data])
33
+ end
34
+ end
35
+ end
36
+
35
37
  def initialized?
36
38
  @initialized
37
39
  end
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module I18n
3
- VERSION = '2.0.11'
3
+ VERSION = '2.0.15'
4
4
  end
5
5
  end
@@ -112,13 +112,7 @@ module LucidTranslation
112
112
  end
113
113
 
114
114
  def _handle_i18n_response(agent, domain)
115
- if agent.processed
116
- agent.result
117
- else
118
- agent.processed = true
119
- if agent.response.key?(:error)
120
- Isomorfeus.raise_error(message: agent.response[:error])
121
- end
115
+ agent.process do
122
116
  if on_browser?
123
117
  Isomorfeus.store.collect_and_defer_dispatch(type: 'I18N_LOAD', data: { domain => agent.response[domain] })
124
118
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.11
4
+ version: 2.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-31 00:00:00.000000000 Z
11
+ date: 2022-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -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.26
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.26
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.11
145
+ version: 2.0.15
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.11
152
+ version: 2.0.15
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.11
159
+ version: 2.0.15
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.11
166
+ version: 2.0.15
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.11
173
+ version: 2.0.15
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.11
180
+ version: 2.0.15
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: rake
183
183
  requirement: !ruby/object:Gem::Requirement