forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement i18n.getSystemUILanguage and i18n.getPreferredSystemLanguages.
https://bugs.webkit.org/show_bug.cgi?id=280586 Reviewed by NOBODY (OOPS!). WECG issue: w3c/webextensions#252 WECG proposal: w3c/webextensions#569 Also changed the i18n APIs to return `"und"` instead of `undefined` when there is no language code. * Source/WebKit/Platform/spi/Cocoa/FoundationSPI.h: * Source/WebKit/Shared/Extensions/WebExtensionUtilities.mm: (WebKit::toWebAPI): Return "und" where then is no language code. * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPILocalizationCocoa.mm: (WebKit::WebExtensionAPILocalization::getPreferredSystemLanguages): (WebKit::WebExtensionAPILocalization::getSystemUILanguage): * Source/WebKit/WebProcess/Extensions/API/WebExtensionAPILocalization.h: * Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPILocalization.idl: * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPILocalization.mm: (TestWebKitAPI::localeStringInWebExtensionFormat): Return "und". (TestWebKitAPI::TEST(WKWebExtensionAPILocalization, i18n)): (TestWebKitAPI::TEST(WKWebExtensionAPILocalization, i18nWithFallback)): (TestWebKitAPI::TEST(WKWebExtensionAPILocalization, i18nWithoutMessages)): (TestWebKitAPI::TEST(WKWebExtensionAPILocalization, i18nWithoutDefaultLocale)):
- Loading branch information
1 parent
4e612c4
commit f494ddc
Showing
6 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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