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 +4 -4
- data/lib/tr8n_client_sdk/{extensions → core}/string.rb +0 -0
- data/lib/tr8n_client_sdk/extensions/action_common_methods.rb +1 -1
- data/lib/tr8n_client_sdk/extensions/action_controller_extension.rb +1 -0
- data/lib/tr8n_client_sdk/extensions/action_view_extension.rb +5 -1
- data/lib/tr8n_client_sdk/railtie.rb +0 -2
- data/lib/tr8n_client_sdk/version.rb +1 -1
- data/lib/tr8n_client_sdk.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6298c33328834895b2d251533980efb1de6cd6af
|
4
|
+
data.tar.gz: f089ec3e0d84765d0d5e2df3b13f83995e2588b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
@@ -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
|
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|
|
data/lib/tr8n_client_sdk.rb
CHANGED
@@ -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
|
+
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-
|
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
|