mozilla-b2g/gaia — pull request #22451 by asutherland (2014-08-02 22:51:48+00:00)
Title: Bug 1008859 - [tarako][l10n] Unable to change language back for New Account page in Email. r=asuth, a=blocking-b2g=v1.3t+ a=bajaj a=wchang a=lmandel

This is a v1.3t and v1.4 specific workaround for bug 993188 in l10n.js.
Specifically, mozL10n.ready() does not correctly add a 'localized'
listener in all cases. In fact, because of the email app control flow,
it will never do the right thing. This patch pierces that function to
directly add the event listener, which is always what we want. (The
other branch that immediately invokes the callback doesn't matter to us
because at the time this method is invoked we are already using the
localization API synchronously and do the callback triggering would
simply result in the work being done twice. (l10n is a dependency so
the locale will already have been loaded.))