SabakiHQ / Sabaki

An elegant Go board and SGF editor for a more civilized age.
https://sabaki.yichuanshen.de/
MIT License
2.39k stars 376 forks source link

Minimal language support for speller in comments #832

Closed zorgnac closed 2 years ago

zorgnac commented 2 years ago

Sabaki v0.52.0 - linux x64

When editing comments, Sabaki underlines misspelled words with a red wave. The notion of misspelling is built-in according to some reference language - namely English - and is not affected by user interface localization. This makes editing quite uncomfortable, as you may type perfect spelling in your own language - or even worse use proper go vocabulary - and get distracted by those red waves you cannot do anything about.

Sabaki may, as a minimal support, either let the user choose not to underline misspelled, or to specify the list of languages he is editing for.

If anyone is interested, I've made patch that implements a demo of the latter alternative. It defines a new entry comments.langs in settings, and adjusts setSpellCheckerLanguages in main.js:newWindow. It's worth about 5 lines of code. There no UI here, it relies on manual editing of settings.json.

apetresc commented 2 years ago

That's a great point, thank you! Yeah, feel free to post up your initial pull request as a starting point :)

zorgnac commented 2 years ago

Not sure I've done it the expected way.

However, here is pull request #833

zorgnac commented 2 years ago

I've worked on this and added some UI around, namely a context menu in the comment box with option to replace misspelled or add to dictionary.

Shall I close the PR and replace by another one?

zorgnac commented 2 years ago

custom