bin/crowdin-cli in crowdin-cli-0.5.0 vs bin/crowdin-cli in crowdin-cli-0.5.1
- old
+ new
@@ -412,10 +412,11 @@
ignores = file['ignore'] || []
if File.exist?(File.join(@base_path, file['source']))
dest = file['dest'] || file['source']
type = file['type']
+
dest_files << dest
local_file = { dest: dest, source: File.join(@base_path, file['source']), export_pattern: file['translation'], type: type }
@allowed_options.each do |option|
@@ -424,10 +425,11 @@
local_files << local_file
else
Find.find(@base_path) do |source_path|
dest = source_path.sub(/\A#{Regexp.escape(@base_path)}/, '') # relative path in Crowdin
+ type = file['type']
if File.directory?(source_path)
if ignores.any? { |pattern| File.fnmatch?(pattern, dest, File::FNM_PATHNAME) }
Find.prune # Don't look any further into this directory
else
@@ -438,10 +440,10 @@
dest_files << dest
export_pattern = construct_export_pattern(dest, file['source'], file['translation'])
- local_file = { dest: dest, source: source_path, export_pattern: export_pattern }
+ local_file = { dest: dest, source: source_path, export_pattern: export_pattern, type: type }
@allowed_options.each do |option|
local_file.merge!({ option.to_sym => file[option] }) if file.has_key?(option)
end