Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird behavior #23

Closed
athosbr99 opened this issue Jun 30, 2017 · 17 comments

Comments

@athosbr99
Copy link

commented Jun 30, 2017

I installed this extension on my Visual Studio Code and I couldn't figure it out how it works or if it is working properly on my computer.

The spell check didn't worked ever on new plain text files. I tried with LaTeX files (with syntax plugins) and it only works if I reselect the language that I want to correct (I already set it by default on settings.json).

Any help would be appreciated. I'm using Windows 10 Home Single Language with Creators Update.

@bartosz-antosik

This comment has been minimized.

Copy link
Owner

commented Jun 30, 2017

Could you please help me and answer the questions below:

  1. What have you set in in settings as the language?
  2. If you switch it using the list (I mean using GUI, like you describe if I understand it correctly) then it spells correctly until it is restarted?
  3. If you would switch it using the list (like in 2) and then select SpellRight: Create/Update Workspace Settings and then restart would it spell correctly?
  4. After 3. what would be the value of language in spellright.json workspace file in .vscode directory?
@athosbr99

This comment has been minimized.

Copy link
Author

commented Jun 30, 2017

  1. I set "Portuguese". I tried "pt_BR" (since there is two kinds of portuguese) but it didn't worked.
  2. It makes the corrections immediatly when I reselect the language when using LaTeX files. It has no effect on plain text
@bartosz-antosik

This comment has been minimized.

Copy link
Owner

commented Jun 30, 2017

If you could please try 3 (Selet Ctrl+Shift+P and then select SpellRight: Create/Update Workspace Settings) and after that see what is written to workspace settings (4).

Ad. 1. I would rather try pt or pt-BR with Windows native spell checking API, but doing 3 + 4 will tell us what is the name of the dictionary you have. Then it would be easier to us to proceed with some sort of refinement/resolution for your situation.

@bartosz-antosik

This comment has been minimized.

Copy link
Owner

commented Jun 30, 2017

Also, please, if you could have a look at the DEBUG output if there is any debug output at the moment e.g. when you switch to PlainText document (which is as you say not spelled at all).

@athosbr99

This comment has been minimized.

Copy link
Author

commented Jul 1, 2017

Doing 3. created this:

{ "language": "Portuguese", "documentTypes": [ "markdown", "latex", "plaintext" ], "groupDictionaries": true, "statusBarIndicator": true, "suggestionsInHints": true, "ignoreWords": [], "ignoreRegExps": [], "ignoreFiles": [ "**/.gitignore", "**/.spellignore" ] }

It also made no effect. I had to reselect the language to make it work.

I made a GIF to explain it better:

2017-07-01_18-38-38

@athosbr99

This comment has been minimized.

Copy link
Author

commented Jul 1, 2017

I setted pt-BR on settings.json and it seemed to work on everywhere now.

bartosz-antosik pushed a commit that referenced this issue Jul 2, 2017

@bartosz-antosik

This comment has been minimized.

Copy link
Owner

commented Jul 2, 2017

Please give version 1.0.23 a try. It should fix what you observe. Should also set default language to Portuguese without need to set it anywhere in settings.

@athosbr99

This comment has been minimized.

Copy link
Author

commented Jul 2, 2017

It seemed to work. However I had to remove pt-BR from settings to work.

Is there anyway to choose between Portuguese and English?

@bartosz-antosik

This comment has been minimized.

Copy link
Owner

commented Jul 2, 2017

Generally the extension integrates all dictionaries with one region (e.g. en-UK, en-US, en-CA etc.) into one entry in the list ("English") and selects the dictionary by setting e.g. "en" in settings. So in your case "pt" would be sufficient to select Portuguese. It's done to avoid mess of having e.g. 15 English dictionaries for exotic regions. This will be maybe changed in the future or made optional etc.

Does the status bar switch display English on the list of available dictionaries? Then it is enough to select it from the list or put "en" in whichever settings (User or Workspace) to make the change permanent.

If English dictionary is not displayed you have to add it to Windows spelled languages (somewhere in Control Panel if I remember correctly and nothing changed recently with progress of Microsoft moving things to Settings).

@athosbr99

This comment has been minimized.

Copy link
Author

commented Jul 4, 2017

I mean if it there is a way to use English as a dictionary. When I click in the eye icon it only shows Portuguese and Spanish (don't know why, since my computer doesn't have anything in spanish)

@bartosz-antosik

This comment has been minimized.

Copy link
Owner

commented Jul 4, 2017

To spell in English you have to have english spelling installed in Windows. I have no idea whether "Windows Single Language" is any different but normally you have to add languages in Control Panel's Language section as you can see below:

langugage

Why do you have Spanish language in the list I cannot tell, but the extension is supposed only to list dictionaries returned by the Windows Spelling API - so it looks, somehow, like it has returned Spanish dictionary.

@athosbr99

This comment has been minimized.

Copy link
Author

commented Jul 4, 2017

the whole point of "Single Language" is that... Windows only supports one language. so no english spelling for me until I update my Windows version 😢

since my only language and dictionary is Portuguese (Brazil) it shouldn't have Spanish dictionary. but thats a minor detail I guess. you can close the issue now since it was fixed

@bartosz-antosik

This comment has been minimized.

Copy link
Owner

commented Jul 8, 2017

I have not closed this since I had to check this thoroughly but it seems you are absolutely right - Windows Single Language does not allow to install more than one language pack.

There is another option for you: You can set system variable (there where you set PATH) named "SPELLCHECKER_PREFER_HUNSPELL" to 1 and the extension will use Hunspell spellchecker in Windows 10. Then you have to install dictionaries as described in the README.md under the Note on Windows 7 Installation heading. This procedure will allow you to have as many languages/dictionaries as you wish. Please remember that the variable you set in spellright.language is the name of the dictionary (also see recently updated README.md for more on this).

@bartosz-antosik

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2017

Once again: I was wrong! My initial intuition & searches in the web (the reason I was not closing the issue for so long) were correct.

Single Language Windows edition does not allow one thing: Change of display language. It does however install other spelling dictionaries & work with them correctly. Here see Windows Single Language EN/US spelling in Polish:

windows-single-language-1

Here is Control Panel with two languages installed:

windows-single-language-2

And here is the information that what you cannot change is Display Language:

windows-single-language-3

P.S. Please let me know if this messages get to you!

@athosbr99

This comment has been minimized.

Copy link
Author

commented Jul 10, 2017

Gonna try here. I tried to install from the "new" Settings thing on Windows 10 so perhaps thats why didn't worked.

@athosbr99

This comment has been minimized.

Copy link
Author

commented Jul 10, 2017

witchcraft, it works!

image

@bartosz-antosik

This comment has been minimized.

Copy link
Owner

commented Jul 10, 2017

Great! Thanks for cooperation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.