tr8n_client_sdk 3.2.4 → 3.2.5

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: a430fd6d3363d71807fa76e4714576232ab7e700
4
- data.tar.gz: c8cde0b647c66310f119bb533deb7aa375549651
3
+ metadata.gz: 6298c33328834895b2d251533980efb1de6cd6af
4
+ data.tar.gz: f089ec3e0d84765d0d5e2df3b13f83995e2588b9
5
5
  SHA512:
6
- metadata.gz: b4764c1074158103a77c61f2a8d157fd5a12a53e80b86446b98d0b7d5ef96dd864f3e9e60dd2ebb969c1b3d6f8a06a4a5713ab59a3a055fbfd614d03b8727951
7
- data.tar.gz: e0dd79cbf38762b3d20500c142c6a5ac71133f992aecd6fec02bb37bc12fc0f69e0646b9014013d5e56d54d923c5b58fccf93fcc766669005c1566d4c12b0701
6
+ metadata.gz: 3357cad03fa504b87999b9ebdfe722e444a04b2f5a8e8176e0c3503da2b1c8fa1ef6fafcbd5acf8c8b7ba56669a6f0ed0f36298354b1838c0e773291da314ede
7
+ data.tar.gz: e00f81f50af6731c77f0a33f4bf66ea0bbacdea8d3c927904340c8785514a62f97572e0211f538bad2d6f92ac0c9bf197356e77e42262580379b11d821278c05
File without changes
@@ -41,7 +41,7 @@ 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?
44
+ return label.html_safe if label.is_a?(String) and label.tr8n_translated?
45
45
 
46
46
  params = Tr8n::Utils.normalize_tr_params(label, description, tokens, options)
47
47
  params[:options][:caller] = caller
@@ -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
@@ -37,8 +37,6 @@ require File.join(File.dirname(__FILE__), 'extensions/action_common_methods')
37
37
  require File.join(File.dirname(__FILE__), 'extensions/action_view_extension')
38
38
  require File.join(File.dirname(__FILE__), 'extensions/action_controller_extension')
39
39
 
40
- require File.join(File.dirname(__FILE__), 'extensions/string')
41
-
42
40
  module Tr8nClientSdk
43
41
  class Railtie < ::Rails::Railtie #:nodoc:
44
42
  initializer 'tr8n_client_sdk' do |app|
@@ -22,5 +22,5 @@
22
22
  #++
23
23
 
24
24
  module Tr8nClientSdk
25
- VERSION = '3.2.4'
25
+ VERSION = '3.2.5'
26
26
  end
@@ -21,9 +21,10 @@
21
21
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  #++
23
23
 
24
+ require "tr8n_core"
25
+ require "tr8n_client_sdk/core/string"
24
26
  require "tr8n_client_sdk/railtie"
25
27
  require "tr8n_client_sdk/engine"
26
- require "tr8n_core"
27
28
  require "tr8n/cache_adapters/rails"
28
29
 
29
30
  module Tr8nClientSdk
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: 3.2.4
4
+ version: 3.2.5
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-26 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
@@ -56,11 +56,11 @@ files:
56
56
  - lib/tasks/tr8n_client_sdk.rake
57
57
  - lib/tr8n/cache_adapters/rails.rb
58
58
  - lib/tr8n_client_sdk.rb
59
+ - lib/tr8n_client_sdk/core/string.rb
59
60
  - lib/tr8n_client_sdk/engine.rb
60
61
  - lib/tr8n_client_sdk/extensions/action_common_methods.rb
61
62
  - lib/tr8n_client_sdk/extensions/action_controller_extension.rb
62
63
  - lib/tr8n_client_sdk/extensions/action_view_extension.rb
63
- - lib/tr8n_client_sdk/extensions/string.rb
64
64
  - lib/tr8n_client_sdk/railtie.rb
65
65
  - lib/tr8n_client_sdk/version.rb
66
66
  homepage: https://translationexchange.com