Repository navigation
Fix currency formatting locale and clean up money transfer command - #20
Merged
Merged
Conversation
- update default locale in formatString method from Locale.getDefault to Locale.GERMAN - ensures consistent currency formatting across the application
There was a problem hiding this comment.
Pull request overview
This PR improves the end-user experience and consistency of money display/transfer flows by adjusting default currency formatting behavior, bumping the project version, and reducing chat noise in the Paper /pay command.
Changes:
- Switches
CurrencyScale.formatStringdefault formatting locale toLocale.GERMAN. - Bumps project version from
4.0.4to4.0.5. - Removes the pre-transfer “Überweisung wird ausgeführt...” informational message from the Paper pay command.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
surf-transaction-paper/src/main/kotlin/dev/slne/surf/transaction/paper/commands/pay/PayCommand.kt |
Removes a pre-transfer sender info message (and triggers an unused-import cleanup need). |
surf-transaction-api/src/main/kotlin/dev/slne/surf/transaction/api/currency/CurrencyScale.kt |
Changes default locale used for numeric formatting in the public API helper. |
gradle.properties |
Increments the project version to 4.0.5. |
| info("Überweisung wird ausgeführt...") | ||
| } | ||
|
|
||
| val currency = Currency.default() |
Comment on lines
59
to
62
| fun formatString( | ||
| amount: BigDecimal, | ||
| locale: Locale = Locale.getDefault(Locale.Category.FORMAT) | ||
| locale: Locale = Locale.GERMAN | ||
| ): String = NumberFormat.getNumberInstance(locale).format(format(amount)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes several small changes focused on improving currency formatting, updating the project version, and cleaning up user messaging in the payment command.
Currency formatting:
CurrencyScale.formatStringwas changed from the system default toLocale.GERMAN, ensuring consistent formatting regardless of server settings.Project configuration:
gradle.propertieswas bumped from4.0.4to4.0.5.User messaging:
PayCommand.kt, reducing unnecessary output.