From ab62b8b5bb7213683956905c12dbe10637151118 Mon Sep 17 00:00:00 2001 From: Priyank Patel Date: Wed, 14 Aug 2019 12:50:47 -0400 Subject: [PATCH] Remove accidently commited translation-util.js file. This file was accidently committed in 77a1fc0bd3453be964d31fc06b4bd3a9c3cb3446 when migrating old PR to use typescript. This commit removes it. --- app/renderer/js/utils/translation-util.js | 29 ----------------------- 1 file changed, 29 deletions(-) delete mode 100644 app/renderer/js/utils/translation-util.js diff --git a/app/renderer/js/utils/translation-util.js b/app/renderer/js/utils/translation-util.js deleted file mode 100644 index c6b43887..00000000 --- a/app/renderer/js/utils/translation-util.js +++ /dev/null @@ -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();