diff --git a/app/ux/WebView.js b/app/ux/WebView.js index 2c6b05ad..c67fc2ef 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -190,7 +190,7 @@ Ext.define('Rambox.ux.WebView',{ } ,getUserAgent: function() { var ua = ipc.sendSync('getConfig').user_agent ? ipc.sendSync('getConfig').user_agent : Ext.getStore('ServicesList').getById(this.record.get('type')).get('userAgent') - return ua.length === 0 ? window.clientInformation.userAgent.replace(/Rambox\/([0-9]\.?)+\s/,'').replace(/Electron\/([0-9]\.?)+\s/,'') : ua; + return ua.length === 0 ? window.clientInformation.userAgent.replace(/Rambox\/([0-9]\.?)+\s/ig,'').replace(/Electron\/([0-9]\.?)+\s/ig,'') : ua; } ,statusBarConstructor: function(floating) { diff --git a/electron/main.js b/electron/main.js index d1722b57..7f07c8fb 100644 --- a/electron/main.js +++ b/electron/main.js @@ -58,6 +58,8 @@ if (config.get('enable_hidpi_support') && (process.platform === 'win32')) { app.commandLine.appendSwitch('force-device-scale-factor', '1') } +app.commandLine.appendSwitch('lang', config.get('locale') === 'en' ? 'en-US' : config.get('locale')); + // Because we build it using Squirrel, it will assign UserModelId automatically, so we match it here to display notifications correctly. // https://github.com/electron-userland/electron-builder/issues/362 app.setAppUserModelId('com.grupovrs.ramboxce');