<commit_before>module Formtastic
  class FormBuilder
    def localized_input(name, args = {})
      t = self.object.send("#{name}_translations")
      field = ActiveAdmin::Mongoid::Localize::Field.new(self.object, name)

      ret = ''
      self.semantic_fields_for "#{name}_translations", field do |lf|
        ::ActiveAdmin::Mongoid::Localize.locales.each do |locale|
          args[:input_html][:value] =  (t.nil? || t[locale.to_s].nil?) ? '' : t[locale.to_s]
          flag_code = locale.to_s.include?("-") ? locale.to_s.split("-")[1].downcase : locale.to_s<commit_msg>fixed bug from previous change<commit_after>module Formtastic
  class FormBuilder
    def localized_input(name, args = {})
      t = self.object.send("#{name}_translations")
      field = ActiveAdmin::Mongoid::Localize::Field.new(self.object, name)

      ret = ''
      self.semantic_fields_for "#{name}_translations", field do |lf|
        ::ActiveAdmin::Mongoid::Localize.locales.each do |locale|
          args[:input_html] = { :value => (t.nil? || t[locale.to_s].nil?) ? '' : t[locale.to_s] }
          flag_code = locale.to_s.include?("-") ? locale.to_s.split("-")[1].downcase : locale.to_s
{'fraction_non_alphanumeric': 0.17264957264957265, 'fraction_numerical': 0.0017094017094017094, 'mean_word_length': 3.684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7240911', 'n_tokens_mistral': 400, 'n_tokens_neox': 399, 'n_words': 62}