]> err.no Git - dpkg/commitdiff
Fix localized strings
authorGuillem Jover <guillem@debian.org>
Fri, 27 Jun 2008 04:04:19 +0000 (07:04 +0300)
committerGuillem Jover <guillem@debian.org>
Sat, 28 Jun 2008 07:03:23 +0000 (10:03 +0300)
ChangeLog
dpkg-deb/build.c
src/help.c
src/processarc.c

index 93ab79c1bd25b5c3e3a229f16600767c4d9af381..ee566b1266be38a81b9add6dba64c8edb49a63b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-06-27  Guillem Jover  <guillem@debian.org>
+
+       * 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  <hertzog@debian.org>
 
        * scripts/install-info.pl: Improve error message when the
index e458ab46283064787b02619552661ce3bfa9ae20..2650ab34a98daa1bd0371473002fc539b5ba1d18 100644 (file)
@@ -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",
index b7b2121334400bb24384b80dd997dcf141c375f1..6ea81d4c1d8e317b30fd042a1ba26a2777549b1c 100644 (file)
@@ -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) {
index 3085962e6fe241dd21cb0d44d7f776280adad944..c93d12ee8ff47169c68b634d7576df5ffbbb1b00 100644 (file)
@@ -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 */