feat(web): more localized number formatting ()

This commit is contained in:
Michel Heusschen 2024-07-29 16:38:27 +02:00 committed by GitHub
parent 2e059bfbfd
commit 0237f9baa3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 44 additions and 19 deletions
web/src/lib/components/memory-page

View file

@ -38,6 +38,7 @@
import { tweened } from 'svelte/motion';
import { fade } from 'svelte/transition';
import { t } from 'svelte-i18n';
import { locale } from '$lib/stores/preferences.store';
const parseIndex = (s: string | null, max: number | null) =>
Math.max(Math.min(Number.parseInt(s ?? '') || 0, max ?? 0), 0);
@ -201,7 +202,7 @@
<div>
<p class="text-small">
{assetIndex + 1}/{currentMemory.assets.length}
{(assetIndex + 1).toLocaleString($locale)}/{currentMemory.assets.length.toLocaleString($locale)}
</p>
</div>
</div>