From 21e1008e144c50770997bc00dc1b27826a31064c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 30 Sep 2006 14:28:00 +0200 Subject: [PATCH] * apt-pkg/deb/dpkgpm.cc: - translate the dpkg progress strings when they are used, not in the struct (thanks to Steinar Gunderson) * debian/changelog: - updated --- apt-pkg/deb/dpkgpm.cc | 22 +++++++++++----------- buildlib/apti18n.h.in | 2 ++ debian/changelog | 7 ++++++- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index bf0434cc..2b167dbf 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -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} }, }; @@ -670,7 +670,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); diff --git a/buildlib/apti18n.h.in b/buildlib/apti18n.h.in index 81245764..a5b91b1e 100644 --- a/buildlib/apti18n.h.in +++ b/buildlib/apti18n.h.in @@ -14,8 +14,10 @@ # 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 diff --git a/debian/changelog b/debian/changelog index 448f4f1e..92c12b5a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,12 @@ apt (0.6.46.1) unstable; urgency=low * methods/gzip.cc: - deal with empty files * Applied patch from Daniel Schepler to make apt bin-NMU able. - (Closes: bug#359634) + (closes: bug#359634) + * rebuild against current g++ because of: + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29289 + (closes: #390189) + * fix broken i18n in the dpkg progress reporting, thanks to + Frans Pop and Steinar Gunderson. (closes: #389261) -- -- 2.20.1