<commit_before>'use strict';

var app = (function() {

  var paginationNodesTable = 1;
  var paginationGraphTable = 0;

  function searchField(event, locale) {
    var searchField = document.getElementById('search-field');
    if (event.keyCode == 13 && searchField.value.length > 0) {
      location.path = ''
      return location = '/' + locale + '/graph/search/searchField?searchParam=' + encodeURIComponent(searchField.value);
      } else {
      return false;
    }  
  }

  function changeLocale(currentLocale, newLocale) {
    var searchParam = location.search;
    var newLocation = location.pathname.replace('/' + currentLocale + '/', newLocale + '/');
    newLocation += searchParam;
    
    location.assign(newLocation);<commit_msg>Improved changeLocale for language button<commit_after>'use strict';

var app = (function() {

  var paginationNodesTable = 1;
  var paginationGraphTable = 0;

  function searchField(event, locale) {
    var searchField = document.getElementById('search-field');
    if (event.keyCode == 13 && searchField.value.length > 0) {
      location.path = ''
      return location = '/' + locale + '/graph/search/searchField?searchParam=' + encodeURIComponent(searchField.value);
      } else {
      return false;
    }  
  }

  function changeLocale(currentLocale, newLocale) {
    var searchParam = location.search;
    var newLocation = location.pathname.replace('/' + currentLocale, newLocale);
    newLocation += searchParam;
    
    location.assign(newLocation);
{'fraction_non_alphanumeric': 0.1246684350132626, 'fraction_numerical': 0.006631299734748011, 'mean_word_length': 3.5866261398176293, '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': '2429568', 'n_tokens_mistral': 436, 'n_tokens_neox': 422, 'n_words': 93}