Use an environment variable to find the WebEngine dictionaries.
This change uses an environment variable instead of a symlink to find the .bdic binary dictionary folder.
The implications of this change require a bit of explanation.
Upstream Chromium made a bunch of funny design decisions with their dictionary support that makes sense for the way they use it but which cause problems for downstream Qt WebEngine. In Chromium, dictionaries are not added at a system level, but by each user. The dictionaries are download by the user in the GUI from an internet repository to the user's personal config directory, and, at the same time the presence of the dictionary is added to some sort of database. Chromium then queries this database when deciding which dictionaries to enable and looks for similarly named files in the config directory.
In Qt WebEngine, this design ends up functioning in the following manner. There are a number of different directories where Qt WebEngine will search for dictionaries. These are described at https://qthub.com/static/doc/qt5/qtwebengine/qtwebengine-features.html#. To enable a dictionary, an application developer must specify the name of the dictionary using https://qthub.com/static/doc/qt5/qtwebengine/qwebengineprofile.html#setSpellCheckLanguages. Importantly, the developer only specifies the language, like en-US
. The full file name, en-US.bdic
and the directory is handled automatically by Qt WebEngine.
The problem is that Qt WebEngine contains no mechanism that informs the user which languages are available. This is because Chromium populates that information into the database when they download the dictionary, so they didn't need a way to detect this. This means that developers needs to query the list of possible dictionary locations to generate their own list of available .bdic files, present these to the user for them to select which dictionary they would like to use, and then use the above setSpellCheckLanguages
function to instruct Qt WebEngine to use it.
Konqueror currently looks for the dictionaries in multiple locations, including whatever directory is set by the QTWEBENGINE_DICTIONARIES_PATH
environment variable. However, Konqueror's spell checking is broken for some other reason that I haven't look at closely but which needs to be addressed by their upstream developers. Falkon currently checks in several different directories for dictionaries, but doesn't look in QTWEBENGINE_DICTIONARIES_PATH
, so it tells the user that no dictionaries are available This is a regression from the previous symlink solution, which worked with Falkon, but that should be an easy fix by their upstream (I will send them a little note). Privacy Browser PC (which I develop) will work fine with this design when it enters Debian shortly.
Merge request reports
Activity
This is a regression from the previous symlink solution, which worked with Falkon, but that should be an easy fix by their upstream (I will send them a little note).
Oh, this is unfortunate. Can we get Falkon fixed in Debian before the freeze? Unfortunately it is not in our team, so the best thing you can do is filing a bug with debdiff attached.
Although, I just looked at falkon's bugs and noticed that it's already broken by the symlink solution: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029621. So removing the symlink will make it a bit less broken, not more.
I think we should upload now. I will work with Falkon to see if they can get their package fixed before the full freeze.
I would like to have my name added to Uploaders and the changelog. I am currently in the process of becoming a Debian Maintainer, but I am waiting on getting my key signed. Back in November I met with the closest Debian Developer, but he said he had his signing key in cold storage and it turns out that he isn't going to have access to it until March.
- Resolved by Soren Stoutner
Oh, that's interesting. I have Falkon installed and it works fine with they symlink. Perhaps they are doing something new in Unstable, because my version is from Testing and I see the bug report is specifically about Sid.
Edited by Soren Stoutner