Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Second locale (not system) has no effect (ru_RU) #290

Open
badfiles opened this issue Dec 23, 2018 · 11 comments
Open

Second locale (not system) has no effect (ru_RU) #290

badfiles opened this issue Dec 23, 2018 · 11 comments

Comments

@badfiles
Copy link

It is somehow impossible to add a second locale to spell-checker.
I tried ru_RU, en_US (only US works), changed order (only US works)
ru_RU (does not work at all)
en_US (works)

System locale is en_US

Ubuntu 18.04, atom 1.33.1, spell-check 0.74.2

hunspell -D
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
/usr/share/hunspell/en_US
/usr/share/hunspell/en_CA
/usr/share/hunspell/en_AU
/usr/share/hunspell/en_GB
/usr/share/hunspell/en_ZA
/usr/share/hunspell/ru_RU
/usr/share/myspell/dicts/hyph_ru_RU
LOADED DICTIONARY:
/usr/share/hunspell/en_US.aff
/usr/share/hunspell/en_US.dic
@badfiles badfiles changed the title ru_RU Second locale (not system) has no effect (ru_RU) Dec 23, 2018
@ghost
Copy link

ghost commented Jan 10, 2019

You need to use the IETF language tag, hombre. Replace your underscores with hyphens within the add-on setting and reference https://www.iana.org/assignments/lang-subtags-templates/lang-subtags-templates.xhtml

@badfiles
Copy link
Author

I don'k know which underscores should be hyphens
screenshot from 2019-01-10 16-24-54

@ghost
Copy link

ghost commented Jan 13, 2019

Looks like the correct IETF language tags now. Perhaps the language pack can't be read from the host?

@badfiles
Copy link
Author

I never tried en_US or ru_RU, only en-US and ru-RU, but ru-RU does not work no matter if I use it alone or with en-US. en-US always works.

@dmoonfire
Copy link
Contributor

Could you look at the console when it shows the error and paste that? If it can't find the Russian dictionary, it should give an error along with the search paths it tried.

The code tries to normalize dashes and underscores. We went with IEFT tags internally and then check both the - and _ versions.

@max-underthesun
Copy link

got similar problem... second locale (ru-RU) not working for me
two languages in the file and Russian text underscored with red (all words, and no suggestions)
it looks, like only English spell-check is working

Ubuntu 18.04, Atom 1.34.0 x 64

:~$ hunspell -v
@(#) International Ispell Version 3.2.06 (but really Hunspell 1.6.2)

...

~$ /usr/bin/hunspell -D
SEARCH PATH:
.::/usr/share/hunspell:/usr/share/myspell: ...
.....
AVAILABLE DICTIONARIES (path is not mandatory for -d option):
/usr/share/hunspell/en_US
/usr/share/hunspell/ru_RU
LOADED DICTIONARY:
/usr/share/hunspell/en_US.aff
/usr/share/hunspell/en_US.dic
Hunspell 1.6.2

I have en-US, ru-RU in Settings > Locales
it is clear in the console, no errors, no warnings

@GoPavel
Copy link

GoPavel commented Mar 30, 2019

Instead of spell-check you can use linter-spell. It's bad, but not worse than a text editor, which can't call simple utilities and show the result.

@dmoonfire
Copy link
Contributor

With the changes in Atom 1.37 (now a beta), we changed how we are passing accented and non-Latin characters to Hunspell. Could you please check out the beta and see if you are still having a problem? Thank you.

@max-underthesun
Copy link

max-underthesun commented May 14, 2019

Hi @dmoonfire!
I've tried it with beta
it's working but unstable
it could work, then stop working
I've tried it next way:

  • putting some english text in the file with errors (have red underlines)
  • putting some russian text with errors (also have red underlines)
  • use suggestions to resolve errors
  • put some more text (changing between en / ru languages) with errors
  • at some moment it is stopping to underline misspelled words in any language
  • if i close and reopen file (or editor) nothing changing - still no underlining or suggestions
  • if i delete all text from the file and start typing again - it is working, but then at some moment i am getting the same behavior

thank you for this package! it is very useful (when it is working ))))

@dmoonfire
Copy link
Contributor

@max-underthesun What platform and distribution if Linux? My Russian is terrible so could you give me an example of what you are putting before using corrections?

@max-underthesun
Copy link

max-underthesun commented May 14, 2019

@dmoonfire I am on Ubuntu 18.04.2 LTS (desktop)
what am i putting? ))) some terrible stuff with tons of mistakes in nearly every word)))
like:

thisse is the anly путылка которуйю я будту drinkeng tonight и эта бутет вотка because i lovve vodka ошень сильно

this way i am changing languages in one sentence in a file (this is my usual workflow) and at some point it stopping to check errors (but it was checking both languages some time ago... sorry could't say from which version it failed)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants