<commit_before>(function () {
  var element, timeline;

  function handlePopover(element) {
    var popover = '';
    if (element.hasOwnProperty("events")) {
      popover = 'Group of ' + element.events.length + ' events';
    } else {
      for (var i in element.details) {
        popover = popover + element.details[i];
      }
    }
    return popover;
  }

  function eventClick(el) {
    var table = '<table class="table table-striped table-bordered">';
    // clear all popovers on new click
    $('[data-toggle="popover"]').popover('hide');

    $(d3.event.target).popover('toggle');

    $(d3.event.target).on('shown.bs.popover', { target: d3.event.target }, function (event) {
      $(document).on('click', { target: event.data.target }, hidePopover);
    });

    if (el.hasOwnProperty("events")) {
      table = table + '<thead>This is a group of ' + el.events.length + ' events starting on ' + el.date.toLocaleString() + '</thead><tbody>';
      table = table + '<tr><th>Date</th><th>Event</th></tr>'
      for (var i = 0; i < el.events.length; i++) {
        table = table + '<tr><td>' + el.events[i].date.toLocaleString() + ' </td> ';
        for (var j in el.events[i].details) {
          table = table + '<td> ' + el.events[i].details[j] + ' </td> ';
        }
        table = table + '</tr>'
      }
      table = table + '</tbody>';
    } else {
      table = table + 'Date: ' + el.date.toLocaleString() + '<br>';
      for (var i in el.details) {
        table = table + el.details[i] + '<br>';
      }<commit_msg>Add missing gettext into miq_timeline.js<commit_after>(function () {
  var element, timeline;

  function handlePopover(element) {
    var popover = '';
    if (element.hasOwnProperty("events")) {
      popover = sprintf(__("Group of %s events"), element.events.length);
    } else {
      for (var i in element.details) {
        popover = popover + element.details[i];
      }
    }
    return popover;
  }

  function eventClick(el) {
    var table = '<table class="table table-striped table-bordered">';
    // clear all popovers on new click
    $('[data-toggle="popover"]').popover('hide');

    $(d3.event.target).popover('toggle');

    $(d3.event.target).on('shown.bs.popover', { target: d3.event.target }, function (event) {
      $(document).on('click', { target: event.data.target }, hidePopover);
    });

    if (el.hasOwnProperty("events")) {
      table = table + '<thead>' + sprintf(__("This is a group of %s events starting on %s"), el.events.length, el.date.toLocaleString()) + '</thead><tbody>';
      table = table + '<tr><th>' + __("Date") + '</th><th>' + __("Event") + '</th></tr>'
      for (var i = 0; i < el.events.length; i++) {
        table = table + '<tr><td>' + el.events[i].date.toLocaleString() + ' </td> ';
        for (var j in el.events[i].details) {
          table = table + '<td> ' + el.events[i].details[j] + ' </td> ';
        }
        table = table + '</tr>'
      }
      table = table + '</tbody>';
    } else {
      table = table + __('Date: ') + el.date.toLocaleString() + '<br>';
      for (var i in el.details) {
        table = table + el.details[i] + '<br>';
      }
{'fraction_non_alphanumeric': 0.19822391373295276, 'fraction_numerical': 0.002537266095781795, 'mean_word_length': 2.6211251435132032, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 41, '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': '2256375', 'n_tokens_mistral': 1046, 'n_tokens_neox': 1028, 'n_words': 236}