<commit_before>module Dragoman
  class UrlHelpers

    def self.add_untranslated_helpers name, path_module, url_module
      path_module.send :define_method, "#{name}_path" do |*args|
        __send__(Dragoman::UrlHelpers.localized_helper_name(name, :path), *Dragoman::UrlHelpers.args_with_locale(*args))
      end
      url_module.send :define_method, "#{name}_url" do |*args|
        __send__(Dragoman::UrlHelpers.localized_helper_name(name, :url), *Dragoman::UrlHelpers.args_with_locale(*args))
      end
    end

    def self.localized_helper_name name, url_helper_type
      locale = I18n.locale
      "#{name}_#{locale}_#{url_helper_type}"
    end

    def self.args_with_locale *args
      if args[0].is_a?(Hash)
        args[0].merge!({locale: I18n.locale})
      else
        args << {locale: I18n.locale}
      end
      args
    end

  end
end<commit_msg>Removes obsolete locale merge in url helpers<commit_after>module Dragoman
  class UrlHelpers

    def self.add_untranslated_helpers name, path_module, url_module
      path_module.send :define_method, "#{name}_path" do |*args|
        __send__(Dragoman::UrlHelpers.localized_helper_name(name, :path), *args)
      end
      url_module.send :define_method, "#{name}_url" do |*args|
        __send__(Dragoman::UrlHelpers.localized_helper_name(name, :url), *args)
      end
    end

    def self.localized_helper_name name, url_helper_type
      locale = I18n.locale
      "#{name}_#{locale}_#{url_helper_type}"
    end
  end
end
{'fraction_non_alphanumeric': 0.11126005361930295, 'fraction_numerical': 0.006702412868632708, 'mean_word_length': 3.7097791798107256, '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': '1524490', 'n_tokens_mistral': 503, 'n_tokens_neox': 506, 'n_words': 95}