[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Final report from the internationalisation team meeting in Extremadura



On Tue, Sep 26, 2006 at 07:55:54PM +0200, Frans Pop wrote:
> On Tuesday 26 September 2006 00:43, Agustin Martin wrote:
> > I also suggested that might be better to disable default ispell dict
> > selection from localization-config, and test better the
> > dictionaries-common way, because it relies on really to be installed
> > dicts, tries to set reasonable fallbacks if there is no good
> > (country,lang)->dict match, and seems easier to maintain to me ;-).
> 
> This way has effectively been used during the last 6 or so months and I 
> have one major issue with it.
> 
> If I do a normal installation (with or without desktop) with en_US as 
> locale, both an American and British Ispell dictionary are installed. And 
> the default is: _British_.

Are you sure that is dictionaries-common code what is being run for ispell
dictionaries?, I see no reference in localization-config changelog. I am
looking very quickly at localization-config code, but seems that it will run
/usr/lib/localization-config/ispell.preinst, and so seems that
localization-config is taking care of this, correctly or incorrectly.
(Either I am missing something or it will not work the other way, with
/usr/lib/localization-config/sarge/dictionaries-common seeming to miss a
British entry)

With the script I use to test this kind of things, and a number of ispell
dicts and wordlists installed, I get (this just sets
debian-installer/language, voids dicts and wordlists defaults and rerun
dictionaries-common script in debug mode)

---------------------------------------------------------------------------
# ./test-dictcommon-config en_US:en_GB:es_ES
Doing with Language: en_US:en_GB:es_ES; Country: 
Trying langkey en_US
 Trying package iamerican
* Guessed [d-i]->(ispell,en,US)
  errorcode: 0; dictionaries-common/default-ispell
  Old:[unset] --> New:[american (American English)]
Not tried: bg, ca, cs, da, de, de:1, de_CH, en_AU, en_CA, en_CA:1, en_GB,
en_US:1, eo, es, fi, fo, fr, ga, gd, gl, gv, hu, it, lt, nb, nl, nn, pl, pt,
pt_BR, ru, sv, tl, uk
---
Trying langkey en_US
 Trying package wamerican
* Guessed [d-i]->(wordlist,en,US)
  errorcode: 0; dictionaries-common/default-wordlist
  Old:[unset] --> New:[american (American English)]
Not tried: bg, ca, cs, da, de, de:1, de_CH, en_AU, en_CA, en_CA:1, en_GB,
en_US:1, eo, es, fi, fo, fr, ga, gd, gl, gv, hu, it, lt, nb, nl, nn, pl, pt,
pt_BR, ru, sv, tl, uk
---------------------------------------------------------------------------

with installed

wordlists:
  miscfiles  wamerican  wbritish  wcatalan  wngerman  wspanish

ispell dictionaries:
  iamerican  ibritish  icatalan  iesperanto  ifrench  igalician-minimos
  iitalian  ingerman  inorwegian  iogerman  ipolish  ispanish  iswiss

> 
> For wordlist, only an American dictionary is installed, so there the 
> default is correct.
> 
> During past installations I have seen the actual questions being asked, 
> but for some reason I currently cannot reproduce that. However, this did 
> show the cause, because for Ispell the "default dictionary" question 
> would be asked _two_  times:
> - the first: British, manual (default: British)
> - the second: American, British, manual symlinks (default: again British,
>   probably because that was selected the first time)
> 
> The reason probably is that the installation of each individual dictionary 
> package prompts the "asking" of the "default dictionary" question and the 
> default is only determined the first time (when only British appears to 
> be available). And thus the order in which packages are installed 
> influences the final outcome.

Things behave completely different on first global install along with
dictionaries-common than for later individual dicts installation. For
individual dicts instalation is just a new alternative the user is
asked for. If at that time more than one dict is installed at the same
time shared question should be asked just once. But for installation
from scratch no question should be asked unless the relationship
between locale and dicts to be installed is strange.

However if preseeding is done by localization-config to an ispell dict
that is not to be installed, first ispell dict postinst will complain about
a bad value, and reask question. Note that localization-config does not know
which ispell dicts are to be installed the first time, so if you set
language to en_US, but only install british dict (you are free for that, of
course) the question will be explicitely prompted again because the default
link cannot be set. This should (I hope) not happen with dictionaries-common
code.

> IMO dictionaries-common should ensure that the default actually matches 
> the locale selected during installation before abandoning the use of 
> localization-config for it can be seriously considered.

dictionaries-common relies on debian-installer/{language,country} while
localization-config seems to rely on LANG, but that should not make a
difference. Which are the values of debian-installer/{language,country} and
LANG at the problematic system?

-- 
Agustin [not subscribed to debian-i18n, please cc me on replies]



Reply to: