<commit_before>'use strict';

const electron = require('electron');
const Menu = electron.Menu;

var createTemplate = function(mainWindow) {
  var app_name = electron.app.getName();
  var first_menu_name = (process.platform === 'darwin') ? app_name : 'File';
  var template = [];

  const platformAppMenu = process.platform === 'darwin' ? [{
    type: 'separator'
  }, {
    label: 'Hide ' + app_name,
    accelerator: 'Command+H',
    selector: 'hide:'
  }, {
    label: 'Hide Others',
    accelerator: 'Command+Shift+H',
    selector: 'hideOtherApplications:'
  }, {
    label: 'Show All',
    selector: 'unhideAllApplications:'
  }, {
    type: 'separator'
  }] : [];

  template.push({
    label: first_menu_name,
    submenu: [{
      label: 'About ' + app_name,
      role: 'about'
    }, {
      label: 'Settings',
      click: function(item, focusedWindow) {
        mainWindow.loadURL('file://' + __dirname + '/browser/settings.html');
      }
    }, ...platformAppMenu, {
      label: 'Quit',
      accelerator: 'CmdOrCtrl+Q',
      click: function(item, focusedWindow) {<commit_msg>Add "About" dialog for Windows and Linux<commit_after>'use strict';

const electron = require('electron');
const Menu = electron.Menu;

var createTemplate = function(mainWindow) {
  var app_name = electron.app.getName();
  var first_menu_name = (process.platform === 'darwin') ? app_name : 'File';
  var template = [];

  const platformAppMenu = process.platform === 'darwin' ? [{
    type: 'separator'
  }, {
    label: 'Hide ' + app_name,
    accelerator: 'Command+H',
    selector: 'hide:'
  }, {
    label: 'Hide Others',
    accelerator: 'Command+Shift+H',
    selector: 'hideOtherApplications:'
  }, {
    label: 'Show All',
    selector: 'unhideAllApplications:'
  }, {
    type: 'separator'
  }] : [];

  template.push({
    label: first_menu_name,
    submenu: [{
      label: 'About ' + app_name,
      role: 'about',
      click: function(item, focusedWindow) {
        electron.dialog.showMessageBox(mainWindow, {
          buttons: ["OK"],
          message: `${app_name} Desktop ${electron.app.getVersion()}`
        });
      }
    }, {
      label: 'Settings',
      click: function(item, focusedWindow) {
        mainWindow.loadURL('file://' + __dirname + '/browser/settings.html');
      }
    }, ...platformAppMenu, {
      label: 'Quit',
      accelerator: 'CmdOrCtrl+Q',
      click: function(item, focusedWindow) {
{'fraction_non_alphanumeric': 0.16220666941128037, 'fraction_numerical': 0.0, 'mean_word_length': 3.043261231281198, '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': '4294465', 'n_tokens_mistral': 771, 'n_tokens_neox': 760, 'n_words': 164}