Skip to content

Feature/accept other decimal separators#1249

Open
A-Axisa wants to merge 6 commits into
wger-project:masterfrom
A-Axisa:feature/accept-other-decimal-separators
Open

Feature/accept other decimal separators#1249
A-Axisa wants to merge 6 commits into
wger-project:masterfrom
A-Axisa:feature/accept-other-decimal-separators

Conversation

@A-Axisa
Copy link
Copy Markdown

@A-Axisa A-Axisa commented May 16, 2026

Proposed Changes

  • Accepts values where commas are used as a decimal separator when entering a new weight or modifying weight in the associated table.

Related Issue(s)

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)

@A-Axisa A-Axisa marked this pull request as ready for review May 16, 2026 14:47
@rolandgeider
Copy link
Copy Markdown
Member

Thanks for the PR! A few things:

A hard-coded replace(/,/, '.') is too fragile, we need a real locale-aware function. We already have some formatters in src/core/lib/numbers.ts , we probably would need to add a parser that accepts a value and a language code and write a little glue code.

Also, while I haven't tested it, but changing the column type in the weight table to string probably breaks the order because it now sorts lexicographically ("100" < "30" < "9")

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.

2 participants