tr8n_client_sdk 4.0.11 → 4.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
  SHA1:
3
- metadata.gz: c2c1b467a4f65754fc29a17f956656d878fb2651
4
- data.tar.gz: 8c2c40f875d8c426e6eee8184f8489327b3129b2
3
+ metadata.gz: b0a90e855e9c4184040cbf011e4851370a300f91
4
+ data.tar.gz: e02d9241fade07efe751bb18620724372fa91746
5
5
  SHA512:
6
- metadata.gz: c192080364ca07a0ec22551611ae2a510bea56212e500c91f59777d8860048c664ba872e94cbd463b8b9a399ebbd2a1b6ea32513a81c8ad700bed26e9048fe9e
7
- data.tar.gz: a0120d94136ae358e12ac3f545d06e0af706136ccc68fe6babea7d6c5f9aebe696babc5a0167c62f22e6b6f57b7cb3f851f42cca1a011d263dc575e3bc8169eb
6
+ metadata.gz: 4835d5a4e4dbf4fadcc8f34b5d9f93da8e752d9fc55aad768af5a0cf5628ba6225f6cbceb1449669529da0a45b963f58a5bf63be3f8bb480185b721ac856e86e
7
+ data.tar.gz: a01ab98b73a3e0d3b61ce59db612c33631933bd65ba11095dd961181153246b88edd7436e409041b249f93c6a68f3b0404b1a38c73c6cd1a23dd1ca44455bed2
@@ -41,9 +41,9 @@ module Tr8nClientSdk
41
41
  # tr(:label => label, :description => "", :tokens => {}, :options => {})
42
42
  ############################################################
43
43
  def tr(label, description = '', tokens = {}, options = {})
44
- return label.html_safe if label.tr8n_translated?
45
-
46
44
  params = Tr8n::Utils.normalize_tr_params(label, description, tokens, options)
45
+ return params[:label].html_safe if params[:label].tr8n_translated?
46
+
47
47
  params[:options][:caller] = caller
48
48
 
49
49
  if request
@@ -41,6 +41,7 @@ module Tr8nClientSdk
41
41
  base.rescue_from 'Tr8n::Exception' do |e|
42
42
  Tr8n.logger.error(e)
43
43
  Tr8n.logger.error(e.backtrace)
44
+ Tr8n.session.reset
44
45
  raise e
45
46
  end
46
47
  end
@@ -166,19 +166,23 @@ module Tr8nClientSdk
166
166
  ######################################################################
167
167
 
168
168
  def tr8n_style_attribute_tag(attr_name = 'float', default = 'right', lang = tr8n_current_language)
169
+ return "#{attr_name}:#{default}".html_safe if Tr8n.config.disabled?
169
170
  "#{attr_name}:#{lang.align(default)}".html_safe
170
171
  end
171
172
 
172
173
  def tr8n_style_directional_attribute_tag(attr_name = 'padding', default = 'right', value = '5px', lang = tr8n_current_language)
174
+ return "#{attr_name}-#{default}:#{value}".html_safe if Tr8n.config.disabled?
173
175
  "#{attr_name}-#{lang.align(default)}:#{value}".html_safe
174
176
  end
175
177
 
176
178
  def tr8n_dir_attribute_tag(lang = tr8n_current_language)
179
+ return "dir='ltr'" if Tr8n.config.disabled?
177
180
  "dir='#{lang.dir}'".html_safe
178
181
  end
179
182
 
180
183
  def tr8n_lang_attribute_tag(lang = tr8n_current_language)
181
- "lang=#{lang.locale}".html_safe
184
+ return "lang='en-US'" if Tr8n.config.disabled?
185
+ "lang='#{lang.locale}'".html_safe
182
186
  end
183
187
 
184
188
  end
@@ -23,5 +23,5 @@
23
23
 
24
24
 
25
25
  module Tr8nClientSdk
26
- VERSION = '4.0.11'
26
+ VERSION = '4.0.13'
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tr8n_client_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.11
4
+ version: 4.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Berkovich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-27 00:00:00.000000000 Z
11
+ date: 2014-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails