Include language-specific dictionaries in MSIX multi-locale packages
Categories
(Firefox :: Installer, enhancement, P3)
Tracking
()
People
(Reporter: nalexander, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fidedi-tikka])
After Bug 1709697 and friends, we produce a multi-locale MSIX package with ~100 langpacks packed into distribution/extensions
. It is a Known Issue that many langpacks do not include the language-specific packages [1], so that folks installing from the MSIX and using a non-en-US won't have a dictionary. My belief is that dictionaries are (or can be) very large so they're not part of langpacks for space and bandwidth reasons.
This ticket tracks doing better.
Broadly speaking, I can see four directions to pursue:
-
Invest into the langpack infrastructure so that dictionaries are part of langpacks or so that there is some kind of dependency/ride-along "dictpack" extension mechanism to address this issue.
-
Invest into runtime interventions, so that Firefox knows how to fetch appropriate dictionaries for the langpacks in play.
-
Find a solution specific to MSIX packages. Were we to make progress on locale-specific resources, à la Bug 1721767, then we could add the dictionaries in the same manner and perhaps avoid the space and bandwidth penalties associated with shipping all dictionaries.
-
Find a solution specific to Microsoft Windows. It's my belief that flatpaks, at least, fall back to system dictionaries. Perhaps Firefox could leverage system dictionaries in the common case when the browser UI locale and the system locale coincide.
[1] At the time of writing, perhaps: bg, br, ca, da, el, en-CA, es-CL, es-MX, et, fr, fy-NL, hu, id, ku, lt, lv, mk, nl, pl, pt-BR, pt-PT, rm, ro, ru, sk, sr, sv-SE, uk, vi.
Comment 1•3 years ago
|
||
Packaging all of them would require additional space (each dictionary should be between 300-800 kb), but more importantly it would make the UI pretty unusable. The UI is very old, and you would have to choose between a ton of languages in a context menu, given Firefox doesn't always detect the language correctly. And users will have a lot of dictionaries they don't care about in that list.
On the other hand, we might already have most of the code to implement a cleaner run-time solution. When we install a new language from Settings, and switch to it, we also download dictionaries from AMO for that language, and install them silently. On first start, we could check if we have the dictionary installed for the locale currently in use, otherwise install it.
That would also solve a long standing issue that goes beyond MSIX: without a dictionary, the spellchecking feature is undiscoverable, and we have plenty of languages who can't ship a dictionary in repacks for license reasons.
The source of the dictionaries is in remote-settings
https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/language-dictionaries/records
This should be the code installing it
https://searchfox.org/mozilla-central/rev/3a8091d1c29473a0839ad7a5810028f41363fe2e/browser/components/preferences/dialogs/browserLanguages.js#590
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Description
•