class GetText::Tools::XGetText

Public Instance Methods

parse(paths) click to toggle source
# File lib/translation_io/railtie.rb, line 47
def parse(paths)
  po = PO.new
  paths = [paths] if paths.kind_of?(String)
  paths.each do |path|
    begin
      parse_path(path, po)
    rescue SystemExit => e
      puts
      puts "---------------"
      puts "Error while parsing this file for GetText: #{path}"
      puts "Are you sure the file is correctly formatted?"
      puts "Feel free to contact us to get some help: contact@translation.io"
      puts "---------------"
      puts
    end
  end
  po
end