refactor: remove dependency to deprected remote module (#593)

the remote module will be removed from electron 14 onwards,
so replace the locale detection with native browser api that
is available in the renderer.

Signed-off-by: Christoph Settgast <csett86@web.de>
This commit is contained in:
csett86 2021-06-27 20:57:25 +02:00 committed by GitHub
parent 055d0b1f95
commit 2baa4b5282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -16,7 +16,7 @@ const languages = {
sq: { translation: require('./lang/sq.json') }
};
const detectedLocale = window.jitsiNodeAPI.getLocale();
const detectedLocale = navigator.language;
i18n
.use(initReactI18next)

View File

@ -1,7 +1,7 @@
/* global process */
const createElectronStorage = require('redux-persist-electron-storage');
const { ipcRenderer, remote } = require('electron');
const { ipcRenderer } = require('electron');
const os = require('os');
const jitsiMeetElectronUtils = require('jitsi-meet-electron-utils');
const { openExternalLink } = require('../features/utils/openExternalLink');
@ -15,7 +15,6 @@ window.jitsiNodeAPI = {
openExternalLink,
platform: process.platform,
jitsiMeetElectronUtils,
getLocale: remote.app.getLocale,
ipc: {
on: (channel, listener) => {
if (!whitelistedIpcChannels.includes(channel)) {