careteditor / issues

Caret issues
https://caret.io
326 stars 12 forks source link

Configuration option that controls spellcheck language #209

Open sguergachi opened 7 years ago

sguergachi commented 7 years ago

In the latest version 1.12.0 The spellcheck and auto correct feature doesn't seem to work.

image

I typed "helo" and it should be "hello" but no underline and no autocorrection happened. I tested this on 2 different Windows 10 computers.

astoilkov commented 7 years ago

Hi @sguergachi,

You should be able to start seeing spellcheck underlining and autocorrect working after a few words.

We have changed the way we detect language. Now we wait before we are absolutely sure you are writing in a specific language before we begin to spellcheck and autocorrect words. The change was required because people writing in different languages than English weren't able to use the autocorrect feature and were getting incorrect spellcheck underlining.

I will close this issue but do not hesitate to write back in the thread if you have more questions.

sguergachi commented 7 years ago

Ok, but does it have to re-detect the language for every new file? I don't understand why it doesn't default to the last detected language and update if it detects a new language on the new file?

astoilkov commented 7 years ago

In this situation if someone writes in two different languages from time to time before starting a new language he/she should turn off autocorrect and after a few words it should turn it on again. This seems inconvenient.

Do you have problems for autocorrect not working at the start of the document? If you have an incorrect word it will be highlighted after few words and you will be able to see it and correct it.

What I can think of is get default suggestions for autocorrect in English and if the match is really close to the mistaken word we can autocorrect it. However, I should test this with a lot of languages and words before seeing it works properly.

sguergachi commented 7 years ago

It just seems like you are optimizing for edge cases when (I am willing to bet) most cases people write in one language most of the time. So you are asking for people to have to go back to the first few words and correct them-which is absolutely a worse experience-instead of auto correcting or correcting as you type for every new document.

It's a trade off, and I understand the reasoning behind it, I'm just curious whether this trade off is in service of most people or if it's only serving the few who vocalized their frustrations with dealing with multiple languages.

I never like to suggest adding a setting. But I know this is a problems that most word processors solve by letting the user select a default language. The choice between a default language or automatic detection feels sensible to me, but again that depends on how you view the trade off I described.

erusev commented 7 years ago

@sguergachi You make a good point - we'll consider adding the setting you described.

sguergachi commented 7 years ago

@erusev Thanks. Perhaps the issue should be re-opened in that case until you've come to a final decision, just so it's not forgotten.