nextcloud / talk-desktop

šŸ’¬šŸ’» Nextcloud Talk Desktop Client Preview
https://nextcloud.com/talk
GNU Affero General Public License v3.0
170 stars 13 forks source link

Configure languages used for spell checking #771

Open st3iny opened 2 months ago

st3iny commented 2 months ago

How to use GitHub


Is your feature request related to a problem? Please describe. Currently, the spell checker defaults to the system's language on Linux. In my case this is German. However, I mostly communicate in English on Talk and the spell checker constantly shows the red underline below each word because it doesn't understand English.

image

Describe the solution you'd like Let users configure languages used for spell checking.

Describe alternatives you've considered Change my system's language. This won't fix the issue as I'm communication both in German and English regularly in Talk.

Additional context Here is a hack I'm currently using that works:

diff --git a/src/talk/talk.window.js b/src/talk/talk.window.js
index 6d69246..680847b 100644
--- a/src/talk/talk.window.js
+++ b/src/talk/talk.window.js
@@ -67,6 +67,9 @@ function createTalkWindow() {
        applyWheelZoom(window)
        setupTray(window)

+       // Configure the spell checker to use English (US) and German
+       window.webContents.session.setSpellCheckerLanguages(['en-US', 'de'])
+
        window.loadURL(TALK_WINDOW_WEBPACK_ENTRY)

        return window
ShGKme commented 2 months ago

A simple solution - use system language + Nextcloud user settings.

An alternative - provide a setting with the list of all the options.

ShGKme commented 2 months ago

Will go with use system languages as the default + local settings.