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

Re: languagechooser: country codes should be uppercase



[Alastair McKinstry]
> If I understand you correctly, you mean to input, eg. "[ca] Canada"
> to cdebconf, with "Canada" being displayed and "ca" being returned.
> That would be useful; I could use the same code in kbd-chooser to
> tidy its display.  Alternatively we could implement a lookup in the
> code to translate "Canada" -> "ca", if necessary.

Yes, you understand what I want.  Of course, we could use a lookup
table, but I would rather not, as any typo in either the template or
the lookup table will give us truble.  Of course, we could generate
both from the same list to avoid any such problems.  I have been
thinking about it, but wanted to test the new cdebconf feature first.
If the feature is currently missing, I might have to reconsider.

> My patch is orthogonal to that; I retrieve the countrycode from
> debconf in kbd-chooser to pick a default keymap; (presumably it is
> also used elsewhere). It is easier to work with if it is upper case.

But it is not very hard to convert to uppercase:

  uppercase`echo $lowercase | tr [:lower:] [:upper:]`

> I think the two fixes should both happen, no?

I do not see the need yet.  No use trowing away the existing
translations for no reason.



Reply to: