Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/8.0][Apple] Use NSLocale.preferredLanguages on for default locale name #102748

Conversation

matouskozak
Copy link
Member

@matouskozak matouskozak commented May 28, 2024

Description

In this PR, we change the DetectDefaultAppleLocaleName to use the ObjC preferredLanguages API to retrieve the device's primary language. This will make sure that users can retrieve the correct locale and use localized strings as expected.

Note, this doesn't change the specific whitelisting done for mobile .NET 8 ICU https://github.com/dotnet/icu/blob/dotnet/main/icu-filters/icudt_mobile.json#L8-L194. Users will be able retrieve the underlining ICU data (e.g. DateTimeFormat) only for the locales specifically included the ICU pack.

Customer Impact

Customer reported incorrect locale returned when setting iPhone region to "China mainland" and language to "Chinese Traditional". Returned zh-CN instead of zh-Hant-CN.

Regression

  • Yes
  • No

Testing

Tested locally on iOS simulator by copying new libSystem.Globalization.Native.dylib and libmonosgen-2.0.dylib into a local version of dotnet and building customer provided MAUI repro app. Verified that the MAUI repro works as expected with the fix included in this PR.

Risk

Affects Globalization code on Apple mobile scenario.

Copy link
Contributor

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

@matouskozak
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@carlossanlop
Copy link
Member

carlossanlop commented Jun 10, 2024

Today is code complete for the July Release. Has this been approved by Tactics? Can you please get a code review sign-off from the area owners?

@carlossanlop
Copy link
Member

There's also many CI failures. Can you please check if they're related to this PR?

@matouskozak
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@matouskozak
Copy link
Member Author

There's also many CI failures. Can you please check if they're related to this PR?

The failures on runtime-extra-platforms CI are un-related and already present on the other release/8.0-staging runs (e.g. https://dev.azure.com/dnceng-public/public/_build/results?buildId=703219)

@matouskozak matouskozak added the Servicing-approved Approved for servicing release label Jun 18, 2024
@matouskozak matouskozak merged commit ad90ca5 into dotnet:release/8.0-staging Jun 21, 2024
249 of 272 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Globalization os-mac-os-x macOS aka OSX Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants