ungoogled-chromium icon indicating copy to clipboard operation
ungoogled-chromium copied to clipboard

language spell check

Open jhuss opened this issue 7 years ago • 51 comments

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?

jhuss avatar Feb 13 '17 14:02 jhuss

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.

Eloston avatar Feb 14 '17 19:02 Eloston

this is old an related to another chromium-based project, but it's about spell checking https://bitbucket.org/chromiumembedded/cef/issues/137

jhuss avatar Feb 20 '17 20:02 jhuss

Well I found some other links: https://github.com/electron/electron/issues/3189 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814552

Eloston avatar Feb 20 '17 21:02 Eloston

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 avatar Mar 09 '17 23:03 Eloston

@Eloston how to do that?

avently avatar Mar 09 '17 23:03 avently

@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.

Eloston avatar Mar 11 '17 07:03 Eloston

Some discussion about spell checking over here: https://github.com/gcarq/inox-patchset/issues/83

Eloston avatar Jun 12 '17 21:06 Eloston

@jhuss https://github.com/hunspell/hunspell

Atavic avatar Jun 13 '17 21:06 Atavic

New status update: https://github.com/gcarq/inox-patchset/issues/83#issuecomment-323229832

Eloston avatar Aug 18 '17 00:08 Eloston

Here is an easy-to-maintain and Google-independent solution:

  1. Patch convert_dict utility so that it can print all possible bdic file names.
  2. Using this utility, make a script that converts all system hunspell dictionaries to ~/.config/chromium/Dictionaries. The script is intended to be run manually by the user.

I have implemented it in qvint/ungoogled-chromium-fedora@a68fdd679566da5134d916776f14e00c8e6a8042. The only language that convert_dict fails to process is uk_UA :confused:

qvint avatar Dec 06 '18 05:12 qvint

@Eloston how to do that?

+1 here, I would like have a working spell check!

TCB13 avatar Mar 15 '19 21:03 TCB13

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?

Innomen avatar Jul 16 '19 15:07 Innomen

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.

jstkdng avatar Jul 17 '19 16:07 jstkdng

A step by step walkthrough for anyone wanting to do this manually, following @qvint 's idea.

  • First you need to unpack and configure the source.
  • Then you need to patch the source with the patch above.
  • After that you need to build just the convert_dict utility and copy it from out/Release/convert_dict to ./dict-utility.
  • Then download the script and chmod +x it.
  • Last step is to simply run this script without arguments: ./chromium-update-dicts.sh. Don't forget to run it with the user, willing to have dictionaries.
  • Afterlast step: save both files for a future use ;)

Some useful commands for Gentoo-users:

  • Unpack and configure the source: ebuild $(equery w ungoogled-chromium) configure
  • Patch the source: wget -O - https://raw.githubusercontent.com/qvint/ungoogled-chromium-fedora/a68fdd679566da5134d916776f14e00c8e6a8042/ucf-dict-utility.patch | patch -p1 -u
  • Edit the environment file to build only: eninja -C out/Release convert_dict;
  • Compile it: 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 ;)

PF4Public avatar Jul 25 '19 01:07 PF4Public

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.

Innomen avatar Jul 25 '19 01:07 Innomen

still, that fix is exclusive for gentoo (linux), dunno if you could port that to windows.

jstkdng avatar Jul 25 '19 01:07 jstkdng

@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...

TCB13 avatar Jul 25 '19 01:07 TCB13

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 avatar Jul 25 '19 02:07 Innomen

@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 avatar Jul 25 '19 16:07 PF4Public

@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 avatar Jul 25 '19 16:07 Innomen

@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.

TCB13 avatar Jul 25 '19 17:07 TCB13

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.

jstkdng avatar Jul 26 '19 01:07 jstkdng

@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.

Innomen avatar Jul 26 '19 02:07 Innomen

Following @qvint's method described in https://github.com/Eloston/ungoogled-chromium/issues/1030#issuecomment-626454805 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.

Eloston avatar Jun 13 '20 19:06 Eloston

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.

Janaue avatar Jun 14 '20 06:06 Janaue

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.

Kein avatar Aug 14 '20 17:08 Kein

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\your_user\AppData\Local\Google\Chrome\User Data) to ugc (C:\Users\your_user\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

GorvGoyl avatar Aug 30 '20 09:08 GorvGoyl

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.

davidhealey avatar Jul 06 '21 12:07 davidhealey

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)

correcteur

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.

nettlebay avatar Dec 01 '21 20:12 nettlebay

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.

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.

aidalgol avatar Apr 26 '22 03:04 aidalgol