Comment 39 for bug 66015

Revision history for this message
In , Era+mozilla (era+mozilla) wrote :

> var isoStrArray = list[i].split("-");

This splits the lc and RC on hyphen, but if they are not hyphen-separated, it doesn't manage to split them properly. Most other tools on Linux (OpenOffice, for example) have the underscore as separator. So the problem isn't really in the code per se, but in the assumption that the dictionary file names will be using a hyphen between these parts.

(The Debian workaround is to install symlinks lc-RC -> lc_RC for each installed dictionary, but that has other problems, as mentioned above.)

My proposed fix would simply use an underscore and be done with it, but that requires Windows (and Mac?) dictionaries to be named according to the Linux / ISO convention. Who controls that, are the Windows and Mac spelling dictionaries distributed by Mozilla or by a third party? Or anyway, perhaps the code could use a different separator on different platforms, but I'm not enough versed in JavaScript to know how to do that elegantly and idiomatically. Or well, perhaps it can split on *either* hyphen or underscore, which should work with minimal fuss on all platforms.

(A crude patch is available as an attachment to the Launchpad bug linked above, but it's completely trivial.)