Allow additional dictionaries for the spell checker on OS X

Bug #396322 reported by Michael Wybrow
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Michael Wybrow

Bug Description

As reported by ~suv on the mailing list:

- spellcheck: none of this years development builds for osx had the
spell checker enabled. On my vanilla OS X 10.5.7 invoking the
spellchecker crashes Inkscape when closing the unfunctional dialog. In
the Spellcheck preferences panel I cannot select any languages except
<none>, console message says
** (inkscape-bin:1109): WARNING **: Error: No word lists can be found for the language "en_US".
This crash happens independant of any $LANG settings in bin/inkscape. I
need some time (or hints) to find out what's missing and how to (if
possible) configure spellcheck outside of inkscape.

Tags: osx
Changed in inkscape:
assignee: nobody → Michael Wybrow (mjwybrow)
status: New → In Progress
Revision history for this message
Michael Wybrow (mjwybrow) wrote :

Fix commited in rev21749:

 - Fix bug #396322: "Spell checker crashes the OS X package"
     - Include the aspell dictionary files in the app bundle.
     - Show an error if at least the en dictionary files are not available.
     - Replace the GtkOptionMenu (for selecting which dictionary to add
        extra words to) with a GtkComboBox since this one behaves correctly
        when it is insensitive. GtkOptionMenu is deprecated and the menu
        would appear when clicking on the insensitive widget and then could
        not be closed.

Revision history for this message
Michael Wybrow (mjwybrow) wrote :

The Inkscape-0.47-pre1-1.LEOPARD.dmg package up now on sourceforge and it includes this fix.

Changed in inkscape:
status: In Progress → Fix Released
Revision history for this message
su_v (suv-lp) wrote :

Wow, that aspell folder doubles the size of the packages!

LeWitt:Resources suv$ du -sch share/*
203M share/aspell
3.5M share/mime
206M total
LeWitt:Resources suv$

Revision history for this message
su_v (suv-lp) wrote :

- Default 'en_US' dictionary spell-checks correct, no more crashes - thanks for fixing it :)

nitpicking: Language selection does not work (only option is 'None')
- Dictionary language can't be changed in 'Preferences > Spellcheck', changing the interface language in the preferences does not influence the dictionary language options.
- setting 'export LANG="de_CH.UTF-8"' explicitly in 'Contents/Resources/bin/inkscape' changes the interface language but not the dictionary language.
- adding the option "lang de_CH;" or "lang german;"to $ASPELL_CONF in 'Contents/Resources/bin/inkscape' doesn't (allow to) change the dictionary language either.

possibly related console msgs:
07.07.09 10:32:21 LeWitt [0x0-0x5cc5cc].org.inkscape.Inkscape 32738 Notice (inkscape-bin:32739): Gdk-CRITICAL **: gdk_x11_xatom_to_atom_for_display: assertion `xatom != None' failed
07.07.09 10:32:21 LeWitt [0x0-0x5cc5cc].org.inkscape.Inkscape 32738 Notice (inkscape-bin:32739): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed

these seem to happen when mousing over/clicking the widget to select a dictionary language in the preferences dialog and when trying to select a different language in the spellcheck dialog.

Revision history for this message
su_v (suv-lp) wrote :

Mac OS X 10.5.8 (9L30)
XQuartz (xorg-server 1.4.2-apple42)
Inkscape 0.46+devel r22011, built Aug 7 2009

compiled with these spell check packages installed:

LeWitt:svn suv$ port installed | grep spell
  aspell @0.60.6_2+macosx (active)
  aspell-dict-de @20030222_0 (active)
  aspell-dict-en @6.0_0 (active)
  gtkspell2 @2.0.15_0 (active)
  hunspell @1.2.8_0 (active)
LeWitt:svn suv$

enables the a additional anguage selection in 'Preferences > Spellcheck' and subsequently 'Text > Check Spelling…'

I took up the hint about 'gtkspell2' from David Evans portfile for 'inkscape-devel'.

Revision history for this message
su_v (suv-lp) wrote :

s/a additional anguage/additional language/

Revision history for this message
su_v (suv-lp) wrote :

Reopening because build environment needs to be changed to make Inkscapes spell checker work with additional dictionaries.

Changed in inkscape:
status: Fix Released → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

seems like with ImageMagick (bug #390024)
- either not all resources are copied to the app bundle
- or some environment variable is still missing in 'bin/inkscape'
- or both?

test: rename/move $(macport-prefix), restart Inkscape
result: pref spellcheck language selection/select dictionary language are no longer available.

I don't know if it is connected to aspell or gtkspell2, but it explains why you don't see the bug as long as you have MacPorts installed with the default prefix (or with the same as when building the app).

Revision history for this message
su_v (suv-lp) wrote :

1) The spell checker dialog itself works (including the popup list with selected dictionaries) once the preferences have been set for all 3 language choices - independent whether $(macport-prefix)/share/aspell and $(macports-prefix)/lib/aspell-0.60 can be found - i.e. the 'prefix' config option seems to be in effect here and the dicts included in the bundle are in use.

2) In the Preferences dialog for Spellcheck however the popup lists for language choices (main, lang2, lang3) are not filled with available dictionaries if the aspell directories in $(maports-prefix)/lib and $(macports-prefix)/share cannot be found. It looks like the 'prefix' config option is completely ignored for this part of the spellchecker implementation.

As far as I can see having gtkspell2 installed (and included by configure) doesn't make a difference. Sorry for the misleading assumption in comment 5.

summary: - Spell checker crashes the OS X package
+ Allow additional dictionaries for the spell checker on OS X
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers