lolita-translation 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/lolita-translation.rb +5 -0
- data/lolita-translation.gemspec +2 -2
- metadata +15 -15
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/lolita-translation.rb
CHANGED
@@ -7,6 +7,7 @@ module Lolita
|
|
7
7
|
module Translation
|
8
8
|
class << self
|
9
9
|
def translatable?(tab)
|
10
|
+
tab.dbi.klass.respond_to?(:translation_attrs) &&
|
10
11
|
tab.dbi.klass.respond_to?(:translations) && (tab.fields.map(&:name) & tab.dbi.klass.translation_attrs).any?
|
11
12
|
end
|
12
13
|
|
@@ -45,6 +46,8 @@ Lolita::Hooks.component(:"/lolita/configuration/tab/fields").around do
|
|
45
46
|
tab = self.component_locals[:tab]
|
46
47
|
if Lolita::Translation.translatable?(tab)
|
47
48
|
self.send(:render_component,"lolita/translation",:language_wrap,:tab => tab, :content => let_content)
|
49
|
+
else
|
50
|
+
let_content
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|
@@ -52,6 +55,8 @@ Lolita::Hooks.component(:"/lolita/configuration/nested_form/fields").around do
|
|
52
55
|
tab = self.component_locals[:nested_form].parent
|
53
56
|
if Lolita::Translation.translatable?(tab)
|
54
57
|
self.send(:render_component,"lolita/translation",:language_wrap, :tab => tab, :content => let_content)
|
58
|
+
else
|
59
|
+
let_content
|
55
60
|
end
|
56
61
|
end
|
57
62
|
|
data/lolita-translation.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{lolita-translation}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{ITHouse}, %q{Gatis Tomsons}, %q{Arturs Meisters}]
|
12
|
-
s.date = %q{2011-08-
|
12
|
+
s.date = %q{2011-08-30}
|
13
13
|
s.description = %q{Translates models in Lolita}
|
14
14
|
s.email = %q{support@ithouse.lv}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolita-translation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2011-08-
|
14
|
+
date: 2011-08-30 00:00:00.000000000Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
18
|
-
requirement: &
|
18
|
+
requirement: &85358650 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ! '>='
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: 3.0.0
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *85358650
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: lolita
|
29
|
-
requirement: &
|
29
|
+
requirement: &85358230 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ~>
|
@@ -34,10 +34,10 @@ dependencies:
|
|
34
34
|
version: 3.1.15
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *85358230
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: shoulda
|
40
|
-
requirement: &
|
40
|
+
requirement: &85357760 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
@@ -45,10 +45,10 @@ dependencies:
|
|
45
45
|
version: '0'
|
46
46
|
type: :development
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *85357760
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: bundler
|
51
|
-
requirement: &
|
51
|
+
requirement: &85357330 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
54
54
|
- - ~>
|
@@ -56,10 +56,10 @@ dependencies:
|
|
56
56
|
version: 1.0.0
|
57
57
|
type: :development
|
58
58
|
prerelease: false
|
59
|
-
version_requirements: *
|
59
|
+
version_requirements: *85357330
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: jeweler
|
62
|
-
requirement: &
|
62
|
+
requirement: &85356510 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
65
65
|
- - ~>
|
@@ -67,10 +67,10 @@ dependencies:
|
|
67
67
|
version: 1.5.2
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
|
-
version_requirements: *
|
70
|
+
version_requirements: *85356510
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: rcov
|
73
|
-
requirement: &
|
73
|
+
requirement: &85355070 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - ! '>='
|
@@ -78,7 +78,7 @@ dependencies:
|
|
78
78
|
version: '0'
|
79
79
|
type: :development
|
80
80
|
prerelease: false
|
81
|
-
version_requirements: *
|
81
|
+
version_requirements: *85355070
|
82
82
|
description: Translates models in Lolita
|
83
83
|
email: support@ithouse.lv
|
84
84
|
executables: []
|
@@ -128,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
segments:
|
130
130
|
- 0
|
131
|
-
hash:
|
131
|
+
hash: 706009075
|
132
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
133
|
none: false
|
134
134
|
requirements:
|