-
Notifications
You must be signed in to change notification settings - Fork 1.7k
REGRESSION: Web Extensions do not pick zh locale when zh-Hant is preferred. #39097
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
Merged
Conversation
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
EWS run on previous version of this PR (hash bf6e8f4) |
b-weinstein
reviewed
Jan 15, 2025
b-weinstein
approved these changes
Jan 15, 2025
EWS run on previous version of this PR (hash c4e7d16) |
EWS run on current version of this PR (hash f6c435f) |
f6c435f
to
cccf064
Compare
…erred. https://webkit.org/b/286024 rdar://142602243 Reviewed by Brian Weinstein. On Apple platforms, the best match search uses Foundation, which skips "zh" when the preferred locale is "zh-Hant", likely assuming "zh" refers to simplified Chinese. However, web extensions expect the base language to be selected if it is supported, regardless of specific variants. Fix this by adding a special-case for base language fallback before using the default locale. * Source/WebKit/UIProcess/Extensions/WebExtension.cpp: (WebKit::WebExtension::bestMatchLocale): Added base language fallback. * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPILocalization.mm: (TestWebKitAPI::TEST(WKWebExtensionAPILocalization, i18nChineseTraditionalFallback)): Added. (TestWebKitAPI::TEST(WKWebExtensionAPILocalization, i18nChineseSimplifiedFallback)): Added. Canonical link: https://commits.webkit.org/288974@main
cccf064
to
f1892e2
Compare
Committed 288974@main (f1892e2): https://commits.webkit.org/288974@main Reviewed commits have been landed. Closing PR #39097 and removing active labels. |
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.
f1892e2
f6c435f
🛠 wpe🛠 win🧪 wpe-wk2🧪 win-tests🧪 ios-wk2🧪 api-wpe🧪 ios-wk2-wpt🛠 wpe-cairo🧪 api-ios🛠 gtk🧪 mac-AS-debug-wk2🧪 gtk-wk2🧪 api-gtk🧪 mac-intel-wk2🛠 playstation🛠 mac-safer-cpp