← Back to team overview

openlp-core team mailing list archive

[Bug 642778] Re: enchant.DictNotFoundError: Dictionary for language 'ja_JP' could not be found

 

This bug will caused with environ LANG='ja_JP.UTF-8' and I wrote a
patch.

diff -u /tmp/orig.py /usr/lib/python2.6/site-packages/openlp/core/ui/__init__.py 
--- /tmp/orig.py	2010-09-22 02:39:49.424495290 +0900
+++ /usr/lib/python2.6/site-packages/openlp/core/ui/__init__.py	2010-09-22 02:38:39.395495963 +0900
@@ -45,7 +45,10 @@
         QtGui.QPlainTextEdit.__init__(self, *args)
         # Default dictionary based on the current locale.
         if enchant_available:
-            self.dict = enchant.Dict()
+            try:
+                self.dict = enchant.Dict()
+            except enchant.DictNotFoundError:
+                self.dict = enchant.Dict('en_US')
             self.highlighter = Highlighter(self.document())
             self.highlighter.setDict(self.dict)

-- 
enchant.DictNotFoundError: Dictionary for language 'ja_JP' could not be found
https://bugs.launchpad.net/bugs/642778
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.

Status in OpenLP - Worship Presentation Software: Confirmed

Bug description:
Traceback (most recent call last):
  File "/usr/bin/openlp", line 204, in <module>
    main()
  File "/usr/bin/openlp", line 198, in main
    sys.exit(app.run())
  File "/usr/bin/openlp", line 138, in run
    self.mainWindow = MainWindow(screens, app_version)
  File "/usr/lib/python2.6/site-packages/openlp/core/ui/mainwindow.py", line 610, in __init__
    self.plugin_manager.find_plugins(pluginpath, self.plugin_helpers)
  File "/usr/lib/python2.6/site-packages/openlp/core/lib/pluginmanager.py", line 105, in find_plugins
    plugin = p(self.plugin_helpers)
  File "/usr/lib/python2.6/site-packages/openlp/plugins/custom/customplugin.py", line 53, in __init__
    self.edit_custom_form = EditCustomForm(self.custommanager)
  File "/usr/lib/python2.6/site-packages/openlp/plugins/custom/forms/editcustomform.py", line 49, in __init__
    self.setupUi(self)
  File "/usr/lib/python2.6/site-packages/openlp/plugins/custom/forms/editcustomdialog.py", line 77, in setupUi
    self.verseTextEdit = SpellTextEdit(self)
  File "/usr/lib/python2.6/site-packages/openlp/core/ui/__init__.py", line 48, in __init__
    self.dict = enchant.Dict()
  File "/usr/lib64/python2.6/site-packages/enchant/__init__.py", line 505, in __init__
    self._switch_this(broker._request_dict_data(tag),broker)
  File "/usr/lib64/python2.6/site-packages/enchant/__init__.py", line 285, in _request_dict_data
    self._raise_error(eStr % (tag,),DictNotFoundError)
  File "/usr/lib64/python2.6/site-packages/enchant/__init__.py", line 217, in _raise_error
    raise eclass(default)
enchant.DictNotFoundError: Dictionary for language 'ja_JP' could not be found





References