web_translate_it 2.1.3 → 2.1.4
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 +6 -14
- data/history.md +5 -0
- data/lib/web_translate_it.rb +1 -2
- data/lib/web_translate_it/command_line.rb +2 -3
- data/readme.md +17 -15
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ZmMxN2JkYjZjMGFlZjYyNjUyMzM0MzUwNzhiMjJkY2IxMjliODE0YTkyMDE5
|
10
|
-
N2RlNGJmNDZjYjUwMDE4MjZjNTA4MzNjOTc0NjNhYzEyMDYzYTQ1ODM0MDM2
|
11
|
-
NjcwZTNkMjA0NTAyNWYxOTkwYjYyNWFmNDc4OWQ4ZGMzZWQ4ZTU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NDZjMTgxNmNkYmVkMjk1MTg1OGVlNzg1ODRiYWZjZTkwOWY0MTY4ZDJkZTg0
|
14
|
-
NzczYTgxZjY3NzE5M2VmOWYwYzUwOGM3NDlkNjlkZWNhNjdmNzMyNGNkNzFh
|
15
|
-
MWU4ODkwMTFkMDI4YzY1NzRmNzdlZmViZWFmNDJlZDkzNTkxNWY=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c8f1709ba300f3590336b4bb2784be4b2a892e7d
|
4
|
+
data.tar.gz: f91e276b15ff4abeb8a549af23c2d410170aaf7e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ecf00b1a30d4229d478bb7b9200a56a9ea585a389f997b81ac854043b51d4c95012b9b4336a5e6cb894e704c5ca0c0b45ce6b0c5e480083acf0cbbeceb79e3bc
|
7
|
+
data.tar.gz: f3a5d8b2e562517e47da0f52fb77ac9b297870a1d1098a15e14a4a4660db4c0d02730a95adf0fb2c2a418a0d430bd7bf0d2808b416b97daf5bd33866bb154d66
|
data/history.md
CHANGED
data/lib/web_translate_it.rb
CHANGED
@@ -21,11 +21,10 @@ module WebTranslateIt
|
|
21
21
|
config = Configuration.new
|
22
22
|
locale = I18n.locale.to_s
|
23
23
|
return if config.ignore_locales.include?(locale)
|
24
|
-
config.logger.debug { "
|
24
|
+
config.logger.debug { " Fetching #{locale} language file(s) from WebTranslateIt" } if config.logger
|
25
25
|
WebTranslateIt::Connection.new(config.api_key) do |http|
|
26
26
|
config.files.find_all{ |file| file.locale == locale }.each do |file|
|
27
27
|
response = file.fetch(http)
|
28
|
-
config.logger.debug { "➔ Web Translate It response: #{response}" } if config.logger
|
29
28
|
end
|
30
29
|
end
|
31
30
|
end
|
@@ -44,8 +44,7 @@ module WebTranslateIt
|
|
44
44
|
# Now actually pulling files
|
45
45
|
time = Time.now
|
46
46
|
threads = []
|
47
|
-
|
48
|
-
ArrayUtil.chunk(files, n_threads).each do |file_array|
|
47
|
+
ArrayUtil.chunk(files, 2).each do |file_array|
|
49
48
|
unless file_array.empty?
|
50
49
|
threads << Thread.new(file_array) do |file_array|
|
51
50
|
WebTranslateIt::Connection.new(configuration.api_key) do |http|
|
@@ -58,7 +57,7 @@ module WebTranslateIt
|
|
58
57
|
end
|
59
58
|
threads.each { |thread| thread.join }
|
60
59
|
time = Time.now - time
|
61
|
-
puts "Pulled #{files.size} files at #{(files.size/time).round} files/sec
|
60
|
+
puts "Pulled #{files.size} files at #{(files.size/time).round} files/sec."
|
62
61
|
`#{configuration.after_pull}` if configuration.after_pull
|
63
62
|
end
|
64
63
|
end
|
data/readme.md
CHANGED
@@ -1,22 +1,24 @@
|
|
1
|
-
# WebTranslateIt Synchronization Tool
|
1
|
+
# WebTranslateIt Synchronization Tool : wti
|
2
2
|
|
3
3
|
[RubyDoc](http://rubydoc.info/github/AtelierConvivialite/webtranslateit/) |
|
4
|
-
[Example app](http://github.com/AtelierConvivialite/rails_example_app) |
|
5
4
|
[Report a bug](http://github.com/AtelierConvivialite/webtranslateit/issues) |
|
6
5
|
[Support](https://webtranslateit.com/support) |
|
7
6
|
[WebTranslateIt.com Homepage](https://webtranslateit.com)
|
8
7
|
|
9
|
-
|
8
|
+
wti lets you easily sync your language files with [WebTranslateIt.com](https://webtranslateit.com), a web-based tool to translation software.
|
10
9
|
|
11
10
|

|
12
11
|
|
13
|
-
|
12
|
+
### wti...
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
3. A rack middleware you can use in your Rails app to automatically fetch new translations from WebTranslateIt.
|
14
|
+
* wti is a **command-line tool**. It works on all operating systems: Windows, Linux, MacOS X...
|
15
|
+
* wti is really easy to use. It was inspired by git. Use `wti push` and `wti pull` to sync your language files with WebTranslateIt.com.
|
18
16
|
|
19
|
-
|
17
|
+
### Optionally, wti does...
|
18
|
+
|
19
|
+
* include a rack middleware you can use in your Rails app to automatically fetch new translations from WebTranslateIt.com.
|
20
|
+
* include libraries you can use to programmatically fetch your segments from WebTranslateIt.com. See [Extras](https://github.com/AtelierConvivialite/webtranslateit/wiki/Extras)
|
21
|
+
* include a web interface for your translation team to update your language files. [Learn more on the web_translate_it_server project page](https://github.com/AtelierConvivialite/web_translate_it_server).
|
20
22
|
|
21
23
|
---
|
22
24
|
|
@@ -26,8 +28,8 @@ You will also need ruby to run `wti`. On Linux or a Mac, it’s already installe
|
|
26
28
|
|
27
29
|
``` bash
|
28
30
|
$ gem install web_translate_it
|
29
|
-
Fetching: web_translate_it-2.
|
30
|
-
Successfully installed web_translate_it-2.
|
31
|
+
Fetching: web_translate_it-2.1.3.gem (100%)
|
32
|
+
Successfully installed web_translate_it-2.1.3
|
31
33
|
1 gem installed
|
32
34
|
```
|
33
35
|
|
@@ -35,7 +37,7 @@ At this point you should have the `wti` executable working:
|
|
35
37
|
|
36
38
|
``` bash
|
37
39
|
$ wti -v
|
38
|
-
wti version 2.
|
40
|
+
wti version 2.1.3
|
39
41
|
```
|
40
42
|
|
41
43
|
## Configuration
|
@@ -43,17 +45,17 @@ wti version 2.0.3
|
|
43
45
|
Now that the tool is installed, you’ll have to configure your project. Basically, `wti` is to be run on a project root directory, and looks for a `.wti` file containing your project information. The command `wti init` lets your create your `.wti` file.
|
44
46
|
|
45
47
|
``` bash
|
46
|
-
$ wti init
|
48
|
+
$ wti init 55555abc1235555
|
47
49
|
# Initializing project
|
48
|
-
Project API Key: 55555abc1235555
|
49
|
-
Path to configuration file: (Default: .wti)
|
50
50
|
|
51
51
|
Your project was successfully initialized.
|
52
52
|
You can now use `wti` to push and pull your language files.
|
53
53
|
Check `wti --help` for help.
|
54
54
|
```
|
55
55
|
|
56
|
-
|
56
|
+
`55555abc1235555` is the API token, which you can find in your project settings.
|
57
|
+
|
58
|
+
If you’d like to specify another path for your configuration file, you can use `wti init`. This command will ask you to enter your project API token and where to save the configuration file (by default it will create a `.wti` in your project root directory).
|
57
59
|
|
58
60
|
Now you’re all set and you can use the `wti` commands on your project.
|
59
61
|
|
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.1.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edouard Briere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multipart-post
|
@@ -42,42 +42,42 @@ dependencies:
|
|
42
42
|
name: multi_json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 2.6.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 2.6.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: guard-rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description:
|
@@ -131,12 +131,12 @@ require_paths:
|
|
131
131
|
- lib
|
132
132
|
required_ruby_version: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
|
-
- -
|
134
|
+
- - '>='
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
|
-
- -
|
139
|
+
- - '>='
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|