On Tue, May 01, 2007 at 02:29:10PM +0200, Christian Perrier wrote: > > Well, that would have needed a plan, which didn't really happen. The > manpower for console handling in D-I is very scarce.
The patch is attached. It activates console-setup for the non-Latin languages as well as for some Latin. I suppose there are more Latin languages that require console-setup, but the only three I noticed are Esperanto (no keyboard), Lithuanian (the keyboard should work as if it is non-Latin) and Vietnamese (no font, no keyboard). Console-setup supports also the following official in at least one country non-Latin languages: Armenian and Amharic (both are missing in languagelist). > How? Just replace "apt-install console-cyrillic" by "apt-install > console-setup" in localechooser's finish-install script? First this and second - unset the value of the debian-installer/keymap debconf template. (Otherwise console-setup won't ask questions about the keyboard layout.) > > The most important change in d-i before the udebs of console-setup can > > be used is that console-setup needs 'loadkeys'. This means that the > > console maintainers will have to make an udeb with loadkeys. > > You mean a udeb from console-tools, named "console-tools-udeb", with > only loadkeys? Yes. > If so, we should file this against console-tools. Or it can be filed against 'kbd'. > > The other change is inside localechooser. Console-setup needs > > information about the encoding of the selected locale, or else it has > > to ask the question about the encoding with critical priority. If > > localechooser sets a template such as debian-installer/locale-encoding, > > this should be enough. > > That should maybe be merged with Colin's proposed changes to > localechooser. I remember him also talking about getting the encoding > for a given locale as not all locales have the encoding in their name. I don't know about the Colin's proposed changes, but I suppose they do exactly what console-setup needs. He is the person in Ubuntu who works for console-setup, he has prepared several patches for console-setup and knows how it works. > > I think that is all that needs to be done outside console-setup. If > > d-i uses console-setup, then all console-related stuff can be (but > > doesn't need to be) removed from localechooser. > > > > The most difficult part inside console-setup is to make the > > model/layout strings translatable. The X upstream provides > > translations in a xml file but I have no idea how to use them. > > Here, I feel like we're desperately needing Denis Barbier who had all > this knowledge..:-| > > However, is that needed? If I'm correct, Ubuntu uses a method to > recognize the keyboard layout by asking users to type some keys. That > could maybe be used to avoid prompting for the keyboard layout. Yes, it is. Colin has filed a bug with a patch against console-setup, but I haven't decided what to do with it yet. For now I am considering to apply it in such a way that it works for Ubuntu and not (yet) for Debian (in order to make the life of Colin easier). The problem is that this metod can not distinguish among several keyboard layouts. For example all Swiss layouts are identical. Another problem is that too much time is required in order to compile the question-tree. Ubuntu uses this method only for a relatively short list of keyboards. I tried to apply the method for the list of all layouts that this method can distinguish and after 30 hours there were still no signs that the compilation was close to finish... > > This is what I can not do: > > - to fix the bugs promptly (for example translation-based uploads); > > I don't get the point here. Do you need help dealing with > console-setup l10n and prepare packages? The problem is that while I have enough time to fix the bugs in my packages, I am unable to do this quick. While this is more or less acceptable for my current packages, if console-setup becomes integral part of d-i, it will require quick fixes of the bugs. I wrote about translation-based uploads because I expect most future bugs agains console-setup to be about translations or in the worst case – about some specific keyboard layout. Anton Zinoviev
diff -Naur localechooser/finish-install localechooser.new/finish-install --- localechooser/finish-install 2007-05-01 16:35:10.000000000 +0300 +++ localechooser.new/finish-install 2007-05-01 17:21:46.000000000 +0300 @@ -6,14 +6,6 @@ ARCH=`udpkg --print-architecture` -modify_cyrconfig() { - if [ "$2" ]; then - sed -e "s/^$1 .*\$/$1 $2/" \ - $cyrconfig > $cyrconfig.tmp && \ - mv $cyrconfig.tmp $cyrconfig - fi -} - db_get debian-installer/locale LOCALE="$RET" @@ -82,6 +74,10 @@ cyr) apt-install console-cyrillic || true ;; + console-setup) + apt-install console-setup || true + db_set debian-installer/keymap '' || true + ;; esac exit 0 diff -Naur localechooser/languagelist localechooser.new/languagelist --- localechooser/languagelist 2007-05-01 16:35:10.000000000 +0300 +++ localechooser.new/languagelist 2007-05-01 17:35:38.000000000 +0300 @@ -2,12 +2,12 @@ # This is the complete list of languages (locales) to choose from. # Language;supported_environments;langcode;countrycode;fallbacklocale;langlist;console-data Albanian;2;sq;AL;sq_AL.UTF-8;;kbd=lat0-sun16(utf8) -Arabic;3;ar;EG;ar_EG.UTF-8;; +Arabic;3;ar;EG;ar_EG.UTF-8;;console-setup Basque;1;eu;ES;eu_ES.UTF-8;;kbd=lat0-sun16(utf8) -Belarusian;2;be;BY;be_BY.UTF-8;;cyr +Belarusian;2;be;BY;be_BY.UTF-8;;console-setup Bengali;4;bn;BD;bn_BD;; Bosnian;2;bs;BA;bs_BA.UTF-8;;kbd=Lat2-Terminus16(utf8) -Bulgarian;2;bg;BG;bg_BG;;kbd=ruscii_8x16(cp1251) +Bulgarian;2;bg;BG;bg_BG;;console-setup # For C locale, set language to 'en' to make sure questions are "translated" # to English instead of showing codes. C;0;en;;C; @@ -26,16 +26,16 @@ # The Esperanto locale *is* (or will be as of 1/11/2006) eo.UTF-8 # so no country on purpose. The default country is Antarctica because... # ...why not..:-) -Esperanto;2;eo;AQ;eo;;kbd=LatArCyrHeb-16(utf8) +Esperanto;2;eo;AQ;eo;;console-setup Estonian;2;et;EE;et_EE.UTF-8;;kbd=lat0-sun16(utf8) Finnish;1;fi;FI;fi_FI.UTF-8;;kbd=lat0-sun16(utf8) French;1;fr;FR;fr_FR.UTF-8;;kbd=lat9u-16(utf8) Galician;1;gl;ES;gl_ES.UTF-8;;kbd=lat0-sun16(utf8) -Georgian;4;ka;GE;ka_GE;;kbd=ka8x16thin(utf8) +Georgian;4;ka;GE;ka_GE;;console-setup German;1;de;DE;de_DE.UTF-8;;kbd=lat0-sun16(utf8) -Greek;2;el;GR;el_GR.UTF-8;;kbd=iso07.f16(utf8) +Greek;2;el;GR;el_GR.UTF-8;;console-setup Gujarati;4;gu;IN;gu_IN;; -Hebrew;3;he;IL;he_IL.UTF-8;;kbd=LatArCyrHeb-16(utf8) +Hebrew;3;he;IL;he_IL.UTF-8;;console-setup Hindi;4;hi;IN;hi_IN;; Hungarian;2;hu;HU;hu_HU.UTF-8;;kbd=lat2-sun16(utf8) #X Icelandic;1;is;IS;is_IS.UTF-8;;kbd=lat9u-16(utf8) @@ -44,18 +44,18 @@ Italian;1;it;IT;it_IT.UTF-8;;kbd=lat0-sun16(utf8) Japanese;3;ja;JP;ja_JP.UTF-8;; #X Kannada;4;kn;IN;kn_IN;; -#X Kazakh;2;kk;KZ;kk_KZ;;kbd=ruscii_8x16(koi8-r) +#X Kazakh;2;kk;KZ;kk_KZ;;console-setup Khmer;4;km;KH;km_KH;; Korean;3;ko;KR;ko_KR.UTF-8;; Kurdish;2;ku;TR;ku_TR.UTF-8;;kbd=Lat15-Terminus16(utf8) -#X Lao;4;lo;LA;lo_LA;; +#X Lao;4;lo;LA;lo_LA;;console-setup Latvian;2;lv;LV;lv_LV.UTF-8;;kbd=lat7-14(utf8) -Lithuanian;2;lt;LT;lt_LT.UTF-8;;kbd=LatArCyrHeb-16(utf8) +Lithuanian;2;lt;LT;lt_LT.UTF-8;;console-setup #X Malagasy;1;mg;MG;mg_MG.UTF-8;mg_MG:fr_FR:fr:en;kbd=lat0-sun16(utf8) #X Malay;1;ms;MY;ms_MY.UTF-8;;kbd=lat0-sun16(utf8) Malayalam;4;ml;IN;ml_IN;; #X Marathi;4;mr;IN;mr_IN;; -Macedonian;2;mk;MK;mk_MK.UTF-8;;kbd=iso05.f16(utf8) +Macedonian;2;mk;MK;mk_MK.UTF-8;;console-setup Nepali;4;ne;NP;ne_NP;; # The Sami translation is really incomplete. We however keep Sami on request # of Skolelinux as a kind of reward to them..:-). They need to be able to @@ -63,16 +63,16 @@ Northern Sami;1;se;NO;se_NO.UTF-8;se_NO:nb_NO:nb:no_NO:no:nn_NO:nn:da:sv:en;kbd=lat0-sun(utf8) Norwegian Bokmaal;1;nb;NO;nb_NO.UTF-8;nb_NO:nb:no_NO:no:nn_NO:nn:da:sv:en;kbd=lat0-sun16(utf8) Norwegian Nynorsk;1;nn;NO;nn_NO.UTF-8;nn_NO:nn:no_NO:no:nb_NO:nb:da:sv:en;kbd=lat0-sun16(utf8) -#X Persian;3;fa;IR;fa_IR;;kbd=iso06.f16(utf8) +#X Persian;3;fa;IR;fa_IR;;console-setup Polish;2;pl;PL;pl_PL.UTF-8;;kbd=lat2-sun16(utf8) Portuguese;1;pt;PT;pt_PT.UTF-8;pt:pt_BR:en;kbd=lat0-sun16(utf8) Portuguese (Brazil);1;pt;BR;pt_BR.UTF-8;pt_BR:pt:en;kbd=lat1-16(utf8) Punjabi (Gurmukhi);4;pa;IN;pa_IN;; Romanian;2;ro;RO;ro_RO.UTF-8;;kbd=Lat2-Terminus16(utf8) -Russian;2;ru;RU;ru_RU.UTF-8;;cyr +Russian;2;ru;RU;ru_RU.UTF-8;;console-setup #X Sanskrit;4;sa;IN;sa_IN;; # Serbian commented for consistency: too incomplete -#X Serbian;2;sr;CS;[EMAIL PROTECTED];;kbd=iso05.f16(utf8) +#X Serbian;2;sr;CS;[EMAIL PROTECTED];;console-setup Slovak;2;sk;SK;sk_SK.UTF-8;;kbd=lat2-sun16(utf8) Slovenian;2;sl;SI;sl_SI.UTF-8;;kbd=lat2-sun16(utf8) Spanish;1;es;ES;es_ES.UTF-8;;kbd=lat0-sun16(utf8) @@ -80,12 +80,12 @@ Tagalog;1;tl;PH;tl_PH.UTF-8;;kbd=lat0-sun16(utf8) Tamil;4;ta;IN;ta_IN;; #X Telugu;4;te;IN;te_IN;; -Thai;4;th;TH;th_TH.UTF-8;; +Thai;4;th;TH;th_TH.UTF-8;;console-setup Turkish;2;tr;TR;tr_TR.UTF-8;;kbd=Lat15-Terminus16(utf8) -Ukrainian;2;uk;UA;uk_UA.UTF-8;;kbd=ruscii_8x16(utf8) -#X Urdu;3;ur;PK;ur_PK.UTF-8;; +Ukrainian;2;uk;UA;uk_UA.UTF-8;;console-setup +#X Urdu;3;ur;PK;ur_PK.UTF-8;;console-setup #X Valencian-Catalan;1;[EMAIL PROTECTED];ES;[EMAIL PROTECTED];;kbd=lat0-sun16(utf8) -Vietnamese;3;vi;VN;vi_VN.UTF-8;; +Vietnamese;3;vi;VN;vi_VN.UTF-8;;console-setup #X Welsh;2;cy;GB;cy_GB.UTF-8;;kbd=iso14.f16(utf8) Wolof;2;wo;SN;wo_SN;wo:fr:en; #X Xhosa;2;xh;ZA;xh_ZA.UTF-8;;kbd=lat0-sun16(utf8)