<commit_before>class CirculationStatus < ActiveRecord::Base
  attr_accessible :name, :display_name, :note
  #include MasterModel
  acts_as_list
  validates :name, :presence => true, :format => {:with => /\A[0-9A-Za-z][0-9A-Za-z_\-\s,]*[0-9a-z]\Z/}
  validates :display_name, :presence => true
  before_validation :set_display_name, :on => :create
  normalize_attributes :name

  default_scope :order => "circulation_statuses.position"
  scope :available_for_checkout, where(:name => 'Available On Shelf')
  has_many :items
end
<commit_msg>added set_display_name<commit_after>class CirculationStatus < ActiveRecord::Base
  attr_accessible :name, :display_name, :note
  #include MasterModel
  acts_as_list
  validates :name, :presence => true, :format => {:with => /\A[0-9A-Za-z][0-9A-Za-z_\-\s,]*[0-9a-z]\Z/}
  validates :display_name, :presence => true
  before_validation :set_display_name, :on => :create
  normalize_attributes :name

  default_scope :order => "circulation_statuses.position"
  scope :available_for_checkout, where(:name => 'Available On Shelf')
  has_many :items

  def set_display_name
    self.display_name = "#{I18n.locale}: #{name}" if display_name.blank?
  end
end

{'fraction_non_alphanumeric': 0.1411764705882353, 'fraction_numerical': 0.011764705882352941, 'mean_word_length': 5.2356020942408374, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '103726', 'n_tokens_mistral': 435, 'n_tokens_neox': 416, 'n_words': 87}