From d3e6d57f208e2308ad1c47ea14fc22c38ecdd65f Mon Sep 17 00:00:00 2001 From: Svallinn <41585298+Svallinn@users.noreply.github.com> Date: Sun, 20 Jun 2021 02:42:11 +0100 Subject: [PATCH] Main+Utils: Rename `getLocale` function to `getSystemLocale` --- src/main/index.js | 2 +- src/renderer/store/modules/utils.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index 502f889c..a0fc0bcc 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -335,7 +335,7 @@ function runApp() { if (typeof url === 'string') shell.openExternal(url) }) - ipcMain.handle('getLocale', () => { + ipcMain.handle('getSystemLocale', () => { return app.getLocale() }) diff --git a/src/renderer/store/modules/utils.js b/src/renderer/store/modules/utils.js index 06cec337..d47c7d28 100644 --- a/src/renderer/store/modules/utils.js +++ b/src/renderer/store/modules/utils.js @@ -153,14 +153,14 @@ const actions = { } }, - async getLocale (context) { + async getSystemLocale (context) { const webCbk = () => { if (navigator && navigator.language) { return navigator.language } } - return await invokeIRC(context, 'getLocale', webCbk) || 'en-US' + return (await invokeIRC(context, 'getSystemLocale', webCbk)) || 'en-US' }, async showOpenDialog (context, options) {