Remove accidently commited translation-util.js file.

This file was accidently committed in 77a1fc0bd3
when migrating old PR to use typescript. This commit removes it.
This commit is contained in:
Priyank Patel
2019-08-14 12:50:47 -04:00
parent ce071dcac9
commit ab62b8b5bb

View File

@@ -1,29 +0,0 @@
'use strict';
const path = require("path");
const electron = require("electron");
const i18n = require("i18n");
let instance = null;
let app = null;
/* To make the util runnable in both main and renderer process */
if (process.type === 'renderer') {
app = electron.remote.app;
}
else {
app = electron.app;
}
class TranslationUtil {
constructor() {
if (instance) {
return this;
}
instance = this;
i18n.configure({
directory: path.join(__dirname, '../../../translations/'),
register: this
});
}
__(phrase) {
return i18n.__({ phrase, locale: app.getLocale() });
}
}
module.exports = new TranslationUtil();