<commit_before>import { app, BrowserWindow, Menu, shell } from 'electron'
import { } from './providers/importProvider'
import { openImportWindow, openStatsWindow, reload, toggleDevTools } from './windows'
import { isMac } from './helpers/platform'

function application(): any {
  const name = 'Billy'

  return {
    label: name,
    submenu: [
      {
        label: 'About ' + name,
        role: 'about'
      },
      {
        type: 'separator'
      },
      {
        label: 'Hide ' + name,
        accelerator: 'Command+H',
        role: 'hide'
      },
      {
        label: 'Show All',
        role: 'unhide'
      },
      {
        type: 'separator'
      },
      {
        label: 'Quit',
        accelerator: 'Command+Q',
        click: function () { app.quit(); }
      },
    ]
  }
}

function edit() {
  return {
    label: 'Edit',
    submenu: [{
      label: 'Cut',
      accelerator: 'CmdOrCtrl+X',
      role: 'cut'
    }, {
      label: 'Copy',
      accelerator: 'CmdOrCtrl+C',
      role: 'copy'
    }, {
      label: 'Paste',
      accelerator: 'CmdOrCtrl+V',
      role: 'paste'
    }, {
      label: 'Select All',
      accelerator: 'CmdOrCtrl+A',
      role: 'selectall'
    }, {
      label: 'Import',
      accelerator: 'CmdOrCtrl+I',
      click: () => openImportWindow()
    }, {
      label: 'Statistiken anzeigen',
      click: () => openStatsWindow()
    }]
  }
}

function view() {
  return {
    label: 'View',
    submenu: [{
      label: 'Reload',
      accelerator: 'CmdOrCtrl+R',
      click: (item, focusedWindow) => reload(focusedWindow)
    }, {
      label: 'Toggle Developer Tools',
      accelerator: (() => {
        if (isMac()) {
          return 'Alt+Command+I'
        } else {
          return 'Ctrl+Shift+I'
        }
      })(),
      click: (item, focusedWindow) => toggleDevTools(focusedWindow)
    }]
  }
}

function window() {
  return {
    label: 'Window',
    role: 'window',
    submenu: [
      {
        label: 'Minimize',
        accelerator: 'CmdOrCtrl+M',
        role: 'minimize'
      },
      {
        label: 'Close',
        accelerator: 'CmdOrCtrl+W',
        role: 'close'
      },
    ]
  }
}

function help() {
  return {
    label: 'Help',
    role: 'help',
    submenu: [{
      label: 'Learn More',
      click: () => shell.openExternal('https://github.com/haimich/billy')
    }]
  }
}
<commit_msg>i18ned<commit_after>import { app, BrowserWindow, Menu, shell } from 'electron'
import { } from './providers/importProvider'
import { openImportWindow, openStatsWindow, reload, toggleDevTools } from './windows'
import { isMac } from './helpers/platform'
import t from './helpers/i18n'

function application(): any {
  const name = 'Billy'

  return {
    label: name,
    submenu: [
      {
        label: `${t('Über')} ${name}`,
        role: 'about'
      },
      {
        type: 'separator'
      },
      {
        label: `${name} ${t('verbergen')}`,
        accelerator: 'Command+H',
        role: 'hide'
      },
      {
        label: t('Alle Fenster zeigen'),
        role: 'unhide'
      },
      {
        type: 'separator'
      },
      {
        label: t('Beenden'),
        accelerator: 'Command+Q',
        click: function () { app.quit(); }
      },
    ]
  }
}

function edit() {
  return {
    label: t('Bearbeiten'),
    submenu: [{
      label: t('Ausschneiden'),
      accelerator: 'CmdOrCtrl+X',
      role: 'cut'
    }, {
      label: t('Kopieren'),
      accelerator: 'CmdOrCtrl+C',
      role: 'copy'
    }, {
      label: t('Einfügen'),
      accelerator: 'CmdOrCtrl+V',
      role: 'paste'
    }, {
      label: t('Alles markieren'),
      accelerator: 'CmdOrCtrl+A',
      role: 'selectall'
    }, {
      label: t('Importieren'),
      accelerator: 'CmdOrCtrl+I',
      click: () => openImportWindow()
    }]
  }
}

function view() {
  return {
    label: t('Ansicht'),
    submenu: [{
      label: t('Neu laden'),
      accelerator: 'CmdOrCtrl+R',
      click: (item, focusedWindow) => reload(focusedWindow)
    }, {
      label: t('Entwicklertools anzeigen'),
      accelerator: (() => {
        if (isMac()) {
          return 'Alt+Command+I'
        } else {
          return 'Ctrl+Shift+I'
        }
      })(),
      click: (item, focusedWindow) => toggleDevTools(focusedWindow)
    }, {
      label: t('Statistiken anzeigen'),
      click: () => openStatsWindow()
    }]
  }
}

function window() {
  return {
    label: t('Fenster'),
    role: 'window',
    submenu: [
      {
        label: t('Minimieren'),
        accelerator: 'CmdOrCtrl+M',
        role: 'minimize'
      },
      {
        label: t('Schließen'),
        accelerator: 'CmdOrCtrl+W',
        role: 'close'
      },
    ]
  }
}

function help() {
  return {
    label: t('Hilfe'),
    role: 'help',
    submenu: [{
      label: t('Mehr erfahren'),
      click: () => shell.openExternal('https://github.com/haimich/billy')
    }]
  }
}

{'fraction_non_alphanumeric': 0.1676829268292683, 'fraction_numerical': 0.0008130081300813008, 'mean_word_length': 1.9591100420926038, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '306841', 'n_tokens_mistral': 1672, 'n_tokens_neox': 1664, 'n_words': 333}