Followup-For: Bug #225463
Package: debconf
Version: 1.4.42
Tags: patch l10n

Hello,

As I was looking for a way to translate the last bit of information
displayed on "apt-get upgrade" with French locale, I noticed the
"Preconfiguring packages ...".

Here is a small patch to be able to translate this string (as well as
3 other less visible (2 error messages and 1 debug message)):

--- dpkg-preconfigure.old       2005-01-22 01:37:12.000000000 +0100
+++ dpkg-preconfigure   2005-01-22 01:46:04.000000000 +0100
@@ -148,7 +148,7 @@
                }
                else {
                        if (system("apt-extracttemplates", @collect) != 0) {
-                               print STDERR "debconf: apt-extracttemplates 
failed: $!";
+                               print STDERR sprintf("debconf: 
".gettext("apt-extracttemplates failed: %s"),$!);
                        }
                                
                        @collect=($deb);
@@ -156,7 +156,7 @@
                }
        }
        exec "apt-extracttemplates", @collect or
-               print STDERR "debconf: apt-extracttemplates failed: $!";
+               print STDERR sprintf("debconf: ".gettext("apt-extracttemplates 
failed: %s"),$!);
 }
 # Why buffer here? Well, suppose 300 packages are being installed, and
 # only the first and last use debconf. The first is preconfigured. Then
@@ -164,7 +164,7 @@
 # Blowing a bit of memory on a buffer seems like a saner approach.
 my @buffer=<INFO>;
 if ($apt && @buffer) {
-       print "Preconfiguring packages ...\n";
+       print gettext("Preconfiguring packages ...\n");
 }
 foreach my $line (@buffer) {
        ($package, $version, $template, $config)=split /\s/, $line;
@@ -188,7 +188,7 @@
 
        # Run config script if any.
        if (defined $config && length $config && -e $config) {
-               debug user => "preconfiguring $package ($version)";
+               debug user => sprintf(gettext("preconfiguring %s 
(%s)",$package,$version))";
                chmod(0755, $config) or
                        die sprintf(gettext("debconf: can't chmod: %s"), $!);
                $frontend->default_title($package);


As I would like the French translation to be updated, here is the
patch to po/fr.po:

--- fr.po.old   2005-01-22 03:44:41.000000000 +0100
+++ fr.po       2005-01-22 03:46:03.000000000 +0100
@@ -7,8 +7,8 @@
 msgstr ""
 "Project-Id-Version: debconf 1.4.30\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-03 14:50-0500\n"
-"PO-Revision-Date: 2004-08-07 11:27+0200\n"
+"POT-Creation-Date: 2005-01-22 03:44+0100\n"
+"PO-Revision-Date: 2005-01-22 03:46+0100\n"
 "Last-Translator: Julien Louis <[EMAIL PROTECTED]>\n"
 "Language-Team: French Translators <debian-l10n-french@lists.debian.org>\n"
 "MIME-Version: 1.0\n"
@@ -311,11 +311,25 @@
 msgstr ""
 "la configuration des paquets est reportée, car apt-utils n'est pas installé"
 
+#: ../dpkg-preconfigure:151 ../dpkg-preconfigure:159
+#, c-format
+msgid "apt-extracttemplates failed: %s"
+msgstr "Échec d'apt-extracttemplates : %s"
+
+#: ../dpkg-preconfigure:167
+msgid "Preconfiguring packages ...\n"
+msgstr "Préconfiguration des paquets ...\n"
+
 #: ../dpkg-preconfigure:179
 #, c-format
 msgid "template parse error: %s"
 msgstr "erreur d'analyse de message : %s"
 
+#: ../dpkg-preconfigure:191
+#, c-format
+msgid "preconfiguring %s (%s)"
+msgstr "préconfiguration de %s (%s)"
+
 #: ../dpkg-preconfigure:193
 #, c-format
 msgid "debconf: can't chmod: %s"


You can check with Julien Louis that my translation is correct.


Fred

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.9
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages debconf depends on:
ii  debconf-i18n                  1.4.42     full internationalization support 
ii  perl-base                     5.8.4-5    The Pathologically Eclectic Rubbis

-- debconf information excluded

Reply via email to