bin/crowdin-cli in crowdin-cli-0.2.2 vs bin/crowdin-cli in crowdin-cli-0.2.3

- old
+ new

@@ -322,11 +322,11 @@ else next end elsif File.fnmatch?(file['source'], dest, File::FNM_PATHNAME) next if ignores.any?{ |pattern| File.fnmatch?(pattern, dest, File::FNM_PATHNAME) } - + dest_files << dest export_pattern = construct_export_pattern(dest, file['source'], file['translation']) local_file = { dest: dest, source: source_path, export_pattern: export_pattern } @@ -372,12 +372,14 @@ print "Updating source file `#{file[:dest]}'" params = {} params[:scheme] = file.delete(:sheme) params[:first_line_contains_header] = file.delete(:first_line_contains_header) + params[:update_option] = file.delete(:update_option) # 'update_without_changes' or 'update_as_unapproved' resp = @crowdin.update_file([] << file, params) + case resp['files'].first[1] when 'skipped' puts "\rUpdating source file `#{file[:dest]}' - Skipped" when 'updated' puts "\rUpdating source file `#{file[:dest]}' - OK" @@ -395,9 +397,10 @@ params = {} params[:scheme] = file.delete(:sheme) params[:first_line_contains_header] = file.delete(:first_line_contains_header) resp = @crowdin.add_file([] << file, params) + puts "\rUploading source file `#{file[:dest]}' - OK" end end # action end # command