Ignore spell check when dictionnary is not found
offlate/ui/spellcheckedit.py
25 | 25 | class SpellCheckEdit(QTextEdit): | |
26 | 26 | def __init__(self, lang, *args): | |
27 | 27 | QTextEdit.__init__(self, *args) | |
28 | - | self.dict = enchant.Dict(lang) | |
28 | + | try: | |
29 | + | self.dict = enchant.Dict(lang) | |
30 | + | except: | |
31 | + | self.dict = None | |
29 | 32 | self.highlighter = Highlighter(self.document()) | |
30 | 33 | self.highlighter.setDict(self.dict) | |
31 | 34 |