zhukov / webogram

Telegram web application, GPL v3
https://web.telegram.org
GNU General Public License v3.0
7.96k stars 2.35k forks source link

[enhancement] spell checking language should be per-chat or per-contact, not per-tab #1103

Open don-coleman opened 8 years ago

don-coleman commented 8 years ago

Spell checking language should be per chat or per contact, not per browser tab.

When someone speaks multiple languages, they generally use the same language for a particular contact, or in a particular chat. Currently, you have to change the spell checking language every time you selects a chat that happens to be in a different language from your previous one.

zhukov commented 8 years ago

Are you sure that it is possible on web? Do you have any example?

don-coleman commented 8 years ago

On 04/05/16 21:26, Igor Zhukov wrote:

Are you sure that it is possible on web? Do you have any example?

This is not my area of expertise (I'm a systems programmer, not a web programmer)... I was making an enhancement request based on something I'd like to have, with no idea of the practicality of implementation.

Having said that, a bit of web searching returns:

https://developer.mozilla.org/en-US/docs/Web/HTML/Controlling_spell_checking_in_HTML_forms

the spell checker uses the |<input>|
<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input>
element's |lang
<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-lang>|
attribute to determine the default spell checker language.

Sounds hopeful, yes?

This may have nothing to do with how Telegram chats work though.

I'd suspect there is also probably a browser specific way to change the input language with out user interaction when a particular chat gets focus ... and I could understand that probably isn't a path you want to go down.

Don

Haktrum commented 8 years ago

Note that is not and will not be implemented in Chrome Edit: it's not really necessary, though. Chrome uses multilingual spellchecking.

magicgoose commented 8 years ago

In an ideal world, a clever spellchecker guesses language from context. Limiting languages per contact is not really a complete solution, because some people like to use several languages interchangeably. :)

stek29 commented 8 years ago

What about improving your firefox (by making Double-lang spellcheck file)