<commit_before>module Idiom #:nodoc:
  # Finds English language translation keys which have not been translated 
  # and translates them through Google Translate.
  #
  module Directories #:nodoc:
    def use_directories?
      use_dirs
    end
    
    def destination_path(lang)
      output_path = File.basename(@base_source).split(".").first
      if use_directories?
        "#{destination}/#{lang}/#{output_path}_#{lang}.#{extension}"
      else
        "#{destination}/#{output_path}_#{lang}.#{extension}"
      end
    end
    
    def ensure_destination_path_exists(lang)
      dest = destination_path(lang)
      dir = File.dirname(dest)
      FileUtils.mkdir_p(dir)
      
      dest
    end
    
    def destination_file_or_directory(lang)
      if use_directories?
        dir = File.dirname(destination_path(lang))
        "#{dir}/*.#{extension}"
      else
        destination_path(lang)
      end
    end    
  end
  
  module Locales #:nodoc:
    # Mapping of the way I18n country codes with the Google Translate codes.
    #
    # The key is the I18n representation, and the value is the code Google Translate would expect.
    #
    LOCALES = {
      "de-DE" => "de",
      "en-MY" => "en",
      "en-SG" => "en",
      "es-MX" => "es",
      "it-IT" => "it",
      "vi-VN" => "vi",
      "zh-Hant-TW" => "zh-TW",
      "en-AA" => "en",
      "en-NZ" => "en",<commit_msg>Add Argentina and US Spanish<commit_after>module Idiom #:nodoc:
  # Finds English language translation keys which have not been translated 
  # and translates them through Google Translate.
  #
  module Directories #:nodoc:
    def use_directories?
      use_dirs
    end
    
    def destination_path(lang)
      output_path = File.basename(@base_source).split(".").first
      if use_directories?
        "#{destination}/#{lang}/#{output_path}_#{lang}.#{extension}"
      else
        "#{destination}/#{output_path}_#{lang}.#{extension}"
      end
    end
    
    def ensure_destination_path_exists(lang)
      dest = destination_path(lang)
      dir = File.dirname(dest)
      FileUtils.mkdir_p(dir)
      
      dest
    end
    
    def destination_file_or_directory(lang)
      if use_directories?
        dir = File.dirname(destination_path(lang))
        "#{dir}/*.#{extension}"
      else
        destination_path(lang)
      end
    end    
  end
  
  module Locales #:nodoc:
    # Mapping of the way I18n country codes with the Google Translate codes.
    #
    # The key is the I18n representation, and the value is the code Google Translate would expect.
    #
    LOCALES = {
      "de-DE" => "de",
      "en-MY" => "en",
      "en-SG" => "en",
      "es-AR" => "es",
      "es-MX" => "es",
      "es-US" => "es",
      "it-IT" => "it",
      "vi-VN" => "vi",
      "zh-Hant-TW" => "zh-TW",
      "en-AA" => "en",
      "en-NZ" => "en",
{'fraction_non_alphanumeric': 0.13586765223512848, 'fraction_numerical': 0.0028159098908834917, 'mean_word_length': 2.308498253783469, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, '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': '2923893', 'n_tokens_mistral': 951, 'n_tokens_neox': 952, 'n_words': 223}