Repository navigation
Use the locale decimal separator in naturalsize - #523
Open
draarivpatel-ui wants to merge 1 commit into
Open
draarivpatel-ui wants to merge 1 commit into
draarivpatel-ui wants to merge 1 commit into
Conversation
intcomma and intword format the fractional part with the active locale's decimal separator, but naturalsize kept the raw ASCII dot, so a French locale produced '1.5 Mo' next to '1,5' everywhere else. Replace the decimal point with decimal_separator() when it differs, and update the French naturalsize expectations which encoded the inconsistent output. Fixes python-humanize#460.
Automation signalsActivity patterns show signs of automation. Evidence
Last 5 PRs: This is an automated analysis by AgentScan |
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.
Fixes #460.
intcommaandintwordformat fractional parts with the active locale's decimal separator, butnaturalsizekept the raw ASCII dot, so a French locale produced1.5 Monext to1,5everywhere else in the same output:The fix swaps the decimal point for
decimal_separator()when it differs, mirroringintword. When no locale is activedecimal_separator()is".", so the default output is unchanged.The existing French
naturalsizeexpectations intest_i18n.pyencoded the inconsistent dot output (42.0 Ko); they are updated to the locale-consistent values, and a new regression test covers thefr_FRdecimal comma plus the unchanged default.