<commit_before>module Translator
  class TranslationsController < ApplicationController
    before_filter :auth

    def index
      @all_keys = Translator.keys_for_strings(:show => params[:show]).collect {|k| k.sub(/\.[a-z]*$/, "")}.uniq
      @keys = paginate(Translator.keys_for_strings(:show => params[:show], :filter => params[:key]))
      render :layout => Translator.layout_name
    end

    def create
      Translator.current_store[params[:key]] = params[:value]
      redirect_to :back unless request.xhr?
    end

    private

    def auth
      Translator.auth_handler.bind(self).call if Translator.auth_handler.is_a? Proc
    end
<commit_msg>do not use top level ones<commit_after>module Translator
  class TranslationsController < ApplicationController
    before_filter :auth

    def index
      @all_keys = Translator.keys_for_strings(:show => params[:show]).collect {|k| k.sub(/\.[a-z0-9_-]*$/, "")}.uniq
      @keys = paginate(Translator.keys_for_strings(:show => params[:show], :filter => params[:key]))
      render :layout => Translator.layout_name
    end

    def create
      Translator.current_store[params[:key]] = params[:value]
      redirect_to :back unless request.xhr?
    end

    private

    def auth
      Translator.auth_handler.bind(self).call if Translator.auth_handler.is_a? Proc
    end

{'fraction_non_alphanumeric': 0.12490594431903687, 'fraction_numerical': 0.0015048908954100827, 'mean_word_length': 3.586206896551724, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '1366394', 'n_tokens_mistral': 426, 'n_tokens_neox': 405, 'n_words': 87}