-
Kosta Harlan authored
We (Growth team) would like to use the language overlay for selecting a language in our welcome survey to new users. (See T232410.) The existing language overlay is built to load language links for the current page, but it is easily adapted for use with obtaining language info. To do this, this patch: * Adds a languageInfoOverlay * Adds a LanguageInfo class for obtaining information via the API, with some light-weight manipulation of the data so it's presentable in the overlay. A nice improvement would be to make use of the UniversalLanguageExtension data to provide additional ways to search (e.g. "Spanish" in addition to español); a comment explaining a possible approach to this is in the patch * Fires an event when a language is picked via LanguageSearcher Because of the additional code, the mobile.startup.js size is now 5.34KB. It's possible to lower this below the previous threshold of 5.2KB by making LanguageOverlay do more, but the code becomes less clear by doing so. Bug: T232410 Change-Id: Ic0f1613e8fd27788f67ed6235386491f0fe077c3
Kosta Harlan authoredWe (Growth team) would like to use the language overlay for selecting a language in our welcome survey to new users. (See T232410.) The existing language overlay is built to load language links for the current page, but it is easily adapted for use with obtaining language info. To do this, this patch: * Adds a languageInfoOverlay * Adds a LanguageInfo class for obtaining information via the API, with some light-weight manipulation of the data so it's presentable in the overlay. A nice improvement would be to make use of the UniversalLanguageExtension data to provide additional ways to search (e.g. "Spanish" in addition to español); a comment explaining a possible approach to this is in the patch * Fires an event when a language is picked via LanguageSearcher Because of the additional code, the mobile.startup.js size is now 5.34KB. It's possible to lower this below the previous threshold of 5.2KB by making LanguageOverlay do more, but the code becomes less clear by doing so. Bug: T232410 Change-Id: Ic0f1613e8fd27788f67ed6235386491f0fe077c3
Loading