signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.42k stars 2.62k forks source link

Support Multiple Spell Check Locales / Option To Disable Spell Checker #1659

Closed Beanow closed 4 months ago

Beanow commented 6 years ago

Description

Currently js/spell_check.js detects and initializes a single locale.

When you speak different languages depending on the contact / situation, being able to switch is an important feature.

Please add:

Edit https://github.com/WhisperSystems/Signal-Desktop/issues/1659#issuecomment-341287034 / https://github.com/WhisperSystems/Signal-Desktop/issues/1659#issuecomment-341457661:

Screenshots

image Example of this feature in Chromium

Platform info

Operating System: Ubuntu 17.04 Browser: Electron app Signal version: 1.0.34

JostMigenda commented 6 years ago

I would also appreciate the ability to disable spellcheck completely.

allefeld commented 6 years ago

In my installation, v1.0.34 on Debian, there is no option to choose the language for spell check. My German messages are "spell checked" probably according to an English dictionary. Please either disable spell check completely, or add an option to choose the language and to disable spell check.

Beanow commented 6 years ago

@allefeld That is the same behaviour as I'm seeing. Note the screenshot is from Chromium as an example.

scottnonnenberg commented 6 years ago

@allefeld On Linux, we use the OS locale and look for hunspell dictionaries which match that locale. Post your log and we can take a look at why it didn't set things up for german for you.

allefeld commented 6 years ago

@scottnonnenberg well then it is correct, since my locale is en_US.UTF-8. I prefer my applications with an English interface, and I also write a lot in English (academia), but occasionally also in my mother tongue. ;) And in that case it would be nice to get rid of the red squiggles, which I can simply do via the right-click menu e.g. in this brower text entry field. Personally, I don't use spell check anyway most of the time. Any way to just disable it?

scytho commented 6 years ago

Isn’t there a way to disable it via the debug background?

scottnonnenberg commented 6 years ago

Not yet, but it would be a simple change. It's on the list.

KorvinSilver commented 6 years ago

I'd also like to have this feature. I too use my system in English, that way it's consistent everywhere (many software I use don't support Hungarian), also I use English almost exclusively unless I talk to friends and family members.
And I assume multilingual chatting's not uncommon these days.

wouterbruijning commented 6 years ago

Same here! I have MacOS set to English, but Dutch is what I speak to my fellow countrymen and women ;-)

CarliJoy commented 6 years ago

Same here. I need spell check, so please add a possibility to change the language. Thanks :-)

fschaap commented 6 years ago

Adding my 2 cents to this request for the same reasons the other users already mentioned. I also would like to disable spell check completely. Thanks :-)

evilphish commented 6 years ago

Same problem here, english locale under Linux and all my foreign text gets spellchecked according to locale language. If no selection of locale or a set of locales is planned at least a switch that disables spellcheck completely is needed. In todays world we converse with many different people, often in many different languages. Guessing the language used by the system locale is not a good way to set a spellchecker and in general it is not a great design decision to force these things on users without the means to disable them. So please, at least a simple on-off switch would help immensely!

inoas commented 6 years ago

Same problem here - new Mac OS X desktop client v 1.3.0

My OS is English and my communications are in English or German sometimes even mixed. I'd welcome a simple setting to disable spell checking for now.

In general it seems that there is no native support for the native Mac OS X spellchecking features as usually you can go to App Bar -> Edit -> Spell Checking to disable/enable spell checking, auto correction, grammar checking, like so:

screen shot 2018-02-26 at 09 46 48
Zibri commented 6 years ago

same here.. disable spellcheck please.. or put an option.

Zibri commented 6 years ago

As of now on linux I solved in this way:

quit signal. from root type: mv /opt/Signal/resources/app.asar.unpacked/node_modules/spellchecker /opt/Signal/resources/app.asar.unpacked/node_modules/spellchecker.disabled then restart signal.

corppneq commented 6 years ago

@Zibri That doesn't work for me: ksnip_20180419-155813

ls -lh /opt/Signal/resources/app.asar.unpacked/node_modules/spellchecker; echo "───────────────────────"; ls -lh /opt/Signal/resources/app.asar.unpacked/node_modules/spellchecker.disabled

ls: Zugriff auf '/opt/Signal/resources/app.asar.unpacked/node_modules/spellchecker' nicht möglich: Datei oder Verzeichnis nicht gefunden
───────────────────────
insgesamt 0
drwxr-xr-x 1 root root 42 Dez 25 00:32 vendor
Zibri commented 6 years ago

strange... I just installed it and that's what I did. And now the spell check is gone.

image

corppneq commented 6 years ago

@Zibri Type Österreich or ärgerlich or Übersetzer

timss commented 6 years ago

I did the same as @Zibri on Signal Desktop beta (v1.7.0-beta.2) and it's working (thanks!). No spell checking for "Östereich" or words with other special characters either.

On Thu, Apr 19, 2018 at 9:48 PM corppneq notifications@github.com wrote:

@Zibri https://github.com/Zibri Type Östereich or ärgerlich or Übersetzer

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/signalapp/Signal-Desktop/issues/1659#issuecomment-382858873, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqqel0epRHS6yGghrycbwd8YNGg309Yks5tqOn7gaJpZM4QO19e .

Zibri commented 6 years ago

@timss "One is glad to be of service" :smile:

Zibri commented 6 years ago

@corppneq I told you it's gone. No matter what I type. image

corppneq commented 6 years ago

I reinstalled signal and for me the spellchecker is still on :-( ksnip_20180420-120657 @Zibri but thanks for checking

Brog33 commented 6 years ago

Just installed Signal myself (Windows 10) and this spellchecker is really bugging me :/

Zibri commented 6 years ago

Note: signal updates frequently. After every update you should "patch" it again by doing:

killall -9 signal-desktop
mv /opt/Signal/resources/app.asar.unpacked/node_modules/spellchecker /opt/Signal/resources/app.asar.unpacked/node_modules/spellchecker.disabled
alexandervlpl commented 6 years ago

To the developers: this is not a "niche" problem for just a few people. I think it's safe to say that outside the US/UK, many (if not most) Signal users communicate in at least two languages on a daily basis. In my case I'm often writing in my imperfect German and I'm desperate for some spelling help. Instead I'm stuck with an English spellchecker making everything red. :disappointed:

Also, what @allefeld does is normal: setting your locale to English even if your native language is German or something else. I see it all the time.

@Zibri: the spellchecker.disabled fix doesn't work for me either, I still have the spellchecker. Thanks for trying!

AGlezB commented 6 years ago

Same here. Often using more than one languague plus tech terms in the same chat I just want spell checking gone.

Zibri commented 6 years ago

image

DISTRIB_ID=Ubuntu DISTRIB_RELEASE=17.10 DISTRIB_CODENAME=artful DISTRIB_DESCRIPTION="Ubuntu 17.10"

corppneq commented 6 years ago

The issue still not fixed.

ksnip_20180604-084157

cat /etc/os-release

NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
stonecrusher commented 6 years ago

So... should we open an own issue just for disabling spellcheck? I think that is much easier and faster to implement than supporting multiple languages. It's really distracting and annoying.

Beanow commented 6 years ago

@stonecrusher I had already edited the issue description to include disabling spellchecker. I think it's clear many people would like to have this capability. Moreover anyone able to make some pull-requests would get this moving along I believe.

scottnonnenberg-signal commented 6 years ago

Hey y'all, finally getting around to commenting here. The latest versions of Signal Desktop (both beta and production) have an option to disable spell check.

corppneq commented 6 years ago

@scottnonnenberg-signal Thank you. It works perfect.

zios007 commented 5 years ago

@scottnonnenberg-signal will be possible to get different dictionaries for spellcheck? I've seen that the threat started last year and seems that hasn't been introduced yet that feature. I've just recently switched and closed accounts of my other communication apps. I prefer Signal over all of them. However, I'm on a country where English isn't spoken and will be nice to have other languages available. Like Spanish which is the 2nd most spoken language in the world :)

Thanks for your hard work and all your efforts.

ogai commented 5 years ago

Yes, it is safe to say that most people using software like signal communicate in at least two languages. An alternative to selecting the spellcheck language would be to select more than one language, in which case only wrong words (in all selected languages) are marked as wrong. My Google Input Method in Android works this way (even in the Signal app :-) and is very useful so.

Beanow commented 5 years ago

I've given switching languages a go, but quickly ended up making a lot of less-than-ideal extensions to the spellcheck package that may be better suited for upstream changes or a refactor of how spellcheck is implemented here.

Any developers willing to take a look at this approach so far? https://github.com/Beanow/Signal-Desktop/tree/feature/1659-multiple-spellcheck-locales

For an OS where spellcheck supports getAvailableDictionaries() it will show a list of options + disable like so: image

Linux and Win7 or lower however are not one of those OSes. So for Linux I also implemented a workaround to check /usr/share/hunspell/*.dic.

If no locales could be found, it will default to only enable/disable like so: image

P.s. yes that many and that obscure dictionaries are actually in my /usr/share/hunspell/ D: needs cleaning up.

scottnonnenberg-signal commented 5 years ago

@Beanow Wow, that's a lot you've been able to get working! What are your plans for it? One thing I will say is that many of our users have mentioned wanting to support multiple, seemingly at the same time. So there's that to consider as well.

Beanow commented 5 years ago

@scottnonnenberg right now I'm interested to hear your or another dev's opinion on the various overrides I did of the spellchecker packages' behaviour. Whether this is an ok approach or better suited for upstreaming or refactoring.

From there, things that need to happen:

gratefulfrog commented 5 years ago

I would also appreciate the ability to select, in the application, the current spell check language. Personally, I prefer explicitly selecting the language rather than the approach where only words that are wrong in all languages are flagged. That is, I prefer the approach used in Firefox or on Android. Simply disabling spell checking would also be nice, but certainly not sufficient from my point of view. On Android, the multi-language integration works perfectly. Thanks for considering this relatively important request for a communication tool.

Beanow commented 5 years ago

@gratefulfrog disabling spellchecker is available already under preferences.

As for multi-language spell checking I saw two approaches.

One is the, check all words against all installed languages and only flag those that are incorrect in all languages. Though simple, seems to do the job. Can live side-by-side with explicit single language options as "All your languages" in Chromium does.

Another is to analyse the full message you're typing in order to guestimate what language it is in, and switch the spellcheck language automatically based on that. It comes with more complexity, detection is error prone and has a downside where mixing languages in a single message will show only one language as correctly spelled even if everything is correctly spelled in their respective languages. So I'm not sure whether this is worth the hassle when explicit language switching is available.

Another other approaches I'm missing?

eligt commented 5 years ago

My 2 cents: the first approach of "All your languages" while simpler is also most likely the best in terms of experience. This is because people who speak multiple languages may often mix words from any 2 or more of them when speaking to friends who share the same languages.

However, I'd recommend not just using all the installed languages but letting people pick which languages they want, cause sometimes you may have a bunch of languages/locales installed for the purpose of OpenOffice documents for instance, even though you don't really use those languages on a messenger.

embray commented 5 years ago

@eligt I also like having an "all languages" capability. E.g. for comparison I use SwiftKey for English, French, and Japanese (mixing Japanese with the other two works less well). But between English and French I get both simultaneously which is good since I am often mixing the two.

zios007 commented 5 years ago

I agree with embray and disagree with eligt.

I use 5 languages all the time and for example with browsers like Chrome I can use them with no problem, I can write in any language and if I make a mistake it will give me options to fix it. But in Firefox it's nuts.. every time I have to switch languages I have to go and change the dictionary in the options. Something that really works pretty well in Chrome without having to change anything, just adding all the languages I use all the time. So will be nice to have something like the chrome way of doing it instead of doing it like firefox. I know there are other tools around that do the same as chrome and I think they are much convenient.

SteenPetersen commented 5 years ago

Also adding my 2 cents that I would love the ability to do this.

texidor commented 5 years ago

Also adding my request for this feature. Furthermore, it would be excellent if the software could associate each conversation with the corresponding language .

kierun commented 5 years ago

A special use case I use is speaking two different languages in the same chat so having a per chat setting would be useless. Could you have true multiple language support? So, check (say) en_GB then fr_FR

Beanow commented 5 years ago

I've updated my initial feature branch https://github.com/Beanow/Signal-Desktop/tree/feature/1659-multiple-spellcheck-locales. It now has cleaner wrappers for it's extra functionality and support the Chrome-like "All your languages" option.

However I noticed there may be performance issue with this "All your languages" when asking for suggestions of misspelled words. Because you get the slowdown of each language sequentially. Taking possibly multiple seconds before your context menu will render.

A test case with long concatenated words like Kaartjesverkoopbaliemedwerker which should be Kaartjesverkoopbaliemedewerker is particularly bad. Hopefully though this is limited to the Dutch dictionary on Linux. Testing the same word in single language, or single language in Firefox has the same issue.

Chrome seems to resolve this issue by not doing suggestions locally at all. It asks to send data to Google's APIs to get suggestions.

So I think this may need some testing on other platforms.

Another TODO is to look at storing preferences and what the preferences page should display.

rozmansi commented 5 years ago

A special use case I use is speaking two different languages in the same chat so having a per chat setting would be useless.

If you borrow occasional clichés from another language, maybe an option to add those to the user dictionary would be better.

Talking person-to-person: Is there anything wrong with your native language, you need to pollute the conversation with some foreign language? ;) If you're fine with foreign language inserts, then why bother with spelling mistakes? Rather, you need an option to turn the spell checking off.

Talking in a group: It's impolite to use a language other members of the chat don't understand. The group conversations should be one-language-everybody-understand.

I fail to see a good reason, why would somebody need all spell checkers in a single conversation.

kierun commented 5 years ago

@rozmansi Sometimes I like to help $person practice their French. At other times, we speak English…

eligt commented 5 years ago

@rozmansi how about bilingual people? You don't want to "pollute" your native language with your other native language? :) When you speak multiple languages well, with someone else who does too, you often end up using both because certain concepts are easier to express in one language and some in the other. That does not mean I'd like to make typing mistakes in either.

rozmansi commented 5 years ago

@eligt I am multilingual too, but I usually speak to the same person in one language only.