bin/crowdin-cli in crowdin-cli-0.0.16 vs bin/crowdin-cli in crowdin-cli-0.0.17
- old
+ new
@@ -217,11 +217,13 @@
end
end
end
- exit_now!("Nothing to upload") if local_files.empty?
+ if local_files.empty?
+ exit_now!("Warning: nothing to upload. See http://crowdin.net/page/cli-client#configuration-file for more details.")
+ end
common_dir = find_common_directory_path(dest_files)
local_project_tree = get_local_files_hierarchy(local_files.collect{ |h| h[:dest].sub(common_dir, '') })
@@ -323,11 +325,11 @@
if File.exists?("#{@base_path}#{file['source']}")
dest = file['source'].sub("#{@base_path}", '')
dest_files << dest
translation_languages.each do |lang|
- source = export_pattern_to_path(dest, file['translation'], lang)
+ source = export_pattern_to_path(dest, file['translation'], lang, languages_mapping)
translated_files[lang['crowdin_code']] << { source: "#{@base_path}#{source}", dest: dest }
end
else
Dir.glob("#{@base_path}#{file['source']}").each do |source|
dest = source.sub("#{@base_path}", '') # relative path in Crowdin
@@ -345,10 +347,12 @@
end
end # if
end # @config['files']
- exit_now!("Nothing to upload") if dest_files.empty?
+ if dest_files.empty?
+ exit_now!("Warning: nothing to upload. See http://crowdin.net/page/cli-client#configuration-file for more details.")
+ end
params = {}
params[:import_duplicates] = options['import-dublicates'] ? 1 : 0
params[:import_eq_suggestions] = options['import-eq-suggestions'] ? 1 : 0
params[:auto_approve_imported] = options['auto-approve-imported'] ? 1 : 0