Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comma support to /pay command #5363

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

werogg
Copy link
Contributor

@werogg werogg commented May 26, 2023

Information

This PR closes #2355.

Details

Proposed feature:

It doesn't take care of currency-symbol-format-locale but at least it supports both comma and dot as decimal separators.
Just noticed that could be confusing if it is used to perform for example: /pay 1.000 (1k), maybe could think in a different approach making use of the currency locale settings or using it as thousand separator is not expected.

Environments tested:

OS: Windows

Java version: 1.8.0_361

  • Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:

@pop4959 pop4959 added type: enhancement Features and feature requests. module: main Issues or PRs for the main Essentials module labels May 27, 2023
Copy link
Member

@pop4959 pop4959 left a comment

Choose a reason for hiding this comment

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

This is not an appropriate solution to the issue linked. Any solution here must be able to properly support properly formatted numbers in the locale the user chooses.

For example, 1,000.5 (US) or 1.000,5 (DE) should both evaluate to one thousand and a half.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: main Issues or PRs for the main Essentials module type: enhancement Features and feature requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/pay uses wrong currency format (decimals)
2 participants