Skip to content

Configure thousands separator#736

Merged
teelur merged 9 commits intomainfrom
configure-thousands-separator
Feb 18, 2026
Merged

Configure thousands separator#736
teelur merged 9 commits intomainfrom
configure-thousands-separator

Conversation

@teelur
Copy link
Owner

@teelur teelur commented Feb 18, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 18, 2026 00:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the date/locale provider to support configurable thousands and decimal separators based on the user's locale. The main changes involve renaming DateProvider to LocaleProvider and adding locale-aware number formatting capabilities.

Changes:

  • Renamed DateProvider to LocaleProvider and useDate to useLocale throughout the codebase
  • Added SignDisplay enum and updated convertNumberToCurrency to accept locale parameter for proper localization
  • Extracted decimal and thousands separators from user's locale using Intl.NumberFormat.formatToParts
  • Updated all NumberInput components to use locale-specific separators and all currency formatting calls to include locale parameter
  • Updated translation files to remove hardcoded % symbol from interest rate messages since it's now part of the formatted percentage

Reviewed changes

Copilot reviewed 66 out of 66 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
client/src/providers/LocaleProvider/LocaleProvider.tsx Renames DateProvider to LocaleProvider, adds decimalSeparator and thousandsSeparator extraction using Intl.NumberFormat
client/src/helpers/currency.ts Adds SignDisplay enum and updates convertNumberToCurrency signature to include signDisplay and locale parameters
client/src/helpers/automaticRules.ts Updates getFormattedValue to accept and pass intlLocale parameter for currency formatting
client/src/components/core/Card/TransactionCard/TransactionCardBase/TransactionCardContent/TransactionCardContent.tsx Updates to use useLocale and passes intlLocale to convertNumberToCurrency
client/src/components/core/Card/TransactionCard/TransactionCardBase/EditableTransactionCardContent/SplitTransaction/SplitTransaction.tsx Adds locale-specific thousand and decimal separators to NumberInput
client/src/components/core/Card/TransactionCard/TransactionCardBase/EditableTransactionCardContent/EditableTransactionCardContent.tsx Adds locale-specific separators to NumberInput and uses dayjsLocale for DateInput
Multiple chart components Updates all chart components to use useLocale and pass intlLocale to convertNumberToCurrency for tooltips
Multiple budget, goal, account, asset, and transaction components Consistently updates all NumberInput components with separators and all convertNumberToCurrency calls with SignDisplay and locale
client/public/locales/en-us/translation.json Removes hardcoded % from interest_rate_message translation
client/public/locales/de/translation.json Removes hardcoded % from interest_rate_message translation
client/src/App.tsx Updates import and component usage from DateProvider to LocaleProvider
Comments suppressed due to low confidence (1)

client/src/providers/LocaleProvider/LocaleProvider.tsx:88

  • The Intl.NumberFormat constructor is being passed dayjsLocale (e.g., "en", "de", "fr", "zh-cn"), but it should receive the full locale identifier like "en-US", "de-DE", etc. The dayjsLocale is a simplified locale code used by dayjs, not a valid BCP 47 language tag expected by Intl.NumberFormat.

This could cause the NumberFormat to fall back to default behavior or not respect the user's language setting properly. Instead, use i18n.language which contains the correct locale identifier (e.g., "en-us", "de", "fr").


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@teelur teelur merged commit 1cae75d into main Feb 18, 2026
9 checks passed
@teelur teelur deleted the configure-thousands-separator branch February 18, 2026 00:45
@teelur teelur linked an issue Feb 18, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to set default thousands/decimal separator

2 participants