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

Bug#381142: tasksel: Tasks names aren't translated



On Thursday 28 September 2006 23:31, Frans Pop wrote:
> On Tuesday 26 September 2006 13:14, Frans Pop wrote:
> > Yesterday I tried a different implementation: setting
> > debconf/language=en in debian-installer-startup.d instead of setting
> > LANGUAGE. However, that did not result in country names being
> > displayed for S/390.
>
> Is it possible that debconf/language is only actually valid if it is
> set _after_ the frontend has been started?

This seems to be the case. I'd like to propose the following set of
patches to resolve this issue. I've verified that these changes do not
interfere with localechooser.

- main-menu: read and set debconf/language on initialization so that
  cdebconf honors the currently set value
- cdebconf-udeb: define the debconf/language template and set 'en' as
  the default language for the installer
- rootskel: as cdebconf-udeb now sets a default language, we no longer
  need to do it here
- network-console-menu: the change in main-menu makes this hack no
  longer necessary
Of course, the pending change in pkgsel to unset LANGUAGE will also be
reverted.

Comments welcome.

Index: main-menu/main-menu.c
===================================================================
--- main-menu/main-menu.c       (revision 41193)
+++ main-menu/main-menu.c       (working copy)
@@ -567,6 +567,7 @@
        di_packages *packages;
        di_packages_allocator *allocator;
        int ret;
+       char *s;

        debconf = debconfclient_new();
        di_system_init(basename(argv[0]));
@@ -574,6 +575,13 @@
        /* Tell udpkg to shut up. */
        setenv("UDPKG_QUIET", "y", 1);

+       /* Make cdebconf honour currently set language */
+        const char *template = "debconf/language";
+       if ((debconf_get(debconf, template) == CMD_SUCCESS) && (debconf->value)) {
+               s = strdup(debconf->value);
+               debconf_set(debconf, template, s);
+       }
+
        menu_startup();

        allocator = di_system_packages_allocator_alloc ();
Index: cdebconf/debian/cdebconf-udeb.templates
===================================================================
--- cdebconf/debian/cdebconf-udeb.templates     (revision 41193)
+++ cdebconf/debian/cdebconf-udeb.templates     (working copy)
@@ -1,3 +1,9 @@
+Template: debconf/language
+Type: string
+Default: en
+Description: Default language
+ This is an internal setting.
+
 Template: debconf/priority
 Type: select
 __Choices: critical, high, medium, low
Index: rootskel/src/lib/debian-installer.d/S40term-linux
===================================================================
--- rootskel/src/lib/debian-installer.d/S40term-linux   (revision 41193)
+++ rootskel/src/lib/debian-installer.d/S40term-linux   (working copy)
@@ -1,5 +1,4 @@
 export LANG=C
-export LANGUAGE=en

 if [ "$TERM" = linux ] ; then
        if [ "$TERM_TYPE" = virtual ]; then
Index: network-console/network-console-menu
===================================================================
--- network-console/network-console-menu        (revision 41193)
+++ network-console/network-console-menu        (working copy)
@@ -3,10 +3,6 @@

 . /usr/share/debconf/confmodule

-if db_get debconf/language && [ "$RET" ] ; then
-        db_set debconf/language $RET
-fi
-
 TEMPLATE_ROOT=network-console

 db_input critical $TEMPLATE_ROOT/login

Attachment: pgpYjjKkgwnnY.pgp
Description: PGP signature


Reply to: