diff options
author | Guillem Jover <guillem@debian.org> | 2006-04-21 02:03:16 +0000 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2006-04-21 02:03:16 +0000 |
commit | 2b8e678a60c7906ba6a1568e28f2eba8ccb300d0 (patch) | |
tree | d411390311fedae843971cfd9ee1ff4ea98be003 /src | |
parent | 842067259303ed68f0ff6756712c06a417eb7ca1 (diff) | |
download | dpkg-2b8e678a60c7906ba6a1568e28f2eba8ccb300d0.tar.gz |
Fix strings so that they can be more easily translated. Closes: #134358
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 7 | ||||
-rw-r--r-- | src/packages.c | 46 | ||||
-rw-r--r-- | src/query.c | 14 |
3 files changed, 40 insertions, 27 deletions
diff --git a/src/main.c b/src/main.c index d80c284aa..99d68e24e 100644 --- a/src/main.c +++ b/src/main.c @@ -514,8 +514,11 @@ void commandfd(const char *const *argv) { 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) diff --git a/src/packages.c b/src/packages.c index 1c81b1884..d265737e0 100644 --- a/src/packages.c +++ b/src/packages.c @@ -264,13 +264,15 @@ static int deppossi_ok_found(struct pkginfo *possdependee, } 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 @@ static int deppossi_ok_found(struct pkginfo *possdependee, 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 @@ static int deppossi_ok_found(struct pkginfo *possdependee, 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)++; diff --git a/src/query.c b/src/query.c index 032c2a0eb..d0bc00e76 100644 --- a/src/query.c +++ b/src/query.c @@ -372,10 +372,16 @@ void enqperpackage(const char *const *argv) { 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; } |