crowdin-cli 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -107,9 +107,41 @@ files:
107
107
  ru: ros
108
108
  uk: ukr
109
109
  ```
110
+ See Also: all available [Crowdin Language Codes](http://crowdin.net/page/api/language-codes)
110
111
 
111
112
  ## Usage
112
113
 
114
+ When the configuration file is created you are ready to start using `crowdin-cli` to manage your localization resources and automate files synchronization.
115
+
116
+ We listed most typical commands that crowdin-cli is used for:
117
+
118
+ Upload your source files to Crowdin:
119
+ ```
120
+ $ crowdin-cli upload sources
121
+ ```
122
+
123
+ Upload existing translations to Crowdin project (translations will be synchronized):
124
+ ```
125
+ $ crowdin-cli upload translations
126
+ ```
127
+
128
+ Download latest translations from Crowdin:
129
+ ```
130
+ $ crowdin-cli download
131
+ ```
132
+
133
+ Get help on `upload` command:
134
+ ```
135
+ $ crowdin-cli help upload
136
+ ```
137
+
138
+ Get help on `upload sources` command:
139
+ ```
140
+ $ crowdin-cli help upload sources
141
+ ```
142
+
143
+ Use help provided with an application to get more information about available commands and options:
144
+
113
145
 
114
146
  ## Supported Rubies
115
147
 
@@ -128,4 +160,4 @@ Tested with the following Ruby versions:
128
160
 
129
161
  ## License
130
162
 
131
- This library is distributed under the MIT license. Please see the LICENSE file.
163
+ This library is distributed under the MIT license. Please see the LICENSE file.
data/bin/crowdin-cli CHANGED
@@ -219,7 +219,9 @@ EOS
219
219
  end
220
220
  end
221
221
 
222
- exit_now!("Nothing to upload") if local_files.empty?
222
+ if local_files.empty?
223
+ exit_now!("Warning: nothing to upload. See http://crowdin.net/page/cli-client#configuration-file for more details.")
224
+ end
223
225
 
224
226
  common_dir = find_common_directory_path(dest_files)
225
227
 
@@ -325,7 +327,7 @@ EOS
325
327
  dest_files << dest
326
328
 
327
329
  translation_languages.each do |lang|
328
- source = export_pattern_to_path(dest, file['translation'], lang)
330
+ source = export_pattern_to_path(dest, file['translation'], lang, languages_mapping)
329
331
  translated_files[lang['crowdin_code']] << { source: "#{@base_path}#{source}", dest: dest }
330
332
  end
331
333
  else
@@ -347,7 +349,9 @@ EOS
347
349
  end # if
348
350
  end # @config['files']
349
351
 
350
- exit_now!("Nothing to upload") if dest_files.empty?
352
+ if dest_files.empty?
353
+ exit_now!("Warning: nothing to upload. See http://crowdin.net/page/cli-client#configuration-file for more details.")
354
+ end
351
355
 
352
356
  params = {}
353
357
  params[:import_duplicates] = options['import-dublicates'] ? 1 : 0
@@ -1,5 +1,5 @@
1
1
  module Crowdin
2
2
  module CLI
3
- VERSION = '0.0.16'
3
+ VERSION = '0.0.17'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crowdin-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
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-10-29 00:00:00.000000000 Z
12
+ date: 2012-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake