web_translate_it 1.9.5 → 1.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/wti +1 -0
- data/history.md +4 -0
- data/lib/web_translate_it/command_line.rb +1 -1
- data/lib/web_translate_it/translation_file.rb +2 -2
- data/version.yml +1 -1
- metadata +8 -8
data/bin/wti
CHANGED
@@ -56,6 +56,7 @@ EOS
|
|
56
56
|
opt :low_priority, "WTI will process this file with a low priority"
|
57
57
|
opt :merge, "Force WTI to merge this file"
|
58
58
|
opt :ignore_missing, "Force WTI to not obsolete missing strings"
|
59
|
+
opt :minor, "Minor Changes. When pushing a master file, prevents target translations to be flagged as `to_verify`."
|
59
60
|
opt :label, "Apply a label to the changes", :type => :string
|
60
61
|
opt :config, "Path to a translation.yml file", :short => "-c", :default => ".wti"
|
61
62
|
end
|
data/history.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## Version 1.9.6 / 2012-03-01
|
2
|
+
|
3
|
+
* Support for new `minor_changes` flag on File API. Use with `wti push --minor`.
|
4
|
+
|
1
5
|
## Version 1.9.5 / 2012-02-06
|
2
6
|
|
3
7
|
* Include classes to connect to [TermBase](http://docs.webtranslateit.com/api/term_base/) and [TermBase Translation](http://docs.webtranslateit.com/api/term_base_translation/) APIs.
|
@@ -56,7 +56,7 @@ module WebTranslateIt
|
|
56
56
|
WebTranslateIt::Util.http_connection do |http|
|
57
57
|
fetch_locales_to_push(configuration).each do |locale|
|
58
58
|
configuration.files.find_all{ |file| file.locale == locale }.sort{|a,b| a.file_path <=> b.file_path} .each do |file|
|
59
|
-
file.upload(http, command_options[:merge], command_options.ignore_missing, command_options.label, command_options.low_priority)
|
59
|
+
file.upload(http, command_options[:merge], command_options.ignore_missing, command_options.label, command_options.low_priority, command_options[:minor])
|
60
60
|
end
|
61
61
|
end
|
62
62
|
end
|
@@ -75,14 +75,14 @@ module WebTranslateIt
|
|
75
75
|
#
|
76
76
|
# Note that the request might or might not eventually be acted upon, as it might be disallowed when processing
|
77
77
|
# actually takes place. This is due to the fact that language file imports are handled by background processing.
|
78
|
-
def upload(http_connection, merge=false, ignore_missing=false, label=nil, low_priority=false)
|
78
|
+
def upload(http_connection, merge=false, ignore_missing=false, label=nil, low_priority=false, minor_changes=false)
|
79
79
|
display = []
|
80
80
|
display.push(self.file_path)
|
81
81
|
display.push "#{StringUtil.checksumify(self.local_checksum.to_s)}..#{StringUtil.checksumify(self.remote_checksum.to_s)}"
|
82
82
|
if File.exists?(self.file_path)
|
83
83
|
File.open(self.file_path) do |file|
|
84
84
|
begin
|
85
|
-
request = Net::HTTP::Put::Multipart.new(api_url, {"file" => UploadIO.new(file, "text/plain", file.path), "merge" => merge, "ignore_missing" => ignore_missing, "label" => label, "low_priority" => low_priority })
|
85
|
+
request = Net::HTTP::Put::Multipart.new(api_url, {"file" => UploadIO.new(file, "text/plain", file.path), "merge" => merge, "ignore_missing" => ignore_missing, "label" => label, "low_priority" => low_priority, "minor_changes" => minor_changes })
|
86
86
|
request.add_field("X-Client-Name", "web_translate_it")
|
87
87
|
request.add_field("X-Client-Version", WebTranslateIt::Util.version)
|
88
88
|
display.push Util.handle_response(http_connection.request(request))
|
data/version.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web_translate_it
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multipart-post
|
16
|
-
requirement: &
|
16
|
+
requirement: &70204693173620 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.1.3
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70204693173620
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: trollop
|
27
|
-
requirement: &
|
27
|
+
requirement: &70204693172400 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.16.2
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70204693172400
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70204693171320 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 2.6.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70204693171320
|
47
47
|
description:
|
48
48
|
email: edouard@atelierconvivialite.com
|
49
49
|
executables:
|