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

Countrychooser commited in CVS



The newly proposed countrychooser package has been commited to HEAD.

General design ideas:
---------------------
 * All countries are proposed
    The country list, names and ISO codes are taken from the iso-codes
    package
 * The package sets up debian-installer/country debconf value
    Thus, it is able to work with the current languagechooser while
    we wait for the new proposed one (see Joey progress update for
    post-beta2)
    The default country comes from debian-installer/country
    previously set up by languagechooser (the new one will have one
    default country per language)
 * This country choice should be used after for all questions
   regarding countries
    Some issues remains-->should this draw locale rather than location?


In-depth look:
-------------

Here come the gory details..

I've taken as much stuff from languagechooser.

countrychooser alon is a very simple script, similar to
languagechooser.

The most complicated thing is the handling of the country list and
country names translations. I didn't want to end up with a huge list
of country names to be translated, thus putting a stupid pressure on
translators.

Alastair McKinstry's iso-codes package has indeed all the needed stuff
: the iso-3166.tab file which is a tab-separated file of all country
names (according to ISO-3166). This package also includes translations
for most languages (the vast majority of those we already support in
d-i).

So, I used a mechanism for building the package templates from this
iso-3166 file AND for getting the country names translations from the
iso-codes translations.

This mechanism is currently a crude shell-script which merges the
"normal" translations (the template Description) and translations
coming from iso-codes.

The drawback is that ALL country names in iso-3166.tab have to be
translated for the language list to be translated. po2debconf doesn't
use "partial" translations (I've asked Denis if something is possible
for this).

As the iso-codes package currently has very partial translations for
most languages (german has 50 fuzzy entries), I left an opportunity
for dropping more complete translations in the package. See the
"iso-codes.updated" directory and the french file there.

All this explains that the package Build-Depends on iso-codes because
I use the translations in the "mktemplates" script and build the
country list in the "get-iso-codes" script

The iso-3166.tab is needed when postinst the package. This is because
the debian-installer/country needs to keep the country ISO code, while
we select a country name. Hence the countrymap script for getting the
code from the name (script stolen from languagechooser).

I currently put this file in /etc which is BAD. Indeed, I'm
considering asking the iso-codes maintainer to build an udeb with this
file alone, in its natural location -->
/usr/share/iso-codes. Suggestions welcome.

TODO list:
----------

-clean up the english templates. I'll ask -l10n-english

-translations may start. Anyway, translators will notice they're no
 more at 100% and will start translating. But this is against a
 possibly moving target

-define the package priority. I'm not really familiar with all this,
 so suggestions are welcome. Petter worried about the additional
 question, so maybe the priority should be a bit lower than
 languagechooser (after all, that one will define a "default" country :
 France for french, Germany for german.....)

-clean up the scripts : I'm a bad programmer..:-)

-look at other places which ask for a country (mirror location,
 timezone configuration) and adapt these for using
 debian-installer/country. However, the country list there is probably
 shorter than the world country list..:-)

-add the package to initrd 

-- 




Reply to: