GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
509 stars 55 forks source link

[Request]: combine language and spell check #454

Open BaumiCoder opened 10 months ago

BaumiCoder commented 10 months ago

Describe the request

I write post in different languages (German and English) and always set the language of the post appropriate. To have the a correct spell checking, I also have to switch the spell check language.

It would be useful, if I could set the spell checking language for each "posting language" in the settings. If this setting is active, the spell check setting in context menu, at the post writing dialog, maybe should be invisible. Changing it there maybe doesn't show clearly, that it belongs to the "posting language".

Implementation Details

GeopJr commented 10 months ago

Thanks for the suggestion!

There's an issue with that. The list of languages Mastodon supports (ISO 639) is much more limited compared to what libspelling does which would require Tuba to make assumptions. For example, German:

On Mastodon:

image

On libspelling:

image

And while the differences might be insignificant for German, they might not be for other languages. (Lastly, I have no idea which one should Tuba assume is the correct one when there are many more options, like for Arabic: image )

BaumiCoder commented 10 months ago

I already saw that there are many different versions of the languages for the different countries. English is also an example with many countries. I think that the settings should be two parts:

  1. A checkbox "Set spell checking language controlled by language of the post". If this is checked, the second part get available
  2. A List where the user can add post languages and choose the spell checking language for it. Each post language can, of course, only added one time.
jrc03c commented 8 months ago

Hey! I'm not quite sure if this was part of what @BaumiCoder was proposing or not, but would it also be possible to add an option to disable spell-checking altogether? I never use it anyway, and the red dots are fairly distracting. But Tuba is awesome in general! Thanks for developing it! :D

nekohayo commented 2 months ago

My suggestion to resolve this discrepancy between Mastodon and desktop locales, without needing to create a preferences UI for it, is to cheat like this:

  1. The first time one uses a posting language: guess the spellchecker language code. It would still be better than nothing.
  2. Automatically remember which language code the user last used for each major languages for spellchecking.
  3. Auto-reassign the last used precise locale code the next time the user picks the broad language code in the composer (including the default code used when opening up the composer).

Therefore, if initially the app guessed wrong, the user can correct the app by selecting a more specific spelling locale, and then the app will remember it next time. This pretty much covers all bases with better default behavior and "smart learning", without added visual complexity.