web_translate_it 2.4.0 → 2.4.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 +10 -1
- data/lib/web_translate_it/command_line.rb +8 -1
- data/lib/web_translate_it/project.rb +1 -1
- data/readme.md +5 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5bf66d9d2ae8463b5997268e75ecd5d6b23d32b
|
4
|
+
data.tar.gz: fb24e325ce76b78d6557b2338992a230cc086958
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb2515c6f83fdf6d527d0e4c54aefddb00fd8b1f52e99303a89fa98fab7bf25618d8ef53645d57f4296f2a5d493e3e40b291ebb5148ddc5c19411aa3b2ee5e41
|
7
|
+
data.tar.gz: fba20f019782ee68f269486c5bfccb6c81b413623530c7f455741978a7800105fda1bd5b43722743ce8a4208a1cb4505c2268f6bcf14a2d8830f3c359907cd8e
|
data/history.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
|
+
## Version 2.4.1 / 2016-02-03
|
2
|
+
|
3
|
+
* `wti status` now returns a status code when a project is not 100% translated or not 100% proofread. #127
|
4
|
+
Status codes are:
|
5
|
+
- 100 if not 100% translated,
|
6
|
+
- 101 if not 100% proofread,
|
7
|
+
- 1 if project is 100% translated and proofread.
|
8
|
+
* `wti init` now returns a successful status code. #126
|
9
|
+
|
1
10
|
## Version 2.4.0 / 2015-08-10
|
2
11
|
|
3
|
-
* Now returns correct exit codes. `0` if command successful, `1` if any error has
|
12
|
+
* Now returns correct exit codes. `0` if command successful, `1` if any error has occurred.
|
4
13
|
* Limit the amount of retries to 3 on timeout.
|
5
14
|
|
6
15
|
## Version 2.3.4 / 2014-05-23
|
@@ -196,7 +196,7 @@ module WebTranslateIt
|
|
196
196
|
project_info = project['project']
|
197
197
|
if File.exists?(path) && !File.writable?(path)
|
198
198
|
puts StringUtil.failure("Error: `#{path}` file is not writable.")
|
199
|
-
exit
|
199
|
+
exit 1
|
200
200
|
end
|
201
201
|
File.open(path, 'w'){ |file| file << generate_configuration(api_key, project_info) }
|
202
202
|
puts ""
|
@@ -224,6 +224,7 @@ module WebTranslateIt
|
|
224
224
|
end
|
225
225
|
puts "You can now use `wti` to push and pull your language files."
|
226
226
|
puts "Check `wti --help` for help."
|
227
|
+
return true
|
227
228
|
end
|
228
229
|
|
229
230
|
def match
|
@@ -247,11 +248,17 @@ module WebTranslateIt
|
|
247
248
|
def status
|
248
249
|
stats = YAML.load(Project.fetch_stats(configuration.api_key))
|
249
250
|
stale = false
|
251
|
+
completely_translated = true
|
252
|
+
completely_proofread = true
|
250
253
|
stats.each do |locale, values|
|
251
254
|
percent_translated = Util.calculate_percentage(values['count_strings_to_proofread'].to_i + values['count_strings_done'].to_i + values['count_strings_to_verify'].to_i, values['count_strings'].to_i)
|
252
255
|
percent_completed = Util.calculate_percentage(values['count_strings_done'].to_i, values['count_strings'].to_i)
|
256
|
+
completely_translated = false if percent_translated != 100
|
257
|
+
completely_proofread = false if percent_completed != 100
|
253
258
|
puts "#{locale}: #{percent_translated}% translated, #{percent_completed}% completed."
|
254
259
|
end
|
260
|
+
exit 100 if !completely_translated
|
261
|
+
exit 101 if !completely_proofread
|
255
262
|
return true
|
256
263
|
end
|
257
264
|
|
data/readme.md
CHANGED
@@ -51,7 +51,7 @@ If 'wti' is not a typo you can use command-not-found to lookup the package that
|
|
51
51
|
The reason is that the wti file is named in another way: `/usr/bin/wti.ruby2.1` so you will have to create a symlink to make wti run.
|
52
52
|
|
53
53
|
``` bash
|
54
|
-
|
54
|
+
# ln -s /usr/bin/wti.ruby2.1 /usr/bin/wti
|
55
55
|
```
|
56
56
|
|
57
57
|
## Configuration
|
@@ -212,7 +212,7 @@ Since version 1.4.0 `wti` returns exit codes on failure. The exit code is `0` if
|
|
212
212
|
config/locales/app/fr.yml | 29f8c9d..da39a3e OK
|
213
213
|
config/locales/defaults/fr.yml | aca123e..aca123e Skipped
|
214
214
|
Pulled 8 files at 7 files/sec, using 3 threads.
|
215
|
-
~/code/webtranslateit.com[master]% echo
|
215
|
+
~/code/webtranslateit.com[master]% echo $?
|
216
216
|
0
|
217
217
|
~/code/webtranslateit.com[master]% wti pull
|
218
218
|
# Pulling files on WebTranslateIt
|
@@ -220,10 +220,12 @@ Pulled 8 files at 7 files/sec, using 3 threads.
|
|
220
220
|
config/locales/app/en.yml | f2ca86c..f2ca86c Skipped
|
221
221
|
config/locales/defaults/fr.yml | aca123e..aca123e Skipped
|
222
222
|
Pulled 3 files at 3 files/sec, using 3 threads.
|
223
|
-
~/code/webtranslateit.com[master]% echo
|
223
|
+
~/code/webtranslateit.com[master]% echo $?
|
224
224
|
1
|
225
225
|
```
|
226
226
|
|
227
|
+
Since version 2.4.1 the `wti status` command also returns meaningfull codes. It will exit with `0` if the project is 100% translated and proofread, `100` if the project is not 100% translated and `101` if the project is not 100% proofread. This allows you to check if a project is 100% translated or completed before deploying a project, for instance.
|
228
|
+
|
227
229
|
# License
|
228
230
|
|
229
231
|
Copyright (c) 2009-2015 Atelier Convivialité, 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: 2.4.
|
4
|
+
version: 2.4.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:
|
11
|
+
date: 2016-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multipart-post
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
145
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.
|
146
|
+
rubygems_version: 2.5.1
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: A CLI to sync locale files with WebTranslateIt.com.
|