microsoft / microsoft/calculator
Support both `.` and `,` as decimal separator when entering numbers
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 31.1k
- Forks
- 5.8k
- PR merge metrics
- No merged PRs in 30d
Description
Problem Statement
The Windows 7 calculator allowed users to enter both . and , as the decimal separator. This is very convenient because while certain locales uses , (e.g. German) as the decimal separator, it's still very common on websites, applications, etc. to use the . separator. Supporting both allows for flexibility when entering values.
Evidence or User Insights
The calculator in Windows 7 supported this.
Proposal
The calculator should accept both . and , as a decimal separator.
Goals
User can enter both . and , as a decimal separator
The only tricky point I see here is how pasting numbers should be handled:
- If the separator appears multiple times it's probably safe to assume that it's a thousands separator and not a decimal separator.
- If multiple separators appear, then the last one should probably be considered the decimal separator; if that one occurs multiple times as well, best to reject the paste since it's not clear what the number is supposed to be
- If exactly one separator is present, it's ambiguous what it should mean. The Win7 behavior here is to only allow the separator of the current locale when pasting, and treating the other one as a thousands separator that should be ignored.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points, so first locate the calculator's number-entry and paste handling. Read the existing locale-specific decimal-separator behavior and related tests, if present. Done means entering both separators works and paste behavior follows the stated locale and ambiguity rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, localization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100