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

Bug#265161: countrychooser: Should default to sensible option for Country if information is avaiable

Hang on, Frans (and others !), I now understand why having a default country for each
language is really not easy....and also why it works with French and
not with Dutch (after making a small change to languagechooser for
putting a default country for all languages)....

All this is because the way we currently build the "short" list of

In early countrychooser releases, this list was built at execution
time by grepping a list of supported locales and then mapping the
country code to the country names in the ISO-3166 table.

As a consequence, the list was always shown with English country names
even when the translators had translated the ISO 3166 file.

Then  someone (Evguenyi, I guess...I'm not online for checking)
proposed a patch for having the country names translated.

This patch uses an intermediate file (built at build time) with the
country names of supported countries for a given language.

For Dutch, this gives:

Belgie, Niederlande
(not sure of spelling)

For French:
Belgique, Canada, France, Luxembourg, Suisse

This list is substituted *in the countrychooser templates* to the
${SHORTLIST} variable.

As a consequence, the list in the debconf database is stored IN THE
CONFIGURED LANGUAGE, with values not being in English.

On the opther hand, the default value, deduced from languagechooser,
is stored IN ENGLISH.

Thus you get the point : the default works for French just because our
country spells exactly the same in French and English...and this fails
for most other languages....

This is VERY BAD. Having some debconf choices stored in debconf with a
localised list of choices goes against all good usage rules for

I'm currently trying to imagine a way to solve this without reverting
back to country names not being translated in the short list....

I think I have a short idea....but this may be tricky to implement.

I hope you got the point...this is not easy to explain, indeed..:-)

Reply to: