Author: guillem
Date: 2006-04-21 02:03:16 +0000 (Fri, 21 Apr 2006)
New Revision: 255

Modified:
   trunk/ChangeLog
   trunk/debian/changelog
   trunk/dpkg-deb/extract.c
   trunk/lib/dbmodify.c
   trunk/lib/parsehelp.c
   trunk/lib/showcright.c
   trunk/src/main.c
   trunk/src/packages.c
   trunk/src/query.c
Log:
Fix strings so that they can be more easily translated. Closes: #134358


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2006-04-21 01:27:56 UTC (rev 254)
+++ trunk/ChangeLog     2006-04-21 02:03:16 UTC (rev 255)
@@ -1,5 +1,17 @@
 2006-04-21  Guillem Jover  <[EMAIL PROTECTED]>
 
+       * src/query.c (enqperpackage): Change dynamically consutructed
+       grammar to proper sentences.
+       * src/packages.c (deppossi_ok_found): Likewise.
+       * src/main.c (commandfd): Do not use digits, use textual numbers.
+       * lib/dbmodify.c (createimptmp): Use proper verb forms.
+       * lib/showcright.c (showcopyright): Remove trailing space from string.
+       * lib/parsehelp.c (illegal_packagename): Clarify what is the last '%s'.
+       * dpkg-deb/extract.c (movecontrolfiles): Likewise.
+       (extracthalf): Do not use abbreviations in the strings.
+
+2006-04-21  Guillem Jover  <[EMAIL PROTECTED]>
+
        * src/main.c (printforhelp, setdebug, setforce): Quote each string
        line instead of escaping its new line at the end.
 

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2006-04-21 01:27:56 UTC (rev 254)
+++ trunk/debian/changelog      2006-04-21 02:03:16 UTC (rev 255)
@@ -26,6 +26,9 @@
   * Generate the Russian man pages in the KOI8-R charset. Closes: #361987
   * Document the shlibs.local format in dpkg-source(1). CLoses: #316485
 
+  [ Guillem Jover ]
+  * Fix strings so that they can be more easily translated. Closes: #134358
+
  -- Bart Cornelis (cobaco) <[EMAIL PROTECTED]>  Thu, 13 Apr 2006 12:51:15 +0200
 
 dpkg (1.13.18) unstable; urgency=low

Modified: trunk/dpkg-deb/extract.c
===================================================================
--- trunk/dpkg-deb/extract.c    2006-04-21 01:27:56 UTC (rev 254)
+++ trunk/dpkg-deb/extract.c    2006-04-21 02:03:16 UTC (rev 255)
@@ -56,7 +56,7 @@
 static void readfail(FILE *a, const char *filename, const char *what) 
NONRETURNING;
 static void readfail(FILE *a, const char *filename, const char *what) {
   if (ferror(a)) {
-    ohshite(_("error reading %s from %.255s"),what,filename);
+    ohshite(_("error reading %s from file %.255s"), what, filename);
   } else {
     ohshit(_("unexpected end of file in %s in %.255s"),what,filename);
   }
@@ -192,9 +192,9 @@
     oldformat= 1;
     l= strlen(versionbuf); if (l && versionbuf[l-1]=='\n') versionbuf[l-1]=0;
     if (!fgets(ctrllenbuf,sizeof(ctrllenbuf),ar))
-      readfail(ar,debar,_("ctrl information length"));
+      readfail(ar, debar, _("control information length"));
     if (sscanf(ctrllenbuf,"%zi%c%d",&ctrllennum,&nlc,&dummy) !=2 || nlc != 
'\n')
-      ohshit(_("archive has malformatted ctrl len `%s'"),ctrllenbuf);
+      ohshit(_("archive has malformatted control length `%s'"), ctrllenbuf);
 
     if (admininfo >= 2)
       if (printf(_(" old debian package, version %s.\n"
@@ -203,10 +203,12 @@
                  (long) (stab.st_size - ctrllennum - strlen(ctrllenbuf) - l)) 
== EOF ||
           fflush(stdout)) werr("stdout");
     
-    ctrlarea= malloc(ctrllennum); if (!ctrlarea) ohshite("malloc ctrlarea 
failed");
+    ctrlarea = malloc(ctrllennum);
+    if (!ctrlarea)
+      ohshite(_("failed allocating memory for variable `ctrlarea'"));
 
     errno=0; if (fread(ctrlarea,1,ctrllennum,ar) != ctrllennum)
-      readfail(ar,debar,_("ctrlarea"));
+      readfail(ar, debar, _("control area"));
 
   } else {
     
@@ -222,18 +224,22 @@
   }
 
 #if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ > 0)
-  if(fgetpos(ar, &fpos)) ohshit(_("fgetpos failed"));
+  if (fgetpos(ar, &fpos))
+    ohshit(_("failed getting the current file position"));
 #endif
   fflush(ar);
 #if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ > 0)
-  if(fsetpos(ar, &fpos)) ohshit(_("fsetpos failed"));
+  if (fsetpos(ar, &fpos))
+    ohshit(_("failed setting the current file position"));
 #endif
   if (oldformat) {
     if (admininfo) {
       m_pipe(p1);
       if (!(c1= m_fork())) {
         close(p1[0]);
-        if (!(pi= fdopen(p1[1],"w"))) ohshite(_("failed to fdopen p1 in 
paste"));
+       pi = fdopen(p1[1], "w");
+       if (!pi)
+         ohshite(_("failed to open pipe descriptor `1' in paste"));
         errno=0; if (fwrite(ctrlarea,1,ctrllennum,pi) != ctrllennum)
           ohshit(_("failed to write to gzip -dc"));
         if (fclose(pi)) ohshit(_("failed to close gzip -dc"));

Modified: trunk/lib/dbmodify.c
===================================================================
--- trunk/lib/dbmodify.c        2006-04-21 01:27:56 UTC (rev 254)
+++ trunk/lib/dbmodify.c        2006-04-21 02:03:16 UTC (rev 255)
@@ -113,9 +113,10 @@
   if (ferror(importanttmp))
     ohshite(_("unable to fill %.250s with padding"),importanttmpfile);
   if (fflush(importanttmp))
-    ohshite(_("unable flush %.250s after padding"),importanttmpfile);
+    ohshite(_("unable to flush %.250s after padding"), importanttmpfile);
   if (fseek(importanttmp,0,SEEK_SET))
-    ohshite(_("unable seek to start of %.250s after 
padding"),importanttmpfile);
+    ohshite(_("unable to seek to start of %.250s after padding"),
+           importanttmpfile);
 
   onerr_abort--;
 }

Modified: trunk/lib/parsehelp.c
===================================================================
--- trunk/lib/parsehelp.c       2006-04-21 01:27:56 UTC (rev 254)
+++ trunk/lib/parsehelp.c       2006-04-21 02:03:16 UTC (rev 255)
@@ -119,9 +119,9 @@
     while (isspace(*p)) p++;
     *ep= p; return NULL;
   }
-  snprintf(buf, sizeof(buf),
-          _("character `%c' not allowed - only letters, digits and %s 
allowed"),
-          c, alsoallowed);
+  snprintf(buf, sizeof(buf), _(
+          "character `%c' not allowed (only letters, digits and characters 
`%s')"),
+          c, alsoallowed);
   return buf;
 }
 

Modified: trunk/lib/showcright.c
===================================================================
--- trunk/lib/showcright.c      2006-04-21 01:27:56 UTC (rev 254)
+++ trunk/lib/showcright.c      2006-04-21 02:03:16 UTC (rev 255)
@@ -30,7 +30,8 @@
 void showcopyright(const struct cmdinfo *c, const char *v) {
   int fd;
   fd= open(COPYINGFILE,O_RDONLY);
-  if (fd < 0) ohshite(_("cannot open GPL file "));
+  if (fd < 0)
+    ohshite(_("cannot open GPL file"));
   fd_fd_copy(fd, 1, -1, "showcopyright");
   exit(0);
 }

Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c    2006-04-21 01:27:56 UTC (rev 254)
+++ trunk/src/main.c    2006-04-21 02:03:16 UTC (rev 255)
@@ -514,8 +514,11 @@
   int c, lno, infd, i, skipchar;
   static void (*actionfunction)(const char *const *argv);
 
-  if ((pipein= *argv++) == NULL) badusage(_("--command-fd takes 1 argument, 
not 0"));
-  if (*argv) badusage(_("--command-fd only takes 1 argument"));
+  pipein = *argv++;
+  if (pipein == NULL)
+    badusage(_("--command-fd takes one argument, not zero"));
+  if (*argv)
+    badusage(_("--command-fd only takes one argument"));
   if ((infd= strtol(pipein, (char **)NULL, 10)) == -1)
     ohshite(_("invalid number for --command-fd"));
   if ((in= fdopen(infd, "r")) == NULL)

Modified: trunk/src/packages.c
===================================================================
--- trunk/src/packages.c        2006-04-21 01:27:56 UTC (rev 254)
+++ trunk/src/packages.c        2006-04-21 02:03:16 UTC (rev 255)
@@ -264,13 +264,15 @@
   }
   thisf= 0;
   if (possdependee == removing) {
-    varbufaddstr(oemsgs,_("  Package "));
-    varbufaddstr(oemsgs,possdependee->name);
     if (providing) {
-      varbufaddstr(oemsgs,_(" which provides "));
-      varbufaddstr(oemsgs,providing->name);
+      varbufprintf(oemsgs,
+                  _("  Package %s which provides %s is to be removed.\n"),
+                  possdependee->name, providing->name);
+    } else {
+      varbufprintf(oemsgs, _("  Package %s is to be removed.\n"),
+                  possdependee->name);
     }
-    varbufaddstr(oemsgs,_(" is to be removed.\n"));
+
     *matched= 1;
     if (fc_depends) thisf= (dependtry >= 4) ? 2 : 1;
     debug(dbg_depcondetail,"      removing possdependee, returning %d",thisf);
@@ -282,12 +284,10 @@
   case stat_halfconfigured:
     assert(possdependee->installed.valid);
     if (checkversion && 
!versionsatisfied(&possdependee->installed,checkversion)) {
-      varbufaddstr(oemsgs,_("  Version of "));
-      varbufaddstr(oemsgs,possdependee->name);
-      varbufaddstr(oemsgs,_(" on system is "));
-      varbufaddstr(oemsgs,versiondescribe(&possdependee->installed.version,
-                                          vdew_nonambig));
-      varbufaddstr(oemsgs,".\n");
+      varbufprintf(oemsgs, _("  Version of %s on system is %s.\n"),
+                  possdependee->name,
+                  versiondescribe(&possdependee->installed.version,
+                                  vdew_nonambig));
       assert(checkversion->verrel != dvr_none);
       if (fc_depends) thisf= (dependtry >= 3) ? 2 : 1;
       debug(dbg_depcondetail,"      bad version, returning %d",thisf);
@@ -308,26 +308,30 @@
               possdependee->name, requiredby->name);
       add_to_queue(possdependee); sincenothing=0; return 1;
     } else {
-      varbufaddstr(oemsgs,_("  Package "));
-      varbufaddstr(oemsgs,possdependee->name);
       if (providing) {
-        varbufaddstr(oemsgs,_(" which provides "));
-        varbufaddstr(oemsgs,providing->name);
+       varbufprintf(oemsgs,
+                    _("  Package %s which provides %s is not configured 
yet.\n"),
+                    possdependee->name, providing->name);
+      } else {
+       varbufprintf(oemsgs, _("  Package %s is not configured yet.\n"),
+                    possdependee->name);
       }
-      varbufaddstr(oemsgs,_(" is not configured yet.\n"));
+
       if (fc_depends) thisf= (dependtry >= 4) ? 2 : 1;
       debug(dbg_depcondetail,"      not configured/able - returning %d",thisf);
       (*interestingwarnings)++;
       return thisf;
     }
   default:
-    varbufaddstr(oemsgs,_("  Package "));
-    varbufaddstr(oemsgs,possdependee->name);
     if (providing) {
-      varbufaddstr(oemsgs,_(" which provides "));
-      varbufaddstr(oemsgs,providing->name);
+      varbufprintf(oemsgs,
+                  _("  Package %s which provides %s is not installed.\n"),
+                  possdependee->name, providing->name);
+    } else {
+      varbufprintf(oemsgs, _("  Package %s is not installed.\n"),
+                  possdependee->name);
     }
-    varbufaddstr(oemsgs,_(" is not installed.\n"));
+
     if (fc_depends) thisf= (dependtry >= 4) ? 2 : 1;
     debug(dbg_depcondetail,"      not installed - returning %d",thisf);
     (*interestingwarnings)++;

Modified: trunk/src/query.c
===================================================================
--- trunk/src/query.c   2006-04-21 01:27:56 UTC (rev 254)
+++ trunk/src/query.c   2006-04-21 02:03:16 UTC (rev 255)
@@ -372,10 +372,16 @@
             namenode= file->namenode;
             puts(namenode->name);
             if (namenode->divert && !namenode->divert->camefrom) {
-              if (!namenode->divert->pkg) printf(_("locally diverted"));
-              else if (pkg == namenode->divert->pkg) printf(_("package diverts 
others"));
-              else printf(_("diverted by %s"),namenode->divert->pkg->name);
-              printf(_(" to: %s\n"),namenode->divert->useinstead->name);
+              if (!namenode->divert->pkg)
+               printf(_("locally diverted to: %s\n"),
+                      namenode->divert->useinstead->name);
+              else if (pkg == namenode->divert->pkg)
+               printf(_("package diverts others to: %s\n"),
+                      namenode->divert->useinstead->name);
+              else
+               printf(_("diverted by %s to: %s\n"),
+                      namenode->divert->pkg->name,
+                      namenode->divert->useinstead->name);
             }
             file= file->next;
           }


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

Reply via email to