i18n-migrations 2.0.7 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -2
- data/.i18n-migrations.default.yml +2 -2
- data/.ruby-version +1 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +56 -65
- data/i18n-migrations.gemspec +1 -1
- data/lib/i18n/migrations/google_translate_dictionary.rb +8 -0
- data/lib/i18n/migrations/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cccd4b210792141aec1edd391bc2483e90c76d9c1c4dcda40369b9b0a4b1a751
|
4
|
+
data.tar.gz: 7907c318d3f3e428674888ba00bffdd64bb76b2ca549b23dc908be64fc869a77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b87f8980b6208a48ea2f9be1e9da99e0c67aecc2e27010d6bcf55c8dc2e40b9881a96001f4af511c9795a19f8a5905ecbc438ff0ee52a719891e29afece60c05
|
7
|
+
data.tar.gz: eaf3e37178ed9b4dfbe22e2acd0e87dcb3ea5e9539ac01ebba2222c8cc0ce9057f897fdfc248c272a39b80762d9b8cdc0171b499739c9467e39f01020c9ea7ea
|
data/.circleci/config.yml
CHANGED
@@ -5,7 +5,7 @@ migration_dir: i18n/migrate
|
|
5
5
|
locales_dir: config/locales
|
6
6
|
|
7
7
|
# choose either google_spreadsheets or crowd_translate as a backend
|
8
|
-
backend:
|
8
|
+
backend: crowd_translate
|
9
9
|
|
10
10
|
# number of threads to concurrently perform migration operations for locales (optional)
|
11
11
|
# concurrency: 4
|
@@ -31,7 +31,7 @@ google_spreadsheets:
|
|
31
31
|
es: https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID/edit
|
32
32
|
|
33
33
|
# this is your api key to use google translate
|
34
|
-
google_translate_api_key:
|
34
|
+
google_translate_api_key: AIzaSyBhndWTcsLe8CfQC3yWhNgiSkEEV16lziE
|
35
35
|
|
36
36
|
# put things like your product name here along with any possible mistranslations
|
37
37
|
do_not_translate:
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-
|
1
|
+
ruby-3.1.3
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -10,53 +10,53 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activesupport (
|
13
|
+
activesupport (7.0.4.3)
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
15
|
i18n (>= 1.6, < 2)
|
16
16
|
minitest (>= 5.1)
|
17
17
|
tzinfo (~> 2.0)
|
18
|
-
zeitwerk (~> 2.3)
|
19
18
|
addressable (2.8.1)
|
20
19
|
public_suffix (>= 2.0.2, < 6.0)
|
21
|
-
autoparse (0.3.3)
|
22
|
-
addressable (>= 2.3.1)
|
23
|
-
extlib (>= 0.9.15)
|
24
|
-
multi_json (>= 1.0.0)
|
25
20
|
colorize (0.8.1)
|
26
|
-
concurrent-ruby (1.
|
27
|
-
connection_pool (2.
|
21
|
+
concurrent-ruby (1.2.2)
|
22
|
+
connection_pool (2.3.0)
|
23
|
+
declarative (0.0.20)
|
28
24
|
diff-lcs (1.5.0)
|
29
25
|
domain_name (0.5.20190701)
|
30
26
|
unf (>= 0.0.5, < 1.0.0)
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
google-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
27
|
+
faraday (0.17.6)
|
28
|
+
multipart-post (>= 1.2, < 3)
|
29
|
+
google-apis-core (0.10.0)
|
30
|
+
addressable (~> 2.5, >= 2.5.1)
|
31
|
+
googleauth (>= 0.16.2, < 2.a)
|
32
|
+
httpclient (>= 2.8.1, < 3.a)
|
33
|
+
mini_mime (~> 1.0)
|
34
|
+
representable (~> 3.0)
|
35
|
+
retriable (>= 2.0, < 4.a)
|
36
|
+
rexml
|
37
|
+
webrick
|
38
|
+
google-apis-drive_v3 (0.33.0)
|
39
|
+
google-apis-core (>= 0.9.1, < 2.a)
|
40
|
+
google-apis-sheets_v4 (0.21.0)
|
41
|
+
google-apis-core (>= 0.9.1, < 2.a)
|
42
|
+
google_drive (3.0.7)
|
43
|
+
google-apis-drive_v3 (>= 0.5.0, < 1.0.0)
|
44
|
+
google-apis-sheets_v4 (>= 0.4.0, < 1.0.0)
|
45
|
+
googleauth (>= 0.5.0, < 1.0.0)
|
46
|
+
nokogiri (>= 1.5.3, < 2.0.0)
|
47
|
+
googleauth (0.17.1)
|
48
|
+
faraday (>= 0.17.3, < 2.0)
|
49
|
+
jwt (>= 1.4, < 3.0)
|
50
|
+
memoist (~> 0.16)
|
51
|
+
multi_json (~> 1.11)
|
52
|
+
os (>= 0.9, < 2.0)
|
53
|
+
signet (~> 0.15)
|
53
54
|
http-cookie (1.0.5)
|
54
55
|
domain_name (~> 0.5)
|
56
|
+
httpclient (2.8.3)
|
55
57
|
i18n (1.12.0)
|
56
58
|
concurrent-ruby (~> 1.0)
|
57
|
-
jwt (2.
|
58
|
-
launchy (2.5.0)
|
59
|
-
addressable (~> 2.7)
|
59
|
+
jwt (2.7.0)
|
60
60
|
mail (2.7.1)
|
61
61
|
mini_mime (>= 0.1.1)
|
62
62
|
mechanize (2.8.5)
|
@@ -70,38 +70,34 @@ GEM
|
|
70
70
|
rubyntlm (~> 0.6, >= 0.6.3)
|
71
71
|
webrick (~> 1.7)
|
72
72
|
webrobots (~> 0.1.2)
|
73
|
+
memoist (0.16.2)
|
73
74
|
mime (0.4.4)
|
74
75
|
mime-types (3.4.1)
|
75
76
|
mime-types-data (~> 3.2015)
|
76
77
|
mime-types-data (3.2022.0105)
|
77
78
|
mini_mime (1.1.2)
|
78
|
-
mini_portile2 (2.8.
|
79
|
-
minitest (5.
|
79
|
+
mini_portile2 (2.8.2)
|
80
|
+
minitest (5.18.0)
|
80
81
|
multi_json (1.15.0)
|
81
|
-
|
82
|
+
multipart-post (2.2.3)
|
82
83
|
net-http-digest_auth (1.4.1)
|
83
84
|
net-http-persistent (4.0.1)
|
84
85
|
connection_pool (~> 2.2)
|
85
|
-
nokogiri (1.
|
86
|
-
mini_portile2 (~> 2.8.
|
86
|
+
nokogiri (1.15.2)
|
87
|
+
mini_portile2 (~> 2.8.2)
|
87
88
|
racc (~> 1.4)
|
88
|
-
nokogiri (1.
|
89
|
+
nokogiri (1.15.2-x86_64-linux)
|
89
90
|
racc (~> 1.4)
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
snaky_hash (~> 2.0)
|
99
|
-
version_gem (~> 1.1)
|
100
|
-
public_suffix (5.0.0)
|
101
|
-
racc (1.6.0)
|
102
|
-
rack (2.2.4)
|
103
|
-
rake (10.5.0)
|
91
|
+
os (1.1.4)
|
92
|
+
public_suffix (5.0.1)
|
93
|
+
racc (1.7.1)
|
94
|
+
rake (13.0.6)
|
95
|
+
representable (3.2.0)
|
96
|
+
declarative (< 0.1.0)
|
97
|
+
trailblazer-option (>= 0.1.1, < 0.2.0)
|
98
|
+
uber (< 0.2.0)
|
104
99
|
retriable (3.1.2)
|
100
|
+
rexml (3.2.5)
|
105
101
|
rspec (3.11.0)
|
106
102
|
rspec-core (~> 3.11.0)
|
107
103
|
rspec-expectations (~> 3.11.0)
|
@@ -115,13 +111,12 @@ GEM
|
|
115
111
|
diff-lcs (>= 1.2.0, < 2.0)
|
116
112
|
rspec-support (~> 3.11.0)
|
117
113
|
rspec-support (3.11.1)
|
118
|
-
rspec_junit_formatter (0.
|
114
|
+
rspec_junit_formatter (0.6.0)
|
119
115
|
rspec-core (>= 2, < 4, != 2.12.0)
|
120
116
|
ruby-gmail (0.3.1)
|
121
117
|
mail (>= 2.2.1)
|
122
118
|
mime (>= 0.1)
|
123
119
|
shared-mime-info
|
124
|
-
ruby2_keywords (0.0.5)
|
125
120
|
rubyntlm (0.6.3)
|
126
121
|
shared-mime-info (0.2.5)
|
127
122
|
signet (0.17.0)
|
@@ -129,19 +124,15 @@ GEM
|
|
129
124
|
faraday (>= 0.17.5, < 3.a)
|
130
125
|
jwt (>= 1.5, < 3.0)
|
131
126
|
multi_json (~> 1.10)
|
132
|
-
|
133
|
-
|
134
|
-
version_gem (~> 1.1)
|
135
|
-
tzinfo (2.0.5)
|
127
|
+
trailblazer-option (0.1.2)
|
128
|
+
tzinfo (2.0.6)
|
136
129
|
concurrent-ruby (~> 1.0)
|
130
|
+
uber (0.1.0)
|
137
131
|
unf (0.1.4)
|
138
132
|
unf_ext
|
139
133
|
unf_ext (0.0.8.2)
|
140
|
-
|
141
|
-
version_gem (1.1.0)
|
142
|
-
webrick (1.7.0)
|
134
|
+
webrick (1.8.1)
|
143
135
|
webrobots (0.1.2)
|
144
|
-
zeitwerk (2.6.0)
|
145
136
|
|
146
137
|
PLATFORMS
|
147
138
|
ruby
|
@@ -155,10 +146,10 @@ DEPENDENCIES
|
|
155
146
|
google_drive
|
156
147
|
i18n-migrations!
|
157
148
|
mechanize
|
158
|
-
rake (~>
|
149
|
+
rake (~> 13.0)
|
159
150
|
rspec
|
160
151
|
rspec_junit_formatter
|
161
152
|
ruby-gmail
|
162
153
|
|
163
154
|
BUNDLED WITH
|
164
|
-
2.3.
|
155
|
+
2.3.26
|
data/i18n-migrations.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.required_ruby_version = ['>= 2.4', '< 3.2']
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 2.3"
|
26
|
-
spec.add_development_dependency "rake", "~>
|
26
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
27
27
|
spec.add_development_dependency "rspec_junit_formatter"
|
28
28
|
|
29
29
|
spec.add_dependency 'google_drive'
|
@@ -20,6 +20,14 @@ module I18n
|
|
20
20
|
q: term)
|
21
21
|
translated_term = JSON.parse(response.body)['data']['translations'].first['translatedText']
|
22
22
|
fix(term, translated_term, key: key)
|
23
|
+
rescue
|
24
|
+
error_message = JSON.parse(response.body).dig('error', 'message')
|
25
|
+
|
26
|
+
if error_message
|
27
|
+
raise error_message
|
28
|
+
else
|
29
|
+
raise $1
|
30
|
+
end
|
23
31
|
end
|
24
32
|
|
25
33
|
VARIABLE_STRING_REGEX = /%\{[^\}]+\}/
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-migrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Lightsmith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec_junit_formatter
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: '0'
|
174
174
|
requirements: []
|
175
|
-
rubygems_version: 3.
|
175
|
+
rubygems_version: 3.3.26
|
176
176
|
signing_key:
|
177
177
|
specification_version: 4
|
178
178
|
summary: Migrations for doing i18n.
|