Open jhuss opened 7 years ago
Yes, spell checking in Chrome and Chromium uses binaries from Google to work. I don't know if there's a way to get it to work without the binaries, such as by using a system library.
this is old an related to another chromium-based project, but it's about spell checking https://bitbucket.org/chromiumembedded/cef/issues/137
Well I found some other links: https://github.com/electron/electron/issues/3189 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814552
I should note that language spell check may work if one were to download the dictionaries manually and insert them into the profile directory.
@Eloston how to do that?
@avently I'm not sure. I haven't dug deep into how it works since I'm using a patch from Inox that disables dictionary fetching from Google.
Some discussion about spell checking over here: https://github.com/gcarq/inox-patchset/issues/83
New status update: https://github.com/gcarq/inox-patchset/issues/83#issuecomment-323229832
Here is an easy-to-maintain and Google-independent solution:
I have implemented it in qvint/ungoogled-chromium-fedora@a68fdd679566da5134d916776f14e00c8e6a8042.
The only language that convert_dict fails to process is uk_UA
:confused:
@Eloston how to do that?
+1 here, I would like have a working spell check!
Can someone summerize the current state of things for me? Like, is this something likely to be fixed any time soon? It reads like qvint offers a solution several months ago but, nothing happened?
you could change to linux m8 ;) , there are more people there that want to fix stuff than in windows. And even if eloston added that patch, it would be specific to linux, in this case, fedora.
A step by step walkthrough for anyone wanting to do this manually, following @qvint 's idea.
convert_dict
utility and copy it from out/Release/convert_dict
to ./dict-utility
.chmod +x
it../chromium-update-dicts.sh
. Don't forget to run it with the user, willing to have dictionaries.Some useful commands for Gentoo-users:
ebuild $(equery w ungoogled-chromium) configure
wget -O - https://raw.githubusercontent.com/qvint/ungoogled-chromium-fedora/a68fdd679566da5134d916776f14e00c8e6a8042/ucf-dict-utility.patch | patch -p1 -u
environment
file to build only: eninja -C out/Release convert_dict;
ebuild $(equery w ungoogled-chromium) compile
PS: now that I have compiled it, I have dict-utility: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked,
and could probably share it with someone brave enough to run executables from unknown sources ;)
I kinda feel like you should fork the whole thing XD
Windows users badly need a fully functional ungoogled chromium, and currently we only lack 3 things to make that happen. Installer, widevine, and spell check. You just brought that number to two :) We appreciate you.
still, that fix is exclusive for gentoo (linux), dunno if you could port that to windows.
@Innomen aren’t you forgetting the essential thing? Like a tag that can actually be built? All the patches are broken at this point, installer / spell check isn’t probably relevant when you can’t build anything...
still, that fix is exclusive for gentoo (linux), dunno if you could port that to windows.
Oh I didnt understand what I was reading I guess. Well, wouldn't apply to me immediately anyway, I was mostly just trying to be encouraging /sigh X)
@Innomen
I kinda feel like you should fork the whole thing XD Windows users badly need a fully functional ungoogled chromium
I do share this feeling, as I also have to use Windows every now and then and miss ungoogled-chromium there. I even thought to try and build ungoogled-chromium on Windows someday, but it might take a lot of time, which I currently do not have to spare. Thus I would like to not give any promises ahead of time.
@jstkdng
Why so pessimistic? The tool is so simple, that it could be readily built on Windows. Have you tried? And the script is basically calling this tool with convert
option and passing filenames as arguments. One could do this easily without this script on Windows. There's even no need for a shell! Windows' cmd
will do.
But I must admit that, like @TCB13 points out, without compilable sources and patches all this has little to no use on Windows.
@PF4Public
Thank you for not being yet another linux dude that basically wants me gassed for having the audacity to use windows. It's refreshing frankly. Though I fear your peers might now burn you at the stake for heresy.
Would it be easier to start from a different place? Like, ungoogling the more popular version of chromium that has an installer? And yeah I 100% get the time constraints, very few of us have anything even approximating real freedom. Just saying there's a niche it appears you could fill.
@Innomen last time I was able to build this under Windows I managed to create and installer using winrar to unpack the files. Also used to add some stuff to the Windows registry. It is a solution, however my current problem is that like @PF4Public I ocasional use Windows but that doesn’t mean I’m able to fix it.
Thank you for not being yet another linux dude that basically wants me gassed for having the audacity to use windows.
I use windows too mate. It's just that I feel more comfortable using linux, I feel it is easier than windows and there is a large community of developers that are willing to help, including me ofc.
In my honest opinion, I see no point in trying to have privacy while using windows, like, you are already sacrificing your privacy to microsoft. The only way to combat that is to give less information to the corporations than trying to completely cut them out of it, they will always find a way around your settings. If someone truly cares about their privacy, they should use linux. Then, you can get help from other privacy enthusiasts.
Take the linux pill @Innomen , you'll thank me later. Of course, you can still use windows for things like word, photoshop or gaming, but for everything else, use Linux.
@jhuss Privacy isn't all or nothing like that: https://www.ted.com/talks/bruce_schneier
It's not like just running linux is the same as living like an active intelligence agent on the dark net behind 4 vpns and changing locations and my appearance every 7 days etc etc.
There are levels. I am looking for a good ratio of protection to effort. I'm already approaching a diminishing returns threshold.
I wouldn't mind going linux if it would stop being so arrogant. There isn't a linux on earth that actually wants to be a threat to microsoft or else one of them would have a shell that looks exactly like windows and make a real solid built in effort at compatibility.
Linux currently doesn't just say come to our side, enjoy privacy etc, it also says do everything our way or write your own from scratch while we all mock you for not being born knowing how to do it OR obsequiously acknowledging our superiority as human beings and thanking us for breathing every 4 words.
The biggest asset with windows is at least the community/company in theory serves me as a paying customer. Where as with linux it's very much a take it or leave it we owe you nothing our way or the highway feel.
I like how the windows gui works, and I like autohotkey. I can't get either one under linux.
I'm not looking to start a religious war, but you kinda directly asked XD Apologies if my reply causes drama, but I have opinions on this I feel I can fairly defend. And they aren't flattering.
I ran linux years ago briefly, back around when Ubuntu flirted with trying to be just a smidge beholden/supportive to its customer equivalents. Their forum banned me for criticizing their officially declared development priorities. Just for typing like I am now. It's not like I am or was spamming nazi images and lolicon or something.
So yeah I tried the linux pill, it made me froof it back up X)
Update 2019-07-30 0643 AM: FWIW I abandoned this fork. Imo it's a honeypot even pretending this version works on windows. Thanks for trying to help all to whatever degree you did so.
Following @qvint's method described in https://github.com/Eloston/ungoogled-chromium/issues/1030#issuecomment-626454805 works on version 81.
My steps:
base64 -d en-US-9-0.bdic > ~/.config/chromium/Dictionaries/en-US-9-0.bdic
(assuming you want the dictionary to be in the default profile)chrome://settings/languages
, or restart the browser for the dictionaries to take effect.Following @qvint's method described in #1030 (comment) works on version 81.
My steps:
1. Go to https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/master 2. Find a bdic you want, click on it. You will see a mostly empty page aside from "X-byte binary file" 3. On the bottom right corner, click "txt". For en-US-9-0.bdic, you will get a link https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/master/en-US-9-0.bdic?format=TEXT 4. This is a base64-encoded file. On Linux, simply run `base64 -d en-US-9-0.bdic > ~/.config/chromium/Dictionaries/en-US-9-0.bdic` (assuming you want the dictionary to be in the default profile) 5. Toggle spell check in `chrome://settings/languages`, or restart the browser for the dictionaries to take effect.
In windows, the TXT gives a .bdic, but it need to be open in 7z and then extracted and renamed into a .bdic.
This probably could be realized as an extension similar to chromium-web-store
extension. The only human-interaction step is to save processed bdic-file into proper directory since extension cant do that.
In windows, the TXT gives a .bdic, but it need to be open in 7z and then extracted and renamed into a .bdic.
this doesn't work on Windows 10 as it gives a en-US-9-0.txt file which can't be opened in 7z. To solve this I just copied dictionary file (in my case en-US-9-0.bdic) from Google chrome (_C:\Users\youruser\AppData\Local\Google\Chrome\User Data) to ugc (_C:\Users\youruser\AppData\Local\Chromium\User Data). yes, need to put at \User Data instead of non-existent \User Data\Dictionaries folder.
make sure to toggle that spell check button (chrome://settings/languages) and restart.
If you don't have google chrome I've also attached en-US-9-0.bdic inside zip folder. en-US-9-0.zip
On Debian, using Ungoogled Chromium, that download link provides a .txt file not a .bdic file. I tried renaming the file but the dictionary isn't showing up in settings.
Linux Manjaro. Chromium Version 95.0.4638.54 (Official Build, ungoogled-chromium) (64 bits) PORTABLE. Yes, I know, it's a relatively old version but I had other issues with the last version. Hello everyone, I have been trying for days to get the French spell check in Ungoogled Chromium. And I found! I only copied the /home/user/.config/iridium/Dictionaries/fr-FR-3-0.bdic (in an old installation of Iridium) and pasted into /home/user/.config/chromium/Dictionaries/. I reboot and everything works like a charm: (snapshot)
In the snapshot, English words are underlined because I haven't installed the English dictionnary yet
Edit: I just realized that GorvGoyl did almost the same in Windows.
Following @qvint's method described in #1030 (comment) works on version 81.
My steps:
- Go to https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/master
- Find a bdic you want, click on it. You will see a mostly empty page aside from "X-byte binary file"
- On the bottom right corner, click "txt". For en-US-9-0.bdic, you will get a link https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/master/en-US-9-0.bdic?format=TEXT
- This is a base64-encoded file. On Linux, simply run
base64 -d en-US-9-0.bdic > ~/.config/chromium/Dictionaries/en-US-9-0.bdic
(assuming you want the dictionary to be in the default profile)- Toggle spell check in
chrome://settings/languages
, or restart the browser for the dictionaries to take effect.
This solution has no visible effect in "Version 100.0.4896.127 (Official Build, ungoogled-chromium) (64-bit)". Does the version number in the file name have to match what ungoogled-chromium was expecting at compile time? I also tried copying the files from the user data dir that the same build of regular chromium creates on startup into the ungoogled-chromium Dictionaries directory, and still nothing is being underlined in red in text boxes.
Edited to add 19 hours later: Well now it's started working the next morning after a reboot. Why a reboot made the dictionary files take effect but simply restarting chromium was not is a complete mystery to me.
Thanks @qvint, it worked for me.
Beware that the latest version in that tree may be ahead of your Chromium version, mine would not accept the 10-1
file but did the 10-0
. Also the 4th step can be put into a one-liner, e.g.:
wget -qO- 'https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/41cdffd71c9948f63c7ad36e1fb0ff519aa7a37e/en-GB-10-0.bdic?format=TEXT' | base64 -d > ~/.config/chromium/Dictionaries/en-GB-10-0.bdic
Thanks for the one-liner. Conversely on 103.0.5060.114
I needed 10-1 for spell check to work.
wget -qO- 'https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/41cdffd71c9948f63c7ad36e1fb0ff519aa7a37e/en-US-10-1.bdic?format=TEXT' | base64 -d > ~/.config/chromium/Dictionaries/en-US-10-1.bdic
After restarting chromium:
Would like some help in getting spell check to work. I have tried putting the file in %LOCALAPPDATA%\Chromium\Application\Dictionaries\ as suggested in the FAQ and also in C:\Users\your_user\AppData\Local\Chromium\User Data, but nothing is happening. I have checked the spell check in settings and have restarted the browser multiple times. Maybe a reboot might help??
@Xoouu Have you followed the FAQ steps exactly? Make sure you have no Chrome processes running in Task Manager's Details tab, make sure you got the right version of the file, and it's been base64 decoded, and the decoded version has the correct filename.
I got it working! The file I downloaded was the wrong one. I should have payed attention whether it had numbers after the locale.
A somewhat related note. One needs to get hyphen-data
from any other chromium (-fork) profile into one's profile for automatic css hyphenation to work. Maybe it would be possible to extract those files from chromium sources, but I didn't explore that possibility.
https://googlechrome.github.io/samples/css-hyphens/
EDIT: It is possible to use hyphen-data from Android to add currently unsupported languages:
That version of the file is outdated and no longer in the repo. You probably want this (adjust bdic
var to match your language):
( bdic=en-GB-10-1.bdic; wget -qO- 'https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/refs/heads/main/'$bdic'?format=TEXT' | base64 -d > ~/.config/chromium/Dictionaries/$bdic )
At the top of the page I linked to is this message:
Remove old versions of English dictionary .bdic files
Bug: 343438 Change-Id: I39dd59b9a265007008512f878c0f6c1416893230
en-AU-10-0.bdic[Deleted - diff] en-CA-10-0.bdic[Deleted - diff] en-GB-10-0.bdic[Deleted - diff] en-GB-oxendict-10-0.bdic[Deleted - diff] en-US-10-0.bdic[Deleted - diff]
The URLs you're using have a hash in them that refer to files from a specific, outdated commit. They are no longer relevant to the current version of Chromium. As I wrote in the comment with the original one-liner, the sources contained files that were ahead of the version of Chromium I was using, so I linked to the older ones.
You need to use newer versions. I tested the updated one-liner on my own installation, and my spell check is working fine. I'm unsure why you chose to ignore the newer instructions I provided.
@u2human I had the same problem when using Flatpak. Issue seems to be that configuration files are in a different place. One has to use ~/.var/app/com.github.Eloston.UngoogledChromium/config/chromium/Dictionaries/
instead of ~/.config/chromium/Dictionaries/
.
@u2human Have you enabled the languages you need in settings?
@u2human You need to also have them here: chrome://settings/languages
no I don't have them there:
Which should explain why spellcheck does not work. Should be working for English though.
BTW: You didn't tick "check for spelling errors" setting.
Thogh they do not work all together
They do. But in my experience it does sometimes underline a correct word in English if it is a misspelled word in German and vice versa. That was beyond annoying and made me keep only English.
Besides, having multiple languages in that setting does result in them being sent with accept-languages header.
In case anyone else comes across this issue I have made a simple enough to use python script to list and install the language files.
It works for Flatpak or standard installs on linux only.
https://gist.github.com/blipk/921a6b376ef2f5e247750d50cf95fcfe
Might be useful if we could pin this issue to prevent duplicates @networkException @Eloston
Perhaps you could also consider including them as they seem to be open source from the hunspell repo (at least the English dictionaries) and the BDIC convertor from the chromium source is BSD-style licenced: https://github.com/adobe/chromium/blob/master/chrome/tools/convert_dict/convert_dict.cc https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/refs/heads/main/README_en_GB.txt
@blipk Have you considered submitting PR in https://github.com/ungoogled-software/contrib?
@PF4Public I considered it, but I really don't know C/++ nor how the .patch files work, and don't have the time at the moment. Perhaps someday, my python script works well enough for most use cases for now.
I considered it, but I really don't know C/++ nor how the .patch files work
I would imagine creating another top directory named "scripts", where you could place your python script with some readme or something like that (in a subdirectory), could be appropriate, no need to convert it into C++.
@PF4Public
Hi everyone,
I saw @blipk's script PR. That looks good, though making use of that is still a bit involved for end users who are not accustomed to running scripts. (I do see that Chromium uses their own custom format for these dictionaries, and so cannot consume standard system hunspell files.)
Is there a reason why we can't just distribute these files ourselves? Either as part of the installer, or as an add-on package?
The dictionary files don't appear to be Google property. If you look in the Git directory where they live, there is an update_dictionaries.py
script that downloads the main English ones from third-party SourceForge and GitHub projects, and then the README_*.txt
files have licensing and attribution information for the others. AFAICT, everything's under some combination of MIT/GPL/LGPL/MPL/Apache license.
All the files together make for a <70 MB tarball, and uncompressed they are about 260 MB. Seems not unreasonable for an add-on download...
@iskunk
See my comment link above, and same file in the chromium repo: https://chromium.googlesource.com/chromium/src/+/lkgr/chrome/tools/convert_dict/convert_dict.cc
This tool converts Hunspell .aff/.dic pairs to a combined binary dictionary format (.bdic)
It's BSD style licenced so I don't see it being a problem to integrate the update_dictionaries.py
and convert_dict.cc
into your own build process, or perhaps you could just use the bdic files from upstream chrome anyway.
I am just not familiar enough with the licences, with C or your build process to be able to get it done.
I installed ungoogle from pre-built, and enabled spell-check (not the web service option), but it's not working. this is linked by default to a google service or download? or is there a library dependency that is missing?