<commit_before>'use strict';

// Load our requirements
const glob = require('glob'),
      path = require('path'),
      logger = require('../log');

// Build a list of the available locale files in a given directory
module.exports = function(dir) {

  // Variables
  let available = [];

  // Run through the installed locales and add to array to be loaded
  glob.sync(path.join(dir, '/*.json')).forEach((file) => {
    
    // Get the shortname for the file
    let lang = path.basename(file, '.json');

    // Add to our object
    logger.debug('Found the "%s" locale.', lang);  
    available.push(lang);
  });

  return available;
};<commit_msg>Update available locales to prioritise english<commit_after>'use strict';

// Load our requirements
const glob = require('glob'),
      path = require('path'),
      logger = require(__base + 'libs/log');

// Build a list of the available locale files in a given directory
module.exports = function(dir) {

  // Variables
  let available = ['en'];

  // Run through the installed locales and add to array to be loaded
  glob.sync(path.join(dir, '/*.json')).forEach((file) => {
    
    // Get the shortname for the file
    let lang = path.basename(file, '.json');

    // Ignore english
    if ( lang !== 'en' ) { available.push(lang); }
  });

  return available;
};
{'fraction_non_alphanumeric': 0.1464339908952959, 'fraction_numerical': 0.0, 'mean_word_length': 3.0091185410334345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '111585', 'n_tokens_mistral': 389, 'n_tokens_neox': 376, 'n_words': 133}