Skip to content

Fix wrong Region Info Names#108466

Merged
tarekgh merged 2 commits into
dotnet:mainfrom
tarekgh:FixRegionInfoNames
Oct 3, 2024
Merged

Fix wrong Region Info Names#108466
tarekgh merged 2 commits into
dotnet:mainfrom
tarekgh:FixRegionInfoNames

Conversation

@tarekgh

@tarekgh tarekgh commented Oct 2, 2024

Copy link
Copy Markdown
Member

We had some typo in some of the region info data. The change here is fixing that.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.

public void BuiltInRegionListTest()
{
// Ensure we can create all region info objects from the built-in list
Dictionary<string, string> regionNames = (Dictionary<string, string>)typeof(RegionInfo).Assembly.GetType("System.Globalization.CultureData").GetProperty("RegionNames", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there another source we could be enumerating? e.g. how does this related to the cultures enumerable from CultureInfo.GetCultures(All)... if we were to parse the regions out of those, would that be equivalent to (some of) this data?

@tarekgh tarekgh Oct 2, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Culture enumeration can be done too but, in our data, we add some extra data that is not getting from the enumeration. That is why I decided to se the data we build.

@tarekgh tarekgh merged commit dff678d into dotnet:main Oct 3, 2024
@tarekgh

tarekgh commented Oct 3, 2024

Copy link
Copy Markdown
Member Author

/backport to release/9.0

@github-actions

github-actions Bot commented Oct 3, 2024

Copy link
Copy Markdown
Contributor

Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/11166289238

lambdageek pushed a commit to lambdageek/runtime that referenced this pull request Oct 3, 2024
* Fix wrong RegionInfo Names

* Exclude the test on Windows 8 for the lack of full globalization data
@tarekgh

tarekgh commented Oct 4, 2024

Copy link
Copy Markdown
Member Author

/backport to release/8.0-staging

@github-actions

github-actions Bot commented Oct 4, 2024

Copy link
Copy Markdown
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/11183150514

sirntar pushed a commit to sirntar/runtime that referenced this pull request Oct 8, 2024
* Fix wrong RegionInfo Names

* Exclude the test on Windows 8 for the lack of full globalization data
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants