active_translation 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 94e47e7f24a4318caea63540d47bd83d639e50be79e04198fc8760fd90156120
|
|
4
|
+
data.tar.gz: 425bbdd22608f48db0882777700576579e15859e5b824332747ddb96fa1cbe98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 728d2c9dff7539257c3d9e2e2853cdb0b80f0b13b912f045c00d22e63c817c0e478c61b30825932917271acf888c903cb70765329f641b2a4eb55e1028d20f5f
|
|
7
|
+
data.tar.gz: d44131c323130218ba82cd767e65fb1d6964b50ddda7647cfe2dd80fed50d4d243649e907708b5f70c8de019e5cefc0d2e07f59d37393e549bad0996e65fb2db
|
data/README.md
CHANGED
|
@@ -7,13 +7,23 @@ Next steps:
|
|
|
7
7
|
1. Run migrations:
|
|
8
8
|
rails db:migrate
|
|
9
9
|
|
|
10
|
-
2. Configure your Google Translation API
|
|
11
|
-
# config/initializers/active_translation.rb
|
|
10
|
+
2. Configure your Google Translation API at config/initializers/active_translation.rb:
|
|
12
11
|
ActiveTranslation.configure do |config|
|
|
13
|
-
config.
|
|
12
|
+
config.project_id = ENV.fetch("GOOGLE_TRANSLATION_PROJECT_ID", :missing_google_translation_project_id)
|
|
13
|
+
config.private_key_id = ENV.fetch("GOOGLE_TRANSLATION_PRIVATE_KEY_ID", :missing_google_translation_private_key_id)
|
|
14
|
+
config.private_key = ENV.fetch("GOOGLE_TRANSLATION_PRIVATE_KEY", :missing_google_translation_private_key)
|
|
15
|
+
config.client_email = ENV.fetch("GOOGLE_TRANSLATION_CLIENT_EMAIL", :missing_google_translation_client_email)
|
|
16
|
+
config.client_id = ENV.fetch("GOOGLE_TRANSLATION_CLIENT_ID", :missing_google_translation_client_id)
|
|
17
|
+
config.client_x509_cert_url = ENV.fetch("GOOGLE_TRANSLATION_CLIENT_CERT_URL", :missing_google_translation_client_cert_url)
|
|
18
|
+
|
|
19
|
+
config.type = ENV.fetch("GOOGLE_TRANSLATION_TYPE", "service_account")
|
|
20
|
+
config.auth_uri = ENV.fetch("GOOGLE_TRANSLATION_AUTH_URI", "https://accounts.google.com/o/oauth2/auth")
|
|
21
|
+
config.token_uri = ENV.fetch("GOOGLE_TRANSLATION_TOKEN_URI", "https://oauth2.googleapis.com/token")
|
|
22
|
+
config.auth_provider_x509_cert_url = ENV.fetch("GOOGLE_TRANSLATION_AUTH_PROVIDER_CERT_URL", "https://www.googleapis.com/oauth2/v1/certs")
|
|
23
|
+
config.universe_domain = ENV.fetch("GOOGLE_TRANSLATION_UNIVERSE_DOMAIN", "googleapis.com")
|
|
14
24
|
end
|
|
15
25
|
|
|
16
26
|
3. Add to your models:
|
|
17
|
-
translates :name, :description, into:
|
|
27
|
+
translates :name, :description, into: :all
|
|
18
28
|
|
|
19
29
|
===============================================================================
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_translation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sean Hogge
|
|
@@ -13,30 +13,42 @@ dependencies:
|
|
|
13
13
|
name: rails
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
|
-
- - "
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '7.0'
|
|
19
|
+
- - "<"
|
|
17
20
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '
|
|
21
|
+
version: '9'
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
25
|
requirements:
|
|
23
|
-
- - "
|
|
26
|
+
- - ">="
|
|
24
27
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '7'
|
|
28
|
+
version: '7.0'
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '9'
|
|
26
32
|
- !ruby/object:Gem::Dependency
|
|
27
33
|
name: activerecord
|
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
|
29
35
|
requirements:
|
|
30
|
-
- - "
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '7.0'
|
|
39
|
+
- - "<"
|
|
31
40
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
41
|
+
version: '9'
|
|
33
42
|
type: :runtime
|
|
34
43
|
prerelease: false
|
|
35
44
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
45
|
requirements:
|
|
37
|
-
- - "
|
|
46
|
+
- - ">="
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: '7.0'
|
|
49
|
+
- - "<"
|
|
38
50
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
51
|
+
version: '9'
|
|
40
52
|
- !ruby/object:Gem::Dependency
|
|
41
53
|
name: faraday
|
|
42
54
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -44,6 +56,9 @@ dependencies:
|
|
|
44
56
|
- - "~>"
|
|
45
57
|
- !ruby/object:Gem::Version
|
|
46
58
|
version: '2.0'
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 2.7.0
|
|
47
62
|
type: :runtime
|
|
48
63
|
prerelease: false
|
|
49
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -51,6 +66,9 @@ dependencies:
|
|
|
51
66
|
- - "~>"
|
|
52
67
|
- !ruby/object:Gem::Version
|
|
53
68
|
version: '2.0'
|
|
69
|
+
- - ">="
|
|
70
|
+
- !ruby/object:Gem::Version
|
|
71
|
+
version: 2.7.0
|
|
54
72
|
- !ruby/object:Gem::Dependency
|
|
55
73
|
name: googleauth
|
|
56
74
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -58,6 +76,9 @@ dependencies:
|
|
|
58
76
|
- - "~>"
|
|
59
77
|
- !ruby/object:Gem::Version
|
|
60
78
|
version: '1.0'
|
|
79
|
+
- - ">="
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: 1.4.0
|
|
61
82
|
type: :runtime
|
|
62
83
|
prerelease: false
|
|
63
84
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -65,6 +86,9 @@ dependencies:
|
|
|
65
86
|
- - "~>"
|
|
66
87
|
- !ruby/object:Gem::Version
|
|
67
88
|
version: '1.0'
|
|
89
|
+
- - ">="
|
|
90
|
+
- !ruby/object:Gem::Version
|
|
91
|
+
version: 1.4.0
|
|
68
92
|
description: Easily translate specific attributes of any ActiveRecord model
|
|
69
93
|
email:
|
|
70
94
|
- sean@seanhogge.com
|