<commit_before>module Tolk
  class Locale < ActiveRecord::Base
    set_table_name "tolk_locales"

    MAPPING = {
      'en' => 'English',
      'zh' => 'Chinese',
      'bt' => 'Bulgarian',
      'de' => 'German',
      'el' => 'Greek',
      'es' => 'Spanish',
      'da' => 'Danish',
      'fr' => 'French',
      'se' => 'Swedish',
      'no' => 'Norweigan',
      'nl' => 'Dutch',
      'jp' => 'Japanese',
      'ru' => 'Russian',
      'it' => "Italian",
      'pl' => "Polish",
      'pt-BR' => "Portugese (Brazilian)"
    }

    has_many :phrases, :through => :translations, :class_name => 'Tolk::Phrase'
    has_many :translations, :class_name => 'Tolk::Translation', :dependent => :destroy
    accepts_nested_attributes_for :translations, :reject_if => proc { |attributes| attributes['text'].blank? }
    before_validation_on_update :remove_invalid_translations_from_target

    cattr_accessor :locales_config_path
    self.locales_config_path = "#{Rails.root}/config/locales"

    cattr_accessor :primary_locale_name
    self.primary_locale_name = I18n.default_locale.to_s

    include Tolk::Sync
    include Tolk::Import<commit_msg>Added Slovak to Locale::MAPPING.<commit_after>module Tolk
  class Locale < ActiveRecord::Base
    set_table_name "tolk_locales"

    MAPPING = {
      'en' => 'English',
      'zh' => 'Chinese',
      'bt' => 'Bulgarian',
      'de' => 'German',
      'el' => 'Greek',
      'es' => 'Spanish',
      'da' => 'Danish',
      'fr' => 'French',
      'se' => 'Swedish',
      'no' => 'Norweigan',
      'nl' => 'Dutch',
      'jp' => 'Japanese',
      'ru' => 'Russian',
      'it' => "Italian",
      'pl' => "Polish",
      'pt-BR' => "Portugese (Brazilian)",
      'sl' => "Slovak"
    }

    has_many :phrases, :through => :translations, :class_name => 'Tolk::Phrase'
    has_many :translations, :class_name => 'Tolk::Translation', :dependent => :destroy
    accepts_nested_attributes_for :translations, :reject_if => proc { |attributes| attributes['text'].blank? }
    before_validation_on_update :remove_invalid_translations_from_target

    cattr_accessor :locales_config_path
    self.locales_config_path = "#{Rails.root}/config/locales"

    cattr_accessor :primary_locale_name
    self.primary_locale_name = I18n.default_locale.to_s

    include Tolk::Sync
    include Tolk::Import
{'fraction_non_alphanumeric': 0.16630947278182598, 'fraction_numerical': 0.0017145306472353193, 'mean_word_length': 3.2904411764705883, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 46, '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': '1649363', 'n_tokens_mistral': 849, 'n_tokens_neox': 801, 'n_words': 150}