<commit_before>module SpreeI18n
  class Railtie < ::Rails::Railtie #:nodoc:
    initializer 'spree-i18n' do |app|
      SpreeI18n::Railtie.instance_eval do
        pattern = pattern_from app.config.i18n.available_locales

        add("config/locales/#{pattern}/*.{rb,yml}")
      end
    end

    protected

    def self.add(pattern)
      files = Dir[File.join(File.dirname(__FILE__), '../..', pattern)]
      I18n.load_path.concat(files)
    end

    def self.pattern_from(args)
      array = Array(args || [])
      array.blank? ? '*' : "{#{array.join ','}}"
    end<commit_msg>loading all locale files, not only those in the subdirectories<commit_after>module SpreeI18n
  class Railtie < ::Rails::Railtie #:nodoc:
    initializer 'spree-i18n' do |app|
      SpreeI18n::Railtie.instance_eval do
        pattern = pattern_from app.config.i18n.available_locales

        add("config/locales/#{pattern}/*.{rb,yml}")
        add("config/locales/*.{rb,yml}")
      end
    end

    protected

    def self.add(pattern)
      files = Dir[File.join(File.dirname(__FILE__), '../..', pattern)]
      I18n.load_path.concat(files)
    end

    def self.pattern_from(args)
      array = Array(args || [])
      array.blank? ? '*' : "{#{array.join ','}}"
    end
{'fraction_non_alphanumeric': 0.15495207667731628, 'fraction_numerical': 0.01597444089456869, 'mean_word_length': 2.867283950617284, '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': '7026147', 'n_tokens_mistral': 461, 'n_tokens_neox': 432, 'n_words': 75}