* merged i18n fixes from apt--mvo
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 5 Oct 2006 11:41:09 +0000 (13:41 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 5 Oct 2006 11:41:09 +0000 (13:41 +0200)
apt-pkg/deb/dpkgpm.cc
buildlib/apti18n.h.in
debian/changelog

index 93dff39..f669623 100644 (file)
@@ -355,28 +355,28 @@ bool pkgDPkgPM::Go(int OutStatusFd)
    static const struct DpkgState DpkgStatesOpMap[][5] = {
       // Install operation
       { 
-        {"half-installed", _("Preparing %s")}, 
-        {"unpacked", _("Unpacking %s") }, 
+        {"half-installed", N_("Preparing %s")}, 
+        {"unpacked", N_("Unpacking %s") }, 
         {NULL, NULL}
       },
       // Configure operation
       { 
-        {"unpacked",_("Preparing to configure %s") },
-        {"half-configured", _("Configuring %s") },
-        { "installed", _("Installed %s")},
+        {"unpacked",N_("Preparing to configure %s") },
+        {"half-configured", N_("Configuring %s") },
+        { "installed", N_("Installed %s")},
         {NULL, NULL}
       },
       // Remove operation
       { 
-        {"half-configured", _("Preparing for removal of %s")},
-        {"half-installed", _("Removing %s")},
-        {"config-files",  _("Removed %s")},
+        {"half-configured", N_("Preparing for removal of %s")},
+        {"half-installed", N_("Removing %s")},
+        {"config-files",  N_("Removed %s")},
         {NULL, NULL}
       },
       // Purge operation
       { 
-        {"config-files", _("Preparing to completely remove %s")},
-        {"not-installed", _("Completely removed %s")},
+        {"config-files", N_("Preparing to completely remove %s")},
+        {"not-installed", N_("Completely removed %s")},
         {NULL, NULL}
       },
    };
@@ -672,7 +672,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
         {
            // only read the translation if there is actually a next
            // action
-           const char *translation = states[PackageOpsDone[pkg]].str;
+           const char *translation = _(states[PackageOpsDone[pkg]].str);
            char s[200];
            snprintf(s, sizeof(s), translation, pkg);
 
index 8124576..a5b91b1 100644 (file)
 # else
 #   define _(x) gettext(x)
 # endif
+# define N_(x) x
 #else
 // apt will not use any gettext
 # define setlocale(a, b)
 # define _(x) x
+# define N_(x) x
 #endif
index 7d12cd3..189598e 100644 (file)
@@ -3,8 +3,10 @@ apt (0.6.45ubuntu15) edgy; urgency=low
   * doc/apt-get.8.xml:
     - documented autoremove, thanks to Vladimír Lapáček 
       (lp: #62919)
+  * fix broken i18n in the dpkg progress reporting, thanks to 
+    Frans Pop and Steinar Gunderson. (closes: #389261)
 
- -- Michael Vogt <michael.vogt@ubuntu.com>  Mon,  2 Oct 2006 15:53:14 +0200
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu,  5 Oct 2006 13:32:41 +0200
 
 apt (0.6.45ubuntu14) edgy; urgency=low