Skip to content

Conversation

@itingliu
Copy link
Contributor

@itingliu itingliu commented Aug 7, 2023

We regressed this behavior in 110211953; Now IntegerFormatStyle (and all other number format styles) and Date.FormatStyle ignores user's region settings if it uses the current locale.

The regression was caused by us changing to use locale.identifierCapturingPreferences for the identifier, which includes "Country" code from global preferences as the extra "rg" keyword. I misunderstood what that represents -- It has nothing to do with the Region setting in System Preferences. We should ignore it internally.

I'm very inclined to remove the reference to that key altogether, but let's keep it for compatibility reason for now.

We regressed this behavior in 110211953; Now `IntegerFormatStyle` (and all other number format styles) and `Date.FormatStyle` ignores user's region settings if it uses the current locale.

The regression was caused by us changing to use `locale.identifierCapturingPreferences` for the identifier, which includes "Country" code from global preferences as the extra "rg" keyword. I misunderstood what that represents -- It has nothing to do with the Region setting in System Preferences. We should ignore it internally.

I'm very inclined to remove the reference to that key altogether, but let's keep it for compatibility reason for now.
@itingliu
Copy link
Contributor Author

itingliu commented Aug 7, 2023

@swift-ci please test

@itingliu itingliu merged commit feed84d into swiftlang:main Aug 9, 2023
@itingliu itingliu deleted the unlocalized-decimal-separator branch August 9, 2023 20:14
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