From aa7c40eb11e38529df8f7604240fe985fa9f8797 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Mon, 25 Oct 1999 18:52:12 +0000 Subject: [PATCH] translation fixups --- ChangeLog | 5 +++++ dselect/basecmds.cc | 2 +- dselect/baselist.cc | 10 +++++----- dselect/methlist.cc | 20 ++++++++++---------- dselect/methparse.cc | 32 ++++++++++++++++---------------- dselect/pkgcmds.cc | 2 +- dselect/pkgdepcon.cc | 42 +++++++++++++++++++++--------------------- dselect/pkgdisplay.cc | 2 +- dselect/pkginfo.cc | 8 ++++---- dselect/pkglist.cc | 22 +++++++++++----------- dselect/pkgsublist.cc | 30 +++++++++++++++--------------- lib/database.c | 2 +- lib/dbmodify.c | 2 +- lib/ehandle.c | 2 +- lib/fields.c | 6 +++--- lib/parsehelp.c | 4 ++-- lib/vercmp.c | 2 +- main/archives.c | 26 +++++++++++++------------- main/configure.c | 4 ++-- main/depcon.c | 16 ++++++++-------- main/enquiry.c | 20 ++++++++++---------- main/errors.c | 6 +++--- main/filesdb.c | 8 ++++---- main/help.c | 7 ++++--- main/main.c | 16 ++++++++-------- main/packages.c | 10 +++++----- main/processarc.c | 2 +- main/update.c | 4 ++-- 28 files changed, 159 insertions(+), 153 deletions(-) diff --git a/ChangeLog b/ChangeLog index faf30512..48368dbd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Oct 25 19:10:50 CEST 1999 Wichert Akkerman + + * Mark more strings for translation in libdpkg and dpkg + * Don't bother translating debug-statements + Mon Oct 25 11:55:35 EDT 1999 Ben Collins * scripts/dpkg-shlibdeps: start using objdump as opposed to ldd, this diff --git a/dselect/basecmds.cc b/dselect/basecmds.cc index 95f1b113..07ff4f53 100644 --- a/dselect/basecmds.cc +++ b/dselect/basecmds.cc @@ -86,7 +86,7 @@ void baselist::kd_redraw() { // RFSH(whatinfowin); /* fixme-ncurses: why does ncurses need this ? */ clearok(curscr,TRUE); redrawall(); - if (debug) fprintf(debug,_("baselist[%p]::kd_redraw() done\n"),this); + if (debug) fprintf(debug,"baselist[%p]::kd_redraw() done\n",this); } void baselist::kd_searchagain() { diff --git a/dselect/baselist.cc b/dselect/baselist.cc index a40fec7c..5e208ae3 100644 --- a/dselect/baselist.cc +++ b/dselect/baselist.cc @@ -105,7 +105,7 @@ void baselist::setheights() { } void baselist::startdisplay() { - if (debug) fprintf(debug,_("baselist[%p]::startdisplay()\n"),this); + if (debug) fprintf(debug,"baselist[%p]::startdisplay()\n",this); cbreak(); noecho(); nonl(); keypad(stdscr,TRUE); clear(); wnoutrefresh(stdscr); @@ -220,7 +220,7 @@ void baselist::redraw1item(int index) { baselist::baselist(keybindings *kb) { if (debug) - fprintf(debug,_("baselist[%p]::baselist()\n"),this); + fprintf(debug,"baselist[%p]::baselist()\n",this); bindings= kb; nitems= 0; @@ -258,7 +258,7 @@ void baselist::itd_keys() { void baselist::dosearch() { int offset, index, searchlen; searchlen= strlen(searchstring); - if (debug) fprintf(debug,_("packagelist[%p]::dosearch(); searchstring=`%s' len=%d\n"), + if (debug) fprintf(debug,"packagelist[%p]::dosearch(); searchstring=`%s' len=%d\n", this,searchstring,searchlen); for (offset=1, index=greaterint(topofscreen,cursorline+1); offset0) { m++; offleft--; } @@ -352,7 +352,7 @@ void baselist::wordwrapinfo(int offset, const char *m) { if (!p) break; m= ++p; } - if (debug) fprintf(debug,_("baselist[%p]::wordwrapinfo() done\n"),this); + if (debug) fprintf(debug,"baselist[%p]::wordwrapinfo() done\n",this); } baselist::~baselist() { } diff --git a/dselect/methlist.cc b/dselect/methlist.cc index cb063f12..726caf42 100644 --- a/dselect/methlist.cc +++ b/dselect/methlist.cc @@ -44,13 +44,13 @@ const char *methodlist::itemname(int index) { void methodlist::kd_abort() { } void methodlist::kd_quit() { - if (debug) fprintf(debug,_("methodlist[%p]::kd_quit() setting coption=%p\n"), + if (debug) fprintf(debug,"methodlist[%p]::kd_quit() setting coption=%p\n", this, table[cursorline]); coption= table[cursorline]; } void methodlist::setwidths() { - if (debug) fprintf(debug,_("methodlist[%p]::setwidths()\n"),this); + if (debug) fprintf(debug,"methodlist[%p]::setwidths()\n",this); status_width= 1; gap_width= 1; @@ -118,7 +118,7 @@ methodlist::methodlist() : baselist(&methodlistbindings) { int newcursor= -1; if (debug) - fprintf(debug,_("methodlist[%p]::methodlist()\n"),this); + fprintf(debug,"methodlist[%p]::methodlist()\n",this); table= new struct option*[noptions]; @@ -133,11 +133,11 @@ methodlist::methodlist() : baselist(&methodlistbindings) { setcursor(newcursor); if (debug) - fprintf(debug,_("methodlist[%p]::methodlist done; noptions=%d\n"), this, noptions); + fprintf(debug,"methodlist[%p]::methodlist done; noptions=%d\n", this, noptions); } methodlist::~methodlist() { - if (debug) fprintf(debug,_("methodlist[%p]::~methodlist()\n"),this); + if (debug) fprintf(debug,"methodlist[%p]::~methodlist()\n",this); delete[] table; } @@ -145,12 +145,12 @@ quitaction methodlist::display() { int response; const keybindings::interpretation *interp; - if (debug) fprintf(debug,_("methodlist[%p]::display()\n"),this); + if (debug) fprintf(debug,"methodlist[%p]::display()\n",this); setupsigwinch(); startdisplay(); - if (debug) fprintf(debug,_("methodlist[%p]::display() entering loop\n"),this); + if (debug) fprintf(debug,"methodlist[%p]::display() entering loop\n",this); for (;;) { if (whatinfo_height) wcursyncup(whatinfowin); if (doupdate() == ERR) ohshite(_("doupdate failed")); @@ -161,7 +161,7 @@ quitaction methodlist::display() { if (response == ERR) ohshite(_("getch failed")); interp= (*bindings)(response); if (debug) - fprintf(debug,_("methodlist[%p]::display() response=%d interp=%s\n"), + fprintf(debug,"methodlist[%p]::display() response=%d interp=%s\n", this,response, interp ? interp->action : _("[none]")); if (!interp) { beep(); continue; } (this->*(interp->mfn))(); @@ -170,7 +170,7 @@ quitaction methodlist::display() { pop_cleanup(ehflag_normaltidy); // unset the SIGWINCH handler enddisplay(); - if (debug) fprintf(debug,_("methodlist[%p]::display() done\n"),this); + if (debug) fprintf(debug,"methodlist[%p]::display() done\n",this); return interp->qa; } @@ -196,7 +196,7 @@ void methodlist::redrawinfo() { whatinfovb.reset(); werase(infopad); wmove(infopad,0,0); - if (debug) fprintf(debug,_("methodlist[%p]::redrawinfo()\n"), this); + if (debug) fprintf(debug,"methodlist[%p]::redrawinfo()\n", this); itd_description(); diff --git a/dselect/methparse.cc b/dselect/methparse.cc index 913fd2fa..0720a354 100644 --- a/dselect/methparse.cc +++ b/dselect/methparse.cc @@ -86,11 +86,11 @@ void readmethods(const char *pathbase, option **optionspp, int *nread) { ohshite(_("unable to read `%.250s' directory for reading methods"),pathbuf); } - if (debug) fprintf(debug,_("readmethods(`%s',...) directory open\n"), pathbase); + if (debug) fprintf(debug,"readmethods(`%s',...) directory open\n", pathbase); while ((dent= readdir(dir)) != 0) { c= dent->d_name[0]; - if (debug) fprintf(debug,_("readmethods(`%s',...) considering `%s' ...\n"), + if (debug) fprintf(debug,"readmethods(`%s',...) considering `%s' ...\n", pathbase,dent->d_name); if (c != '_' && !isalpha(c)) continue; for (p= dent->d_name+1; (c= *p) != 0 && isalnum(c) && c != '_'; p++); @@ -110,7 +110,7 @@ void readmethods(const char *pathbase, option **optionspp, int *nread) { if (access(pathbuf,R_OK|X_OK)) ohshite(_("unable to access method script `%.250s'"),pathbuf); } - if (debug) fprintf(debug,_(" readmethods(`%s',...) scripts ok\n"), pathbase); + if (debug) fprintf(debug," readmethods(`%s',...) scripts ok\n", pathbase); strcpy(pathinmeth,METHODOPTIONSFILE); names= fopen(pathbuf,"r"); @@ -127,8 +127,8 @@ void readmethods(const char *pathbase, option **optionspp, int *nread) { meth->back= 0; if (methods) methods->back= meth; methods= meth; - if (debug) fprintf(debug,_(" readmethods(`%s',...) new method" - " name=`%s' path=`%s' pathinmeth=`%s'\n"), + if (debug) fprintf(debug," readmethods(`%s',...) new method" + " name=`%s' path=`%s' pathinmeth=`%s'\n", pathbase, meth->name, meth->path, meth->pathinmeth); while ((c= fgetc(names)) != EOF) { @@ -196,10 +196,10 @@ void readmethods(const char *pathbase, option **optionspp, int *nread) { } strcpy(pathinmeth,METHODOPTIONSFILE); - if (debug) fprintf(debug,_(" readmethods(`%s',...) new option" + if (debug) fprintf(debug," readmethods(`%s',...) new option" " index=`%s' name=`%s' summary=`%.20s'" " strlen(description=%s)=%ld" - " method name=`%s' path=`%s' pathinmeth=`%s'\n"), + " method name=`%s' path=`%s' pathinmeth=`%s'\n", pathbase, opt->index, opt->name, opt->summary, opt->description ? "`...'" : "null", @@ -217,7 +217,7 @@ void readmethods(const char *pathbase, option **optionspp, int *nread) { fclose(names); } closedir(dir); - if (debug) fprintf(debug,_("readmethods(`%s',...) done\n"), pathbase); + if (debug) fprintf(debug,"readmethods(`%s',...) done\n", pathbase); delete[] pathbuf; } @@ -245,26 +245,26 @@ void getcurrentopt() { if (errno == ENOENT) return; ohshite(_("unable to open current option file `%.250s'"),methoptfile); } - if (debug) fprintf(debug,_("getcurrentopt() cmethopt open\n")); + if (debug) fprintf(debug,"getcurrentopt() cmethopt open\n"); if (!fgets(methoptbuf,sizeof(methoptbuf),cmo)) { fclose(cmo); return; } if (fgetc(cmo) != EOF) { fclose(cmo); return; } if (!feof(cmo)) { fclose(cmo); return; } - if (debug) fprintf(debug,_("getcurrentopt() cmethopt eof\n")); + if (debug) fprintf(debug,"getcurrentopt() cmethopt eof\n"); fclose(cmo); - if (debug) fprintf(debug,_("getcurrentopt() cmethopt read\n")); + if (debug) fprintf(debug,"getcurrentopt() cmethopt read\n"); l= strlen(methoptbuf); if (!l || methoptbuf[l-1] != '\n') return; methoptbuf[--l]= 0; - if (debug) fprintf(debug,_("getcurrentopt() cmethopt len and newline\n")); + if (debug) fprintf(debug,"getcurrentopt() cmethopt len and newline\n"); p= strchr(methoptbuf,' '); if (!p) return; - if (debug) fprintf(debug,_("getcurrentopt() cmethopt space\n")); + if (debug) fprintf(debug,"getcurrentopt() cmethopt space\n"); *p++= 0; - if (debug) fprintf(debug,_("getcurrentopt() cmethopt meth name `%s'\n"), methoptbuf); + if (debug) fprintf(debug,"getcurrentopt() cmethopt meth name `%s'\n", methoptbuf); for (meth= methods; meth && strcmp(methoptbuf,meth->name); meth= meth->next); if (!meth) return; - if (debug) fprintf(debug,_("getcurrentopt() cmethopt meth found; opt `%s'\n"),p); + if (debug) fprintf(debug,"getcurrentopt() cmethopt meth found; opt `%s'\n",p); for (opt= options; opt && (opt->meth != meth || strcmp(p,opt->name)); opt= opt->next); if (!opt) return; - if (debug) fprintf(debug,_("getcurrentopt() cmethopt opt found\n")); + if (debug) fprintf(debug,"getcurrentopt() cmethopt opt found\n"); coption= opt; } diff --git a/dselect/pkgcmds.cc b/dselect/pkgcmds.cc index 1de9e8e2..4189b15a 100644 --- a/dselect/pkgcmds.cc +++ b/dselect/pkgcmds.cc @@ -136,7 +136,7 @@ void packagelist::kd_purge() { setwant(pkginfo::want_purge); } int would_like_to_install(pkginfo::pkgwant wantvalue, pkginfo *pkg) { /* Returns: 1 for yes, 0 for no, -1 for if they want to preserve an error condition. */ - if (debug) fprintf(debug,_("would_like_to_install(%d, %s) status %d\n"), + if (debug) fprintf(debug,"would_like_to_install(%d, %s) status %d\n", wantvalue,pkg->name,pkg->status); if (wantvalue == pkginfo::want_install) return 1; diff --git a/dselect/pkgdepcon.cc b/dselect/pkgdepcon.cc index 5e11470f..51f063b7 100644 --- a/dselect/pkgdepcon.cc +++ b/dselect/pkgdepcon.cc @@ -49,7 +49,7 @@ pkginfoperfile *packagelist::findinfo(pkginfo *pkg) { pkginfoperfile *r; r= useavailable(pkg) ? &pkg->available : &pkg->installed; if (debug) - fprintf(debug,_("packagelist[%p]::findinfo(%s) useavailable=%d\n"),this,pkg->name,useavailable(pkg)); + fprintf(debug,"packagelist[%p]::findinfo(%s) useavailable=%d\n",this,pkg->name,useavailable(pkg)); if (!r->valid) blankpackageperfile(r); return r; } @@ -78,7 +78,7 @@ int packagelist::resolvesuggest() { // Return 2 if we made a change due to a Recommended, Depends or Conficts, // or 1 if we offered or made a change because of an Optional line. if (debug) - fprintf(debug,_("packagelist[%p]::resolvesuggest()\n"),this); + fprintf(debug,"packagelist[%p]::resolvesuggest()\n",this); int changemade, maxchangemade; maxchangemade= 0; for (;;) { @@ -87,7 +87,7 @@ int packagelist::resolvesuggest() { for (index=0; indexpkg->name) continue; if (depdebug && debug) - fprintf(debug,_("packagelist[%p]::resolvesuggest() loop[%i] %s / %d\n"), + fprintf(debug,"packagelist[%p]::resolvesuggest() loop[%i] %s / %d\n", this, index, table[index]->pkg->name, changemade); dependency *depends; for (depends= findinfo(table[index]->pkg)->depends; @@ -103,14 +103,14 @@ int packagelist::resolvesuggest() { changemade= checkdependers(depends->list->ed,changemade); } if (depdebug && debug) - fprintf(debug,_("packagelist[%p]::resolvesuggest() loop[%i] %s / -> %d\n"), + fprintf(debug,"packagelist[%p]::resolvesuggest() loop[%i] %s / -> %d\n", this, index, table[index]->pkg->name, changemade); } if (!changemade) break; maxchangemade= greaterint(maxchangemade, changemade); } if (debug) - fprintf(debug,_("packagelist[%p]::resolvesuggest() done; maxchangemade=%d\n"), + fprintf(debug,"packagelist[%p]::resolvesuggest() done; maxchangemade=%d\n", this,maxchangemade); return maxchangemade; } @@ -120,7 +120,7 @@ static int dep_update_best_to_change_stop(perpackagestate *& best, pkginfo *tryt if (!trythis->clientdata) return 0; if (depdebug && debug) - fprintf(debug,_("update_best_to_change(best=%s{%d}, test=%s{%d});\n"), + fprintf(debug,"update_best_to_change(best=%s{%d}, test=%s{%d});\n", best ? best->pkg->name : "", best ? (int)best->spriority : -1, trythis->name, trythis->clientdata->spriority); @@ -150,7 +150,7 @@ static int dep_update_best_to_change_stop(perpackagestate *& best, pkginfo *tryt return 0; yes: - if (depdebug && debug) fprintf(debug,_("update_best_to_change(); yes\n")); + if (depdebug && debug) fprintf(debug,"update_best_to_change(); yes\n"); best=trythis->clientdata; return 0; } @@ -168,7 +168,7 @@ int packagelist::deselect_one_of(pkginfo *per, pkginfo *ped, dependency *display ed= ped->clientdata; if (depdebug && debug) - fprintf(debug,_("packagelist[%p]::deselect_one_of(): er %s{%d} ed %s{%d} [%p]\n"), + fprintf(debug,"packagelist[%p]::deselect_one_of(): er %s{%d} ed %s{%d} [%p]\n", this, er->pkg->name, er->spriority, ed->pkg->name, ed->spriority, display); perpackagestate *best; @@ -185,7 +185,7 @@ int packagelist::deselect_one_of(pkginfo *per, pkginfo *ped, dependency *display else best= ed; // ... failing that, the second if (depdebug && debug) - fprintf(debug,_("packagelist[%p]::deselect_one_of(): best %s{%d}\n"), + fprintf(debug,"packagelist[%p]::deselect_one_of(): best %s{%d}\n", this, best->pkg->name, best->spriority); if (best->spriority >= sp_deselecting) return 0; @@ -204,7 +204,7 @@ int packagelist::resolvedepcon(dependency *depends) { int r, foundany; if (depdebug && debug) { - fprintf(debug,_("packagelist[%p]::resolvedepcon([%p] %s --%s-->"), + fprintf(debug,"packagelist[%p]::resolvedepcon([%p] %s --%s-->", this,depends,depends->up->name,gettext(relatestrings[depends->type])); for (possi=depends->list; possi; possi=possi->next) fprintf(debug," %s",possi->ed->name); @@ -238,7 +238,7 @@ int packagelist::resolvedepcon(dependency *depends) { possi && !deppossatisfied(possi,&fixbyupgrade); possi= possi->next); if (depdebug && debug) - fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): depends found %s\n"), + fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): depends found %s\n", this,depends, possi ? possi->ed->name : _("[none]")); if (possi) return 0; @@ -249,8 +249,8 @@ int packagelist::resolvedepcon(dependency *depends) { if (depends->type == dep_suggests) return r; if (fixbyupgrade) { - if (depdebug && debug) fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): " - "fixbyupgrade %s\n"), this,depends,fixbyupgrade->pkg->name); + if (depdebug && debug) fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): " + "fixbyupgrade %s\n", this,depends,fixbyupgrade->pkg->name); best= fixbyupgrade; } else { best= 0; @@ -270,13 +270,13 @@ int packagelist::resolvedepcon(dependency *depends) { if (!foundany) addunavailable(possi); } if (!best) { - if (depdebug && debug) fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): " - "mustdeselect nobest\n"), this,depends); + if (depdebug && debug) fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): " + "mustdeselect nobest\n", this,depends); return r; } } if (depdebug && debug) - fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): select best=%s{%d}\n"), + fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): select best=%s{%d}\n", this,depends, best->pkg->name, best->spriority); if (best->spriority >= sp_selecting) return r; best->selected= best->suggested= pkginfo::want_install; @@ -286,7 +286,7 @@ int packagelist::resolvedepcon(dependency *depends) { mustdeselect: best= depends->up->clientdata; if (depdebug && debug) - fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): mustdeselect best=%s{%d}\n"), + fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): mustdeselect best=%s{%d}\n", this,depends, best->pkg->name, best->spriority); if (best->spriority >= sp_deselecting) return r; @@ -299,20 +299,20 @@ int packagelist::resolvedepcon(dependency *depends) { case dep_conflicts: if (depdebug && debug) - fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): conflict\n"), + fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): conflict\n", this,depends); if (would_like_to_install(depends->up->clientdata->selected,depends->up) == 0) return 0; if (depdebug && debug) - fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): conflict installing 1\n"), + fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): conflict installing 1\n", this,depends); if (!deppossatisfied(depends->list,0)) return 0; if (depdebug && debug) - fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): conflict satisfied - ouch\n"), + fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): conflict satisfied - ouch\n", this,depends); if (depends->up != depends->list->ed) { @@ -327,7 +327,7 @@ int packagelist::resolvedepcon(dependency *depends) { r= deselect_one_of(depends->up, provider->up->up, depends); if (r) return r; } if (depdebug && debug) - fprintf(debug,_("packagelist[%p]::resolvedepcon([%p]): no desel\n"), this,depends); + fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): no desel\n", this,depends); return 0; default: diff --git a/dselect/pkgdisplay.cc b/dselect/pkgdisplay.cc index 82ac2362..e6de72ee 100644 --- a/dselect/pkgdisplay.cc +++ b/dselect/pkgdisplay.cc @@ -128,7 +128,7 @@ static int maximumstring(const char *const *array) { } void packagelist::setwidths() { - if (debug) fprintf(debug,_("packagelist[%p]::setwidths()\n"),this); + if (debug) fprintf(debug,"packagelist[%p]::setwidths()\n",this); if (verbose) { status_hold_width= 9; diff --git a/dselect/pkginfo.cc b/dselect/pkginfo.cc index aa9ad06a..8ace6d86 100644 --- a/dselect/pkginfo.cc +++ b/dselect/pkginfo.cc @@ -94,7 +94,7 @@ void packagelist::itd_relations() { if (table[cursorline]->pkg->name) { whatinfovb(_("interrelationships affecting ")); whatinfovb(table[cursorline]->pkg->name); - if (debug) fprintf(debug,_("packagelist[%p]::idt_relations(); `%s'\n"), + if (debug) fprintf(debug,"packagelist[%p]::idt_relations(); `%s'\n", this,table[cursorline]->relations.string()); waddstr(infopad,table[cursorline]->relations.string()); } else { @@ -136,7 +136,7 @@ void packagelist::itd_statuscontrol() { varbufrecord(&vb,table[cursorline]->pkg,&table[cursorline]->pkg->installed); vb.terminate(); if (debug) - fprintf(debug,_("packagelist[%p]::idt_statuscontrol(); `%s'\n"),this,vb.string()); + fprintf(debug,"packagelist[%p]::idt_statuscontrol(); `%s'\n",this,vb.string()); waddstr(infopad,vb.string()); } } @@ -152,7 +152,7 @@ void packagelist::itd_availablecontrol() { varbufrecord(&vb,table[cursorline]->pkg,&table[cursorline]->pkg->available); vb.terminate(); if (debug) - fprintf(debug,_("packagelist[%p]::idt_availablecontrol(); `%s'\n"),this,vb.string()); + fprintf(debug,"packagelist[%p]::idt_availablecontrol(); `%s'\n",this,vb.string()); waddstr(infopad,vb.string()); } } @@ -169,7 +169,7 @@ void packagelist::redrawinfo() { werase(infopad); wmove(infopad,0,0); if (debug) - fprintf(debug,_("packagelist[%p]::redrawinfo(); #=%d\n"), this, + fprintf(debug,"packagelist[%p]::redrawinfo(); #=%d\n", this, (int)(currentinfo - baseinfo)); (this->*currentinfo->display)(); diff --git a/dselect/pkglist.cc b/dselect/pkglist.cc index 829a21dd..1826ed4f 100644 --- a/dselect/pkglist.cc +++ b/dselect/pkglist.cc @@ -116,7 +116,7 @@ void packagelist::addheading(enum ssavailval ssavail, table= newtable; } - if (debug) fprintf(debug,_("packagelist[%p]::addheading(%d,%d,%d,%s,%s)\n"), + if (debug) fprintf(debug,"packagelist[%p]::addheading(%d,%d,%d,%s,%s)\n", this,ssavail,ssstate,priority, otherpriority ? otherpriority : _(""), section ? section : _("")); @@ -148,7 +148,7 @@ int qsort_compareentries(const void *a, const void *b) { void packagelist::sortinplace() { sortpackagelist= this; - if (debug) fprintf(debug,_("packagelist[%p]::sortinplace()\n"),this); + if (debug) fprintf(debug,"packagelist[%p]::sortinplace()\n",this); qsort(table,nitems,sizeof(struct pkginfoperfile*),qsort_compareentries); } @@ -158,20 +158,20 @@ void packagelist::ensurestatsortinfo() { struct pkginfo *pkg; int index; - if (debug) fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() " - "sortorder=%d nitems=%d\n"),this,statsortorder,nitems); + if (debug) fprintf(debug,"packagelist[%p]::ensurestatsortinfos() " + "sortorder=%d nitems=%d\n",this,statsortorder,nitems); switch (statsortorder) { case sso_unsorted: - if (debug) fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() unsorted\n"),this); + if (debug) fprintf(debug,"packagelist[%p]::ensurestatsortinfos() unsorted\n",this); return; case sso_avail: - if (debug) fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() calcssadone=%d\n"), + if (debug) fprintf(debug,"packagelist[%p]::ensurestatsortinfos() calcssadone=%d\n", this,calcssadone); if (calcssadone) return; for (index=0; index < nitems; index++) { if (debug) - fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() i=%d pkg=%s\n"), + fprintf(debug,"packagelist[%p]::ensurestatsortinfos() i=%d pkg=%s\n", this,index,table[index]->pkg->name); pkg= table[index]->pkg; if (!pkg->installed.valid) blankpackageperfile(&pkg->installed); @@ -207,19 +207,19 @@ void packagelist::ensurestatsortinfo() { internerr(_("unknown stat in ensurestatsortinfo sso_avail")); } if (debug) - fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() i=%d ssavail=%d\n"), + fprintf(debug,"packagelist[%p]::ensurestatsortinfos() i=%d ssavail=%d\n", this,index,table[index]->ssavail); } calcssadone= 1; break; case sso_state: - if (debug) fprintf(debug,_(_("packagelist[%p]::ensurestatsortinfos() calcsssdone=%d\n")), + if (debug) fprintf(debug,"packagelist[%p]::ensurestatsortinfos() calcsssdone=%d\n", this,calcsssdone); if (calcsssdone) return; for (index=0; index < nitems; index++) { if (debug) - fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() i=%d pkg=%s\n"), + fprintf(debug,"packagelist[%p]::ensurestatsortinfos() i=%d pkg=%s\n", this,index,table[index]->pkg->name); switch (table[index]->pkg->status) { case pkginfo::stat_unpacked: @@ -240,7 +240,7 @@ void packagelist::ensurestatsortinfo() { internerr(_("unknown stat in ensurestatsortinfo sso_state")); } if (debug) - fprintf(debug,_("packagelist[%p]::ensurestatsortinfos() i=%d ssstate=%d\n"), + fprintf(debug,"packagelist[%p]::ensurestatsortinfos() i=%d ssstate=%d\n", this,index,table[index]->ssstate); } diff --git a/dselect/pkgsublist.cc b/dselect/pkgsublist.cc index b9b9db82..9817803e 100644 --- a/dselect/pkgsublist.cc +++ b/dselect/pkgsublist.cc @@ -34,12 +34,12 @@ extern "C" { #include "bindings.h" void packagelist::add(pkginfo *pkg) { - if (debug) fprintf(debug,_("packagelist[%p]::add(pkginfo %s)\n"),this,pkg->name); + if (debug) fprintf(debug,"packagelist[%p]::add(pkginfo %s)\n",this,pkg->name); if (!recursive || // never add things to top level !pkg->clientdata || // don't add pure virtual packages pkg->clientdata->uprec) // don't add ones already in the recursive list return; - if (debug) fprintf(debug,_("packagelist[%p]::add(pkginfo %s) adding\n"),this,pkg->name); + if (debug) fprintf(debug,"packagelist[%p]::add(pkginfo %s) adding\n",this,pkg->name); perpackagestate *state= &datatable[nitems]; state->pkg= pkg; state->direct= state->original= pkg->clientdata->selected; @@ -53,14 +53,14 @@ void packagelist::add(pkginfo *pkg) { } void packagelist::add(pkginfo *pkg, pkginfo::pkgwant nw) { - if (debug) fprintf(debug,_("packagelist[%p]::add(pkginfo %s, %s)\n"), + if (debug) fprintf(debug,"packagelist[%p]::add(pkginfo %s, %s)\n", this,pkg->name,gettext(wantstrings[nw])); add(pkg); if (!pkg->clientdata) return; pkg->clientdata->direct= nw; selpriority np; np= would_like_to_install(nw,pkg) ? sp_selecting : sp_deselecting; if (pkg->clientdata->spriority > np) return; - if (debug) fprintf(debug,_("packagelist[%p]::add(pkginfo %s, %s) setting\n"), + if (debug) fprintf(debug,"packagelist[%p]::add(pkginfo %s, %s) setting\n", this,pkg->name,gettext(wantstrings[nw])); pkg->clientdata->suggested= pkg->clientdata->selected= nw; pkg->clientdata->spriority= np; @@ -69,7 +69,7 @@ void packagelist::add(pkginfo *pkg, pkginfo::pkgwant nw) { void packagelist::add(pkginfo *pkg, const char *extrainfo, showpriority showimp) { if (debug) - fprintf(debug,_("packagelist[%p]::add(pkginfo %s, \"...\", showpriority %d)\n"), + fprintf(debug,"packagelist[%p]::add(pkginfo %s, \"...\", showpriority %d)\n", this,pkg->name,showimp); add(pkg); if (!pkg->clientdata) return; if (pkg->clientdata->dpriority < showimp) pkg->clientdata->dpriority= showimp; @@ -82,7 +82,7 @@ int packagelist::alreadydone(doneent **done, void *check) { for (search= *done; search && search->dep != check; search=search->next); if (search) return 1; - if (debug) fprintf(debug,_("packagelist[%p]::alreadydone(%p,%p) new\n"), + if (debug) fprintf(debug,"packagelist[%p]::alreadydone(%p,%p) new\n", this,done,check); search= new doneent; search->next= *done; @@ -92,7 +92,7 @@ int packagelist::alreadydone(doneent **done, void *check) { } void packagelist::addunavailable(deppossi *possi) { - if (debug) fprintf(debug,_("packagelist[%p]::addunavail(%p)\n"),this,possi); + if (debug) fprintf(debug,"packagelist[%p]::addunavail(%p)\n",this,possi); if (!recursive) return; if (alreadydone(&unavdone,possi)) return; @@ -106,7 +106,7 @@ void packagelist::addunavailable(deppossi *possi) { } int packagelist::add(dependency *depends, showpriority displayimportance) { - if (debug) fprintf(debug,_("packagelist[%p]::add(dependency[%p])\n"),this,depends); + if (debug) fprintf(debug,"packagelist[%p]::add(dependency[%p])\n",this,depends); if (alreadydone(&depsdone,depends)) return 0; @@ -161,29 +161,29 @@ void repeatedlydisplay(packagelist *sub, pkginfo **newl; keybindings *kb; - if (debug) fprintf(debug,_("repeatedlydisplay(packagelist[%p])\n"),sub); + if (debug) fprintf(debug,"repeatedlydisplay(packagelist[%p])\n",sub); if (sub->resolvesuggest() != 0 && sub->deletelessimp_anyleft(initial)) { - if (debug) fprintf(debug,_("repeatedlydisplay(packagelist[%p]) once\n"),sub); + if (debug) fprintf(debug,"repeatedlydisplay(packagelist[%p]) once\n",sub); if (unredisplay) unredisplay->enddisplay(); for (;;) { newl= sub->display(); if (!newl) break; - if (debug) fprintf(debug,_("repeatedlydisplay(packagelist[%p]) newl\n"),sub); + if (debug) fprintf(debug,"repeatedlydisplay(packagelist[%p]) newl\n",sub); kb= sub->bindings; delete sub; sub= new packagelist(kb,newl); if (sub->resolvesuggest() <= 1) break; if (!sub->deletelessimp_anyleft(dp_must)) break; - if (debug) fprintf(debug,_("repeatedlydisplay(packagelist[%p]) again\n"),sub); + if (debug) fprintf(debug,"repeatedlydisplay(packagelist[%p]) again\n",sub); } if (unredisplay) unredisplay->startdisplay(); } delete sub; - if (debug) fprintf(debug,_("repeatedlydisplay(packagelist[%p]) done\n"),sub); + if (debug) fprintf(debug,"repeatedlydisplay(packagelist[%p]) done\n",sub); } int packagelist::deletelessimp_anyleft(showpriority than) { if (debug) - fprintf(debug,_("packagelist[%p]::dli_al(%d): nitems=%d\n"),this,than,nitems); + fprintf(debug,"packagelist[%p]::dli_al(%d): nitems=%d\n",this,than,nitems); int insat, runthr; for (runthr=0, insat=0; runthr < nitems; @@ -196,7 +196,7 @@ int packagelist::deletelessimp_anyleft(showpriority than) { } } nitems= insat; - if (debug) fprintf(debug,_("packagelist[%p]::dli_al(%d) done; nitems=%d\n"), + if (debug) fprintf(debug,"packagelist[%p]::dli_al(%d) done; nitems=%d\n", this,than,nitems); return nitems; } diff --git a/lib/database.c b/lib/database.c index dc6f25b5..4fc1e6cf 100644 --- a/lib/database.c +++ b/lib/database.c @@ -232,7 +232,7 @@ void hashreport(FILE *file) { freq[c]++; } for (i=npackages; i>0 && freq[i]==0; i--); - while (i>=0) { fprintf(file,"size %7d occurs %5d times\n",i,freq[i]); i--; } + while (i>=0) { fprintf(file,_("size %7d occurs %5d times\n"),i,freq[i]); i--; } if (ferror(file)) ohshite(_("failed write during hashreport")); } diff --git a/lib/dbmodify.c b/lib/dbmodify.c index eb34c0c4..9d9c41de 100644 --- a/lib/dbmodify.c +++ b/lib/dbmodify.c @@ -159,7 +159,7 @@ enum modstatdb_rw modstatdb_init(const char *adir, enum modstatdb_rw readwritere case msdbrw_readonly: cstatus= msdbrw_readonly; break; default: - internerr("unknown readwritereq"); + internerr(_("unknown readwritereq")); } updatefnbuf= m_malloc(strlen(adir)+sizeof(UPDATESDIR)+IMPORTANTMAXLEN+5); diff --git a/lib/ehandle.c b/lib/ehandle.c index 1b8bb925..3f647d44 100644 --- a/lib/ehandle.c +++ b/lib/ehandle.c @@ -192,7 +192,7 @@ void push_cleanup(void (*call1)(int argc, void **argv), int mask1, va_end(al); cep->next= econtext->cleanups; econtext->cleanups= cep; - if (cep == &emergency.ce) { e= errno; ohshite("out of memory for new cleanup entry"); } + if (cep == &emergency.ce) { e= errno; ohshite(_("out of memory for new cleanup entry")); } onerr_abort--; } diff --git a/lib/fields.c b/lib/fields.c index 47e186ac..36bc241d 100644 --- a/lib/fields.c +++ b/lib/fields.c @@ -38,7 +38,7 @@ static int convert_string int c, l; ep= startp; - if (!*ep) parseerr(0,filename,lno, warnto,warncount,pigp,0, "%s is missing",what); + if (!*ep) parseerr(0,filename,lno, warnto,warncount,pigp,0, _("%s is missing"),what); while ((c= *ep) && !isspace(c)) ep++; l= (int)(ep-startp); while (nvip->name && (strncasecmp(nvip->name,startp,l) || nvip->name[l])) nvip++; @@ -120,7 +120,7 @@ void f_boolean(struct pkginfo *pigp, struct pkginfoperfile *pifp, const char *filename, int lno, FILE *warnto, int *warncount, const char *value, const struct fieldinfo *fip) { pifp->essential= - *value ? convert_string(filename,lno,"yes/no in `essential' field", -1, + *value ? convert_string(filename,lno,_("yes/no in `essential' field"), -1, warnto,warncount,pigp, value,booleaninfos,0) : 0; @@ -164,7 +164,7 @@ void f_status(struct pkginfo *pigp, struct pkginfoperfile *pifp, pigp->want= want_hold; pigp->eflag &= ~eflagf_obsoletehold; } - pigp->status= convert_string(filename,lno,"third (status) word in `status' field", -1, + pigp->status= convert_string(filename,lno,_("third (status) word in `status' field"), -1, warnto,warncount,pigp, ep,statusinfos,0); } diff --git a/lib/parsehelp.c b/lib/parsehelp.c index 58ddeb4b..5c1456ee 100644 --- a/lib/parsehelp.c +++ b/lib/parsehelp.c @@ -159,7 +159,7 @@ void varbufversion varbufprintf(vb,"%lu:",version->epoch); break; default: - internerr("bad versiondisplayepochwhen in varbufversion"); + internerr(_("bad versiondisplayepochwhen in varbufversion")); } if (version->version) varbufaddstr(vb,version->version); if (version->revision && *version->revision) { @@ -177,7 +177,7 @@ const char *versiondescribe struct varbuf *vb; - if (!informativeversion(version)) return ""; + if (!informativeversion(version)) return _(""); vb= &bufs[bufnum]; bufnum++; if (bufnum == 10) bufnum= 0; varbufreset(vb); diff --git a/lib/vercmp.c b/lib/vercmp.c index fecc7456..dfdc2d23 100644 --- a/lib/vercmp.c +++ b/lib/vercmp.c @@ -83,7 +83,7 @@ int versionsatisfied3(const struct versionrevision *it, case dvr_earlierstrict: return r < 0; case dvr_laterstrict: return r > 0; case dvr_exact: return r == 0; - default: internerr("unknown verrel"); + default: internerr(_("unknown verrel")); } } diff --git a/main/archives.c b/main/archives.c index 0b4b8f43..ee445196 100644 --- a/main/archives.c +++ b/main/archives.c @@ -94,7 +94,7 @@ int filesavespackage(struct fileinlist *file, struct pkginfo *pkgtobesaved, if (!thirdpkg->clientdata->fileslistvalid) { debug(dbg_eachfiledetail, - "process_archive ... already disappeared !"); + _("process_archive ... already disappeared !")); continue; } /* We've found a package that can take this file. */ @@ -232,8 +232,8 @@ int tarobject(struct TarInfo *ti) { nifd->namenode->flags |= fnnf_new_inarchive; debug(dbg_eachfile, - "tarobject ti->Name=`%s' Mode=%lo owner=%u.%u Type=%d(%c)" - " ti->LinkName=`%s' namenode=`%s' flags=%o instead=`%s'", + _("tarobject ti->Name=`%s' Mode=%lo owner=%u.%u Type=%d(%c)" + " ti->LinkName=`%s' namenode=`%s' flags=%o instead=`%s'"), ti->Name, (long)ti->Mode, (unsigned)ti->UserID, (unsigned)ti->GroupID, ti->Type, ti->Type == '\0' ? '_' : ti->Type >= '0' && ti->Type <= '6' ? "-hlcbdp"[ti->Type - '0'] : '?', @@ -249,7 +249,7 @@ int tarobject(struct TarInfo *ti) { "diverted version of `%.250s'%.10s%.100s%.10s"), nifd->namenode->name, nifd->namenode->divert->camefrom->name, - divpkg ? " (package: " : "", + divpkg ? _(" (package: ") : "", divpkg ? divpkg->name : "", divpkg ? ")" : ""); } @@ -348,7 +348,7 @@ int tarobject(struct TarInfo *ti) { /* Perhaps we're removing a conflicting package ? */ if (otherpkg->clientdata->istobe == itb_remove) continue; if (does_replace(tc->pkg,&tc->pkg->available,otherpkg)) { - printf("Replacing files in old package %s ...\n",otherpkg->name); + printf(_("Replacing files in old package %s ...\n"),otherpkg->name); otherpkg->clientdata->replacingfilesandsaid= 1; } else { if (S_ISDIR(stab.st_mode)) { @@ -845,12 +845,12 @@ int wanttoinstall(struct pkginfo *pkg, const struct versionrevision *ver, int sa if (pkg->want != want_install) { if (f_alsoselect) { if (saywhy) { - printf("Selecting previously deselected package %s.\n",pkg->name); + printf(_("Selecting previously deselected package %s.\n"),pkg->name); pkg->want= want_install; } return 1; } else { - if (saywhy) printf("Skipping deselected package %s.\n",pkg->name); + if (saywhy) printf(_("Skipping deselected package %s.\n"),pkg->name); return 0; } } @@ -864,8 +864,8 @@ int wanttoinstall(struct pkginfo *pkg, const struct versionrevision *ver, int sa } else if (r == 0) { if (f_skipsame && /* same version fully installed ? */ pkg->status == stat_installed && !(pkg->eflag &= eflagf_reinstreq)) { - if (saywhy) fprintf(stderr, "Version %.250s of %.250s already installed, " - "skipping.\n", + if (saywhy) fprintf(stderr, _("Version %.250s of %.250s already installed, " + "skipping.\n"), versiondescribe(&pkg->installed.version,vdew_never), pkg->name); return 0; @@ -876,14 +876,14 @@ int wanttoinstall(struct pkginfo *pkg, const struct versionrevision *ver, int sa needepochs= epochsdiffer(&pkg->available.version,&pkg->installed.version) ? vdew_always : vdew_never; if (fc_downgrade) { - if (saywhy) fprintf(stderr, DPKG " - warning: downgrading %.250s " - "from %.250s to %.250s.\n", pkg->name, + if (saywhy) fprintf(stderr, _("%s - warning: downgrading %.250s " + "from %.250s to %.250s.\n"), DPK, pkg->name, versiondescribe(&pkg->installed.version,needepochs), versiondescribe(&pkg->available.version,needepochs)); return 1; } else { - if (saywhy) fprintf(stderr, "Will not downgrade %.250s from version %.250s " - "to %.250s, skipping.\n", pkg->name, + if (saywhy) fprintf(stderr, _("Will not downgrade %.250s from version %.250s " + "to %.250s, skipping.\n"), pkg->name, versiondescribe(&pkg->installed.version,needepochs), versiondescribe(&pkg->available.version,needepochs)); return 0; diff --git a/main/configure.c b/main/configure.c index 694a8365..1824307f 100644 --- a/main/configure.c +++ b/main/configure.c @@ -363,7 +363,7 @@ void deferred_configure(struct pkginfo *pkg) { switch (cc) { case 'i': case 'y': what= cfof_install | cfof_backup; break; case 'n': case 'o': what= cfof_keep | cfof_backup; break; - default: internerr("unknown response"); + default: internerr(_("unknown response")); } } @@ -418,7 +418,7 @@ void deferred_configure(struct pkginfo *pkg) { break; default: - internerr("unknown what"); + internerr(_("unknown what")); } conff->hash= nfstrsave(newdisthash); diff --git a/main/depcon.c b/main/depcon.c index d1de502b..7ada4380 100644 --- a/main/depcon.c +++ b/main/depcon.c @@ -133,7 +133,7 @@ void describedepcon(struct varbuf *addto, struct dependency *dep) { case dep_predepends: varbufaddstr(addto, _(" pre-depends on ")); break; case dep_recommends: varbufaddstr(addto, _(" recommends ")); break; case dep_conflicts: varbufaddstr(addto, _(" conflicts with ")); break; - default: internerr("unknown deptype"); + default: internerr(_("unknown deptype")); } varbufdependency(addto, dep); } @@ -179,13 +179,13 @@ int depisok(struct dependency *dep, struct varbuf *whynot, case stat_halfconfigured: case stat_unpacked: return 1; default: - internerr("unknown status depending"); + internerr(_("unknown status depending")); } break; case itb_installnew: case itb_preinstall: break; default: - internerr("unknown istobe depending"); + internerr(_("unknown istobe depending")); } /* Describe the dependency, in case we have to moan about it. */ @@ -261,7 +261,7 @@ int depisok(struct dependency *dep, struct varbuf *whynot, } break; default: - internerr("unknown istobe depended"); + internerr(_("unknown istobe depended")); } varbufaddstr(whynot, linebuf); @@ -305,7 +305,7 @@ int depisok(struct dependency *dep, struct varbuf *whynot, gettext(statusstrings[provider->up->up->status])); break; default: - internerr("unknown istobe provider"); + internerr(_("unknown istobe provider")); } varbufaddstr(whynot, linebuf); } @@ -314,7 +314,7 @@ int depisok(struct dependency *dep, struct varbuf *whynot, /* If the package wasn't installed at all, and we haven't said * yet why this isn't satisfied, we should say so now. */ - sprintf(linebuf, " %.250s is not installed.\n", possi->ed->name); + sprintf(linebuf, _(" %.250s is not installed.\n"), possi->ed->name); varbufaddstr(whynot, linebuf); } } @@ -370,7 +370,7 @@ int depisok(struct dependency *dep, struct varbuf *whynot, } break; default: - internerr("unknown istobe conflict"); + internerr(_("unknown istobe conflict")); } } @@ -426,7 +426,7 @@ int depisok(struct dependency *dep, struct varbuf *whynot, } break; default: - internerr("unknown istobe conflict provider"); + internerr(_("unknown istobe conflict provider")); } } } diff --git a/main/enquiry.c b/main/enquiry.c index b2cf5983..ccc1332e 100644 --- a/main/enquiry.c +++ b/main/enquiry.c @@ -48,7 +48,7 @@ static void limiteddescription(struct pkginfo *pkg, int maxl, int l; pdesc= pkg->installed.valid ? pkg->installed.description : 0; - if (!pdesc) pdesc= "(no description available)"; + if (!pdesc) pdesc= _("(no description available)"); p= strchr(pdesc,'\n'); if (!p) p= pdesc+strlen(pdesc); l= (p - pdesc > maxl) ? maxl : (int)(p - pdesc); @@ -218,10 +218,10 @@ static int yettobeunpacked(struct pkginfo *pkg, const char **thissect) { return 0; case stat_notinstalled: case stat_halfinstalled: case stat_configfiles: if (thissect) - *thissect= pkg->section && *pkg->section ? pkg->section : ""; + *thissect= pkg->section && *pkg->section ? pkg->section : _(""); return 1; default: - internerr("unknown status checking for unpackedness"); + internerr(_("unknown status checking for unpackedness")); } } @@ -272,7 +272,7 @@ void unpackchk(const char *const *argv) { } else if (sects <= 12) { for (se= sectionentries; se; se= se->next) { sprintf(buf,"%d",se->count); - printf(" %d in %s: ",se->count,se->name); + printf(_(" %d in %s: "),se->count,se->name); width= 70-strlen(se->name)-strlen(buf); while (width > 59) { putchar(' '); width--; } it= iterpkgstart(); @@ -453,7 +453,7 @@ void enqperpackage(const char *const *argv) { break; default: - internerr("unknown action"); + internerr(_("unknown action")); } putchar('\n'); @@ -472,7 +472,7 @@ static void assertversion(const char *const *argv, const char *reqversion) { struct pkginfo *pkg; - if (*argv) badusage("--assert-* does not take any arguments"); + if (*argv) badusage(_("--assert-* does not take any arguments")); modstatdb_init(admindir,msdbrw_readonly|msdbrw_noavail); if (verrev_buf->epoch == ~0UL) { @@ -487,11 +487,11 @@ static void assertversion(const char *const *argv, case stat_unpacked: case stat_halfconfigured: case stat_halfinstalled: if (versionsatisfied3(&pkg->configversion,verrev_buf,dvr_laterequal)) break; - printf("Version of dpkg with working epoch support not yet configured.\n" - " Please use `dpkg --configure dpkg', and then try again.\n"); + printf(_("Version of dpkg with working epoch support not yet configured.\n" + " Please use `dpkg --configure dpkg', and then try again.\n")); exit(1); default: - printf("dpkg not recorded as installed, cannot check for epoch support !\n"); + printf(_("dpkg not recorded as installed, cannot check for epoch support !\n")); exit(1); } } @@ -676,7 +676,7 @@ void printarch(const char *const *argv) { switch (cipaction->arg) { case act_printarch: arch= archp->to; break; case act_printgnuarch: arch= archp->gnu; break; - default: internerr("unknown action in printarch"); + default: internerr(_("unknown action in printarch")); } if (!arch) { *q= 0; arch= p; diff --git a/main/errors.c b/main/errors.c index f7ccb009..c83e7aac 100644 --- a/main/errors.c +++ b/main/errors.c @@ -53,8 +53,8 @@ static struct error_report emergency; void print_error_perpackage(const char *emsg, const char *arg) { struct error_report *nr; - fprintf(stderr, DPKG ": error processing %s (--%s):\n %s\n", - arg, cipaction->olong, emsg); + fprintf(stderr, _("%s: error processing %s (--%s):\n %s\n"), + DPKG, arg, cipaction->olong, emsg); nr= malloc(sizeof(struct error_report)); if (!nr) { perror(_("dpkg: failed to allocate memory for new entry in list of failed packages.")); @@ -92,7 +92,7 @@ int skip_due_to_hold(struct pkginfo *pkg) { pkg->name); return 0; } - printf("Package %s is on hold, not touching it. Use --force-hold to override.\n", + printf(_("Package %s is on hold, not touching it. Use --force-hold to override.\n"), pkg->name); return 1; } diff --git a/main/filesdb.c b/main/filesdb.c index f83617be..4efe05fa 100644 --- a/main/filesdb.c +++ b/main/filesdb.c @@ -460,7 +460,7 @@ struct fileiterator *iterfilestart(void) { i->u.low.current= allfiles; break; default: - internerr("iterfilestart no f_largemem"); + internerr(_("iterfilestart no f_largemem")); } return i; } @@ -482,7 +482,7 @@ struct filenamenode *iterfilenext(struct fileiterator *i) { i->u.low.current= i->u.low.current->next; break; default: - internerr("iterfilenext no f_largemem"); + internerr(_("iterfilenext no f_largemem")); } return r; } @@ -528,7 +528,7 @@ void filesdbinit(void) { } break; default: - internerr("filesdbinit no f_largemem"); + internerr(_("filesdbinit no f_largemem")); } } @@ -542,7 +542,7 @@ struct filenamenode *findnamenode(const char *name) { case -1: return findnamenode_low(name); default: - internerr("findnamenode no f_largemem"); + internerr(_("findnamenode no f_largemem")); } } diff --git a/main/help.c b/main/help.c index 1c6b3e6f..46a951c2 100644 --- a/main/help.c +++ b/main/help.c @@ -38,7 +38,8 @@ #include "main.h" const char *const statusstrings[]= { - N_("not installed"), N_("unpacked but not configured"), + N_("not installed"), + N_("unpacked but not configured"), N_("broken due to postinst failure"), N_("installed"), N_("broken due to failed removal"), @@ -172,7 +173,7 @@ static const char* preexecscript(const char *path, char *const *argv) { int instdirl; if (*instdir) { - if (chroot(instdir)) ohshite("failed to chroot to `%.250s'",instdir); + if (chroot(instdir)) ohshite(_("failed to chroot to `%.250s'"),instdir); } if (f_debug & dbg_scripts) { fprintf(stderr,"D0%05o: fork/exec %s (",dbg_scripts,path); @@ -340,7 +341,7 @@ int maintainer_script_alternative(struct pkginfo *pkg, ifok,versiondescribe(&pkg->available.version, vdew_nonambig), (char*)0); - sprintf(buf,"old %s script",description); + sprintf(buf,_("old %s script"),description); if (stat(oldscriptpath,&stab)) { if (errno == ENOENT) { debug(dbg_scripts,"maintainer_script_alternative nonexistent %s `%s'", diff --git a/main/main.c b/main/main.c index 87c22a3f..71a02463 100644 --- a/main/main.c +++ b/main/main.c @@ -183,8 +183,8 @@ static void setdebug(const struct cmdinfo *cpi, const char *value) { char *endp; if (*value == 'h') { - if (fputs( -DPKG " debugging option, --debug= or -D:\n\n\ + if (printf( +_("%s debugging option, --debug= or -D:\n\n\ number ref. in source description\n\ 1 general Generally helpful progress information\n\ 2 scripts Invocation and status of maintainer scripts\n\ @@ -197,13 +197,13 @@ DPKG " debugging option, --debug= or -D:\n\n\ 1000 veryverbose Lots of drivel about eg the dpkg/info directory\n\ 2000 stupidlyverbose Insane amounts of drivel\n\n\ Debugging options are be mixed using bitwise-or.\n\ -Note that the meanings and values are subject to change.\n", - stdout) < 0) werr("stdout"); +Note that the meanings and values are subject to change.\n"), + DPKG) < 0) werr("stdout"); exit(0); } f_debug= strtoul(value,&endp,8); - if (*endp) badusage("--debug requires an octal argument"); + if (*endp) badusage(_("--debug requires an octal argument")); } static void setroot(const struct cmdinfo *cip, const char *value) { @@ -249,7 +249,7 @@ static void setinteger(const struct cmdinfo *cip, const char *value) { v= strtoul(value,&ep,0); if (*ep || v > INT_MAX) - badusage("invalid integer for --%s: `%.250s'",cip->olong,value); + badusage(_("invalid integer for --%s: `%.250s'"),cip->olong,value); *cip->iassignto= v; } @@ -259,7 +259,7 @@ static void setforce(const struct cmdinfo *cip, const char *value) { const struct forceinfo *fip; if (!strcmp(value,"help")) { - if (fputs(_("dpkg forcing options - control behaviour when problems found:\n\ + if (printf(_("%s forcing options - control behaviour when problems found:\n\ warn but continue: --force-,,...\n\ stop with error: --refuse-,,... | --no-force-,...\n\ Forcing things:\n\ @@ -288,7 +288,7 @@ static void setforce(const struct cmdinfo *cip, const char *value) { \n\ WARNING - use of options marked [!] can seriously damage your installation.\n\ Forcing options marked [*] are enabled by default.\n"), - stdout) < 0) werr("stdout"); + DPKG) < 0) werr("stdout"); exit(0); } diff --git a/main/packages.c b/main/packages.c index 0cb6aaaa..b915f396 100644 --- a/main/packages.c +++ b/main/packages.c @@ -97,7 +97,7 @@ void packages(const char *const *argv) { continue; break; default: - internerr("unknown action for pending"); + internerr(_("unknown action for pending")); } add_to_queue(pkg); } @@ -139,7 +139,7 @@ void process_queue(void) { switch (cipaction->arg) { case act_configure: case act_install: istobe= itb_installnew; break; case act_remove: case act_purge: istobe= itb_remove; break; - default: internerr("unknown action for queue start"); + default: internerr(_("unknown action for queue start")); } for (rundown= queuehead; rundown; rundown= rundown->next) { ensure_package_clientdata(rundown->pkg); @@ -156,7 +156,7 @@ void process_queue(void) { rundown->pkg->name); break; default: - internerr("unknown action in duplicate"); + internerr(_("unknown action in duplicate")); } rundown->pkg= 0; } else { @@ -199,7 +199,7 @@ void process_queue(void) { deferred_remove(pkg); break; default: - internerr("unknown action in queue"); + internerr(_("unknown action in queue")); } if (ferror(stdout)) werr("stdout"); if (ferror(stderr)) werr("stderr"); @@ -402,7 +402,7 @@ int dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing, case 3: break; default: - internerr("unknown value for found"); + internerr(_("unknown value for found")); } } if (ok == 0 && (pkg->clientdata && pkg->clientdata->istobe == itb_remove)) diff --git a/main/processarc.c b/main/processarc.c index 91672c17..600e350a 100644 --- a/main/processarc.c +++ b/main/processarc.c @@ -124,7 +124,7 @@ void process_archive(const char *filename) { /* It was a part - is it complete ? */ if (!stat(reasmbuf,&stab)) { /* Yes. */ filename= reasmbuf; - pfilename= "reassembled package file"; + pfilename= _("reassembled package file"); break; } else if (errno == ENOENT) { /* No. That's it, we skip it. */ return; diff --git a/main/update.c b/main/update.c index 797d519f..100bead1 100644 --- a/main/update.c +++ b/main/update.c @@ -48,7 +48,7 @@ void updateavailable(const char *const *argv) { badusage(_("--%s needs exactly one Packages file argument"),cipaction->olong); break; default: - internerr("bad cipaction->arg in updateavailable"); + internerr(_("bad cipaction->arg in updateavailable")); } if (!f_noact) { @@ -71,7 +71,7 @@ void updateavailable(const char *const *argv) { case act_avclear: break; default: - internerr("bad cipaction->arg in update available"); + internerr(_("bad cipaction->arg in update available")); } varbufaddstr(&vb,admindir); -- 2.39.5