<commit_before>// do this better:
setLanguage = function (language) {
  // Session.set('i18nReady', false);
  // console.log('i18n loading… '+language)

  // moment
  Session.set('momentReady', false);
  // console.log('moment loading…')
  $.getScript("//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/lang/" + language.toLowerCase() + ".js", function (result) {
    moment.locale(language);
    Session.set('momentReady', true);
    Session.set('momentLocale', language);
    // console.log('moment loaded!')
  });

  // TAPi18n<commit_msg>do not make call to CDN when language is english (fix #589)<commit_after>// do this better:
setLanguage = function (language) {
  // Session.set('i18nReady', false);
  // console.log('i18n loading… '+language)

  // moment
  Session.set('momentReady', false);
  // console.log('moment loading…')
  if (language.toLowerCase() === "en") {
    Session.set('momentReady', true);
  } else {
    $.getScript("//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/lang/" + language.toLowerCase() + ".js", function (result) {
      moment.locale(language);
      Session.set('momentReady', true);
      Session.set('momentLocale', language);
      // console.log('moment loaded!')
    });
  }

  // TAPi18n
{'fraction_non_alphanumeric': 0.1912479740680713, 'fraction_numerical': 0.017017828200972446, 'mean_word_length': 3.5238095238095237, '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': '7197688', 'n_tokens_mistral': 417, 'n_tokens_neox': 400, 'n_words': 76}