def localizable_duplicate_entries
      localizable_files = (git.modified_files + git.added_files) - git.deleted_files
      localizable_files.select! { |line| line.end_with?('.strings') }

      duplicate_entries = []

      localizable_files.each do |file|
        lines = File.readlines(file)

        # Grab just the keys, translations might be different
        keys = lines.map { |e| e.split('=').first }
        # Filter newlines and comments
        keys = keys.select do |e|
          e != "\n" && !e.start_with?('/*') && !e.start_with?('//')
        end

        # Grab keys that appear more than once
        duplicate_keys = keys.select { |e| keys.rindex(e) != keys.index(e) }
        # And make sure we have one entry per duplicate key
        duplicate_keys = duplicate_keys.uniq

        duplicate_keys.each do |key|
          duplicate_entries << { 'file' => file, 'key' => key }
        end
      end

      duplicate_entries
    end
def localizable_duplicate_entries
      localizable_files = (git.modified_files + git.added_files) - git.deleted_files
      localizable_files.select! { |line| line.end_with?('.strings') }

      duplicate_entries = []

      localizable_files.each do |file|
        lines = File.readlines(file)

        # Grab just the keys, translations might be different
        keys = lines.map { |e| e.split('=').first }
        # Filter newlines and comments
        keys = keys.select do |e|
          e != "\n" && !e.start_with?('/*') && !e.start_with?('//')
        end

        # Grab keys that appear more than once
        duplicate_keys = keys.select { |e| keys.rindex(e) != keys.index(e) }
        # And make sure we have one entry per duplicate key
        duplicate_keys = duplicate_keys.uniq

        duplicate_keys.each do |key|
          duplicate_entries << { 'file' => file, 'key' => key }
        end
      end

      duplicate_entries
    end
Returns an array of all detected duplicate entries. An entry is
 represented by a has with file path under 'file' key and the
 Localizable.strings key under 'key' key.

 @return  [Array of duplicate Localizable.strings entries]