<commit_before>'use strict';

var i18n = require('i18n');
var path = require('path');
var extend = require('util')._extend;

module.exports = {
  loadPriority:  1,
  initialize: function(api, next){
    var options = api.config.i18n;
    options.directory = path.normalize(api.config.general.paths.locale[0]);
    i18n.configure(options);
    i18n.setLocale(api.config.i18n.defaultLocale);

    api.i18n = extend({
      // simplistic determination of locale for connection
      determineConnectionLocale: function(connection){
        // perhpas you want to look at the `accept-language` headers from a web requests
        // perhaps your API can use a certain cookie or URL to determine locale
        return api.config.i18n.defaultLocale;
      },<commit_msg>Replaced the use of util._extend with Object.assign<commit_after>'use strict';

var i18n = require('i18n');
var path = require('path');

module.exports = {
  loadPriority:  1,
  initialize: function(api, next){
    var options = api.config.i18n;
    options.directory = path.normalize(api.config.general.paths.locale[0]);
    i18n.configure(options);
    i18n.setLocale(api.config.i18n.defaultLocale);

    api.i18n = Object.assign({
      // simplistic determination of locale for connection
      determineConnectionLocale: function(connection){
        // perhpas you want to look at the `accept-language` headers from a web requests
        // perhaps your API can use a certain cookie or URL to determine locale
        return api.config.i18n.defaultLocale;
      },
{'fraction_non_alphanumeric': 0.10814332247557003, 'fraction_numerical': 0.023452768729641693, 'mean_word_length': 3.478134110787172, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2316892', 'n_tokens_mistral': 460, 'n_tokens_neox': 442, 'n_words': 127}