i18n-migrations 2.0.6 → 2.0.8

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: 274cc2afe088dd6f3222a02373b5e7cffe919a49aa927a837bc73170f06ad4e9
4
- data.tar.gz: 15bae7e096587080bab7333d8ec2e6cb5e6c94e664ade5f62b67dc5fed284673
3
+ metadata.gz: cccd4b210792141aec1edd391bc2483e90c76d9c1c4dcda40369b9b0a4b1a751
4
+ data.tar.gz: 7907c318d3f3e428674888ba00bffdd64bb76b2ca549b23dc908be64fc869a77
5
5
  SHA512:
6
- metadata.gz: 7b346021869b4ac4c8fb89c0798589bd9102380181d6c5b0c2bce095a5bbf249c1d1447227714dff46fa4534e7fdc90688ef8d1ebbc8a6e23b72dd370390941c
7
- data.tar.gz: 444444d2a9ee2f2e0fa60330a1505f01746b7e1eadd6e8f2dc662f10c22f94ead1ad5a7b91d623d4536177b5c15d2a6667b77c9b3977a8bf7fe4bad45451270a
6
+ metadata.gz: b87f8980b6208a48ea2f9be1e9da99e0c67aecc2e27010d6bcf55c8dc2e40b9881a96001f4af511c9795a19f8a5905ecbc438ff0ee52a719891e29afece60c05
7
+ data.tar.gz: eaf3e37178ed9b4dfbe22e2acd0e87dcb3ea5e9539ac01ebba2222c8cc0ce9057f897fdfc248c272a39b80762d9b8cdc0171b499739c9467e39f01020c9ea7ea
@@ -0,0 +1,17 @@
1
+ version: 2.1
2
+ orbs:
3
+ ruby: circleci/ruby@2.0.0
4
+ jobs:
5
+ rspec:
6
+ docker:
7
+ - image: cimg/ruby:3.1.3
8
+ steps:
9
+ - checkout
10
+ - ruby/install-deps
11
+ - ruby/rspec-test
12
+ - store_test_results:
13
+ path: spec/reports
14
+ workflows:
15
+ test_suite:
16
+ jobs:
17
+ - rspec
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
@@ -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: google_spreadsheets
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: [INSERT_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-2.6.5
1
+ ruby-3.1.3
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in i18n-migrations.gemspec
4
4
  gemspec
5
5
 
6
- gem "google_drive"
6
+ gem 'google_drive'
7
7
  gem 'mechanize'
8
8
  gem 'ruby-gmail'
9
9
  gem 'activesupport'
data/Gemfile.lock ADDED
@@ -0,0 +1,155 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ i18n-migrations (2.0.7)
5
+ activesupport
6
+ colorize
7
+ faraday
8
+ google_drive
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ activesupport (7.0.4.3)
14
+ concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ i18n (>= 1.6, < 2)
16
+ minitest (>= 5.1)
17
+ tzinfo (~> 2.0)
18
+ addressable (2.8.1)
19
+ public_suffix (>= 2.0.2, < 6.0)
20
+ colorize (0.8.1)
21
+ concurrent-ruby (1.2.2)
22
+ connection_pool (2.3.0)
23
+ declarative (0.0.20)
24
+ diff-lcs (1.5.0)
25
+ domain_name (0.5.20190701)
26
+ unf (>= 0.0.5, < 1.0.0)
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)
54
+ http-cookie (1.0.5)
55
+ domain_name (~> 0.5)
56
+ httpclient (2.8.3)
57
+ i18n (1.12.0)
58
+ concurrent-ruby (~> 1.0)
59
+ jwt (2.7.0)
60
+ mail (2.7.1)
61
+ mini_mime (>= 0.1.1)
62
+ mechanize (2.8.5)
63
+ addressable (~> 2.8)
64
+ domain_name (~> 0.5, >= 0.5.20190701)
65
+ http-cookie (~> 1.0, >= 1.0.3)
66
+ mime-types (~> 3.0)
67
+ net-http-digest_auth (~> 1.4, >= 1.4.1)
68
+ net-http-persistent (>= 2.5.2, < 5.0.dev)
69
+ nokogiri (~> 1.11, >= 1.11.2)
70
+ rubyntlm (~> 0.6, >= 0.6.3)
71
+ webrick (~> 1.7)
72
+ webrobots (~> 0.1.2)
73
+ memoist (0.16.2)
74
+ mime (0.4.4)
75
+ mime-types (3.4.1)
76
+ mime-types-data (~> 3.2015)
77
+ mime-types-data (3.2022.0105)
78
+ mini_mime (1.1.2)
79
+ mini_portile2 (2.8.2)
80
+ minitest (5.18.0)
81
+ multi_json (1.15.0)
82
+ multipart-post (2.2.3)
83
+ net-http-digest_auth (1.4.1)
84
+ net-http-persistent (4.0.1)
85
+ connection_pool (~> 2.2)
86
+ nokogiri (1.15.2)
87
+ mini_portile2 (~> 2.8.2)
88
+ racc (~> 1.4)
89
+ nokogiri (1.15.2-x86_64-linux)
90
+ racc (~> 1.4)
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)
99
+ retriable (3.1.2)
100
+ rexml (3.2.5)
101
+ rspec (3.11.0)
102
+ rspec-core (~> 3.11.0)
103
+ rspec-expectations (~> 3.11.0)
104
+ rspec-mocks (~> 3.11.0)
105
+ rspec-core (3.11.0)
106
+ rspec-support (~> 3.11.0)
107
+ rspec-expectations (3.11.1)
108
+ diff-lcs (>= 1.2.0, < 2.0)
109
+ rspec-support (~> 3.11.0)
110
+ rspec-mocks (3.11.1)
111
+ diff-lcs (>= 1.2.0, < 2.0)
112
+ rspec-support (~> 3.11.0)
113
+ rspec-support (3.11.1)
114
+ rspec_junit_formatter (0.6.0)
115
+ rspec-core (>= 2, < 4, != 2.12.0)
116
+ ruby-gmail (0.3.1)
117
+ mail (>= 2.2.1)
118
+ mime (>= 0.1)
119
+ shared-mime-info
120
+ rubyntlm (0.6.3)
121
+ shared-mime-info (0.2.5)
122
+ signet (0.17.0)
123
+ addressable (~> 2.8)
124
+ faraday (>= 0.17.5, < 3.a)
125
+ jwt (>= 1.5, < 3.0)
126
+ multi_json (~> 1.10)
127
+ trailblazer-option (0.1.2)
128
+ tzinfo (2.0.6)
129
+ concurrent-ruby (~> 1.0)
130
+ uber (0.1.0)
131
+ unf (0.1.4)
132
+ unf_ext
133
+ unf_ext (0.0.8.2)
134
+ webrick (1.8.1)
135
+ webrobots (0.1.2)
136
+
137
+ PLATFORMS
138
+ ruby
139
+ x86_64-linux
140
+
141
+ DEPENDENCIES
142
+ activesupport
143
+ bundler (~> 2.3)
144
+ colorize
145
+ faraday
146
+ google_drive
147
+ i18n-migrations!
148
+ mechanize
149
+ rake (~> 13.0)
150
+ rspec
151
+ rspec_junit_formatter
152
+ ruby-gmail
153
+
154
+ BUNDLED WITH
155
+ 2.3.26
data/README.md CHANGED
@@ -27,11 +27,11 @@ And then execute:
27
27
  Or install it yourself as:
28
28
 
29
29
  $ gem install i18n-migrations
30
-
30
+
31
31
  From your project file, you'll want to run
32
32
 
33
33
  $ i18n-migrate setup
34
-
34
+
35
35
  This will create a config file you can edit.
36
36
 
37
37
  ## Usage
@@ -45,7 +45,7 @@ Let's imagine that your config file look like this:
45
45
  - es
46
46
  ..
47
47
 
48
- In your project file, you should then have all your english terms in ```config/locales/en.yml```
48
+ In your project file, you should then have all your English terms in ```config/locales/en.yml```
49
49
 
50
50
  You can:
51
51
 
@@ -20,10 +20,11 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = ["i18n-migrate"]
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.required_ruby_version = '~> 2.4'
23
+ spec.required_ruby_version = ['>= 2.4', '< 3.2']
24
24
 
25
- spec.add_development_dependency "bundler", "~> 1.9"
26
- spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "bundler", "~> 2.3"
26
+ spec.add_development_dependency "rake", "~> 13.0"
27
+ spec.add_development_dependency "rspec_junit_formatter"
27
28
 
28
29
  spec.add_dependency 'google_drive'
29
30
  spec.add_dependency 'activesupport'
@@ -1,4 +1,3 @@
1
- require_relative './google_spreadsheet'
2
1
  require_relative '../metadata'
3
2
 
4
3
  module I18n
@@ -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 = /%\{[^\}]+\}/
@@ -1,5 +1,5 @@
1
1
  module I18n
2
2
  module Migrations
3
- VERSION = "2.0.6"
3
+ VERSION = "2.0.8"
4
4
  end
5
5
  end
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.6
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Lightsmith
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-28 00:00:00.000000000 Z
11
+ date: 2023-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.9'
19
+ version: '2.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.9'
26
+ version: '2.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
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: '10.0'
40
+ version: '13.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec_junit_formatter
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: google_drive
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -103,13 +117,14 @@ executables:
103
117
  extensions: []
104
118
  extra_rdoc_files: []
105
119
  files:
120
+ - ".circleci/config.yml"
106
121
  - ".gitignore"
107
122
  - ".i18n-migrations.default.yml"
108
123
  - ".rspec"
109
124
  - ".ruby-version"
110
- - ".travis.yml"
111
125
  - CODE_OF_CONDUCT.md
112
126
  - Gemfile
127
+ - Gemfile.lock
113
128
  - LICENSE.txt
114
129
  - README.md
115
130
  - Rakefile
@@ -139,23 +154,26 @@ homepage: https://github.com/transparentclassroom/i18n-migrations
139
154
  licenses:
140
155
  - MIT
141
156
  metadata: {}
142
- post_install_message:
157
+ post_install_message:
143
158
  rdoc_options: []
144
159
  require_paths:
145
160
  - lib
146
161
  required_ruby_version: !ruby/object:Gem::Requirement
147
162
  requirements:
148
- - - "~>"
163
+ - - ">="
149
164
  - !ruby/object:Gem::Version
150
165
  version: '2.4'
166
+ - - "<"
167
+ - !ruby/object:Gem::Version
168
+ version: '3.2'
151
169
  required_rubygems_version: !ruby/object:Gem::Requirement
152
170
  requirements:
153
171
  - - ">="
154
172
  - !ruby/object:Gem::Version
155
173
  version: '0'
156
174
  requirements: []
157
- rubygems_version: 3.1.2
158
- signing_key:
175
+ rubygems_version: 3.3.26
176
+ signing_key:
159
177
  specification_version: 4
160
178
  summary: Migrations for doing i18n.
161
179
  test_files: []
data/.travis.yml DELETED
@@ -1,2 +0,0 @@
1
- language: ruby
2
- cache: bundler