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

Bug#260025: marked as done ([Proposal] The locale generation at the prebaseconfig)



Your message dated Thu, 8 Jun 2006 12:32:03 -0400
with message-id <20060608163203.GA27265@kitenet.net>
and subject line closing old bug
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: prebaseconfig
Severity: wishlist
Tags: l10n patch d-i

* Recai Oktas [2004-07-11 21:08:04+0300]
> Hi,
> 
> I'm planning to work on a patch which generates the locale for the 
> selected language at the prebaseconfig stage.  There are some pretty 
> good reasons to do so:
> 
> * As a critical step for i18n, the locale generation should not be part 
>   of a kludgy script like termwrap.  It deserves a well-defined conf 
>   script on its own right.
> 
> * Some initialization scripts of the installed system may need to reach 
>   the locale info found in the /etc/environment file.  Indeed, this is 
>   the case for console-screen.sh of console-tools and another bug report 
>   (#258681) has been filed for keymap.sh of console-common, which refers 
>   to this file.  In the current implementation, /etc/environment is 
>   created at the end of the base-config, which introduces a problem for 
>   unicode consoles as explained below.
>   
> * We modified the keymap handling to resolve a (IMO) serious d-i bug 
>   (#251550) somewhat related with the unicode consoles.  It seems that a 
>   similar solution will be needed for languages using a UTF-8 locale 
>   (confirmed for tr_TR.UTF-8).  The console must be in the unicode mode 
>   under the unicode locales, but _unless_ we consider to rehack [1] the 
>   keymap loading mechanism, /etc/environment is the only source to 
>   extract the locale info which mandates to install it in the first 
>   stage d-i and later use it to switch the unicode mode.  In fact, IMHO, 
>   such an approach would present the most simple and natural solution 
>   for the problem at hand.
> 
> * By moving the locale generation code to prebaseconfig, one of the 
>   central duties of termwrap will be transfered to this package, so we 
>   will be able to simplify the termwrap.  According to my tests, I can 
>   safely state that, termwrap would not be needed at all for languages 
>   having a charset of ISO-8859-[1-15].  But it would have to be used 
>   mainly for Asian and Cyrillic consoles (not sure for the latter).
> 
> As a side note, please notice that we wouldn't need to touch the 
> termwrap in an effort to simplify it, till the proposed patch matures 
> enough.
> 
> So, have you any comments or objections?
> 
> Regards,
> 
> [1] The current code base of 'loadkeys' is rather messy, which makes 
>     such modifications difficult.

Hi,

In accordance with my proposal, I prepared a patch set.  Please consult  
to my previous post quoted above to see the rationale behind these 
changes.

Here goes the descriptions of patches attached.  Feel free to review 
them.

* 75generate-locales.gz: Prebaseconfig script to install the locale for 
  the selected language.  It gets the localecode from the debconf 
  registery and does the following things:

  (1) Parse (and validate) the localecode
  (2) Generate the locale
  (3) Save the generated locale entry in /target/etc/locale.gen
  (4) Setup the locale environment in /target/environment
  
  Considering some possibilites for the future, the script is somewhat 
  over-designed.  It is driven by the 'debian-installer/locale' for the 
  moment, but it is quite easy to make it work with multiple locales 
  (changing a few line should be sufficient), though the current i18n 
  design of d-i doesn't supply a "multiple language selection" feature 
  (providing that one of them is the default).  As I confirm from my 
  real life experiences, this feature comes handy when people from 
  different nations share the same computing environment.  Perhaps we 
  may add a new debconf menu in languagechooser which could be shown at 
  the low priority.  Another possibility which comes to mind regarding 
  the multiple locales feature is that, almost all languages have a 
  Unicode (UTF-8) and a non-Unicode variant locale (e.g.  fr_FR@euro and 
  fr_FR.UTF-8), so we could install both of them for the user's 
  convenience.

  I choosed the prebaseconfig package for the script and set the order
  to '75' (somewhere after the similar scripts, 65languagechooser and
  70kbd-chooser).  It is perfectly possible to put it another package
  like languagechooser or even in a separate package of its own.
  
* prebaseconfig-generate-locales.patch: Required patch to add the script
  to the prebaseconfig package.

The script has been heavily tested with a number of languages (to name a
few; French, Turkish, Russian, Japanese and Ukrainian), so I think it
should be safe to add it to d-i.  Please note that, in order to resolve
the bug #258681 completely, inclusion of this script is _mandatory_
since it creates the /etc/environment before the 2nd stage installation, 
and hence, feeds the /etc/init.d/keymap.sh with the locale environment.

Regards,

-- 
roktas

Attachment: 75generate-locales.gz
Description: Binary data

diff -ruN prebaseconfig.orig/debian/templates prebaseconfig/debian/templates
--- prebaseconfig.orig/debian/templates	Fri Jul 16 14:18:09 2004
+++ prebaseconfig/debian/templates	Fri Jul 16 14:23:11 2004
@@ -19,6 +19,10 @@
 Type: text
 _Description: Setting up frame buffer...
 
+Template: prebaseconfig/progress/generate-locales
+Type: text
+_Description: Generating locale...
+
 Template: prebaseconfig/progress/prepare-base-config
 Type: text
 _Description: Preparing for base-config...

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
This bug is outdated, since the locale generation stuff is not done by
termwrap anymore, and is indeed handled much like was suggested here.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: