Track your finances easily: categorize transaction data quickly via "smart" inverted index, then define your own charts and reports.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
749 B

// All of the Node.js APIs are available in the preload process.
// It has the same sandbox as a Chrome extension.
const { ipcRenderer } = require('electron')
window.moment = require('moment')
const { translations } = require('./strings')
const settings = require('./settings')
window.myLocale = (new Intl.NumberFormat()).resolvedOptions().locale;
const simpleLocale = window.myLocale.split('-')[0];
if(translations[window.myLocale]) {
window.strings = translations[window.myLocale];
} else if(translations[simpleLocale]) {
window.strings = translations[simpleLocale];
} else {
window.strings = translations['en']
}
window.electronIpc = ipcRenderer;
Object.entries(settings).forEach(entry => {
window[entry[0]] = entry[1];
});