web_translate_it 1.7.0.3 → 1.7.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/bin/wti CHANGED
@@ -71,7 +71,12 @@ Choice.options do
71
71
  long '--ignore_missing'
72
72
  desc "Force WTI to not obsolete missing strings."
73
73
  end
74
-
74
+
75
+ option :label do
76
+ long '--label'
77
+ desc "Apply a label to the changes."
78
+ end
79
+
75
80
  separator ''
76
81
  separator 'Server options: '
77
82
 
data/history.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## Version 1.7.0.4 / 2010-06-29
2
+
3
+ * New: Added support for labels. Only works for `wti push` for now.
4
+ `wti push --label release_week_4` will tag new and changed strings as `release_week_4`.
5
+
1
6
  ## Version 1.7.0.3 / 2010-06-08
2
7
 
3
8
  * New: ability to add several master files at once
@@ -32,7 +32,7 @@ module WebTranslateIt
32
32
  ignore_missing = !(ARGV.index('--ignore_missing')).nil?
33
33
  configuration.files.find_all{ |file| file.locale == locale }.each do |file|
34
34
  print "Pushing #{file.file_path}… "
35
- puts file.upload(merge, ignore_missing)
35
+ puts file.upload(merge, ignore_missing, options.label)
36
36
  end
37
37
  end
38
38
  end
@@ -48,7 +48,7 @@ module WebTranslateIt
48
48
  print "Creating #{file.file_path}… "
49
49
  puts file.create
50
50
  end
51
- puts "Master file added! Use `wti push --all` to send your existing translations."
51
+ puts "Master file added. Use `wti push --all` to send your existing translations."
52
52
  end
53
53
 
54
54
  def autoconf
@@ -64,12 +64,12 @@ module WebTranslateIt
64
64
  #
65
65
  # Note that the request might or might not eventually be acted upon, as it might be disallowed when processing
66
66
  # actually takes place. This is due to the fact that language file imports are handled by background processing.
67
- def upload(merge=false, ignore_missing=false)
67
+ def upload(merge=false, ignore_missing=false, label=nil)
68
68
  if File.exists?(self.file_path)
69
69
  File.open(self.file_path) do |file|
70
70
  begin
71
71
  WebTranslateIt::Util.http_connection do |http|
72
- request = Net::HTTP::Put::Multipart.new(api_url, {"file" => UploadIO.new(file, "text/plain", file.path), "merge" => merge, "ignore_missing" => ignore_missing})
72
+ request = Net::HTTP::Put::Multipart.new(api_url, {"file" => UploadIO.new(file, "text/plain", file.path), "merge" => merge, "ignore_missing" => ignore_missing, "label" => label })
73
73
  Util.handle_response(http.request(request))
74
74
  end
75
75
  rescue Timeout::Error
@@ -79,7 +79,7 @@ module WebTranslateIt
79
79
  end
80
80
  end
81
81
  else
82
- puts "\nFile #{self.file_path} doesn't exist!"
82
+ puts "\nFile #{self.file_path} doesn't exist."
83
83
  end
84
84
  end
85
85
 
data/version.yml CHANGED
@@ -2,4 +2,4 @@
2
2
  :major: 1
3
3
  :minor: 7
4
4
  :tiny: 0
5
- :patch: 3
5
+ :patch: 4
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
- hash: 97
4
+ hash: 111
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
9
  - 0
10
- - 3
11
- version: 1.7.0.3
10
+ - 4
11
+ version: 1.7.0.4
12
12
  platform: ruby
13
13
  authors:
14
14
  - "\xC3\x89douard Bri\xC3\xA8re"
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-06-08 00:00:00 +02:00
19
+ date: 2010-06-29 00:00:00 +02:00
20
20
  default_executable: wti
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency