Re: Language selection: cdebconf and main-menu

2002-11-27 Thread Denis Barbier
On Tue, Nov 26, 2002 at 09:39:25PM -0800, Randolph Chung wrote:
> > Does it mean that cdebconf should not use the LANGUAGE environment variable
> > at all?  If not, what is the exact role of this variable and the debconf
> > question?
> 
> well... i'm not clear on why we have LANGUAGE and don't use either
> LC_MESSAGES or LC_ALL. Isn't that the standard way to define locales?
> instead of using getenv("LANGUAGE") we could use setlocale(3) 

Because it lets you define a list of languages, e.g.
  LANGUAGE=fr:de
if I want French messages by default, German when they are not available,
and of course fallback to English if none exist.  The LANGUAGE variable
is an extension of GNU libc.
Having a colon separated list of languages is implemented in cdebconf.

> actually i don't mind using an environment variable for this purpose,
> I'm just not comfortable with adding random debconf commands to
> cdebconf if we can avoid it.

Ok, but I know nothing about signal handling, so someone else has to
implement it.
Note: Joey Hess pointed out on IRC that the 'seen' flag must not be stored
 in database before session is over, otherwise backing up won't work.  We
 have to store seen question names in a new confmodule member, and set
 'seen' flag when leaving session.  When signal is caught, we must not
 lose this list of seen questions.

Denis


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Language selection: cdebconf and main-menu

2002-11-26 Thread Randolph Chung
> Does it mean that cdebconf should not use the LANGUAGE environment variable
> at all?  If not, what is the exact role of this variable and the debconf
> question?

well... i'm not clear on why we have LANGUAGE and don't use either
LC_MESSAGES or LC_ALL. Isn't that the standard way to define locales?
instead of using getenv("LANGUAGE") we could use setlocale(3) 

actually i don't mind using an environment variable for this purpose,
I'm just not comfortable with adding random debconf commands to
cdebconf if we can avoid it.

randolph


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Language selection: cdebconf and main-menu

2002-11-26 Thread Denis Barbier
On Mon, Nov 25, 2002 at 09:18:48PM -0800, Randolph Chung wrote:
> >   * In cdebconf, implement this new X_SET_LANGUAGE command.
> > Note that the language list is hardcoded in main-menu/language.c and not
> > in languagechooser/debian/{postinst,templates}.  In fact, as language
> > selection is driven by main-menu, I suggest not to add the languagechooser
> > package and instead add its template under main-menu wings.
> 
> why do we need to implement a special command to do this? 
> this command is non-standard (not in the debconf spec)...  this seems
> very much like a hack to me.
> 
> I'd rather have the language setting be read from the debconf database,
> and have a mechanism to trigger cdebconf to re-read the debconf database
> (e.g. when getting a SIGHUP). i remember there were some discussions
> along the same lines some time ago.
> 
> will that do what you want?

Does it mean that cdebconf should not use the LANGUAGE environment variable
at all?  If not, what is the exact role of this variable and the debconf
question?

Denis


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Language selection: cdebconf and main-menu

2002-11-25 Thread Randolph Chung
>   * In cdebconf, implement this new X_SET_LANGUAGE command.
> Note that the language list is hardcoded in main-menu/language.c and not
> in languagechooser/debian/{postinst,templates}.  In fact, as language
> selection is driven by main-menu, I suggest not to add the languagechooser
> package and instead add its template under main-menu wings.

why do we need to implement a special command to do this? 
this command is non-standard (not in the debconf spec)...  this seems
very much like a hack to me.

I'd rather have the language setting be read from the debconf database,
and have a mechanism to trigger cdebconf to re-read the debconf database
(e.g. when getting a SIGHUP). i remember there were some discussions
along the same lines some time ago.

will that do what you want?

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]