The following commit has been merged in the master branch:
commit c7843e7d4a95bdf200bdf513332a04acf0ad93c5
Author: Guillem Jover <[EMAIL PROTECTED]>
Date:   Fri Jun 27 07:04:19 2008 +0300

    Fix localized strings

diff --git a/ChangeLog b/ChangeLog
index 93ab79c..ee566b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-06-27  Guillem Jover  <[EMAIL PROTECTED]>
+
+       * dpkg-deb/build.c (do_build): Move string translation markers outside
+       of the string.
+       * src/help.c (ensure_pathname_nonexisting): Localize the 'failed'
+       variable instead of expecting gettext to magically infer the formatted
+       string.
+       * src/processarc.c (process_archive): Likewise.
+
 2008-06-27  Raphael Hertzog  <[EMAIL PROTECTED]>
 
        * scripts/install-info.pl: Improve error message when the
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index e458ab4..2650ab3 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -490,7 +490,8 @@ void do_build(const char *const *argv) {
     default:
       ohshit(_("Internal error, compress_type `%i' unknown!"), compress_type);
     }
-    if (fstat(gzfd,&datastab)) ohshite("_(failed to fstat tmpfile (data))");
+    if (fstat(gzfd, &datastab))
+      ohshite(_("failed to fstat tmpfile (data)"));
     if (fprintf(ar,
                 "%s"
                 "%s" "%-12lu0     0     100644  %-10ld`\n",
diff --git a/src/help.c b/src/help.c
index b7b2121..6ea81d4 100644
--- a/src/help.c
+++ b/src/help.c
@@ -527,9 +527,9 @@ void ensure_pathname_nonexisting(const char *pathname) {
     if (errno == ENOTDIR) return;
   }
   if (errno != ENOTEMPTY && errno != EEXIST) { /* Huh ? */
-    char mbuf[250];
-    snprintf(mbuf, sizeof(mbuf), N_("failed to %s `%%.255s'"), failed);
-    ohshite(_(mbuf),pathname);
+    const char *failed_local = gettext(failed);
+
+    ohshite(_("failed to %s '%.255s'"), failed_local, pathname);
   }
   c1= m_fork();
   if (!c1) {
diff --git a/src/processarc.c b/src/processarc.c
index 3085962..c93d12e 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -739,11 +739,10 @@ void process_archive(const char *filename) {
 
       failed= N_("delete");
       if (chmodsafe_unlink_statted(fnamevb.buf, &oldfs, &failed)) {
-       char mbuf[250];
-       snprintf(mbuf, sizeof(mbuf),
-                N_("dpkg: warning - unable to %s old file `%%.250s': %%s\n"),
-                failed);
-       fprintf(stderr, _(mbuf), namenode->name, strerror(errno));
+        const char *failed_local = gettext(failed);
+
+        fprintf(stderr, _("dpkg: warning - unable to %s old file '%.250s': 
%s\n"),
+                failed_local, namenode->name, strerror(errno));
       }
 
     } /* !S_ISDIR */

-- 
dpkg's main repository


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

Reply via email to