signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.51k stars 2.63k forks source link

Support Multiple Spell Check Locales / Option To Disable Spell Checker #1659

Closed Beanow closed 4 months ago

Beanow commented 6 years ago

Description

Currently js/spell_check.js detects and initializes a single locale.

When you speak different languages depending on the contact / situation, being able to switch is an important feature.

Please add:

Edit https://github.com/WhisperSystems/Signal-Desktop/issues/1659#issuecomment-341287034 / https://github.com/WhisperSystems/Signal-Desktop/issues/1659#issuecomment-341457661:

Screenshots

image Example of this feature in Chromium

Platform info

Operating System: Ubuntu 17.04 Browser: Electron app Signal version: 1.0.34

nunesgh commented 1 year ago

@scottnonnenberg-signal, would it be possible to implement on Signal Desktop something like the spell-check selection available on Chromium (screenshot), on Electron, and even on Firefox?

Screenshot at 2023-03-30 13-12-49

scottnonnenberg-signal commented 1 year ago

@nunesgh Are you saying that you've added languages to Chromium that your operating system doesn't know about? Can you talk more about why you've done things that way?

arekm commented 1 year ago

Small note. On Linux there is no such thing as "OS knows about languages". You simply have spell check application installed for which you can install tens of dictionaries for different languages for it on single system. Other apps can use it.

For example mentioned Electron uses hunspell engine and dictionaries (on Linux and on Windows). On my example system I can have that much different hunspell dictionaries/languages. On single system.

$ apt-cache search hunspell | grep dictionary | wc -l
85
nunesgh commented 1 year ago

@nunesgh Are you saying that you've added languages to Chromium that your operating system doesn't know about? Can you talk more about why you've done things that way?

@scottnonnenberg-signal, I have never enjoyed how user interfaces behave when using languages other than English, the language oftentimes they are built for. Usually what happens is a direct translation of words and sentences without considering the actual characters count available on the interface. As a result, users get an interface full of incomplete sentences cutoff with "..." in the end, particularly on menus. To get rid of translated interfaces was one of the main reasons why I learned English as a teenager.

So once I was able to have my whole system on English only, I just stopped installing language packs at all, even sometimes at the expense of spell checking. That is why I think the currently available spell-check selection on Chromium and Firefox is a really nice user experience, and it is also being adopted on other Electron-based software, e.g. Joplin.

Moreover, as @arekm mentioned, I could not find a way of making Signal Desktop acknowledge the existence of other language packs on my Linux Mint system even after installing the Portuguese one, and there is no way of selecting more than one Language, Region, or Time format at the same time.

Screenshot at 2023-03-30 13-48-58

Screenshot at 2023-03-30 13-49-08

cobordism commented 1 year ago

Just to clear up an remaining confusion here, current versions of Signal Desktop are set up to handle multiple spell-check locales, as taken from the system. The option to disable spell check overall also exists.

If you are having trouble setting up spell-check as desired on your machine, please file a new bug.

This is disingenuous.

When typing text in for example Firefox, Chrome, Chromium, Brave, Vivaldi, Thunderbird, and Libre Office, I can change the spellchecker language with a simple right click. In Libre Office I can change it even on a per paragraph basis.

Nothing like this works in Signal desktop. So whatever it is you are referring to, it sure doesn't show up by the time a user interacts with the app.

cobordism commented 1 year ago

@nunesgh The thought was that you could choose that secondary language at the OS level, and Desktop would pick it up and have spellcheck that worked for both languages.

The problem is that most software systems - Ubuntu and Signal included - are written with a very monolingual mindset. The multi-language support boils down to the ability to add a second language -- and if I do this, it will install translated versions of everything and then I will be able to choose that other one single language the next time I log in.

I have many hunspell dictionaries installed. I even customised some by hand (yes really). And while it can happen that I write a message to someone in Hungarian on Signal Desktop and could very much use the help of a spellchecker, I do not want to have to log out of my session, log back in with every app and every menu being Hungarian, re-open Signal, write my message, log back out, switch back to English, log back in....

So even if the OS exists in many languages, that does not mean it is multilingual, and relying on the system language for spellchecking does not mean you support multilingual use. It means you support one single language at a time which does not necessarily have to be English.

Therefore me and many others in this thread ask, beseech, and implore you to please allow Signal Desktop to tie in to a system like hunspell in the same way as everyone else has done from Firefox to Chrome, from Element to Telegram, from Libre Office to Thunderbird to .. well all except Discord really. This is not about "ungrateful users reporting as bugs what really should be a feature request". This is people genuinely reporting a pain point in this app that is clearly common and widespread and for which there is ample precedent in other apps.

please file a new bug.

Do you really want me to do this?

jamiebuilds-signal commented 1 year ago

What @scottnonnenberg is referring to is a recent change I made to pick up multiple locales that are configured but only ones configured at the OS level, and we now use that to "resolve" a locale for our translations. We've discussed adding user preference in the app to allow users to configure multiple locales, but there is something else we can and would need to do in the meantime.

The framework we use does allow you to configure multiple spellchecker locales, but it looks like we only use the "resolved locale" for our translations (aka the language we pick to render the UI in based on the OS selection). We could pass in multiple preferred languages there.

I will make that change and test it out before the next release.

nunesgh commented 1 year ago

@jamiebuilds-signal, thank you for your reply!

We could pass in multiple preferred languages there.

How would the preferred languages be selected? From the list of OS language packs installed on the system or from user's input, e.g. as in Chromium?

jamiebuilds-signal commented 1 year ago

@nunesgh If you mean in a separate app instance of Chromium, no we would not load locales from there, we only ever pull from the operating system itself using common OS APIs. In the future we may have something in our Preferences menu, but not at the moment.

Instructions for some common operating systems:

On various Linux distros the steps can get much more involved, and I'm not going to be able to test them all out myself, but in general we're just using what we get from g_get_language_names on Linux as that's what our app framework uses. Which itself pulls from the LANGUAGE environment variable

For example:

LANGUAGE=de:en_US
# Returns: "de", "en_US", "en", "C"
# Don't ask me why the default locale is "C", I have no clue

# The full list of env variables it will attempt to lookup from:
# LANGUAGE, LC_ALL, LC_MESSAGES and LANG
jamiebuilds-signal commented 1 year ago

Another note: On macOS we use native spellchecking APIs which we cannot configure at all, but it seems to work fairly well with these instructions support.apple.com/guide/mac-help/mh26684/mac

tgy commented 1 year ago

As someone who is just reading this thread (and I'm most definitely not the only one), just wanted to thank @jamiebuilds-signal and @scottnonnenberg-signal for their work, and other contributors who fuel this thread with valuable info. :) Cheers

RalfJung commented 1 year ago

When I try to configure multiple languages with KDE, I get a big warning:

"Putting American English above other languages will cause undesired behavior in some applications. If you would like your system to use American English, remove all other languages."

I don't know what this warning is about, but it surely doesn't make me confident that this approach to multi-lang configuration will work as intended.

EDIT: https://bugs.kde.org/show_bug.cgi?id=465449 has some background. Looks like setting the language to en_US:de_DE doesn't work properly since many apps don't have en_US -- they use that as the default language, which is the C locale.

jamiebuilds-signal commented 1 year ago

FYI -- Multi-language Spellchecking was released in 6.14.0

nunesgh commented 1 year ago

Hi @jamiebuilds-signal! Thank you for your work!

FYI -- Multi-language Spellchecking was released in 6.14.0

I have installed the new version and the feature still does not work on my Linux Mint system.

Screenshot at 2023-04-12 18-34-27 Screenshot at 2023-04-12 18-58-17 Screenshot at 2023-04-12 18-35-56

Unfortunately, I think this approach for setting spellchecking on Linux is unreliable.

jamiebuilds-signal commented 1 year ago

@nunesgh Would you mind sharing a debuglog?

nunesgh commented 1 year ago

@nunesgh Would you mind sharing a debuglog?

Of course, @jamiebuilds-signal! Here it is: debuglog.

jamiebuilds-signal commented 1 year ago

@nunesgh Interesting, it seems we're getting only en in your locales.

INFO  2023-04-12T22:24:56.284Z app.ready: preferred system locales: en-US, en
INFO  2023-04-12T22:24:56.291Z Loading preferred system locale: 'en-US'
WARN  2023-04-12T22:24:56.291Z Problem loading messages for locale 'en-US', Error: ENOENT, _locales/en-US/messages.json not found in [REDACTED]
WARN  2023-04-12T22:24:56.291Z Falling back to parent language: 'en'
...
INFO  2023-04-12T22:24:56.351Z spellcheck: user locales: ["en-US","en"]
INFO  2023-04-12T22:24:56.352Z spellcheck: available spellchecker languages: ["af","bg","ca","cs","cy","da","de","de-DE","el","en","en-AU","en-CA","en-GB","en-GB-oxendict","en-US","es","es-419","es-AR","es-ES","es-MX","es-US","et","fa","fo","fr","fr-FR","he","hi","hr","hu","hy","id","it","it-IT","ko","lt","lv","nb","nl","pl","pt","pt-BR","pt-PT","ro","ru","sh","sk","sl","sq","sr","sv","ta","tg","tr","uk","vi"]
INFO  2023-04-12T22:24:56.352Z spellcheck: setting languages to: ["en-US","en"]

If you just run locale what is the output of that?

jamiebuilds-signal commented 1 year ago

@RalfJung We actually don't support an en-US specific locale either, we just fallback to en if you set that. So you could specify it on your system with just en

nunesgh commented 1 year ago

@jamiebuilds-signal, here is the output for locale:

Screenshot at 2023-04-12 19-52-21

MarcoSmeulders commented 1 year ago

When I run signal-desktop on Ubuntu 22.04 with the Dutch locale using LOCALE=nl signal-desktop at the commandline

The spell checker is set

{"level":30,"time":"2023-04-29T13:00:09.749Z","msg":"spellcheck: user locales: [\"nl\"]"}
{"level":30,"time":"2023-04-29T13:00:09.750Z","msg":"spellcheck: available spellchecker languages: [\"af\",\"bg\",\"ca\",\"cs\",\"cy\",\"da\",\"de\",\"de-DE\",\"el\",\"en\",\"en-AU\",\"en-CA\",\"en-GB\",\"en-GB-oxendict\",\"en-US\",\"es\",\"es-419\",\"es-AR\",\"es-ES\",\"es-MX\",\"es-US\",\"et\",\"fa\",\"fo\",\"fr\",\"fr-FR\",\"he\",\"hi\",\"hr\",\"hu\",\"hy\",\"id\",\"it\",\"it-IT\",\"ko\",\"lt\",\"lv\",\"nb\",\"nl\",\"pl\",\"pt\",\"pt-BR\",\"pt-PT\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sq\",\"sr\",\"sv\",\"ta\",\"tg\",\"tr\",\"uk\",\"vi\"]"}
{"level":30,"time":"2023-04-29T13:00:09.750Z","msg":"spellcheck: setting languages to: [\"nl\"]"}

And the app runs with Dutch localization (windows etc. are all fine) but no spelling suggestions appear.

Using LOCALE=en signal-desktop works correctly

~$ localectl list-locales
C.UTF-8
en_AG.UTF-8
en_AU.UTF-8
en_BW.UTF-8
en_CA.UTF-8
en_DK.UTF-8
en_GB.UTF-8
en_HK.UTF-8
en_IE.UTF-8
en_IL.UTF-8
en_IN.UTF-8
en_NG.UTF-8
en_NZ.UTF-8
en_PH.UTF-8
en_SG.UTF-8
en_US.UTF-8
en_ZA.UTF-8
en_ZM.UTF-8
en_ZW.UTF-8
nl_AW.UTF-8
nl_BE.UTF-8
nl_NL.UTF-8
~$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=nl_NL.UTF-8
LC_TIME=nl_NL.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=nl_NL.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=nl_NL.UTF-8
LC_NAME=nl_NL.UTF-8
LC_ADDRESS=nl_NL.UTF-8
LC_TELEPHONE=nl_NL.UTF-8
LC_MEASUREMENT=nl_NL.UTF-8
LC_IDENTIFICATION=nl_NL.UTF-8
LC_ALL=
cobordism commented 1 year ago

tying spellchecking exclusively to the installed locales - as opposed to freely using any and all installed dictionaries - is a mistake. As long as that decision isn't reversed, I doubt this issue will ever really be resolved.

kierun commented 1 year ago

tying spellchecking exclusively to the installed locales - as opposed to freely using any and all installed dictionaries - is a mistake. As long as that decision isn't reversed, I doubt this issue will ever really be resolved.

This issue is marked as closed.

Yet, we still do not have decent multi-language spell checking.

I tried signal-desktop-6.16.0-1.1.x86_64 (Fedora) with LOCALE=en-GB /usr/bin/signal-desktop --use-tray-icon and I do not have any spell checking enabled. Not one.

The flatpak version at least has one language spellchecking – I am unable to set which one, it just picked one at random. However, it does not obey .XCompose key bindings.

I :100: get volunteer projects and the pressure the developers are under. That said, this has been an issue for 6 years, which explains the frustration we users have…

jamiebuilds-signal commented 1 year ago

@cobordism The output from the above debuglog does show that it's pulling from installed dictionaries (it includes locales like tg and en-GB which are not locales we support in our translations).

...
{..."msg":"spellcheck: available spellchecker languages: [\"af\",\"bg\",\"ca\",\"cs\",\"cy\",\"da\",\"de\",\"de-DE\",\"el\",\"en\",\"en-AU\",\"en-CA\",\"en-GB\",\"en-GB-oxendict\",\"en-US\",\"es\",\"es-419\",\"es-AR\",\"es-ES\",\"es-MX\",\"es-US\",\"et\",\"fa\",\"fo\",\"fr\",\"fr-FR\",\"he\",\"hi\",\"hr\",\"hu\",\"hy\",\"id\",\"it\",\"it-IT\",\"ko\",\"lt\",\"lv\",\"nb\",\"nl\",\"pl\",\"pt\",\"pt-BR\",\"pt-PT\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sq\",\"sr\",\"sv\",\"ta\",\"tg\",\"tr\",\"uk\",\"vi\"]"}
...

I'm not sure why certain Linux distros are not showing spellchecking even when dictionaries are installed. If someone can post a full debuglog I can check for a couple different possible problems. https://support.signal.org/hc/en-us/articles/360007318591-Debug-Logs-and-Crash-Reports#desktop_debug

kierun commented 1 year ago

@jamiebuilds-signal Here it is. Signal's version is signal-desktop-6.16.0-1.1.x86_64 via Fedora. Kindly let me know if you need further information.

debuglog.txt

Click to view the command used and its output ```bash √ ; LOCALE=en-GB /usr/bin/signal-desktop --use-tray-icon Set Windows Application User Model ID (AUMID) { appUserModelId: 'org.whispersystems.signal-desktop' } NODE_ENV production NODE_CONFIG_DIR /usr/libexec/signal-desktop/config NODE_CONFIG {} ALLOW_CONFIG_MUTATIONS undefined HOSTNAME undefined NODE_APP_INSTANCE undefined SUPPRESS_NO_CONFIG_WARNING undefined SIGNAL_ENABLE_HTTP undefined userData: /home/yann/.config/Signal config/get: Successfully read user config file config/get: Successfully read ephemeral config file making app single instance {"level":30,"time":"2023-05-04T10:16:59.206Z","msg":"app.ready: preferred system locales: en-GB, en"} {"level":30,"time":"2023-05-04T10:16:59.207Z","msg":"locale: Supported locales: af-ZA, ar, az-AZ, bg-BG, bn-BD, bs-BA, ca, cs, da, de, el, en, es, et-EE, eu, fa-IR, fi, fr, ga-IE, gl-ES, gu-IN, he, hi-IN, hr-HR, hu, id, it, ja, ka-GE, kk-KZ, km-KH, kn-IN, ko, ky-KG, lt-LT, lv-LV, mk-MK, ml-IN, mr-IN, ms, my, nb, nl, pa-IN, pl, pt-BR, pt-PT, ro-RO, ru, sk-SK, sl-SI, sq-AL, sr-RS, sr-YR, sv, sw, ta-IN, te-IN, th, tl-PH, tr, ug, uk-UA, ur, vi, yue, zh-CN, zh-HK, zh-TW"} {"level":30,"time":"2023-05-04T10:16:59.207Z","msg":"locale: Preferred locales: en-GB, en"} {"level":30,"time":"2023-05-04T10:16:59.209Z","msg":"locale: Matched locale: en"} {"level":30,"time":"2023-05-04T10:16:59.257Z","msg":"app ready"} {"level":30,"time":"2023-05-04T10:16:59.258Z","msg":"starting version 6.16.0"} {"level":30,"time":"2023-05-04T10:16:59.258Z","msg":"media access status [object Undefined] [object Undefined]"} {"level":30,"time":"2023-05-04T10:16:59.258Z","msg":"got fast theme-setting value dark"} {"level":30,"time":"2023-05-04T10:16:59.260Z","msg":"got fast theme-setting value dark"} {"level":30,"time":"2023-05-04T10:16:59.260Z","msg":"got fast spellcheck setting true"} {"level":30,"time":"2023-05-04T10:16:59.260Z","msg":"getSystemTraySetting saw --use-tray-icon flag. Returning MinimizeToSystemTray"} {"level":30,"time":"2023-05-04T10:16:59.261Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":681,\"height\":513,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":true,\"titleBarStyle\":\"default\",\"titleBarOverlay\":false,\"backgroundColor\":\"#121212\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":true,\"nodeIntegration\":false,\"nodeIntegrationInWorker\":false,\"sandbox\":false,\"contextIsolation\":true,\"preload\":\"[REDACTED]/preload.bundle.js\",\"backgroundThrottling\":true,\"enablePreferredSizeMode\":true,\"disableBlinkFeatures\":\"Accelerated2dCanvas,AcceleratedSmallCanvases\"},\"icon\":\"[REDACTED]/images/signal-logo-desktop-linux.png\",\"x\":1012,\"y\":214}"} {"level":30,"time":"2023-05-04T10:16:59.284Z","msg":"spellcheck: user locales: [\"en-GB\",\"en\"]"} {"level":30,"time":"2023-05-04T10:16:59.284Z","msg":"spellcheck: available spellchecker languages: [\"af\",\"bg\",\"ca\",\"cs\",\"cy\",\"da\",\"de\",\"de-DE\",\"el\",\"en\",\"en-AU\",\"en-CA\",\"en-GB\",\"en-GB-oxendict\",\"en-US\",\"es\",\"es-419\",\"es-AR\",\"es-ES\",\"es-MX\",\"es-US\",\"et\",\"fa\",\"fo\",\"fr\",\"fr-FR\",\"he\",\"hi\",\"hr\",\"hu\",\"hy\",\"id\",\"it\",\"it-IT\",\"ko\",\"lt\",\"lv\",\"nb\",\"nl\",\"pl\",\"pt\",\"pt-BR\",\"pt-PT\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sq\",\"sr\",\"sv\",\"ta\",\"tg\",\"tr\",\"uk\",\"vi\"]"} {"level":30,"time":"2023-05-04T10:16:59.284Z","msg":"spellcheck: setting languages to: [\"en-GB\",\"en\"]"} {"level":30,"time":"2023-05-04T10:16:59.292Z","msg":"MainSQL: updateSchema:\n Current user_version: 81;\n Most recent db schema: 81;\n SQLite version: 3.39.4;\n SQLCipher version: 4.5.3 community;\n (deprecated) schema_version: 358;\n"} {"level":30,"time":"2023-05-04T10:16:59.689Z","msg":"got fast theme-setting value dark"} {"level":30,"time":"2023-05-04T10:17:00.417Z","msg":"got fast spellcheck setting true"} {"level":30,"time":"2023-05-04T10:17:00.428Z","msg":"System tray service: created"} {"level":30,"time":"2023-05-04T10:17:00.428Z","msg":"System tray service: updating main window. Previously, there was not a window, and now there is"} {"level":30,"time":"2023-05-04T10:17:00.428Z","msg":"System tray service: rendering no tray"} {"level":30,"time":"2023-05-04T10:17:00.428Z","msg":"System tray service: enabling"} {"level":30,"time":"2023-05-04T10:17:00.429Z","msg":"System tray service: rendering the tray"} {"level":30,"time":"2023-05-04T10:17:00.429Z","msg":"System tray service: creating the tray"} {"level":30,"time":"2023-05-04T10:17:00.433Z","msg":"Begin ensuring permissions"} {"level":30,"time":"2023-05-04T10:17:00.433Z","msg":"main window is ready-to-show"} {"level":30,"time":"2023-05-04T10:17:00.434Z","msg":"showing main window"} {"level":30,"time":"2023-05-04T10:17:00.450Z","msg":"System tray service: rendering the tray"} {"level":30,"time":"2023-05-04T10:17:00.492Z","msg":"Ensuring file permissions for 4 files"} {"level":30,"time":"2023-05-04T10:17:00.495Z","msg":"Finish ensuring permissions in 62ms"} {"level":30,"time":"2023-05-04T10:17:01.022Z","msg":"Updating BrowserWindow config: %s {\"maximized\":false,\"autoHideMenuBar\":true,\"fullscreen\":false,\"width\":683,\"height\":516,\"x\":1625,\"y\":24}"} {"level":30,"time":"2023-05-04T10:17:01.023Z","msg":"config/set: Saving ephemeral config to disk"} {"level":30,"time":"2023-05-04T10:17:01.024Z","msg":"config/set: Saved ephemeral config to disk"} {"level":30,"time":"2023-05-04T10:17:01.187Z","msg":"sending `database-ready`"} {"level":30,"time":"2023-05-04T10:17:01.770Z","msg":"Prevent display sleep service: allowing display sleep"} {"level":30,"time":"2023-05-04T10:17:01.770Z","msg":"Background throttling enabled because no call is active"} {"level":30,"time":"2023-05-04T10:17:03.168Z","msg":"Updating BrowserWindow config: %s {\"maximized\":false,\"autoHideMenuBar\":true,\"fullscreen\":false,\"width\":684,\"height\":516,\"x\":819,\"y\":614}"} {"level":30,"time":"2023-05-04T10:17:03.169Z","msg":"config/set: Saving ephemeral config to disk"} {"level":30,"time":"2023-05-04T10:17:03.169Z","msg":"config/set: Saved ephemeral config to disk"} {"level":30,"time":"2023-05-04T10:17:08.130Z","msg":"updater/start: Updates disabled - not starting new version checks"} {"level":30,"time":"2023-05-04T10:17:08.225Z","msg":"App loaded - time: 8970"} {"level":30,"time":"2023-05-04T10:17:08.225Z","msg":"SQL init - time: 38"} {"level":30,"time":"2023-05-04T10:17:08.225Z","msg":"Preload - time: 617"} {"level":30,"time":"2023-05-04T10:17:08.225Z","msg":"WebSocket connect - time: 1699"} {"level":30,"time":"2023-05-04T10:17:08.225Z","msg":"Processed count: 1664"} {"level":30,"time":"2023-05-04T10:17:08.225Z","msg":"Messages per second: 250.0751427712654"} {"level":30,"time":"2023-05-04T10:17:08.613Z","msg":"MainSQL: slow query saveMessages duration=250ms"} {"level":30,"time":"2023-05-04T10:17:14.046Z","msg":"MainSQL: slow query removeMessages duration=91ms"} [105624:0504/111714.135823:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.135973:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.138338:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.138401:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.139100:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.139161:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.141631:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.141677:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.142396:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.142440:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.370950:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.371114:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.371190:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.371257:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.371856:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.371931:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.372760:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.372922:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.373567:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.373689:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.374451:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111714.374555:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory {"level":30,"time":"2023-05-04T10:17:15.257Z","msg":"got fast theme-setting value dark"} {"level":30,"time":"2023-05-04T10:17:15.496Z","msg":"got fast theme-setting value dark"} [105624:0504/111715.855419:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111715.855576:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111715.855707:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111715.855833:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111715.855992:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111715.856106:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111715.856209:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111715.856302:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111715.858383:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111715.858512:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111715.859252:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111715.859365:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.130756:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.130942:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.131523:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.131642:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.132300:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.132418:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.133090:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.133211:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.137551:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.137684:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.752669:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.752813:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.753098:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.753174:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.756433:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.756512:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.759107:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.759201:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.765497:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RED_8, share_between_threads: 0, gmb_type: shared_memory [105624:0504/111716.765711:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: RG_88, share_between_threads: 0, gmb_type: shared_memory {"level":30,"time":"2023-05-04T10:17:20.983Z","msg":"Updating BrowserWindow config: %s {\"maximized\":false,\"autoHideMenuBar\":false,\"fullscreen\":false,\"width\":683,\"height\":515,\"x\":666,\"y\":591}"} {"level":30,"time":"2023-05-04T10:17:20.983Z","msg":"config/set: Saving ephemeral config to disk"} {"level":30,"time":"2023-05-04T10:17:20.984Z","msg":"config/set: Saved ephemeral config to disk"} {"level":30,"time":"2023-05-04T10:17:22.738Z","msg":"got fast theme-setting value dark"} {"level":30,"time":"2023-05-04T10:17:22.978Z","msg":"got fast theme-setting value dark"} {"level":30,"time":"2023-05-04T10:17:59.981Z","msg":"before-quit event {\"readyForShutdown\":false,\"shouldQuit\":false}"} {"level":30,"time":"2023-05-04T10:17:59.981Z","msg":"System tray service: markShouldQuit"} {"level":30,"time":"2023-05-04T10:17:59.981Z","msg":"close event {\"readyForShutdown\":false,\"shouldQuit\":true}"} {"level":30,"time":"2023-05-04T10:17:59.982Z","msg":"System tray service: not rendering the tray, quitting"} {"level":30,"time":"2023-05-04T10:17:59.982Z","msg":"requestShutdown: Requesting close of mainWindow..."} {"level":30,"time":"2023-05-04T10:18:00.135Z","msg":"MainSQL: slow query close duration=123ms"} {"level":30,"time":"2023-05-04T10:18:00.136Z","msg":"requestShutdown: Response received"} {"level":30,"time":"2023-05-04T10:18:00.139Z","msg":"before-quit event {\"readyForShutdown\":true,\"shouldQuit\":true}"} {"level":30,"time":"2023-05-04T10:18:00.139Z","msg":"System tray service: markShouldQuit"} {"level":30,"time":"2023-05-04T10:18:00.139Z","msg":"close event {\"readyForShutdown\":true,\"shouldQuit\":true}"} {"level":30,"time":"2023-05-04T10:18:00.170Z","msg":"System tray service: updating main window. Previously, there was a window, and now there is not"} {"level":30,"time":"2023-05-04T10:18:00.170Z","msg":"System tray service: rendering no tray"} ```
kierun commented 1 year ago

I feel that there are many things here:

  1. Disable spell checked: That is done.
  2. Multi-language support for spell checker: That is not done. This is a new feature.
  3. Using LOCAL as a setting for spell checker: Is this a bug, or wrong choice?
  4. Some versions of Signal packaging do not have one language spell checking.
  5. Did I miss anything?

Maybe we should break this into different issues? ¯\_(ツ)_/¯

mu-aleph commented 1 year ago

$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal

$ locale | grep ^LANG= LANG=en_AU.UTF-8

$ cat ~/.config/Signal/Preferences {"browser":{"enable_spellchecking":true},"electron":{"media":{"device_id_salt":"XXXXXXXXXXXXXXXXXXX"}},"spellcheck":{"dictionaries":["en-AU","en"],"dictionary":""}}

Changing en-AU to en_AU in the above 'Preferences' file for v6.17.1 prod seems to have fixed the spell check issue for me.

kierun commented 1 year ago

"spellcheck":{"dictionaries":["en-AU","en"]

Now, if this could allow multiple dictionary entries, that would be fantastic.

nunesgh commented 10 months ago

Hi! Any update on this? Version 6.39.0 has brought the option of changing the whole app's language, but still nothing related to multi-languages spell check.

Mark3xtrm commented 9 months ago

+1

nunesgh commented 5 months ago

Hi! Any update on this?

It is so disappointing that this issue is still ongoing after so many years.

jamiebuilds-signal commented 4 months ago

For most users, multiple spellchecker locales is working today and has an option to disable it.

For anyone it's not currently working, what you can do to help is provide as much detail as possible about your operating system, language and keyboard settings, and for linux users how you install Signal, your locale environment variables, and anything unique about your setup that could affect the loading of dictionaries

And as always, please share a debuglog or there's little to no investigation that can be done.

I'm going to close this issue as this point, it should just be OS-specific bug reports.

Compizfox commented 4 months ago

For most users, multiple spellchecker locales is working today and has an option to disable it.

Maybe I missed it in the comments above, but can you explain how to use multi-language spellchecking in Signal? In the settings, I only see an option for the UI language, which is something different, and only allows a single language. There is no setting for spellchecking languages, as far as I can find.

jamiebuilds-signal commented 4 months ago

If you have multiple preferred languages configured in your OS settings, we will attempt to load dictionaries for any that we support.

This configuration is OS-specific:

In the logs we're able to see what we loaded from your operating system, what the available spellchecker languages in your version of signal are, and what we resolved them to:

spellcheck: user locales: ["en-US","es-US"]
spellcheck: available spellchecker languages: ["af","bg","ca","cs","cy","da","de","de-DE","el","en","en-AU","en-CA","en-GB","en-GB-oxendict","en-US","es","es-419","es-AR","es-ES","es-MX","es-US","et","fa","fo","fr","fr-FR","he","hi","hr","hu","hy","id","it","it-IT","ko","lt","lv","nb","nl","pl","pt","pt-BR","pt-PT","ro","ru","sh","sk","sl","sq","sr","sv","ta","tg","tr","uk","vi"]
spellcheck: setting languages to: ["en-US","es-US"]
drzraf commented 4 months ago

https://github.com/signalapp/Signal-Desktop/issues/1659#issuecomment-1490893656 said it all.

The code-path is relying on app.getPreferredSystemLanguages() which, on Linux depends on GLib's g_get_language_names which relies on LANGUAGE=xx:yy:zz.

and it works. Eg LANGUAGE=fr:es signal-desktop will enable two languages, assuming these locales are installed on the system.

but there is this --lang argument:

https://github.com/signalapp/Signal-Desktop/blob/72169820ebad71573c1125f3e2df91c04c0f96ab/app/main.ts#L1669

which is casted to string:

https://github.com/signalapp/Signal-Desktop/blob/72169820ebad71573c1125f3e2df91c04c0f96ab/app/main.ts#L212

So signal-desktop --lang=fr,es,de won't work because (neither using :) $ node -e "console.log(Intl.getCanonicalLocales('en-US,fr'));" leads to catching (and ignoring) the

RangeError: Incorrect locale information provided

For a Linux user, I'm not sure this situation is good enough:

daniel-krysiak commented 4 months ago

Sorry, but changing the app language is not a solution. It doesn't help if someone is talking to multiple people using different languages. At least we should be able to change the spellcheck with right-click context menu, like I'm doing right in my browser for the purpose of this message. Ideally, Signal should remember the chosen spellcheck per contact and group.

kierun commented 4 months ago

@daniel-krysiak

Sorry, but changing the app language is not a solution. It doesn't help if someone is talking to multiple people using different languages. At least we should be able to change the spellcheck with right-click context menu, like I'm doing right in my browser for the purpose of this message. Ideally, Signal should remember the chosen spellcheck per contact and group.

This is what some of us have been arguing from the start.

My personal use case is that in some channels I speak English; in others, I speak French; and in some I mix both. Currently, I can only have one spell checker. Even that is limited, as I cannot add/remove words to any dictionary. Even having both languages spell checkers enable at the same time would be good even if it could lead to confusion. However, I cannot even do that using flatpak

This is the solution:

sudo flatpak override --env=LANGUAGE=en-GB:fr-FR org.signal.Signal

This will enable both English and French spell checking at once.

Compizfox commented 4 months ago

If you have multiple preferred languages configured in your OS settings, we will attempt to load dictionaries for any that we support.

This configuration is OS-specific:

* **Windows**: `Settings > Time & language > Language & region > Preferred Languages > Add a language`

* **macOS**: `System Settings > General > Language & Region > Preferred Languages > +`

* **Linux**: For your specific operating system, you'll need to lookup how to setup multiple languages. Sometimes there is a system setting (sometimes labelled "input sources"), other times there are scripts you can run, or environment variables you need to modify.

In the logs we're able to see what we loaded from your operating system, what the available spellchecker languages in your version of signal are, and what we resolved them to:

spellcheck: user locales: ["en-US","es-US"]
spellcheck: available spellchecker languages: ["af","bg","ca","cs","cy","da","de","de-DE","el","en","en-AU","en-CA","en-GB","en-GB-oxendict","en-US","es","es-419","es-AR","es-ES","es-MX","es-US","et","fa","fo","fr","fr-FR","he","hi","hr","hu","hy","id","it","it-IT","ko","lt","lv","nb","nl","pl","pt","pt-BR","pt-PT","ro","ru","sh","sk","sl","sq","sr","sv","ta","tg","tr","uk","vi"]
spellcheck: setting languages to: ["en-US","es-US"]

Thanks for the elaborate response!

KDE Plasma warns me when I'm trying to set multiple languages system-wide:

image

I agree that this is probably not a good solution, since the LANGUAGE environment variable also influences the preferred language for UI translations (using GNU gettext). Apparently the problem is that many software does not have an 'explicit' English translation, rather, it's the default, so setting for example LANG="en-US:nl-NL" causes software to get translated to Dutch (which I don't want) because it can't find the en-US translation.

For now, I've just modified Signal's .desktop file to set LANGUAGE="en-US:nl-NL" for Signal specifically.

I would still prefer an setting in Signal for this, instead of Signal inferring it from the LANGUAGE environment variable, but this works.