<commit_before>module J18n
  pwd = File.expand_path(File.dirname(__FILE__))

  mattr_accessor :source_path
  @@source_path = File.join(File.dirname(__FILE__), 'javascripts', 'j18n.js')

  mattr_accessor :output_path
  @@output_path = "public/javascripts/j18n.js"
      
  mattr_accessor :i18n_path
  @@i18n_path = "public/javascripts/j18n.locales.js"

  mattr_accessor :build_on_boot
  @@build_on_boot = false
  
  def self.setup
    yield self
  end
  
  class Railtie < Rails::Railtie
    generators do
      require File.join(File.dirname(__FILE__), "generators", "install_generator.rb")
      require File.join(File.dirname(__FILE__), "generators", "regenerate_generator.rb")
    end
    
    initializer "j18n.initialize" do |app|
      # nothing to do
    end
    
    config.after_initialize do |app|
      if (J18n.build_on_boot)
        J18n::Builder.build()
      end
    end
  end
  
  class Builder
    def self.build
      copy_file(J18n.source_path, J18n.output_path) unless File.exists?(J18n.output_path)
      
      locales = I18n.backend.instance_eval do
        init_translations unless initialized?
        translations.to_json
      end
      File.delete(J18n.i18n_path) if File.exists?(J18n.i18n_path)
      File.open(J18n.i18n_path, 'w') do |f|
        f.print("I18n.dictionary = #{locales.to_s};\n")
        f.print("I18n.locale = '#{I18n.default_locale.to_s}'")
      end
    end
  end
end<commit_msg>added a missing semicolon<commit_after>module J18n
  pwd = File.expand_path(File.dirname(__FILE__))

  mattr_accessor :source_path
  @@source_path = File.join(File.dirname(__FILE__), 'javascripts', 'j18n.js')

  mattr_accessor :output_path
  @@output_path = "public/javascripts/j18n.js"
      
  mattr_accessor :i18n_path
  @@i18n_path = "public/javascripts/j18n.locales.js"

  mattr_accessor :build_on_boot
  @@build_on_boot = false
  
  def self.setup
    yield self
  end
  
  class Railtie < Rails::Railtie
    generators do
      require File.join(File.dirname(__FILE__), "generators", "install_generator.rb")
      require File.join(File.dirname(__FILE__), "generators", "regenerate_generator.rb")
    end
    
    initializer "j18n.initialize" do |app|
      # nothing to do
    end
    
    config.after_initialize do |app|
      if (J18n.build_on_boot)
        J18n::Builder.build()
      end
    end
  end
  
  class Builder
    def self.build
      copy_file(J18n.source_path, J18n.output_path) unless File.exists?(J18n.output_path)
      
      locales = I18n.backend.instance_eval do
        init_translations unless initialized?
        translations.to_json
      end
      File.delete(J18n.i18n_path) if File.exists?(J18n.i18n_path)
      File.open(J18n.i18n_path, 'w') do |f|
        f.print("I18n.dictionary = #{locales.to_s};\n")
        f.print("I18n.locale = '#{I18n.default_locale.to_s}';")
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.11064572425828971, 'fraction_numerical': 0.030715532286212915, 'mean_word_length': 3.0594900849858355, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4278638', 'n_tokens_mistral': 1115, 'n_tokens_neox': 1046, 'n_words': 180}