mirror of
https://github.com/beekeeper-studio/beekeeper-studio.git
synced 2026-03-13 10:12:54 +08:00
fix: 🐛 move fix to moneymagic. Full app set seems too much
This commit is contained in:
@@ -33,8 +33,6 @@ export function mainPlatformInfo(): IPlatformInfo {
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const e = require('electron')
|
||||
// defaulting applocale to US (sorry friends, but that's where I am). Maybe add it to the ini file at some point?
|
||||
const appLocale = e.app.getLocale() || 'en-US'
|
||||
const platform = p.env.OS_OVERRIDE ? p.env.OS_OVERRIDE : p.platform
|
||||
const testMode = p.env.TEST_MODE ? true : false
|
||||
const isDevEnv = testMode ? false : !e.app.isPackaged;
|
||||
@@ -42,7 +40,7 @@ export function mainPlatformInfo(): IPlatformInfo {
|
||||
const isMac = platform === 'darwin'
|
||||
const isArm = p.arch.startsWith('arm')
|
||||
const easyPlatform = isWindows ? 'windows' : (isMac ? 'mac' : 'linux')
|
||||
const locale = testMode ? 'test' : appLocale;
|
||||
const locale = testMode ? 'test' : e.app.getLocale();
|
||||
|
||||
const windowPrefersDarkMode = false
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@ const MoneyMagic: Magic = {
|
||||
initializers: ['money', 'currency', 'dinero'],
|
||||
autocompleteHints: CurrencyCodes.map((cc) => cc.cc.toLowerCase()),
|
||||
render: function (args: string[]): MagicColumn {
|
||||
const locale = window.platformInfo.locale
|
||||
// defaulting applocale to US (sorry friends, but that's where I am). Maybe add it to the ini file at some point?
|
||||
// https://www.electronjs.org/docs/latest/api/app#appgetlocale mentiones the getLocale must be called after the ready event so maybe something here?
|
||||
const locale = window.platformInfo.locale || 'en-US'
|
||||
const currency = args[3]?.toUpperCase() || 'USD'
|
||||
const result = {
|
||||
title: args[0],
|
||||
|
||||
Reference in New Issue
Block a user