lib/i18n/tasks/scanners/pattern_scanner.rb in i18n-tasks-0.4.5 vs lib/i18n/tasks/scanners/pattern_scanner.rb in i18n-tasks-0.5.0

- old
+ new

@@ -11,11 +11,11 @@ keys = [] text.scan(pattern) do |match| src_pos = Regexp.last_match.offset(0).first key = match_to_key(match, path) next unless valid_key?(key) - keys << ::I18n::Tasks::Key.new(key, src_location(text, src_pos)) + keys << [key, data: src_location(path, text, src_pos)] end keys end def default_pattern @@ -32,9 +32,10 @@ # @param [MatchData] match # @param [String] path # @return [String] full absolute key name def match_to_key(match, path) key = strip_literal(match[0]) + key = key + '*' if key.end_with?('.') key = absolutize_key(key, path) if path && key.start_with?('.') key end def pattern