fix: 🐛 move fix to moneymagic. Full app set seems too much

This commit is contained in:
Will Montgomery
2025-12-14 11:27:28 -05:00
parent b2d6bc511f
commit e507e10ea0
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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],