So the main problem here is that as things stand synchronously loading
ftl files from langpacks fail. Synchronous loads use
[`Cu.readUTF8URI`](https://searchfox.org/mozilla-
central/rev/05a22d864814cb1e4352faa4004e1f975c7d2eb9/intl/l10n/L10nRegistry.jsm#754)
which underneath uses the `URLPreloader` which [only supports file or
omnijar urls](https://searchfox.org/mozilla-
central/rev/05a22d864814cb1e4352faa4004e1f975c7d2eb9/js/xpconnect/loader/URLPreloader.cpp#565).
So attempting to load strings for browser.xhtml which uses synchronous
localization fails for the langpack and so falls back to the built-in
localization (yay for fallback!).

Unfortunately we cache these load failures which effectively poison the
langpack for future localization passes. In particular we cache the fact
that `branding/brand.ftl` isn't available in the langpack and then any
attempt to generate bundles that include `branding/brand.ftl` as a
resource (which the majority of pages do) fail because that file is
cached as missing. That seems like a different bug, I had the impression
that fluent would fall back on a per-resource level, not ignore the
entire locale if just one resource is missing, but we don't need to
solve that to fix this.

There are a couple of ways to solve this. Probably the ideal solution
would be to make the `URLPreloader` support loading out of langpacks.
But for a safer patch for beta I've just made `loadSync` fallback to an
alternative method of loading the ftl file in the event that
`Cu.readUTF8URI` fails.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1846371

Title:
  firefox 70.0 beta 11 isn't fully translated

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/1846371/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to