web_translate_it 3.0.2 → 3.1.1
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 +4 -4
- data/history.md +9 -0
- data/readme.md +5 -5
- metadata +4 -6
- data/generators/webtranslateit/lib/insert_commands.rb +0 -34
- data/generators/webtranslateit/webtranslateit_generator.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9969f7e37be94cde92709918318f0ad3b86a68995a8ce1ad7c9fdc2892e85ef
|
4
|
+
data.tar.gz: 042af09e341242b03091379e767e0fef9fe72c45c8f0fd45f4564b1e1df9fd86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 633f0b4209397ee69babe0474ae675de9b2302092c8cf92f63df49b72e468802958be8b0486cc0810baeebfe2c461bd535f117d3b9e247ef7ea5f5c6704edd12
|
7
|
+
data.tar.gz: f959c59f956a59dd2fc0fcf33d53646f620350ce130584449ae8c9f8b0fd337a460d0329a1651812a06e8b995ecb1d8a9ca5b37a9e008329c1d555d9bb7b14c6
|
data/history.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## Version 3.1.1 / 2024-10-07
|
2
|
+
|
3
|
+
* Remove unused rake generators. Use `wti init` command instead.
|
4
|
+
|
5
|
+
## Version 3.1.0 / 2024-09-19
|
6
|
+
|
7
|
+
* Remove support for ruby 2.7. Minimum supported ruby version is 3.0. #328
|
8
|
+
* Dependency updates.
|
9
|
+
|
1
10
|
## Version 3.0.2 / 2024-01-08
|
2
11
|
|
3
12
|
* Fix: Limit the amount of threads used. #294
|
data/readme.md
CHANGED
@@ -25,12 +25,12 @@ wti lets you easily sync your language files with [WebTranslateIt.com](https://w
|
|
25
25
|
|
26
26
|
## Installation
|
27
27
|
|
28
|
-
You will also need ruby to run `wti`. We require ruby version
|
28
|
+
You will also need ruby to run `wti`. We require ruby version 3.0 or newer. On Linux or a Mac, it’s already installed. Install [RubyInstaller](http://rubyinstaller.org/) if you’re using Windows. [See detailed installation instructions for Windows users](https://github.com/webtranslateit/webtranslateit/wiki/Install-wti-on-Windows).
|
29
29
|
|
30
30
|
``` bash
|
31
31
|
$ gem install web_translate_it
|
32
|
-
Fetching: web_translate_it-
|
33
|
-
Successfully installed web_translate_it-
|
32
|
+
Fetching: web_translate_it-3.0.2.gem (100%)
|
33
|
+
Successfully installed web_translate_it-3.0.2
|
34
34
|
1 gem installed
|
35
35
|
```
|
36
36
|
|
@@ -38,7 +38,7 @@ At this point you should have the `wti` executable working:
|
|
38
38
|
|
39
39
|
``` bash
|
40
40
|
$ wti -v
|
41
|
-
wti version
|
41
|
+
wti version 3.0.2
|
42
42
|
```
|
43
43
|
|
44
44
|
We also provide `wti` as a Docker packages. [See our packages and instructions to install](https://github.com/webtranslateit/wti-docker/pkgs/container/wti-docker).
|
@@ -272,4 +272,4 @@ fr: 100% translated, 100% completed.
|
|
272
272
|
|
273
273
|
# License
|
274
274
|
|
275
|
-
Copyright (c) 2009-
|
275
|
+
Copyright (c) 2009-2024 [WebTranslateIt Software S.L](https://webtranslateit.com), released under the MIT License.
|
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: 3.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edouard Briere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -49,8 +49,6 @@ extra_rdoc_files:
|
|
49
49
|
files:
|
50
50
|
- bin/wti
|
51
51
|
- examples/locale.rb
|
52
|
-
- generators/webtranslateit/lib/insert_commands.rb
|
53
|
-
- generators/webtranslateit/webtranslateit_generator.rb
|
54
52
|
- history.md
|
55
53
|
- lib/web_translate_it.rb
|
56
54
|
- lib/web_translate_it/auto_fetch.rb
|
@@ -92,14 +90,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
90
|
requirements:
|
93
91
|
- - ">="
|
94
92
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
93
|
+
version: '3.0'
|
96
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
95
|
requirements:
|
98
96
|
- - ">="
|
99
97
|
- !ruby/object:Gem::Version
|
100
98
|
version: '0'
|
101
99
|
requirements: []
|
102
|
-
rubygems_version: 3.5.
|
100
|
+
rubygems_version: 3.5.20
|
103
101
|
signing_key:
|
104
102
|
specification_version: 4
|
105
103
|
summary: A CLI tool to sync locale files with WebTranslateIt.com.
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Mostly pinched from http://github.com/ryanb/nifty-generators/tree/master
|
4
|
-
|
5
|
-
Rails::Generator::Commands::Base.class_eval do
|
6
|
-
def file_contains?(relative_destination, line)
|
7
|
-
File.read(destination_path(relative_destination)).include?(line)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
Rails::Generator::Commands::Create.class_eval do
|
12
|
-
def append_to(file, line)
|
13
|
-
logger.insert "#{line} appended to #{file}"
|
14
|
-
return if options[:pretend] || file_contains?(file, line)
|
15
|
-
|
16
|
-
File.open(file, 'a') do |f|
|
17
|
-
f.puts
|
18
|
-
f.puts line
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
Rails::Generator::Commands::Destroy.class_eval do
|
24
|
-
def append_to(file, line)
|
25
|
-
logger.remove "#{line} removed from #{file}"
|
26
|
-
gsub_file file, "\n#{line}", '' unless options[:pretend]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
Rails::Generator::Commands::List.class_eval do
|
31
|
-
def append_to(file, line)
|
32
|
-
logger.insert "#{line} appended to #{file}"
|
33
|
-
end
|
34
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require File.expand_path("#{File.dirname(__FILE__)}/lib/insert_commands.rb")
|
4
|
-
|
5
|
-
class WebtranslateitGenerator < Rails::Generator::Base
|
6
|
-
|
7
|
-
def add_options!(opt)
|
8
|
-
opt.on('-k', '--api-key=key', String, 'Your Web Translate It API key') { |v| options[:api_key] = v }
|
9
|
-
end
|
10
|
-
|
11
|
-
def manifest # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
|
12
|
-
if !api_key_configured? && !options[:api_key]
|
13
|
-
puts 'You must pass --api-key or create config/translations.yml'
|
14
|
-
exit
|
15
|
-
end
|
16
|
-
record do |m|
|
17
|
-
if options[:api_key]
|
18
|
-
project_details = YAML.safe_load WebTranslateIt::Project.fetch_info(options[:api_key])
|
19
|
-
m.template '.wti', '.wti',
|
20
|
-
assigns: {api_key: options[:api_key], project: project_details['project']}
|
21
|
-
m.append_to 'Rakefile', "require 'web_translate_it' rescue LoadError"
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def api_key_configured?
|
27
|
-
File.exist?('config/translations.yml')
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|