From: Wichert Akkerman Date: Tue, 26 Oct 1999 17:37:05 +0000 (+0000) Subject: Translate helpmessages in dselect X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0feaf8d7a52849a409baf9506c923464a7a927bf;p=dpkg Translate helpmessages in dselect --- diff --git a/ChangeLog b/ChangeLog index ff2ed4d0..e41c64d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Oct 26 19:35:53 CEST 1999 Wichert Akkerman + + * Also translate helpmessages for dselect + Mon Oct 25 21:08:06 CEST 1999 Wichert Akkerman * Added Czech translation from Petr Cech diff --git a/dselect/basecmds.cc b/dselect/basecmds.cc index 07ff4f53..2ef277d7 100644 --- a/dselect/basecmds.cc +++ b/dselect/basecmds.cc @@ -121,10 +121,10 @@ void baselist::displayhelp(const struct helpmenuentry *helpmenu, int key) { for (hme= helpmenu; hme->key && hme->key != key; hme++); if (hme->key) { attrset(list_attr); - mvaddstr(1,0, hme->msg->text); + mvaddstr(1,0, gettext(hme->msg->text)); attrset(title_attr); mvaddstr(0,0, _("Help: ")); - addstr(hme->msg->title); + addstr(gettext(hme->msg->title)); getyx(stdscr,y,x); while (++xkey; hme++,i++) { attrset(A_BOLD); - mvaddch(i+3,3, hme->key); + mvaddch(i+3,3, gettext(hme->key)); attrset(A_NORMAL); - mvaddstr(i+3,6, hme->msg->title); + mvaddstr(i+3,6, gettext(hme->msg->title)); } mvaddstr(i+4,1, _("Press a key from the list above, Space to exit help,\n" diff --git a/dselect/mkhelpmsgs.pl b/dselect/mkhelpmsgs.pl index d6eb3140..11b42520 100755 --- a/dselect/mkhelpmsgs.pl +++ b/dselect/mkhelpmsgs.pl @@ -25,7 +25,7 @@ while () { print(NH "extern const struct helpmessage hlp_$currentname;\n") || die $!; print(NC "const struct helpmessage hlp_$currentname = {\n". - " \"$currenttitle\", \"") || die $!; + " N_(\"$currenttitle\"), N_(\"") || die $!; } elsif (m/^\@\@\@/) { die; } elsif (!m/\S/) { @@ -53,7 +53,7 @@ rename("helpmsgs.h.new","helpmsgs.h") || die $!; sub finishif { if ($state ne 'start') { - print(NC "\"\n};\n") || die $!; + print(NC "\")\n};\n") || die $!; printf "\t\t%s: %d lines\n",$currentname,$nlines; if ($nlines > $maxnlines) { warn "Too many lines in $currentname"; } }