web_translate_it 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/bin/wti CHANGED
@@ -36,7 +36,7 @@ command_options = case command
36
36
  when "pull"
37
37
  Trollop::options do
38
38
  banner <<-EOS
39
- Pull target language file(s)
39
+ wti pull - Pull target language file(s)
40
40
  [options] are:
41
41
  EOS
42
42
  opt :locale, "ISO code of locale(s) to pull", :type => :string
@@ -47,7 +47,7 @@ EOS
47
47
  when "push"
48
48
  Trollop::options do
49
49
  banner <<-EOS
50
- Push master language file(s)
50
+ wti push [filename] - Push master language file(s)
51
51
  [options] are:
52
52
  EOS
53
53
  opt :locale, "ISO code of locale(s) to push", :type => :string
@@ -62,38 +62,38 @@ EOS
62
62
  end
63
63
  when "add"
64
64
  Trollop::options do
65
- banner "Create and push a new master language file"
65
+ banner "wti add filename - Create and push a new master language file"
66
66
  opt :low_priority, "WTI will process this file with a low priority"
67
67
  opt :config, "Path to a configuration file", :short => "-c", :default => ".wti"
68
68
  end
69
69
  when "rm"
70
70
  Trollop::options do
71
- banner "Delete a master language file"
71
+ banner "wti rm filename - Delete a master language file"
72
72
  opt :config, "Path to a configuration file", :short => "-c", :default => ".wti"
73
73
  end
74
74
  when "addlocale"
75
75
  Trollop::options do
76
- banner "Add a new locale to the project"
76
+ banner "wti addlocale localename - Add a new locale to the project"
77
77
  opt :config, "Path to a configuration file", :short => "-c", :default => ".wti"
78
78
  end
79
79
  when "rmlocale"
80
80
  Trollop::options do
81
- banner "Delete a locale from the project"
81
+ banner "wti rmlocale localename Delete a locale from the project"
82
82
  opt :config, "Path to a configuration file", :short => "-c", :default => ".wti"
83
83
  end
84
84
  when "status"
85
85
  Trollop::options do
86
- banner "Fetch and display project statistics"
86
+ banner "wti status - Fetch and display project statistics"
87
87
  opt :config, "Path to a configuration file", :short => "-c", :default => ".wti"
88
88
  end
89
89
  when "init"
90
90
  Trollop::options do
91
- banner "Configure your project to sync"
91
+ banner "wti init - Configure your project to sync"
92
92
  opt :config, "Path to a configuration file", :short => "-c", :default => ".wti"
93
93
  end
94
94
  when "match"
95
95
  Trollop::options do
96
- banner "Display matching of local files with File Manager"
96
+ banner "wti match - Display matching of local files with File Manager"
97
97
  opt :config, "Path to a configuration file", :short => "-c", :default => ".wti"
98
98
  end
99
99
  else
data/history.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## Version 2.0.5 / 2012-02-22
2
+
3
+ * New: Add ability to pass a file path in `wti push`: `wti push path/to/file`. #90.
4
+ * Made it a bit clearer that wti push now takes an optional file path.
5
+ * Move version file to a string in the .gemspec file.
6
+ * Upgrade dependencies
7
+
1
8
  ## Version 2.0.4 / 2012-08-08
2
9
 
3
10
  * New: Add a throbber to indicate the project information is loading.
@@ -68,7 +68,11 @@ module WebTranslateIt
68
68
  `#{configuration.before_push}` if configuration.before_push
69
69
  WebTranslateIt::Connection.new(configuration.api_key) do |http|
70
70
  fetch_locales_to_push(configuration).each do |locale|
71
- files = configuration.files.find_all{ |file| file.locale == locale }.sort{|a,b| a.file_path <=> b.file_path}
71
+ if parameters.any?
72
+ files = configuration.files.find_all{ |file| parameters.include?(file.file_path) }.sort{|a,b| a.file_path <=> b.file_path}
73
+ else
74
+ files = configuration.files.find_all{ |file| file.locale == locale }.sort{|a,b| a.file_path <=> b.file_path}
75
+ end
72
76
  if files.size == 0
73
77
  puts "No files to push."
74
78
  else
@@ -9,7 +9,7 @@ module WebTranslateIt
9
9
  # Return a string representing the gem version
10
10
  # For example "1.8.3"
11
11
  def self.version
12
- File.read(File.expand_path('../../../version', __FILE__))
12
+ Gem.loaded_specs['web_translate_it'].version
13
13
  end
14
14
 
15
15
  def self.calculate_percentage(processed, total)
data/readme.md CHANGED
@@ -14,14 +14,15 @@
14
14
 
15
15
  1. A Command-Line Interface, `wti`, to sync files between your computer/server and WebTranslateIt.com. It is cross-platform and runs in a terminal (Linux, MacOS X) or in cmd.exe (Windows).
16
16
  2. A synchronisation server which provides 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).
17
- 3. A library to help write programs to connect to WebTranslateIt.com’s API. See [Extras](https://github.com/AtelierConvivialite/webtranslateit/wiki/Extras).
18
- 4. A rack middleware you can use in your Rails app to automatically fetch new translations from WebTranslateIt.
17
+ 3. A rack middleware you can use in your Rails app to automatically fetch new translations from WebTranslateIt.
18
+
19
+ An external library, [web_translate_it_server](https://github.com/AtelierConvivialite/web_translate_it_server), extends this rubygem and provides a web interface for your translation team to update your language files.
19
20
 
20
21
  ---
21
22
 
22
23
  ## Installation
23
24
 
24
- A dependency of `wti` needs gcc, so you will need it. With Linux, `apt-get install build-essential` or `yum install gcc` should do it.
25
+ `wti` requires `json`, a library that needs gcc, so you will need to have a gcc compile. With Linux, `apt-get install build-essential` or `yum install gcc` should do it. On Mac OS X, install Xcode command line tools.
25
26
 
26
27
  You will also need ruby to run `wti`. 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/AtelierConvivialite/webtranslateit/wiki/Install-wti-on-Windows).
27
28
 
@@ -177,10 +178,6 @@ There are 4 hooks:
177
178
 
178
179
  Check the [sample `.wti`](https://github.com/AtelierConvivialite/webtranslateit/blob/master/examples/.wti#L9..L13) file for implementation.
179
180
 
180
- ## WebTranslateIt Server
181
-
182
- This feature was extracted out to a separate gem. See [web_translate_it_server](https://github.com/AtelierConvivialite/web_translate_it_server).
183
-
184
181
  # License
185
182
 
186
- Copyright (c) 2009-2012 Atelier Convivialité, released under the MIT License.
183
+ Copyright (c) 2009-2013 Atelier Convivialité, released under the MIT License.
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: 2.0.4
4
+ version: 2.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-08 00:00:00.000000000 Z
12
+ date: 2013-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multipart-post
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 1.16.2
37
+ version: '2.0'
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 1.16.2
45
+ version: '2.0'
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: json
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -103,7 +103,6 @@ files:
103
103
  - history.md
104
104
  - license
105
105
  - readme.md
106
- - version
107
106
  - examples/locale.rb
108
107
  - lib/web_translate_it/auto_fetch.rb
109
108
  - lib/web_translate_it/cacert.pem
data/version DELETED
@@ -1 +0,0 @@
1
- 2.0.4