diff options
| author | Adam Soltys <[email protected]> | 2026-02-26 13:56:08 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-26 13:56:08 -0800 |
| commit | e854eb48370dc3e3d7ac452ed31d648fb0cd3d9c (patch) | |
| tree | 084838c2b377352284d1c4e9de166566b3c456db /src/components | |
| parent | a5faa64ba470f935ea3e7932feece3cd9fbadb90 (diff) | |
| download | coinos-ui-e854eb48370dc3e3d7ac452ed31d648fb0cd3d9c.tar.gz coinos-ui-e854eb48370dc3e3d7ac452ed31d648fb0cd3d9c.zip | |
fix locale
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Numpad.svelte | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/Numpad.svelte b/src/components/Numpad.svelte index 4f04fbaa..5ba6e244 100644 --- a/src/components/Numpad.svelte +++ b/src/components/Numpad.svelte @@ -1,7 +1,7 @@ <script lang="ts"> import { onMount } from "svelte"; import Left from "$comp/Left.svelte"; - import { f, s, focus, warning, sat, sats } from "$lib/utils"; + import { f, s, focus, warning, sat, sats, localeMap } from "$lib/utils"; import { t } from "$lib/translations"; import { fiat as fiatStore } from "$lib/store"; @@ -26,8 +26,8 @@ let symbol = $state(""); let position = $state("before"); - function getCurrencyInfo(locale: any = "en-US", currency: string) { - const l = typeof locale === "function" ? locale() : locale || "en-US"; + function getCurrencyInfo(locale: any = "", currency: string) { + const l = typeof locale === "function" ? locale() : locale || localeMap[currency] || "en-US"; const region = l.length >= 2 ? l.slice(-2) : ""; const currencyDisplay = region && currency.startsWith(region) ? "narrowSymbol" : "symbol"; const formatter = new Intl.NumberFormat(l, { |
