# File lib/gettext_i18n_rails/ruby_gettext_extractor.rb, line 42 def extract_string(node) case node.first when :str node.last when :call type, recv, meth, args = node # node has to be in form of "string" + "other_string" return nil unless recv && meth == :+ first_part = extract_string(recv) second_part = extract_string(args) first_part && second_part ? first_part.to_s + second_part.to_s : nil else nil end end