Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 14 lines (11 sloc) 336 Bytes
#!/usr/bin/env macruby
framework 'Cocoa'
ARGV.each do |f|
f = File.expand_path f
d = NSDictionary.dictionaryWithContentsOfFile(f)
if not d
$stderr.puts "#{f} is not a dictionary or strings file!"
next
end
d.descriptionInStringsFileFormat.dataUsingEncoding(NSUTF8StringEncoding).writeToFile(f, atomically:true)
end