New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for ruby_parser > 3.x #85
Conversation
@@ -32,7 +40,7 @@ def initialize(filename, targets) | |||
@targets[k] = a | |||
@results << a | |||
end | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Watch your whitespace :)
-> 0.9.0 is for you :) |
Is "rake gettext:find" supposed to work with HAML that uses Ruby 1.9? I am having issue with this :( |
Does updating ruby parser help?
|
I am using ruby_parser (3.4.1) and I keep getting the following error, ruby_parser cannot read haml files with 1.9 syntax --- My HAML code is below: .border_wrapper.pop-up = simple_form_for(@user, :html => { :class => 'form-horizontal' },
'data-dismiss' => 'modal'}
s_('USERS|Password Confirmation')
Code')
Range'), collection: User::AGE_RANGES
collection: { s_('USERS|Female') => User::FEMALE, s_('USERS|Male') =>
s_('USERS|Language'), collection: Utils::I18n.humanized_locales
btn-primary'
true, class: 'btn-noaccount' On Fri, Feb 28, 2014 at 4:09 PM, Michael Grosser
|
My apologies, I am actually using Ruby 2.0 On Fri, Feb 28, 2014 at 4:19 PM, Lukas Beaton lukas@coupgon.com wrote:
|
WOW....so I solved it and it turns out the Ruby Parser is fine. In one of my lines of code I had s_('USERS|Gender)' instead of s_('USERS|Gender'). Notice the misplaced single quote. This caused a Ruby 1.9 error message, which I then Googled for, was mislead, and got taken for wild ride into wonderland. Sorry to bug you and thanks for the help :) |
Maybe run it through ruby parser on its own and if that fails open a right
|
Class Extractor was a subclass of RubyParser.
Ruby_parser 3.x uses Ruby18Parser and Ruby19Parser.
Changed superclass to Ruby19Parser / Ruby18Parser depending on Ruby Version in ruby_gettext_extractor.rb
Fixes issue #82, #72