Skip to content

Commit

Permalink
Merge pull request #1 from 11449/latest-haml
Browse files Browse the repository at this point in the history
make gem compatible with latest haml version.
  • Loading branch information
clemenshelm committed Jun 22, 2013
2 parents b0b98ac + bf99cd5 commit 2354f46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/haml-i18n.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def parse_tag_with_i18n(line)
def translate(text)
simple_key = text.parameterize.underscore

filename_components = options[:filename].match(/\/views\/([^\/]+)\/([^\/]+).html.haml/)
filename_components = @options[:filename].match(/\/views\/([^\/]+)\/([^\/]+).html.haml/)
key = filename_components ? "#{filename_components[1]}.#{filename_components[2]}.#{simple_key}" : simple_key

begin
Expand All @@ -45,7 +45,7 @@ def translate(text)
end

module Haml
class Engine
class Parser
include HamlI18n::Internationalizer
end
end

0 comments on commit 2354f46

Please sign in to comment.