Default wordlist selection by locale
Colin Watson
cjwatson at ubuntu.com
Fri Sep 2 07:41:36 CDT 2005
Hi,
I've got a hairy problem with installation of dictionaries as part of
the Ubuntu installation process.
Part of our policy in the Ubuntu installer is to ask as few questions as
possible, and in particular to avoid questions in the second stage
(base-config). In most cases the second stage needs to ask no questions
at all, although occasionally X can't figure out the screen resolution
and has to ask for that. However, since we upgraded to the new
dictionaries-common (currently 0.49.2) and dictionaries as part of the
aspell 0.60 transition, installations have been asking which dictionary
should be the default.
We install some set of dictionaries as dependencies of the
language-support-* packages, depending on the selected locale; for
example, language-support-en depends on wamerican and wbritish. In fact,
language-support-en is always installed in addition to any other
locale-specific language support package, so there are always multiple
dictionaries and a question will always be asked.
Now, there are various ways I could get around this:
* In the short term I'm just going to drop the priority of the
wordlist question to medium in Ubuntu; unfortunately, that leaves
/etc/dictionaries-common/words (and thus /usr/share/dict/words) as a
dangling symlink, which is obviously bad.
* I could change dc-debconf-select.pl to select a wordlist arbitrarily
in the event that none was explicitly selected. That doesn't produce
very good results, though, especially in case wamerican (say)
manages to sort before the appropriate wordlist for the primary
language the user selected.
* We often have better information about the default wordlist than
just the language part of the locale; if the user selected en_US,
then wamerican should really be the default wordlist, but if they
selected en_GB then it should be wbritish. I could have an enormous
lookup table in localechooser or something that selects a default
wordlist.
* Putting this all in localechooser is pretty nasty, though; the set
of available wordlist packages could change at any time, and I don't
want to have to keep up with it. How about having each wordlist
package declare some kind of a priority for various locales (e.g.
wamerican could be en_US:10, en_*:5, wbritish could be en_GB:10,
en_ZA:9, en_*:5, etc.)? Then something in dictionaries-common could
select a good default in case the user didn't explicitly select one,
and all the information would reside in individual packages rather
than in the installer, which is generally a good plan.
Does this make any kind of sense to any dictionary maintainers, or am I
missing something that lets me get good results already?
Thanks,
--
Colin Watson [cjwatson at ubuntu.com]
More information about the ubuntu-devel
mailing list