diff -urNp -x '*.orig' LPRng-3.8.35.org/po/POTFILES.in LPRng-3.8.35/po/POTFILES.in --- LPRng-3.8.35.org/po/POTFILES.in 2003-09-04 22:47:02.000000000 +0200 +++ LPRng-3.8.35/po/POTFILES.in 2022-01-23 17:50:18.677027807 +0100 @@ -1,5 +1,7 @@ src/common/accounting.c src/common/controlword.c +src/common/debug.c +src/common/getopt.c src/common/linelist.c src/common/lpc.c src/common/lpd.c @@ -12,6 +14,7 @@ src/common/lpd_status.c src/common/lpq.c src/common/lpr.c src/common/lprm.c +src/common/lpstat.c src/common/sendjob.c src/common/sendmail.c src/common/sendreq.c diff -urNp -x '*.orig' LPRng-3.8.35.org/src/common/debug.c LPRng-3.8.35/src/common/debug.c --- LPRng-3.8.35.org/src/common/debug.c 2005-04-14 22:05:18.000000000 +0200 +++ LPRng-3.8.35/src/common/debug.c 2022-01-23 17:50:18.680361191 +0100 @@ -89,22 +89,22 @@ */ static char *guide[] = { - " use on command line, or in printcap :db=... entry", - " for server:", - " print: show queue (printing) actions, larger number, more information", - " NUMBER same as print+NUMBER", - " lpr: show servicing lpr actions", - " lpq: show servicing lpq actions", - " lprm: show servicing lprm actions", - " network: show low level network actions", - " database: show low level database actions", - " log: Testing. Don't use this unless you read the code.", - " test: Testing. don't use this unless you read the code.", - " for clients (lpr, lpq, etc):", - " print: show client actions, larger number, more information", - " NUMBER same as print+NUMBER", - " network: show low level network actions.", - " database: show low level database actions.", + N_(" use on command line, or in printcap :db=... entry"), + N_(" for server:"), + N_(" print: show queue (printing) actions, larger number, more information"), + N_(" NUMBER same as print+NUMBER"), + N_(" lpr: show servicing lpr actions"), + N_(" lpq: show servicing lpq actions"), + N_(" lprm: show servicing lprm actions"), + N_(" network: show low level network actions"), + N_(" database: show low level database actions"), + N_(" log: Testing. Don't use this unless you read the code."), + N_(" test: Testing. don't use this unless you read the code."), + N_(" for clients (lpr, lpq, etc):"), + N_(" print: show client actions, larger number, more information"), + N_(" NUMBER same as print+NUMBER"), + N_(" network: show low level network actions."), + N_(" database: show low level database actions."), 0 }; void Parse_debug (char *dbgstr, int interactive ) @@ -157,8 +157,8 @@ void Parse_debug (char *dbgstr, int inte if(!found && interactive ){ int i; int lastflag = 0; - FPRINTF (STDERR, "debug flag format: num | flag[+num] | flag=str\n"); - FPRINTF (STDERR, " flag names:"); + FPRINTF (STDERR, _("debug flag format: num | flag[+num] | flag=str\n")); + FPRINTF (STDERR, _(" flag names:")); for (i = 0; list[i].keyword; i++) { if( safestrchr( list[i].keyword, '+' ) ) continue; if( lastflag ){ @@ -169,10 +169,10 @@ void Parse_debug (char *dbgstr, int inte } switch( list[i].type ){ case INTEGER_K: - FPRINTF (STDERR, "%s=num", list[i].keyword); + FPRINTF (STDERR, _("%s=num"), list[i].keyword); break; case STRING_K: - FPRINTF (STDERR, "%s=str", list[i].keyword); + FPRINTF (STDERR, _("%s=str"), list[i].keyword); break; case FLAG_K: FPRINTF (STDERR, "%s[+N]", list[i].keyword ); @@ -184,7 +184,7 @@ void Parse_debug (char *dbgstr, int inte } FPRINTF (STDERR, "\n"); for(i = 0; guide[i]; ++i ){ - FPRINTF (STDERR, "%s\n", guide[i]); + FPRINTF (STDERR, "%s\n", _(guide[i])); } Errorcode = JABORT; diff -urNp -x '*.orig' LPRng-3.8.35.org/src/common/getopt.c LPRng-3.8.35/src/common/getopt.c --- LPRng-3.8.35.org/src/common/getopt.c 2005-04-14 22:05:18.000000000 +0200 +++ LPRng-3.8.35/src/common/getopt.c 2022-01-23 17:50:18.677027807 +0100 @@ -89,7 +89,7 @@ int Getopt (int argc, char *argv[], char if (option == '-') { if( *next_opt ){ if( Opterr ){ - (void) FPRINTF (STDERR, "--X option form illegal\n" ); + (void) FPRINTF (STDERR, _("--X option form illegal\n") ); return('?'); } } @@ -100,7 +100,7 @@ int Getopt (int argc, char *argv[], char */ if ((match = (char *) safestrchr (optstring, option)) == 0 ){ if( Opterr ){ - (void) FPRINTF (STDERR, "%s: Illegal option '%c'\n", Name, option); + (void) FPRINTF (STDERR, _("%s: Illegal option '%c'\n"), Name, option); } return( '?' ); } @@ -122,7 +122,7 @@ int Getopt (int argc, char *argv[], char } if( Optarg == 0 && Opterr ) { (void) FPRINTF (STDERR, - "%s: missing argument for '%c'\n", Name, option); + _("%s: missing argument for '%c'\n"), Name, option); option = '?'; } next_opt = 0; diff -urNp -x '*.orig' LPRng-3.8.35.org/src/common/lpd_status.c LPRng-3.8.35/src/common/lpd_status.c --- LPRng-3.8.35.org/src/common/lpd_status.c 2022-01-23 17:50:18.410357100 +0100 +++ LPRng-3.8.35/src/common/lpd_status.c 2022-01-23 17:50:18.680361191 +0100 @@ -467,7 +467,7 @@ void Get_queue_status( struct line_list end_of_name = 0; if( displayformat != REQ_DSHORT ){ SNPRINTF( header, sizeof(header)) "%s: ", - Server_queue_name_DYN?"Server Printer":"Printer" ); + Server_queue_name_DYN?_("Server Printer"):_("Printer") ); } len = safestrlen(header); SNPRINTF( header+len, sizeof(header)-len) "%s@%s", diff -urNp -x '*.orig' LPRng-3.8.35.org/src/common/lpstat.c LPRng-3.8.35/src/common/lpstat.c --- LPRng-3.8.35.org/src/common/lpstat.c 2005-04-14 22:05:19.000000000 +0200 +++ LPRng-3.8.35/src/common/lpstat.c 2022-01-23 17:50:18.677027807 +0100 @@ -114,7 +114,7 @@ int main(int argc, char *argv[], char *e Setup_configuration(); Get_parms(argc, argv ); /* scan input args */ if( A_flag && !getenv( "AUTH" ) ){ - FPRINTF(STDERR,"lpstat: requested authenticated transfer (-A) and AUTH environment variable not set"); + FPRINTF(STDERR,_("lpstat: requested authenticated transfer (-A) and AUTH environment variable not set")); usage(); } @@ -162,14 +162,14 @@ int main(int argc, char *argv[], char *e if(DEBUGL1)Dump_line_list("lpstat - options", &options); if( r_flag ){ - Write_fd_str(1,"scheduler is running\n"); + Write_fd_str(1,_("scheduler is running\n")); } if( d_flag ){ if( Printer_DYN == 0 ){ - Write_fd_str(1,"no system default destination\n"); + Write_fd_str(1,_("no system default destination\n")); } else { SNPRINTF(msg,sizeof(msg)) - "system default destination: %s\n", Printer_DYN); + _("system default destination: %s\n"), Printer_DYN); Write_fd_str(1,msg); } } @@ -177,7 +177,7 @@ int main(int argc, char *argv[], char *e for( i = 0; i < request_list.count; ++i ){ Set_DYN(&Printer_DYN,request_list.list[i] ); Fix_Rm_Rp_info(0,0); - SNPRINTF(msg,sizeof(msg)) "system for %s: %s\n", Printer_DYN, RemoteHost_DYN); + SNPRINTF(msg,sizeof(msg)) _("system for %s: %s\n"), Printer_DYN, RemoteHost_DYN); Write_fd_str(1,msg); } } @@ -221,7 +221,7 @@ void Show_status(char **argv, int displa if( Check_for_rg_group( Logname_DYN ) ){ SNPRINTF( msg, sizeof(msg)) - " Printer: %s - cannot use printer, not in privileged group\n", Printer_DYN ); + _(" Printer: %s - cannot use printer, not in privileged group\n"), Printer_DYN ); if( Write_fd_str( 1, msg ) < 0 ) cleanup(0); return; } @@ -359,25 +359,25 @@ int Read_status_info( char *host, int so if( a_flag ){ if( !nospool ){ SNPRINTF(msg,sizeof(msg)) - "%s accepting requests since %s\n", + _("%s accepting requests since %s\n"), Printer_DYN, Time_str(0,0) ); } else { SNPRINTF(msg,sizeof(msg)) - "%s not accepting requests since %s -\n\tunknown reason\n", + _("%s not accepting requests since %s -\n\tunknown reason\n"), Printer_DYN, Time_str(0,0) ); } if( Write_fd_str( output, msg ) < 0 ) return(1); } if( p_flag ){ SNPRINTF(msg,sizeof(msg)) - "printer %s unknown state. %s since %s. available\n", + _("printer %s unknown state. %s since %s. available\n"), Printer_DYN, noprint?"disabled":"enabled", Pretty_time(0)); if( Write_fd_str( output, msg ) < 0 ) return(1); } if( p_flag && D_flag ){ SNPRINTF(msg,sizeof(msg)) - "\tDescription: %s@%s\n", + _("\tDescription: %s@%s\n"), RemotePrinter_DYN, RemoteHost_DYN ); if( Write_fd_str( output, msg ) < 0 ) return(1); } @@ -585,30 +585,30 @@ void Get_parms(int argc, char *argv[] ) } static char *lpstat_msg[] = { - "usage: %s [-A] [-d] [-l] [-r] [-R] [-s] [-t] [-a [list]]\n", - " [-c [list]] [-f [list]] [-o [list]]\n", - " [-p [list]] [-P] [-S [list]] [list]\n", - " [-u [login-ID-list]] [-v [list]] [-V] [-n] [-Tdbgflags]\n", - " list is a list of print queues\n", - " -A use authentication specified by AUTH environment variable\n", - " -a [list] destination status *\n", - " -c [list] class status *\n", - " -d print default destination\n", - " -f [list] forms status *\n", - " -o [list] job or printer status *\n", - " -n each -n increases number of status lines (default 1) *\n", - " -N maximum number of status lines *\n", - " -p [list] printer status *\n", - " -P paper types - ignored\n", - " -r scheduler status\n", - " -s summary status information - short format\n", - " -S [list] character set - ignored\n", - " -t all status information - long format\n", - " -u [joblist] job status information\n", - " -v [list] printer mapping *\n", - " -V verbose mode \n", - " -Tdbgflags debug flags\n", - " * - long status format produced\n", + N_("usage: %s [-A] [-d] [-l] [-r] [-R] [-s] [-t] [-a [list]]\n"), + N_(" [-c [list]] [-f [list]] [-o [list]]\n"), + N_(" [-p [list]] [-P] [-S [list]] [list]\n"), + N_(" [-u [login-ID-list]] [-v [list]] [-V] [-n] [-Tdbgflags]\n"), + N_(" list is a list of print queues\n"), + N_(" -A use authentication specified by AUTH environment variable\n"), + N_(" -a [list] destination status *\n"), + N_(" -c [list] class status *\n"), + N_(" -d print default destination\n"), + N_(" -f [list] forms status *\n"), + N_(" -o [list] job or printer status *\n"), + N_(" -n each -n increases number of status lines (default 1) *\n"), + N_(" -N maximum number of status lines *\n"), + N_(" -p [list] printer status *\n"), + N_(" -P paper types - ignored\n"), + N_(" -r scheduler status\n"), + N_(" -s summary status information - short format\n"), + N_(" -S [list] character set - ignored\n"), + N_(" -t all status information - long format\n"), + N_(" -u [joblist] job status information\n"), + N_(" -v [list] printer mapping *\n"), + N_(" -V verbose mode \n"), + N_(" -Tdbgflags debug flags\n"), + N_(" * - long status format produced\n"), 0 }; @@ -616,7 +616,7 @@ void usage(void) { char **sptr, *s; for( sptr= lpstat_msg; (s = *sptr); ++sptr ){ - FPRINTF( STDERR, s, Name ); + FPRINTF( STDERR, _(s), Name ); } { char buffer[128];