has_many_translations 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/has_many_translations.gemspec +7 -7
- data/lib/has_many_translations/creation.rb +3 -1
- metadata +12 -9
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -10,13 +10,13 @@ begin
|
|
10
10
|
g.name = 'has_many_translations'
|
11
11
|
g.summary = %(Makes models' speak in tongues)
|
12
12
|
g.description = %(Keep a DRY multilingual translation of your ActiveRecord models' textual attributes)
|
13
|
-
g.email = '
|
13
|
+
g.email = 'adam@artforge.com'
|
14
14
|
g.homepage = 'http://github.com/opengotham/has_many_translations'
|
15
|
-
g.authors =
|
15
|
+
g.authors = ["opengotham","Artforge"]
|
16
16
|
g.add_dependency 'activerecord', '>= 2.1.0'
|
17
17
|
g.add_development_dependency 'shoulda'
|
18
18
|
g.add_development_dependency 'mocha'
|
19
|
-
g.add_runtime_dependency '
|
19
|
+
g.add_runtime_dependency 'artforge-rtranslate', '>=1.3.2'
|
20
20
|
g.add_runtime_dependency 'activequeue'
|
21
21
|
g.add_runtime_dependency 'settingslogic'
|
22
22
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.4
|
@@ -5,13 +5,13 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{has_many_translations}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["opengotham"]
|
12
|
-
s.date = %q{2010-
|
11
|
+
s.authors = ["opengotham", "Artforge"]
|
12
|
+
s.date = %q{2010-07-02}
|
13
13
|
s.description = %q{Keep a DRY multilingual translation of your ActiveRecord models' textual attributes}
|
14
|
-
s.email = %q{
|
14
|
+
s.email = %q{adam@artforge.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.rdoc"
|
17
17
|
]
|
@@ -52,14 +52,14 @@ Gem::Specification.new do |s|
|
|
52
52
|
s.add_runtime_dependency(%q<activerecord>, [">= 2.1.0"])
|
53
53
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
54
54
|
s.add_development_dependency(%q<mocha>, [">= 0"])
|
55
|
-
s.add_runtime_dependency(%q<
|
55
|
+
s.add_runtime_dependency(%q<artforge-rtranslate>, [">= 1.3.2"])
|
56
56
|
s.add_runtime_dependency(%q<activequeue>, [">= 0"])
|
57
57
|
s.add_runtime_dependency(%q<settingslogic>, [">= 0"])
|
58
58
|
else
|
59
59
|
s.add_dependency(%q<activerecord>, [">= 2.1.0"])
|
60
60
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
61
61
|
s.add_dependency(%q<mocha>, [">= 0"])
|
62
|
-
s.add_dependency(%q<
|
62
|
+
s.add_dependency(%q<artforge-rtranslate>, [">= 1.3.2"])
|
63
63
|
s.add_dependency(%q<activequeue>, [">= 0"])
|
64
64
|
s.add_dependency(%q<settingslogic>, [">= 0"])
|
65
65
|
end
|
@@ -67,7 +67,7 @@ Gem::Specification.new do |s|
|
|
67
67
|
s.add_dependency(%q<activerecord>, [">= 2.1.0"])
|
68
68
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
69
69
|
s.add_dependency(%q<mocha>, [">= 0"])
|
70
|
-
s.add_dependency(%q<
|
70
|
+
s.add_dependency(%q<artforge-rtranslate>, [">= 1.3.2"])
|
71
71
|
s.add_dependency(%q<activequeue>, [">= 0"])
|
72
72
|
s.add_dependency(%q<settingslogic>, [">= 0"])
|
73
73
|
end
|
@@ -157,7 +157,9 @@ module HasManyTranslations
|
|
157
157
|
if defined? HmtSettings
|
158
158
|
@translator.key = HmtSettings.google_api_key
|
159
159
|
end
|
160
|
-
translation_val = @translator.translate(try(attrib), :from => origin_locale.to_s, :to => loc.to_s)
|
160
|
+
# translation_val = @translator.translate(try(attrib), :from => origin_locale.to_s, :to => loc.to_s)
|
161
|
+
translation_val = @translator.post_translate(try(attrib), :from => origin_locale.to_s, :to => loc.to_s)
|
162
|
+
# translation_val = @translator.translate(try(attrib), origin_locale.to_s, loc.to_s, {:method => :post})
|
161
163
|
translations.create(:attribute => attrib, :locale_code => loc.to_s, :value => translation_val, :locale_name => Google::Language::Languages[loc.to_s], :machine_translation => true, :origin_locale_code => origin_locale ) unless translation_val.nil? || translation_val.match('Error: ')
|
162
164
|
end
|
163
165
|
|
metadata
CHANGED
@@ -1,21 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_many_translations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 4
|
10
|
+
version: 0.3.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- opengotham
|
14
|
+
- Artforge
|
14
15
|
autorequire:
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-
|
19
|
+
date: 2010-07-02 00:00:00 -04:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -63,17 +64,19 @@ dependencies:
|
|
63
64
|
type: :development
|
64
65
|
version_requirements: *id003
|
65
66
|
- !ruby/object:Gem::Dependency
|
66
|
-
name:
|
67
|
+
name: artforge-rtranslate
|
67
68
|
prerelease: false
|
68
69
|
requirement: &id004 !ruby/object:Gem::Requirement
|
69
70
|
none: false
|
70
71
|
requirements:
|
71
72
|
- - ">="
|
72
73
|
- !ruby/object:Gem::Version
|
73
|
-
hash:
|
74
|
+
hash: 31
|
74
75
|
segments:
|
75
|
-
-
|
76
|
-
|
76
|
+
- 1
|
77
|
+
- 3
|
78
|
+
- 2
|
79
|
+
version: 1.3.2
|
77
80
|
type: :runtime
|
78
81
|
version_requirements: *id004
|
79
82
|
- !ruby/object:Gem::Dependency
|
@@ -105,7 +108,7 @@ dependencies:
|
|
105
108
|
type: :runtime
|
106
109
|
version_requirements: *id006
|
107
110
|
description: Keep a DRY multilingual translation of your ActiveRecord models' textual attributes
|
108
|
-
email:
|
111
|
+
email: adam@artforge.com
|
109
112
|
executables: []
|
110
113
|
|
111
114
|
extensions: []
|