FirefoxAutoDict
FirefoxAutoDict copied to clipboard
Linux support
Thank you for writing this add-on. Do you know if it works on Linux?
I'm running Firefox 67.0 on Linux Mint 19, and it does not seem to work for me. I've tried it in GitHub (when writing this GitHub issue), and in Slack.
I have the spell check language set to English by default, and I have Norwegian dictionary (not language pack) installed as an add-on. Writing a few lines of Norwegian did not cause it to switch from English to Norwegian (I get a red squiggly line under each word.)
I tried deleting my content-prefs.sqlite
file, which did remove my zoom preferences and, I think, reset the spell check language back to the default, English.
Switching languages manually by right-clicking the text box and selecting it in the spell check language menu works as normal.
Hi @rogerdahl,
I haven't tested it on Linux, but I'll have a look.
I have tested now in both Ubuntu and Mint, and it seems to work just fine in both. However, I have noticed both that the language detector built into Firefox has a hard time distinguishing between Danish and Norwegian Bokmål and that it doesn't support Nynorsk.
Which of the two written standards are you using? If you have problems with Bokmål, it might be possible to introduce some configurable language mapping, da -> no
. In any case, I'll add a list of supported languages to the README.
Thank you for testing. I really appreciate it!
I'm using Bokmål. Is it possible for the add-on to indiciate in some way which dictionary is currently in use?
I tried installing a Danish dictionary and pasting some Danish text in, without success:
I also tried deleting content-prefs.sqlite
again.
Does the language detector provide a ranked list of matches? If so, how about selecting the first one for which there is a dictionary? So for me, it would skip Danish as long as I don't have a Danish dictionary installed.
As a slight aside, the perfect solution for me would be to be able to permanently select more than one language for spell checking. Firefox would check against each dictionary before flagging words. If only 2-3 languages are checked, I would be ok with rare cases in which a typo in one language is a valid word in another. It would allow mixed language text as well.
Your problem does seem to be an error in this extension, since copy pasting the very same text into a text box on my installation correctly sets the spell checking language to Danish. Unfortunately, the extension doesn't currently have any logging which would help me diagnose the problem. I can add some, but it will take a bit of work, as the logging would end up in the normal developer console, and I would therefore like to add a toggle for it, so as not to annoy users who use that console.
Unfortunately, Firefox doesn't support any way to interact with the spell checking. I can't check which dictionaries are installed or which one is set, and I can't directly set the dictionary. There is an open issue in the Firefox bug tracker about adding a way for extensions to interact with the spell checking, but there hasn't been any progress there. This extension works by setting a language attribute on each text area, which Firefox then uses to select a dictionary.
The language detector doesn't return a ranked list of languages. It may return a list of multiple languages if the text switches language in the middle, and will then indicate what percentage of the text is in each of those languages. In that case, I use the language with the highest percentage. When writing in Danish or Norwegian Bokmål, the detector sometimes detect the wrong language, but never both at once.
I would also like the perfect solution you describe, but it can't be done by an extension right now. If you are open to manually merging your dictionary files, one of these links might help you. I haven't tried any of them myself, though.
Thanks again for looking into this and for the background information. I see that it's pretty limited what you can do from an add-on.
Ability to select multiple languages really should be a core feature in Firefox. I picture the radio buttons in the languages dropdown being checkboxes instead. Of course, Firefox is open source, so if one really wanted to dive in... :)
Thank you for the links. I had looked at merging dictionaries before, but it's certainly a bit of a hassle. I might take another look, or just turn off spellchecking altogether. In any case, seems we have reached the end of the current round of testing. Feel free to close this, and if you do end up making a version with additional logging, give me a ping and I'll try it out on my box and report back!