Skip to content

Fix formatNumber() Inconsistency#7457

Closed
erenkarakal wants to merge 1 commit into
SkriptLang:dev/patchfrom
erenkarakal:patch/fix-formatted-number-inconsistency
Closed

Fix formatNumber() Inconsistency#7457
erenkarakal wants to merge 1 commit into
SkriptLang:dev/patchfrom
erenkarakal:patch/fix-formatted-number-inconsistency

Conversation

@erenkarakal
Copy link
Copy Markdown
Member

Description

Some European countries such as France and Germany use . as their thousands separator while the US uses ,. This causes inconsistencies in the function output and causes tests to fail depending on the server's locale.

This PR fixes this issue by forcing it to use US symbols.


Target Minecraft Versions: any
Requirements: none
Related Issues: none

@Moderocky Moderocky added the breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) label Jan 16, 2025
@sovdeeth
Copy link
Copy Markdown
Member

Can we not just adjust the tests and/or force US only during the testing environment?

@erenkarakal
Copy link
Copy Markdown
Member Author

Can we not just adjust the tests and/or force US only during the testing environment?

I don't know how you would adjust the test but we can try the -Duser.language=en -Duser.country=US startup flag during testing

@TheLimeGlass
Copy link
Copy Markdown
Contributor

Why not Locale.ENGLISH?

@erenkarakal
Copy link
Copy Markdown
Member Author

closing in favor of #7557

@erenkarakal erenkarakal closed this Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants