<commit_before>module ActionViewExtensions

  extend ActiveSupport::Concern

  def translate_helper(key_param, *interpolations)
    begin
      # DRY DRY DRY
      return TranslationEngine.translate_text(key_param, interpolations)
      # return "[" + key_param.to_s + "]" if I18n.locale == :tags
      # translation_key_id = TranslationKey.where("name = ?",key_param.to_s).first.id
      # locale_id = Locale.where("name = ?",I18n.locale).first.id
      # translation_records = Translation.where("translation_key_id = ? AND locale_id = ?", translation_key_id, locale_id)
      # #should add a Honeybadger call if multiple records returned.
      # translation_records.count > 0 ? translation_text = translation_records[0].value : translation_text = "Translation not found: key = #{key_param}"
      # translation_text.sub! '%{age}', '65'
      # return translation_text.html_safe
    rescue err
      return "Translation not found: key = #{key_param}"
    end
  end

end<commit_msg>cleanup<commit_after>module ActionViewExtensions

  extend ActiveSupport::Concern

  def translate_helper(key_param, *interpolations)
    begin
      return TranslationEngine.translate_text(key_param, interpolations)
    rescue err
      return "Translation not found: key = #{key_param}"
    end
  end

end
{'fraction_non_alphanumeric': 0.09844961240310078, 'fraction_numerical': 0.006201550387596899, 'mean_word_length': 4.04296875, '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': '7384294', 'n_tokens_mistral': 393, 'n_tokens_neox': 377, 'n_words': 87}