<commit_before>module Locomotive
  module SimpleForm
    module BootstrapHelpers

      def row_wrapping(options = {}, &block)
        options.merge!(class: 'row')
        template.content_tag(:div,
          template.capture(&block).html_safe,
          options)
      end

      def col_wrapping(class_name, column = 6, &block)
        template.content_tag(:div,
          template.capture(&block).html_safe,
          class: "col-md-#{column} #{class_name}")
      end

    end

    module HeaderLink

      def _header_link(name, type)
        if _options = options[name]
          label = _options[:label] || I18n.t(:edit, scope: ['locomotive.shared.form', type])
          url   = _options[:url]
          template.link_to(label, url, class: 'action')
        else
          ''
        end
      end

    end

    module Inputs

      module FasterTranslate

        def translate_from_namespace(namespace, default = '')
          if (model_names = lookup_model_names)[0] == 'locomotive'
            model_name = model_names.join('.')

            _key = [<commit_msg>caching the label, hint or placeholder for a simple_form input uses now a key including the Locomotive::VERSION string<commit_after>module Locomotive
  module SimpleForm
    module BootstrapHelpers

      def row_wrapping(options = {}, &block)
        options.merge!(class: 'row')
        template.content_tag(:div,
          template.capture(&block).html_safe,
          options)
      end

      def col_wrapping(class_name, column = 6, &block)
        template.content_tag(:div,
          template.capture(&block).html_safe,
          class: "col-md-#{column} #{class_name}")
      end

    end

    module HeaderLink

      def _header_link(name, type)
        if _options = options[name]
          label = _options[:label] || I18n.t(:edit, scope: ['locomotive.shared.form', type])
          url   = _options[:url]
          template.link_to(label, url, class: 'action')
        else
          ''
        end
      end

    end

    module Inputs

      module FasterTranslate

        def translate_from_namespace(namespace, default = '')
          if (model_names = lookup_model_names)[0] == 'locomotive'
            model_name = model_names.join('.')

            _key = [
              Locomotive::VERSION,
{'fraction_non_alphanumeric': 0.10664335664335664, 'fraction_numerical': 0.0034965034965034965, 'mean_word_length': 2.2103786816269286, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6586752', 'n_tokens_mistral': 674, 'n_tokens_neox': 658, 'n_words': 148}