lolita-translation 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -1
- data/README.md +3 -2
- data/VERSION +1 -1
- data/lib/lolita-translation/has_translations.rb +2 -0
- data/lolita-translation.gemspec +2 -5
- metadata +13 -24
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -8,8 +8,9 @@
|
|
8
8
|
|
9
9
|
### Usage
|
10
10
|
|
11
|
-
1.
|
12
|
-
2.
|
11
|
+
1. Add `include Lolita::Translation` in your model.
|
12
|
+
2. Call `translations :title, :body` in your model and pass column names to translate.
|
13
|
+
3. Add `Article.sync_translation_table!` to your `db/seeds.rb` and run it.
|
13
14
|
|
14
15
|
#### What it does?
|
15
16
|
In Lolita, each tab, that contains at least on field, that needs to be translated, is changed to translatable tab.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.9
|
@@ -211,9 +211,11 @@ module Lolita
|
|
211
211
|
# before friendly_id 4.x
|
212
212
|
if adapter.klass.respond_to?(:uses_friendly_id?) && adapter.klass.send(:uses_friendly_id?)
|
213
213
|
parent_config = adapter.klass.friendly_id_config
|
214
|
+
|
214
215
|
has_friendly_id parent_config.method,
|
215
216
|
:allow_nil => parent_config.allow_nil,
|
216
217
|
:approximate_ascii => parent_config.approximate_ascii,
|
218
|
+
:ascii_approximation_options => [:russian],
|
217
219
|
:max_length => parent_config.max_length,
|
218
220
|
:reserved_words => parent_config.reserved_words,
|
219
221
|
:use_slug => parent_config.use_slug
|
data/lolita-translation.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "lolita-translation"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["ITHouse", "Gatis Tomsons", "Arturs Meisters"]
|
12
|
-
s.date = "2011-
|
12
|
+
s.date = "2011-11-03"
|
13
13
|
s.description = "Translates models in Lolita"
|
14
14
|
s.email = "support@ithouse.lv"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -58,14 +58,12 @@ Gem::Specification.new do |s|
|
|
58
58
|
s.specification_version = 3
|
59
59
|
|
60
60
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
61
|
-
s.add_runtime_dependency(%q<rails>, ["~> 3.1.0"])
|
62
61
|
s.add_runtime_dependency(%q<lolita>, [">= 3.2.0.rc.3"])
|
63
62
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
64
63
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
65
64
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
66
65
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
67
66
|
else
|
68
|
-
s.add_dependency(%q<rails>, ["~> 3.1.0"])
|
69
67
|
s.add_dependency(%q<lolita>, [">= 3.2.0.rc.3"])
|
70
68
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
71
69
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
@@ -73,7 +71,6 @@ Gem::Specification.new do |s|
|
|
73
71
|
s.add_dependency(%q<rcov>, [">= 0"])
|
74
72
|
end
|
75
73
|
else
|
76
|
-
s.add_dependency(%q<rails>, ["~> 3.1.0"])
|
77
74
|
s.add_dependency(%q<lolita>, [">= 3.2.0.rc.3"])
|
78
75
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
79
76
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
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.2.
|
4
|
+
version: 0.2.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,22 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2011-
|
14
|
+
date: 2011-11-03 00:00:00.000000000Z
|
15
15
|
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
17
|
-
name: rails
|
18
|
-
requirement: &79749180 !ruby/object:Gem::Requirement
|
19
|
-
none: false
|
20
|
-
requirements:
|
21
|
-
- - ~>
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 3.1.0
|
24
|
-
type: :runtime
|
25
|
-
prerelease: false
|
26
|
-
version_requirements: *79749180
|
27
16
|
- !ruby/object:Gem::Dependency
|
28
17
|
name: lolita
|
29
|
-
requirement: &
|
18
|
+
requirement: &84206130 !ruby/object:Gem::Requirement
|
30
19
|
none: false
|
31
20
|
requirements:
|
32
21
|
- - ! '>='
|
@@ -34,10 +23,10 @@ dependencies:
|
|
34
23
|
version: 3.2.0.rc.3
|
35
24
|
type: :runtime
|
36
25
|
prerelease: false
|
37
|
-
version_requirements: *
|
26
|
+
version_requirements: *84206130
|
38
27
|
- !ruby/object:Gem::Dependency
|
39
28
|
name: shoulda
|
40
|
-
requirement: &
|
29
|
+
requirement: &84205770 !ruby/object:Gem::Requirement
|
41
30
|
none: false
|
42
31
|
requirements:
|
43
32
|
- - ! '>='
|
@@ -45,10 +34,10 @@ dependencies:
|
|
45
34
|
version: '0'
|
46
35
|
type: :development
|
47
36
|
prerelease: false
|
48
|
-
version_requirements: *
|
37
|
+
version_requirements: *84205770
|
49
38
|
- !ruby/object:Gem::Dependency
|
50
39
|
name: bundler
|
51
|
-
requirement: &
|
40
|
+
requirement: &84205350 !ruby/object:Gem::Requirement
|
52
41
|
none: false
|
53
42
|
requirements:
|
54
43
|
- - ~>
|
@@ -56,10 +45,10 @@ dependencies:
|
|
56
45
|
version: 1.0.0
|
57
46
|
type: :development
|
58
47
|
prerelease: false
|
59
|
-
version_requirements: *
|
48
|
+
version_requirements: *84205350
|
60
49
|
- !ruby/object:Gem::Dependency
|
61
50
|
name: jeweler
|
62
|
-
requirement: &
|
51
|
+
requirement: &84204930 !ruby/object:Gem::Requirement
|
63
52
|
none: false
|
64
53
|
requirements:
|
65
54
|
- - ~>
|
@@ -67,10 +56,10 @@ dependencies:
|
|
67
56
|
version: 1.5.2
|
68
57
|
type: :development
|
69
58
|
prerelease: false
|
70
|
-
version_requirements: *
|
59
|
+
version_requirements: *84204930
|
71
60
|
- !ruby/object:Gem::Dependency
|
72
61
|
name: rcov
|
73
|
-
requirement: &
|
62
|
+
requirement: &84204370 !ruby/object:Gem::Requirement
|
74
63
|
none: false
|
75
64
|
requirements:
|
76
65
|
- - ! '>='
|
@@ -78,7 +67,7 @@ dependencies:
|
|
78
67
|
version: '0'
|
79
68
|
type: :development
|
80
69
|
prerelease: false
|
81
|
-
version_requirements: *
|
70
|
+
version_requirements: *84204370
|
82
71
|
description: Translates models in Lolita
|
83
72
|
email: support@ithouse.lv
|
84
73
|
executables: []
|
@@ -128,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
128
117
|
version: '0'
|
129
118
|
segments:
|
130
119
|
- 0
|
131
|
-
hash:
|
120
|
+
hash: 941878035
|
132
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
122
|
none: false
|
134
123
|
requirements:
|