thegooglecodearchive / marave

Automatically exported from code.google.com/p/marave
GNU General Public License v2.0
0 stars 0 forks source link

Can't disable spell-checker in localised interface #90

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use a non-English interface (I have German by default)
2. Try disabling the spell checker

What is the expected output? What do you see instead?
The spell checker doesn't get disabled. On the command line, I get an error 
saying
Dictionary for language 'Aus' could not be found
Note that 'Aus' is the German translation of 'None' - which gets recognized 
properly

What version of the product are you using? On what operating system?
svn r456 on Ubuntu Lucid

Please provide any additional information below.
In order to use the spellchecker, the additional package python-enchant needs 
to be installed. First, I didn't realize this and started marave without it. It 
(naturally) told me that the spell checker was disabled. In any subsequent 
attempt to restart marave, it crashed with the following traceback:
Traceback (most recent call last):
  File "../marave-editor", line 7, in <module>
    main()
  File "/home/stefan/Programmieren/python/marave-read-only/marave/main.py", line 1481, in main
    window.loadprefs()
  File "/home/stefan/Programmieren/python/marave-read-only/marave/main.py", line 879, in loadprefs
    self.setspellchecker(unicode(l.toString()))
  File "/home/stefan/Programmieren/python/marave-read-only/marave/main.py", line 912, in setspellchecker
    self.editor.initDict(self.lang)
  File "/home/stefan/Programmieren/python/marave-read-only/marave/editor/spelltextedit.py", line 79, in initDict
    self.dict = enchant.Dict(lang)
  File "/usr/lib/pymodules/python2.6/enchant/__init__.py", line 475, in __init__
    self._switch_this(broker._request_dict_data(tag),broker)
  File "/usr/lib/pymodules/python2.6/enchant/__init__.py", line 260, in _request_dict_data
    self._raise_error(eStr % (tag,),DictNotFoundError)
  File "/usr/lib/pymodules/python2.6/enchant/__init__.py", line 215, in _raise_error
    raise eclass(default)
enchant.DictNotFoundError: Dictionary for language 'Aus' could not be found
Segmentation fault

Apparently this is related to marave writing the default value 'Aus' (='None') 
into the config file during the first startup, which isn't recognized later and 
leads to a segfault. This should not happen (probably by a try/catch 
enchant.DictNotFoundError).

Original issue reported on code.google.com by st.loeffler on 4 Aug 2010 at 3:35