mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
spellchecker: selects the right language when is set to system. Fixes #117
This commit is contained in:
parent
20c2f844f5
commit
b165d564e0
@ -6,6 +6,7 @@
|
|||||||
* Now OCR will work in images from retweets. It fixes a bug where TWBlue was detecting images but couldn't apply OCR on them. [#105](https://github.com/manuelcortez/TWBlue/issues/105)
|
* Now OCR will work in images from retweets. It fixes a bug where TWBlue was detecting images but couldn't apply OCR on them. [#105](https://github.com/manuelcortez/TWBlue/issues/105)
|
||||||
* TWBlue won't try to load tweets already deleted, made with Twishort. Before, if someone posted a long tweet but deleted it in the Twishort's site, TWBlue was trying to load the tweet and it was causing problems in all the client. [#113](https://github.com/manuelcortez/TWBlue/issues/113)
|
* TWBlue won't try to load tweets already deleted, made with Twishort. Before, if someone posted a long tweet but deleted it in the Twishort's site, TWBlue was trying to load the tweet and it was causing problems in all the client. [#113](https://github.com/manuelcortez/TWBlue/issues/113)
|
||||||
* TWBlue shows an error message when you try to view the profile of a user that does not exist or has been suspended. [#114,](https://github.com/manuelcortez/TWBlue/issues/114) [#115](https://github.com/manuelcortez/TWBlue/issues/115)
|
* TWBlue shows an error message when you try to view the profile of a user that does not exist or has been suspended. [#114,](https://github.com/manuelcortez/TWBlue/issues/114) [#115](https://github.com/manuelcortez/TWBlue/issues/115)
|
||||||
|
* The spellchecker module should select the right language when is set to "user default". [#117](https://github.com/manuelcortez/TWBlue/issues/117)
|
||||||
|
|
||||||
## Changes in version 0.88 and 0.89
|
## Changes in version 0.88 and 0.89
|
||||||
|
|
||||||
|
@ -19,10 +19,10 @@ class spellChecker(object):
|
|||||||
try:
|
try:
|
||||||
if config.app["app-settings"]["language"] == "system":
|
if config.app["app-settings"]["language"] == "system":
|
||||||
log.debug("Using the system language")
|
log.debug("Using the system language")
|
||||||
self.checker = SpellChecker(filters=[twitterFilter.TwitterFilter, tokenize.EmailFilter, tokenize.URLFilter])
|
self.checker = SpellChecker(languageHandler.curLang[:2], filters=[twitterFilter.TwitterFilter, tokenize.EmailFilter, tokenize.URLFilter])
|
||||||
else:
|
else:
|
||||||
log.debug("Using language: %s" % (languageHandler.getLanguage(),))
|
log.debug("Using language: %s" % (languageHandler.getLanguage(),))
|
||||||
self.checker = SpellChecker(languageHandler.getLanguage(), filters=[twitterFilter.TwitterFilter, tokenize.EmailFilter, tokenize.URLFilter])
|
self.checker = SpellChecker(languageHandler.getLanguage()[:2], filters=[twitterFilter.TwitterFilter, tokenize.EmailFilter, tokenize.URLFilter])
|
||||||
self.checker.set_text(text)
|
self.checker.set_text(text)
|
||||||
except DictNotFoundError:
|
except DictNotFoundError:
|
||||||
log.exception("Dictionary for language %s not found." % (dictionary,))
|
log.exception("Dictionary for language %s not found." % (dictionary,))
|
||||||
|
Loading…
Reference in New Issue
Block a user