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

2006-10-05 Thread Frans Pop
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


pgpxePfriaJRq.pgp
Description: PGP signature


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

2006-09-28 Thread Frans Pop
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?

I've verified that if I set it early in debian-installer-startup.d (after 
loading templates, but before main-menu is started) it does not work, but 
if I set it in some postinst, it does.

That would also explain why network-console only showed the correct 
language after I added these lines in network-console-menu (to make the 
new frontend see the language setting):
if db_get debconf/language  [ $RET ] ; then
db_set debconf/language $RET
fi

Is this a bug or a feature of cdebconf?


pgpTMzIT230IB.pgp
Description: PGP signature


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

2006-09-26 Thread Joey Hess
Frans Pop wrote:
 I'm not quite sure if letting LANGUAGE overrule debconf/language is not a 
 bug in tasksel, but at least we have tasks translated now.

tasksel uses standard gettext for translations of the tasks menu, since
that menu is generated on the fly and so cannot be translated using
debconf.

So this problem actually affects anything else that d-i might happen to
run in the chroot that uses gettext. Which suggests to me that this
LANGUAGE setting is bogus and wrong at root.

-- 
see shy jo


signature.asc
Description: Digital signature


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

2006-09-26 Thread Frans Pop
On Tuesday 26 September 2006 08:44, Joey Hess wrote:
 tasksel uses standard gettext for translations of the tasks menu, since
 that menu is generated on the fly and so cannot be translated using
 debconf.

I'm still confused why the rest of tasksel _is_ translated correctly and 
only the tasks are affected.

 So this problem actually affects anything else that d-i might happen to
 run in the chroot that uses gettext. Which suggests to me that this
 LANGUAGE setting is bogus and wrong at root.

The problem this solves is the following. The S/390 images do not include 
localechooser and thus language selection is missing. This results in the 
country selection in mirror-chooser showing the country codes instead of 
country names. Setting LANGUAGE to en solves this.

In general, IMO the installer should ensure a good default language 
setting (C/English), even if localechooser is not run.

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.

Suggestions for alternative solutions are very welcome.


pgpG8xnO4T1kM.pgp
Description: PGP signature


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

2006-09-25 Thread Frans Pop
reassign 381142 pkgsel
tags 381142 + pending
thanks

 When running a test install with D-I beta3 candidate images, in French,
 the tasks names are not translated while the tasks selection text is
 properly translated. 

Kenshi Muto spotted the reason for this.
In rootskel LANGUAGE is set to en. This does not affect anything during 
the installation as localechooser sets debconf/language, but it does seem 
to affect the translation of task descriptions for some reason.

Solution is to unset LANGUAGE in the pkgsel postinst.

I'm not quite sure if letting LANGUAGE overrule debconf/language is not a 
bug in tasksel, but at least we have tasks translated now.

Cheers,
FJP


pgpUIasORS6dR.pgp
Description: PGP signature


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

2006-09-25 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 reassign 381142 pkgsel
Bug#381142: tasksel: Tasks names aren't translated
Bug reassigned from package `tasksel' to `pkgsel'.

 tags 381142 + pending
Bug#381142: tasksel: Tasks names aren't translated
Tags were: l10n
Tags added: pending

 thanks
Stopping processing here.

Please contact me if you need assistance.

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


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



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

2006-08-02 Thread Christian Perrier
Package: tasksel
Version: 2.53
Severity: normal
Tags: l10n

When running a test install with D-I beta3 candidate images, in French, the 
tasks names
are not translated while the tasks selection text is properly translated.

As far as I know, the French translation of tasks was completed in 2.52.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.16-2-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=ANSI_X3.4-1968) 
(ignored: LC_ALL set to C)

Versions of packages tasksel depends on:
ii  aptitude  0.4.1-1.1  terminal-based apt frontend
ii  debconf [debconf-2.0] 1.5.3  Debian configuration management sy
ii  liblocale-gettext-perl1.05-1 Using libc functions for internati
ii  tasksel-data  2.53   Official tasks used for installati

tasksel recommends no packages.

-- debconf information excluded


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