rake gettext:find not able to parse new Ruby 1.9 Hash syntax
Opened this issue · 1 comments
Hi!
we're playing with gettext and the new Ruby 1.9 Hash syntax and the rake gettext:find
task won't parse our views correctly. The error:
parse error on value ":" (tCOLON)
The syntax we're referring to:
# Ruby 1.8 Syntax
{:this => 'syntax', 'is' => 'fun', #<And:0x10036bb58> => 'flexible'}
# Ruby 1.9 syntax
{this: 'syntax', 'will': 'cause', #<Nasty:0x10031bf85>: 'errors'}
Are we doing something wrong? If not, any plans to support this? Shall we find another gettext string searching tool after all :)?
Regards!
I suppose that the parser does not support this syntax. It's old and rusty. I'll test it tomorrow and let you know for sure. If it's actually broken, I can fix it but it'll have to wait a week or two because I'm overloaded with other work now. Patches are welcome.
I am not sure that there is any other tool for this. At least I did not find anything reliable even though this gem seems abandoned and breaks all the time. If you find anything noteworthy, please let me know. There's get_pomo but it's not complete and I think it was abandoned too. My plan is to keep gettext barely working for my limited needs until I can find enough time to create a separate gem that contains only the parser without the runtime part and a set of tasks for extracting strings.