hey

I would like to bring the newest versions of haml(2.0.1), rails(2.1.0)
and gettext(1.91.0) in my current project together. But in the moment, I
failure on parsing the haml-files to update my po-files. This is the
error message:

~/dev/GettextTest$ rake updatepo
Error: #<RubyLex::SyntaxError: unknown type of %string>

# the rake task
desc "Update pot/po files."
task :updatepo do
  require 'gettext/utils'
  GetText.update_pofiles("blog",
Dir.glob("{app,lib,bin}/**/*.{rb,erb,rjs,haml}"), "blog 1.0.0")
end

# and the haml-parser
require 'gettext/rgettext'
module HamlParser
  module_function

  def target?(file)
    File.extname(file) == ".haml"
  end

  def parse(file, ary = [])
    haml = Haml::Engine.new(IO.readlines(file).join)
    code = haml.precompiled.split(/$/)
    RubyParser.parse_lines(file, code, ary)
  end
end
GetText::RGetText.add_parser(HamlParser)

Any idas how to fix it?

thanks in advance,
Benni
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Railsi18n-discussion mailing list
Railsi18n-discussion@rubyforge.org
http://rubyforge.org/mailman/listinfo/railsi18n-discussion

Reply via email to