<commit_before>module GettextI18nRails::ActiveRecord
  # CarDealer.sales_count -> s_('CarDealer|Sales count') -> 'Sales count' if no translation was found
  def human_attribute_name(attribute, *args)
    s_(gettext_translation_for_attribute_name(attribute))
  end

  # CarDealer -> _('car dealer')
  def human_name(*args)
    _(self.human_name_without_translation)
  end

  def human_name_without_translation
    self.to_s.underscore.gsub('_',' ')
  end

  private

  def gettext_translation_for_attribute_name(attribute)
    "#{self}|#{attribute.to_s.split('.').map! {|a| a.gsub('_',' ').capitalize }.join('|')}"
  end
end<commit_msg>Changing method missing method to public instead of private<commit_after>module GettextI18nRails::ActiveRecord
  # CarDealer.sales_count -> s_('CarDealer|Sales count') -> 'Sales count' if no translation was found
  def human_attribute_name(attribute, *args)
    s_(gettext_translation_for_attribute_name(attribute))
  end

  # CarDealer -> _('car dealer')
  def human_name(*args)
    _(self.human_name_without_translation)
  end

  def human_name_without_translation
    self.to_s.underscore.gsub('_',' ')
  end

  def gettext_translation_for_attribute_name(attribute)
    "#{self}|#{attribute.to_s.split('.').map! {|a| a.gsub('_',' ').capitalize }.join('|')}"
  end
end
{'fraction_non_alphanumeric': 0.13486590038314175, 'fraction_numerical': 0.0030651340996168583, 'mean_word_length': 5.3707317073170735, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '512039', 'n_tokens_mistral': 458, 'n_tokens_neox': 444, 'n_words': 82}