+2006-04-21 Guillem Jover <guillem@debian.org>
+
+ * 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 <guillem@debian.org>
* src/main.c (printforhelp, setdebug, setforce): Quote each string
* 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) <cobaco@linux.be> Thu, 13 Apr 2006 12:51:15 +0200
dpkg (1.13.18) unstable; urgency=low
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);
}
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"
(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 {
}
#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"));
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--;
}
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;
}
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);
}
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)
}
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);
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);
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)++;
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;
}