web_translate_it 2.6.1 → 2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/history.md +4 -0
- data/lib/web_translate_it/command_line.rb +19 -7
- data/readme.md +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8816da80bd99107be31a26af0c6853b28e46018df5d114c4114ed9b109eada9b
|
4
|
+
data.tar.gz: 1ed5126b65809c231cdee660d53ec00f004a6b6c9e08d2676fd2b0c7e4d64319
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d121c3b05ef8eafb848fb6719c40c252ea257beeca42d72571e9eb651aa6b0c9f1cc3a6fadacda102ad4746798efc4bc8802c0547ee746d77cb281237f79849
|
7
|
+
data.tar.gz: ab9f038f9cc74746c6c4f844c8142472fb808824274835ac37f5291ce724af68bd477421fecfaad771efab88524334cbce98e9659f0194a9aa4632e961724d21
|
data/history.md
CHANGED
@@ -294,7 +294,11 @@ module WebTranslateIt
|
|
294
294
|
path = Util.ask(' Path to configuration file:', '.wti')
|
295
295
|
end
|
296
296
|
FileUtils.mkpath(path.split('/')[0..path.split('/').size - 2].join('/')) unless path.split('/').size == 1
|
297
|
-
project =
|
297
|
+
project = if RUBY_VERSION >= '3.1'
|
298
|
+
YAML.safe_load WebTranslateIt::Project.fetch_info(api_key), permitted_classes: [Time]
|
299
|
+
else
|
300
|
+
YAML.load WebTranslateIt::Project.fetch_info(api_key)
|
301
|
+
end
|
298
302
|
project_info = project['project']
|
299
303
|
if File.exist?(path) && !File.writable?(path)
|
300
304
|
puts StringUtil.failure("Error: `#{path}` file is not writable.")
|
@@ -414,24 +418,32 @@ module WebTranslateIt
|
|
414
418
|
|
415
419
|
def generate_configuration(api_key, project_info)
|
416
420
|
<<~FILE
|
421
|
+
# Required - The Project API Token from WebTranslateIt.com
|
422
|
+
# More information: https://github.com/webtranslateit/webtranslateit/wiki#configuration-file
|
423
|
+
|
417
424
|
api_key: #{api_key}
|
418
425
|
|
419
|
-
# Optional
|
426
|
+
# Optional - Locales not to sync with WebTranslateIt.
|
427
|
+
# Takes a string, a symbol, or an array of string or symbol.
|
428
|
+
|
429
|
+
# ignore_locales: [#{project_info['source_locale']['code']}]
|
430
|
+
|
431
|
+
# Optional - Locales to sync with WebTranslateIt.
|
420
432
|
# Takes a string, a symbol, or an array of string or symbol.
|
421
|
-
# More information here: https://github.com/AtelierConvivialite/webtranslateit/wiki
|
422
|
-
# ignore_locales: '#{project_info['source_locale']['code']}'
|
423
433
|
|
424
|
-
# Or if you prefer a list of locales to sync with WebTranslateIt:
|
425
434
|
# needed_locales: #{project_info['target_locales'].map { |locale| locale['code'] }}
|
426
435
|
|
427
436
|
# Optional: files not to sync with WebTranslateIt.
|
428
437
|
# Takes an array of globs.
|
438
|
+
|
429
439
|
# ignore_files: ['somefile*.csv']
|
430
440
|
|
431
|
-
# Optional
|
441
|
+
# Optional - Hooks
|
442
|
+
# Takes a string containing a command to run.
|
443
|
+
|
432
444
|
# before_pull: "echo 'some unix command'" # Command executed before pulling files
|
433
445
|
# after_pull: "touch tmp/restart.txt" # Command executed after pulling files
|
434
|
-
|
446
|
+
|
435
447
|
# before_push: "echo 'some unix command'" # Command executed before pushing files
|
436
448
|
# after_push: "touch tmp/restart.txt" # Command executed after pushing files
|
437
449
|
|
data/readme.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# WebTranslateIt Synchronization Tool : wti
|
2
2
|
|
3
|
-
[RubyDoc](https://rubydoc.info/
|
3
|
+
[RubyDoc](https://www.rubydoc.info/gems/web_translate_it/) |
|
4
4
|
[Report a bug](https://github.com/webtranslateit/webtranslateit/issues) |
|
5
5
|
[Support](https://webtranslateit.com/support) |
|
6
6
|
[WebTranslateIt.com Homepage](https://webtranslateit.com)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web_translate_it
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edouard Briere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -190,14 +190,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
- !ruby/object:Gem::Version
|
191
191
|
version: '0'
|
192
192
|
requirements: []
|
193
|
-
rubygems_version: 3.
|
193
|
+
rubygems_version: 3.3.3
|
194
194
|
signing_key:
|
195
195
|
specification_version: 4
|
196
196
|
summary: A CLI tool to sync locale files with WebTranslateIt.com.
|
197
197
|
test_files:
|
198
|
-
- spec/web_translate_it/auto_fetch_spec.rb
|
199
|
-
- spec/web_translate_it/term_spec.rb
|
200
|
-
- spec/web_translate_it/string_spec.rb
|
201
|
-
- spec/spec_helper.rb
|
202
198
|
- spec/examples/config/translation.yml
|
203
199
|
- spec/examples/en.yml
|
200
|
+
- spec/spec_helper.rb
|
201
|
+
- spec/web_translate_it/auto_fetch_spec.rb
|
202
|
+
- spec/web_translate_it/string_spec.rb
|
203
|
+
- spec/web_translate_it/term_spec.rb
|