Closed
Bug 1125177
Opened 9 years ago
Closed 9 years ago
Amend ctx.availableLocales when additionallanguageschange event is fired
Categories
(Firefox OS Graveyard :: Gaia::L10n, defect)
Firefox OS Graveyard
Gaia::L10n
Tracking
(b2g-v2.2 fixed, b2g-master fixed)
RESOLVED
FIXED
2.2 S5 (6feb)
People
(Reporter: stas, Assigned: stas)
Details
Attachments
(1 file)
1.48 KB,
patch
|
zbraniecki
:
review+
bajaj
:
approval-gaia-v2.2+
|
Details | Diff | Splinter Review |
There's one thing that we missed in bug 1115796: when a langpack is installed and the user chooses the newly installed languages as their system language, we need to amend ctx.availableLocales in already running apps so that the language negotiation correctly returns the new language.
Assignee | ||
Comment 1•9 years ago
|
||
Here's one way to fix this: https://github.com/mozilla-b2g/gaia/pull/27634
Assignee | ||
Comment 2•9 years ago
|
||
Fabrice, a quick question about the additionallanguageschange event: I might be reading the code wrong, but I looked at https://hg.mozilla.org/integration/b2g-inbound/diff/df960e299bcd/dom/apps/Langpacks.jsm#l1.2449 and then tried to access the 'languages' property of the event which turned out to be undefined. The only property of the event that I can see in a handler is 'isTrusted.' Is there a way to get the updated list of additional languages from the additionallanguageschange event? In the patch I currently need to make another mozApps.getAdditionalLanguages() call to get the new list.
Flags: needinfo?(fabrice)
Comment 3•9 years ago
|
||
Stas, you should get it from the event.detail property.
Flags: needinfo?(fabrice)
Comment 4•9 years ago
|
||
Comment on attachment 8553775 [details] [diff] [review] Listen to additionallanguageschange Review of attachment 8553775 [details] [diff] [review]: ----------------------------------------------------------------- I like the patch. I'd like it more with event.detail ;)
Attachment #8553775 -
Flags: review?(gandalf) → review+
Assignee | ||
Comment 5•9 years ago
|
||
Master: https://github.com/mozilla-b2g/gaia/commit/86f65f8c1a1f26fdf4252750f28afe068b4ece49
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 6•9 years ago
|
||
L20n.js: https://github.com/l20n/l20n.js/commit/9d43c2fb08bbaa9000cb59d2ee567ba89807d8d0
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8553775 [details] [diff] [review] Listen to additionallanguageschange [Approval Request Comment] [Bug caused by] (feature/regressing bug #): bug 1115796 [User impact] if declined: when a new langpack is installed and selected as the system language, currently open apps will not retranslate immediately. Subsequent launches will be in the correct language. [Testing completed]: on the device [Risk to taking this patch] (and alternatives if risky): low risk, the code adds an event listener. [String changes made]: n/a
Attachment #8553775 -
Flags: approval-gaia-v2.2?(bbajaj)
Updated•9 years ago
|
Attachment #8553775 -
Flags: approval-gaia-v2.2?(bbajaj) → approval-gaia-v2.2+
Comment 8•9 years ago
|
||
v2.2: https://github.com/mozilla-b2g/gaia/commit/ea02a0c9ac92841709a3fdcf39be754f44bbe361
You need to log in
before you can comment on or make changes to this bug.
Description
•