desktop: no Polish spellcheck suggestions when en-US is enabled alongside pl on Windows

Aperta
#65,281 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
electron, typescript
Ambito
desktop-dev

Direzione di ricerca

Start in the desktop main process where spellcheckLanguages is read and where the Electron context-menu event builds dictionarySuggestions. Reproduce on Windows with pl + en-US, then trace how languages are passed to session.setSpellCheckerLanguages and whether runtime menu changes are applied. Done means language changes take effect without restart and Polish suggestions appear when another Hunspell language is enabled, with manual verification noted.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/desktop platform/windows type/bug version/v2
Description

In OpenCode Desktop on Windows, misspelled Polish words get the red underline, but the right-click menu shows no Polish suggestions ("No Guesses Found", or only suggestions from other enabled languages).

This happens whenever another language that uses a downloaded Hunspell dictionary (.bdic) is enabled next to pl, and the app enables en-US next to pl by default (from the system's preferred languages). Polish itself is checked by the native Windows spellchecker here (there is no pl-*.bdic in Dictionaries/; this is my assumption, not verified).

I logged the context-menu event in the main process (params.misspelledWord / params.dictionarySuggestions) on Electron 44.9.1 (Chromium 152):

Enabled languages zdrowje suggestions
pl + en-US (default) ["drowse"] (English only)
pl + lt Lithuanian only
en-US + lt + de + pl English, Lithuanian and German ones; none from Polish
pl only, from startup ["zdrowie", "zdrowej", "zdroje", "zdrowe", "zdrowia"] (works)

Also, changing the languages in the context menu while the app is running did not take effect until I restarted the app.

This is not an Electron version issue (an earlier version of this report said so; see the comments for the correction).

Workaround: untick every language except pl in the spellcheck language menu and restart the app. The choice is saved as spellcheckLanguages in opencode.settings.

Possible fixes: apply the menu change without a restart, and/or make suggestions from the native-checked language show up when Hunspell languages are also enabled (or avoid enabling en-US next to pl by default).

Caveat: this is based on observed behavior only; I did not verify it in Chromium's code.

Plugins

polystrata.autostart (local plugin, unrelated to the input/menu)

OpenCode version

Desktop 2.3.2 (CLI v2.3.2)

Steps to reproduce
  1. On Windows 11 with Polish as the only Windows language, open OpenCode Desktop 2.3.2 with default spellcheck languages (pl + en-US).
  2. In the prompt input type zdroje followed by a space. It is underlined.
  3. Right-click the word.
  4. No Polish suggestions (expected e.g. zdrowie).
  5. Untick en-US in "Spellcheck Languages", restart the app, and repeat: suggestions appear.
Screenshot
obraz obraz
Operating System

Windows 11 Pro 10.0.26300

Terminal

Not applicable: OpenCode Desktop

Lingua principale
TypeScript
Stelle
227k
Fork
30.7k
Merge medio
3h 57m
PR unite (30g)
484

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di anomalyco/opencode

Tutte le issue di anomalyco/opencode

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.