Opened on 02/25/2016 at 12:09:08 AM
Closed on 08/31/2017 at 02:59:12 PM
Last modified on 09/20/2017 at 08:58:41 AM
#3697 closed change (fixed)
Fall back to i18n.getUILanguage if @ui_locale isn't supported
Reported by: | sebastian | Assignee: | oleksandr |
---|---|---|---|
Priority: | P2 | Milestone: | Adblock-Plus-1.13.4-for-Chrome-Opera |
Module: | Platform | Keywords: | |
Cc: | scottlow, kzar, Ross | Blocked By: | #4084 |
Blocking: | Platform: | Edge | |
Ready: | yes | Confidential: | no |
Tester: | Ross | Verified working: | yes |
Review URL(s): |
Description (last modified by kzar)
Background
Much of the user interface in Adblock Plus relies on knowing which language the user is using, and the reading direction for it. Currently we use the getMessage API in combination with some special message IDs:
- chrome.i18n.getMessage("@ui_locale") returns the language of the browser's user interface.
- chrome.i18n.getMessage("@bidi_dir") returns the respective reading direction of that language.
The problem is that Microsoft Edge does not yet support those message IDs yet.
What to change
- Use i18n.getUILanguage instead of i18n.getMessage("@ui_locale").
- If i18n.getMessage("@bidi_dir") returns "" (empty string) fall back to the same logic we had on Safari to determine the reading direction of the UI locale, matching the locale against a list of known right-to-left languages.
- Update the adblockplusui dependency to revision 104a61b1949d.
Note: The adblockplusui dependency update includes many other changes. They mostly relate to the new options page and the copyright headers, but there is one small change to how the links on the first run page are setup.
Hints for testers
- Ensure that the correct filter list is selected by default.
- Ensure that the correct UI language is selected by default.
- Check that right-to-left detection works correctly for languages that require that (for example Arabic).
- Ensure that the links on the first run page still all work.
Attachments (0)
Change History (17)
comment:1 Changed on 02/25/2016 at 12:09:18 AM by sebastian
- Summary changed from Fall back to i18n.getUILanguage if @ui_locale isn't supported. to Fall back to i18n.getUILanguage if @ui_locale isn't supported
comment:2 Changed on 03/14/2016 at 07:58:34 AM by oleksandr
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:3 Changed on 05/07/2016 at 01:32:41 AM by sebastian
- Cc scottlow added
comment:4 Changed on 05/23/2016 at 10:36:25 AM by sebastian
- Keywords edge removed
- Platform changed from Unknown / Cross platform to Edge
comment:5 Changed on 06/10/2016 at 11:27:49 PM by sebastian
- Sensitive unset
comment:6 Changed on 08/29/2017 at 12:54:52 PM by sebastian
- Blocked By 4084 added
comment:10 Changed on 08/30/2017 at 11:42:23 AM by kzar
- Description modified (diff)
comment:11 Changed on 08/30/2017 at 11:43:26 AM by kzar
- Cc kzar added
- Owner set to oleksandr
comment:12 Changed on 08/31/2017 at 02:45:17 PM by abpbot
comment:13 Changed on 08/31/2017 at 02:59:12 PM by oleksandr
- Resolution set to fixed
- Status changed from reviewing to closed
comment:14 Changed on 09/05/2017 at 10:18:35 PM by sebastian
- Milestone set to Adblock-Plus-for-Chrome-Opera-next
comment:15 follow-up: ↓ 16 Changed on 09/11/2017 at 06:44:33 AM by Ross
- Tester changed from Unknown to Ross
- Verified working set
Done. The correct filter lists are added. First run page links work. Language and right-to-left work as expected.
ABP 1.13.13.1838
Chrome 49 / 60 / Windows 7
Opera 36 / 46 / Windows 7
ABP 0.9.11.1842
Edge 40 / Windows 10
comment:16 in reply to: ↑ 15 ; follow-up: ↓ 17 Changed on 09/11/2017 at 07:09:55 PM by sebastian
- Cc Ross added
Replying to Ross:
Edge 40 / Windows 7
This seems to be wrong, Microsoft Edge doesn't exist before Windows 10.
A commit referencing this issue has landed:
Issue 3697 - Fall back to i18n.getUILanguage if @ui_locale isn't supported