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

Truncate legacy extension keys from default locale on iOS/Mac #1141

Closed
wants to merge 1 commit into from

Conversation

neildhar
Copy link
Contributor

@neildhar neildhar commented Oct 3, 2023

Differential Revision: D49870526

@facebook-github-bot facebook-github-bot added CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported labels Oct 3, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49870526

neildhar added a commit to neildhar/hermes that referenced this pull request Oct 3, 2023
…ok#1141)

Summary:

iOS can sometimes return a default locale identifier that contains
extensions in the legacy form. Ideally, we should convert these into
the new style and respect them, but that isn't trivial to do.

We could do also just use the iOS version of the locale without
converting it. But this is potentially confusing, since the locale
won't follow a format that we actually accept. So in something like:

```
Intl.Collator(Intl.Collator().resolvedOptions.locale)
```

the inner collator and outer collator will have inconsistent behaviour.

For now, truncate the extensions so we can at least parse the first
part of the identifier and honour it.

Closes facebook#1140

Differential Revision: D49870526
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49870526

…ok#1141)

Summary:

iOS can sometimes return a default locale identifier that contains
extensions in the legacy form. Ideally, we should convert these into
the new style and respect them, but that isn't trivial to do.

We could do also just use the iOS version of the locale without
converting it. But this is potentially confusing, since the locale
won't follow a format that we actually accept. So in something like:

```
Intl.Collator(Intl.Collator().resolvedOptions.locale)
```

the inner collator and outer collator will have inconsistent behaviour.

For now, truncate the extensions so we can at least parse the first
part of the identifier and honour it.

Closes facebook#1140

Reviewed By: avp

Differential Revision: D49870526
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49870526

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 329430e.

facebook-github-bot pushed a commit that referenced this pull request Nov 8, 2023
…#1141)

Summary:
Original Author: neildhar@meta.com
Original Git: 329430e
Original Reviewed By: avp
Original Revision: D49870526

Pull Request resolved: #1141

iOS can sometimes return a default locale identifier that contains
extensions in the legacy form. Ideally, we should convert these into
the new style and respect them, but that isn't trivial to do.

We could do also just use the iOS version of the locale without
converting it. But this is potentially confusing, since the locale
won't follow a format that we actually accept. So in something like:

```
Intl.Collator(Intl.Collator().resolvedOptions.locale)
```

the inner collator and outer collator will have inconsistent behaviour.

For now, truncate the extensions so we can at least parse the first
part of the identifier and honour it.

Closes #1140

Reviewed By: tmikov

Differential Revision: D50992846

fbshipit-source-id: 8acfc3a2926bf500fae35f4c2a0925c593350e3e
lunaleaps pushed a commit that referenced this pull request Nov 17, 2023
Summary:
Pull Request resolved: #1141

iOS can sometimes return a default locale identifier that contains
extensions in the legacy form. Ideally, we should convert these into
the new style and respect them, but that isn't trivial to do.

We could do also just use the iOS version of the locale without
converting it. But this is potentially confusing, since the locale
won't follow a format that we actually accept. So in something like:

```
Intl.Collator(Intl.Collator().resolvedOptions.locale)
```

the inner collator and outer collator will have inconsistent behaviour.

For now, truncate the extensions so we can at least parse the first
part of the identifier and honour it.

Closes #1140

Reviewed By: avp

Differential Revision: D49870526

fbshipit-source-id: 893c3e1d95009ab6b32b2e2c41ef84855cedf28a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants