[Debconf-devel] [Fwd: Handling values with db_get in case of translation]

Olivier Berger olivier.berger at it-sudparis.eu
Wed Feb 20 14:12:34 UTC 2008


Hi.

I haven't received any response on debian-mentors...

Maybe I'll get more luck here ?

Thanks in advance.

Best regards,
-------- Message transféré --------
De: Olivier Berger <olivier.berger at it-sudparis.eu>
À: debian-mentors at lists.debian.org
Sujet: Handling values with db_get in case of translation
Date: Tue, 19 Feb 2008 15:49:35 +0100

Hi.

I'm wondering how would one write postinst script tests, in the case of
"select" debconf configuration values, which are translated in the
templates.

Let's say that a package's template contains something like :

 Template: sympa/db_authtype
 Type: select
 Choices: Ident-based, Password
 ...
 Choices-fr.UTF-8: Basée sur ident, Mot de passe

If issueing 'db_get sympa/db_authtype', and wanting to test the results, I would expect some code like the following to be correct :

 db_get sympa/db_authtype
   if [ "$RET" = "Ident-based" ]; then
   ...

However, it seems that the db_get results depend on the locale, and return "Basée sur ident" instead of "Ident-based" when with french locale...

How can one write scripts, which will not depend on translation of the templates ?

Is this a bug in debconf ?

Btw, that's a real case example in the sympa package, and testing distro (and see bug #466530).

Thanks for your comments.

Best regards,
-- 
Olivier BERGER <olivier.berger at it-sudparis.eu> (*NEW ADDRESS*)
http://www-inf.it-sudparis.eu/~olberger/ - OpenPGP-Id: 1024D/6B829EEC
Ingénieur Recherche - Dept INF
Institut TELECOM / TELECOM & Management SudParis (http://www.it-sudparis.eu/), Evry





More information about the Debconf-devel mailing list