Bug 831228: don't fire any `localized' event before the document is fully loaded

https://bugzilla.mozilla.org/show_bug.cgi?id=831228