The following commit has been merged in the master branch:
commit 43fc4ae3712fa40f85679feb32e7987f06a3c714
Author: Guillem Jover <[EMAIL PROTECTED]>
Date:   Thu Nov 20 05:57:37 2008 +0200

    Mark strings for translation

diff --git a/ChangeLog b/ChangeLog
index 4c51298..5c52a8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2008-12-08  Guillem Jover  <[EMAIL PROTECTED]>
 
+       * dpkg-deb/build.c (do_build): Mark strings for translation.
+       * dpkg-deb/extract.c (extracthalf): Likewise.
+       * dpkg-split/info.c (read_info): Likewise.
+       * dpkg-split/join.c (reassemble): Likewise.
+       * dpkg-split/queue.c (do_queue): Likewise.
+       * dselect/pkglist.cc (packagelist::packagelist): Likewise.
+       (packagelist::display): Likewise.
+       * lib/log.c (statusfd_send): Likewise.
+       * scripts/Dpkg/Source/Package/V1.pm (do_build): Likewise.
+       * src/filesdb.c (ensure_packagefiles_available): Likewise.
+       (ensure_statoverrides): Likewise.
+
+2008-12-08  Guillem Jover  <[EMAIL PROTECTED]>
+
        * dpkg-deb/extract.c (extracthalf): Improve internerr strings, and add
        the invalid value provoking the call.
        * dpkg-split/queue.c (discardsome): Likewise.
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index d5c8a15..da84345 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -257,8 +257,10 @@ void do_build(const char *const *argv) {
               controlfile, field->name);
       warns++;
     }
-    checkversion(checkedinfo->available.version.version,"(upstream) 
version",&errs);
-    checkversion(checkedinfo->available.version.revision,"Debian 
revision",&errs);
+    checkversion(checkedinfo->available.version.version,
+                 _("(upstream) version"), &errs);
+    checkversion(checkedinfo->available.version.revision,
+                 _("Debian revision"), &errs);
     if (errs) ohshit(_("%d errors in control file"),errs);
 
     if (subdir) {
@@ -275,8 +277,10 @@ void do_build(const char *const *argv) {
     /* Check file permissions */
     strcpy(controlfile, directory);
     strcat(controlfile, "/" BUILDCONTROLDIR "/");
-    if (lstat(controlfile,&mscriptstab)) ohshite("unable to stat control 
directory");
-    if (!S_ISDIR(mscriptstab.st_mode)) ohshit("control directory is not a 
directory");
+    if (lstat(controlfile, &mscriptstab))
+      ohshite(_("unable to stat control directory"));
+    if (!S_ISDIR(mscriptstab.st_mode))
+      ohshit(_("control directory is not a directory"));
     if ((mscriptstab.st_mode & 07757) != 0755)
       ohshit(_("control directory has bad permissions %03lo (must be >=0755 "
              "and <=0775)"), (unsigned long)(mscriptstab.st_mode & 07777));
@@ -472,7 +476,7 @@ void do_build(const char *const *argv) {
   /* All done, clean up wait for tar and gzip to finish their job */
   close(p1[1]);
   free_filist(symlist);
-  waitsubproc(c2,"<compress> from tar -cf",0);
+  waitsubproc(c2, _("<compress> from tar -cf"), 0);
   waitsubproc(c1,"tar -cf",0);
   /* Okay, we have data.tar.gz as well now, add it to the ar wrapper */
   if (!oldformatflag) {
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index 96fce65..d7be0de 100644
--- a/dpkg-deb/extract.c
+++ b/dpkg-deb/extract.c
@@ -139,7 +139,7 @@ void extracthalf(const char *debar, const char *directory,
       if (memcmp(arh.ar_fmag,ARFMAG,sizeof(arh.ar_fmag)))
         ohshit(_("file `%.250s' is corrupt - bad magic at end of first 
header"),debar);
       memberlen= parseheaderlength(arh.ar_size,sizeof(arh.ar_size),
-                                   debar,"member length");
+                                   debar, _("member length"));
       if (!header_done) {
         if (memcmp(arh.ar_name,"debian-binary   ",sizeof(arh.ar_name)) &&
            memcmp(arh.ar_name,"debian-binary/   ",sizeof(arh.ar_name)))
@@ -319,8 +319,9 @@ void extracthalf(const char *debar, const char *directory,
     waitsubproc(c3,"tar",0);
   }
   
-  waitsubproc(c2,"<decompress>",PROCPIPE);
-  if (c1 != -1) waitsubproc(c1,"paste",0);
+  waitsubproc(c2, _("<decompress>"), PROCPIPE);
+  if (c1 != -1)
+    waitsubproc(c1, _("paste"), 0);
   if (oldformat && admininfo) {
     if (versionnum == 0.931F) {
       movecontrolfiles(OLDOLDDEBDIR);
diff --git a/dpkg-split/info.c b/dpkg-split/info.c
index 1b2d628..802b58a 100644
--- a/dpkg-split/info.c
+++ b/dpkg-split/info.c
@@ -97,7 +97,8 @@ struct partinfo *read_info(FILE *partfile, const char *fn, 
struct partinfo *ir)
   if (fread(&arh,1,sizeof(arh),partfile) != sizeof(arh)) rerreof(partfile,fn);
   if (memcmp(arh.ar_fmag,ARFMAG,sizeof(arh.ar_fmag)))
     ohshit(_("file `%.250s' is corrupt - bad magic at end of first 
header"),fn);
-  thisilen= parseheaderlength(arh.ar_size,sizeof(arh.ar_size),fn,"info 
length");
+  thisilen = parseheaderlength(arh.ar_size, sizeof(arh.ar_size), fn,
+                               _("info length"));
   if (thisilen >= readinfobuflen) {
     readinfobuflen= thisilen+1;
     readinfobuf= m_realloc(readinfobuf,readinfobuflen);
@@ -115,31 +116,33 @@ struct partinfo *read_info(FILE *partfile, const char 
*fn, struct partinfo *ir)
   ir->filename= fn;
 
   rip= readinfobuf;
-  ir->fmtversion= nfstrsave(nextline(&rip,fn,"format version number"));
+  ir->fmtversion = nfstrsave(nextline(&rip, fn, _("format version number")));
   if (strcmp(ir->fmtversion,SPLITVERSION))
     ohshit(_("file `%.250s' is format version `%.250s' - you need a newer 
dpkg-split"),
            fn,ir->fmtversion);
 
-  ir->package= nfstrsave(nextline(&rip,fn,"package name"));
-  ir->version= nfstrsave(nextline(&rip,fn,"package version number"));
-  ir->md5sum= nfstrsave(nextline(&rip,fn,"package file MD5 checksum"));
+  ir->package = nfstrsave(nextline(&rip, fn, _("package name")));
+  ir->version = nfstrsave(nextline(&rip, fn, _("package version number")));
+  ir->md5sum = nfstrsave(nextline(&rip, fn, _("package file MD5 checksum")));
   if (strlen(ir->md5sum) != 32 ||
       strspn(ir->md5sum,"0123456789abcdef") != 32)
     ohshit(_("file `%.250s' is corrupt - bad MD5 checksum 
`%.250s'"),fn,ir->md5sum);
 
-  ir->orglength= unsignedlong(nextline(&rip,fn,"total length"),fn,"total 
length");
-  ir->maxpartlen= unsignedlong(nextline(&rip,fn,"part offset"),fn,"part 
offset");
+  ir->orglength = unsignedlong(nextline(&rip, fn, _("total length")), fn,
+                               _("total length"));
+  ir->maxpartlen = unsignedlong(nextline(&rip, fn, _("part offset")), fn,
+                                _("part offset"));
   
-  partnums= nextline(&rip,fn,"part numbers");
+  partnums = nextline(&rip, fn, _("part numbers"));
   slash= strchr(partnums,'/');
   if (!slash) ohshit(_("file `%.250s' is corrupt - no slash between part 
numbers"),fn);
   *slash++= 0;
 
-  templong= unsignedlong(slash,fn,"number of parts");
+  templong = unsignedlong(slash, fn, _("number of parts"));
   if (templong <= 0 || templong > INT_MAX)
-    ohshit("file `%.250s' is corrupt - bad number of parts",fn);
+    ohshit(_("file '%.250s' is corrupt - bad number of parts"), fn);
   ir->maxpartn= templong;
-  templong= unsignedlong(partnums,fn,"parts number");
+  templong = unsignedlong(partnums, fn, _("parts number"));
   if (templong <= 0 || templong > ir->maxpartn)
     ohshit(_("file `%.250s' is corrupt - bad part number"),fn);
   ir->thispartn= templong;
@@ -150,7 +153,8 @@ struct partinfo *read_info(FILE *partfile, const char *fn, 
struct partinfo *ir)
   if (strncmp(arh.ar_name,"data",4))
     ohshit(_("file `%.250s' is corrupt - second member is not data 
member"),fn);
 
-  ir->thispartlen= parseheaderlength(arh.ar_size,sizeof(arh.ar_size),fn,"data 
length");
+  ir->thispartlen = parseheaderlength(arh.ar_size, sizeof(arh.ar_size), fn,
+                                      _("data length"));
   ir->thispartoffset= (ir->thispartn-1)*ir->maxpartlen;
 
   if (ir->maxpartn != (ir->orglength+ir->maxpartlen-1)/ir->maxpartlen)
diff --git a/dpkg-split/join.c b/dpkg-split/join.c
index 09ecfd2..4961c39 100644
--- a/dpkg-split/join.c
+++ b/dpkg-split/join.c
@@ -41,7 +41,7 @@ void reassemble(struct partinfo **partlist, const char 
*outputfile) {
   unsigned int i;
   size_t nr,buffersize;
 
-  printf("Putting package %s together from %d parts: ",
+  printf(_("Putting package %s together from %d parts: "),
          partlist[0]->package,partlist[0]->maxpartn);
   
   buffersize= partlist[0]->maxpartlen;
diff --git a/dpkg-split/queue.c b/dpkg-split/queue.c
index 85136ac..5dbba76 100644
--- a/dpkg-split/queue.c
+++ b/dpkg-split/queue.c
@@ -220,7 +220,7 @@ void do_queue(const char *const *argv) {
     if (!pq->info.md5sum) continue;
     mustgetpartinfo(pq->info.filename,&ti);
     fputs(gettext(head),stdout); head= "";
-    printf(" Package %s: part(s) ",ti.package);
+    printf(_(" Package %s: part(s) "), ti.package);
     bytes= 0;
     for (i=0; i<ti.maxpartn; i++) {
       for (qq= pq;
diff --git a/dselect/pkglist.cc b/dselect/pkglist.cc
index ac7a9df..09976b5 100644
--- a/dselect/pkglist.cc
+++ b/dselect/pkglist.cc
@@ -415,7 +415,8 @@ packagelist::packagelist(keybindings *kb) : baselist(kb) {
     table[nitems]= state;
     nitems++;
   }
-  if (!nitems) ohshit("There are no packages.");
+  if (!nitems)
+    ohshit(_("There are no packages."));
   recursive= 0;
   sortorder= so_priority;
   statsortorder= sso_avail;
@@ -562,14 +563,18 @@ pkginfo **packagelist::display() {
   if (debug) fprintf(debug,"packagelist[%p]::display() entering loop\n",this);
   for (;;) {
     if (whatinfo_height) wcursyncup(whatinfowin);
-    if (doupdate() == ERR) ohshite("doupdate failed");
+    if (doupdate() == ERR)
+      ohshite(_("doupdate failed"));
     signallist= this;
-    if (sigprocmask(SIG_UNBLOCK,&sigwinchset,0)) ohshite("failed to unblock 
SIGWINCH");
+    if (sigprocmask(SIG_UNBLOCK, &sigwinchset, 0))
+      ohshite(_("failed to unblock SIGWINCH"));
     do
     response= getch();
     while (response == ERR && errno == EINTR);
-    if (sigprocmask(SIG_BLOCK,&sigwinchset,0)) ohshite("failed to re-block 
SIGWINCH");
-    if (response == ERR) ohshite("getch failed");
+    if (sigprocmask(SIG_BLOCK, &sigwinchset, 0))
+      ohshite(_("failed to re-block SIGWINCH"));
+    if (response == ERR)
+      ohshite(_("getch failed"));
     interp= (*bindings)(response);
     if (debug)
       fprintf(debug,"packagelist[%p]::display() response=%d interp=%s\n",
diff --git a/lib/log.c b/lib/log.c
index c5428ef..4a0715e 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -96,7 +96,7 @@ statusfd_send(const char *fmt, ...)
                for (p = vb.buf, l = vb.used; l;  p += r, l -= r) {
                        r = write(pipef->fd, vb.buf, vb.used);
                        if (r < 0)
-                               ohshite("unable to write to status fd %d",
+                               ohshite(_("unable to write to status fd %d"),
                                        pipef->fd);
                        assert(r && r <= l);
                }
diff --git a/scripts/Dpkg/Source/Package/V1.pm 
b/scripts/Dpkg/Source/Package/V1.pm
index 2089e74..2bcf8bb 100644
--- a/scripts/Dpkg/Source/Package/V1.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -212,7 +212,8 @@ sub do_build {
                           $sourcestyle);
                 }
             } else {
-                error("orig argument $origarg is not a plain file or 
directory");
+                error(_g("orig argument %s is not a plain file or directory"),
+                      $origarg);
             }
         } else {
             $sourcestyle =~ y/aA/nn/;
diff --git a/src/filesdb.c b/src/filesdb.c
index 11a4304..e9a1a91 100644
--- a/src/filesdb.c
+++ b/src/filesdb.c
@@ -152,7 +152,8 @@ void ensure_packagefiles_available(struct pkginfo *pkg) {
   push_cleanup(cu_closefd, ehflag_bombout, NULL, 0, 1, &fd);
   
    if(fstat(fd, &stat_buf))
-     ohshite("unable to stat files list file for package `%.250s'",pkg->name);
+     ohshite(_("unable to stat files list file for package '%.250s'"),
+             pkg->name);
 
    if (stat_buf.st_size) {
      loaded_list = nfmalloc(stat_buf.st_size);
@@ -164,7 +165,8 @@ void ensure_packagefiles_available(struct pkginfo *pkg) {
     thisline = loaded_list;
     while (thisline < loaded_list_end) {
       if (!(ptr = memchr(thisline, '\n', loaded_list_end - thisline))) 
-        ohshit("files list file for package `%.250s' is missing final 
newline",pkg->name);
+        ohshit(_("files list file for package '%.250s' is missing final 
newline"),
+               pkg->name);
       /* where to start next time around */
       nextline = ptr + 1;
       /* strip trailing "/" */
@@ -375,7 +377,7 @@ void ensure_statoverrides(void) {
     fso= nfmalloc(sizeof(struct filestatoverride));
 
     if (!(ptr = memchr(thisline, '\n', loaded_list_end - thisline))) 
-      ohshit("statoverride file is missing final newline");
+      ohshit(_("statoverride file is missing final newline"));
     /* where to start next time around */
     nextline = ptr + 1;
     if (ptr == thisline)
@@ -384,60 +386,62 @@ void ensure_statoverrides(void) {
 
     /* Extract the uid */
     if (!(ptr=memchr(thisline, ' ', nextline-thisline)))
-      ohshit("syntax error in statoverride file ");
+      ohshit(_("syntax error in statoverride file"));
     *ptr=0;
     if (thisline[0]=='#') {
       fso->uid=strtol(thisline + 1, &endptr, 10);
       if (*endptr!=0)
-       ohshit("syntax error: invalid uid in statoverride file ");
+        ohshit(_("syntax error: invalid uid in statoverride file"));
     } else {
       struct passwd* pw = getpwnam(thisline);
       if (pw==NULL)
-       ohshit("syntax error: unknown user `%s' in statoverride file ", 
thisline);
+        ohshit(_("syntax error: unknown user '%s' in statoverride file"),
+               thisline);
       fso->uid=pw->pw_uid;
     }
 
     /* Move to the next bit */
     thisline=ptr+1;
     if (thisline>=loaded_list_end)
-      ohshit("unexpected end of line in statoverride file");
+      ohshit(_("unexpected end of line in statoverride file"));
 
     /* Extract the gid */
     if (!(ptr=memchr(thisline, ' ', nextline-thisline)))
-      ohshit("syntax error in statoverride file ");
+      ohshit(_("syntax error in statoverride file"));
     *ptr=0;
     if (thisline[0]=='#') {
       fso->gid=strtol(thisline + 1, &endptr, 10);
       if (*endptr!=0)
-       ohshit("syntax error: invalid gid in statoverride file ");
+        ohshit(_("syntax error: invalid gid in statoverride file"));
     } else {
       struct group* gr = getgrnam(thisline);
       if (gr==NULL)
-       ohshit("syntax error: unknown group `%s' in statoverride file ", 
thisline);
+        ohshit(_("syntax error: unknown group '%s' in statoverride file"),
+               thisline);
       fso->gid=gr->gr_gid;
     }
 
     /* Move to the next bit */
     thisline=ptr+1;
     if (thisline>=loaded_list_end)
-      ohshit("unexpected end of line in statoverride file");
+      ohshit(_("unexpected end of line in statoverride file"));
 
     /* Extract the mode */
     if (!(ptr=memchr(thisline, ' ', nextline-thisline)))
-      ohshit("syntax error in statoverride file ");
+      ohshit(_("syntax error in statoverride file"));
     *ptr=0;
     fso->mode=strtol(thisline, &endptr, 8);
     if (*endptr!=0)
-      ohshit("syntax error: invalid mode in statoverride file ");
+      ohshit(_("syntax error: invalid mode in statoverride file"));
 
     /* Move to the next bit */
     thisline=ptr+1;
     if (thisline>=loaded_list_end)
-      ohshit("unexecpted end of line in statoverride file");
+      ohshit(_("unexecpted end of line in statoverride file"));
 
     fnn= findnamenode(thisline, 0);
     if (fnn->statoverride)
-      ohshit("multiple statusoverides present for file `%.250s'", thisline);
+      ohshit(_("multiple statusoverides present for file '%.250s'"), thisline);
     fnn->statoverride=fso;
     /* Moving on.. */
     thisline=nextline;

-- 
dpkg's main repository


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

Reply via email to