From 18ddfbbc92eec76ab4056098cb1a0ffadef47621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20D=2E=20Gonz=C3=A1lez?= Date: Mon, 5 Oct 2026 12:06:12 +0200 Subject: [PATCH] Bugfix/Add useGrouping option for locale string formatting --- CHANGELOG.md | 1 + .../components/admin-overview/admin-overview.component.ts | 3 ++- .../src/lib/fire-calculator/fire-calculator.component.ts | 6 ++++-- libs/ui/src/lib/treemap-chart/treemap-chart.component.ts | 8 ++++---- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6af0cf179b..684b1703c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Upgraded `Nx` from version `23.1.1` to `23.2.1` +- Fixed the missing thousands separator of 4-digit numbers in certain locales ## 3.79.0 - 2026-10-04 diff --git a/apps/client/src/app/components/admin-overview/admin-overview.component.ts b/apps/client/src/app/components/admin-overview/admin-overview.component.ts index 72b9194890..fd1b72fcaf 100644 --- a/apps/client/src/app/components/admin-overview/admin-overview.component.ts +++ b/apps/client/src/app/components/admin-overview/admin-overview.component.ts @@ -170,7 +170,8 @@ export class GfAdminOverviewComponent implements OnInit { this.activitiesCount / this.userCount ).toLocaleString(this.user?.settings?.locale, { maximumFractionDigits: 2, - minimumFractionDigits: 2 + minimumFractionDigits: 2, + useGrouping: true }); return `(${formattedActivitiesCountPerUser} ${$localize`per User`})`; diff --git a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts index 64bcec2934..057ce796bb 100644 --- a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts +++ b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts @@ -358,7 +358,8 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy { return `Total: ${new Intl.NumberFormat(this.locale, { currency: this.currency ?? DEFAULT_CURRENCY, currencyDisplay: 'code', - style: 'currency' + style: 'currency', + useGrouping: true }).format(totalAmount)}`; }, label: (context) => { @@ -372,7 +373,8 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy { label += new Intl.NumberFormat(this.locale, { currency: this.currency ?? DEFAULT_CURRENCY, currencyDisplay: 'code', - style: 'currency' + style: 'currency', + useGrouping: true }).format(context.parsed.y); } diff --git a/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts b/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts index 0046ffff54..5eb7e1bf62 100644 --- a/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts +++ b/libs/ui/src/lib/treemap-chart/treemap-chart.component.ts @@ -324,8 +324,8 @@ export class GfTreemapChartComponent ).toLocaleString(this.locale(), { maximumFractionDigits: 2, minimumFractionDigits: 2, - useGrouping: true, - signDisplay: 'exceptZero' + signDisplay: 'exceptZero', + useGrouping: true })}%` ]; }, @@ -412,8 +412,8 @@ export class GfTreemapChartComponent ).toLocaleString(this.locale(), { maximumFractionDigits: 2, minimumFractionDigits: 2, - useGrouping: true, - signDisplay: 'exceptZero' + signDisplay: 'exceptZero', + useGrouping: true })}%`; if (raw._data.valueInBaseCurrency !== null) {