From: Frédéric Marchal Date: Sun, 30 Oct 2011 19:03:41 +0000 (+0000) Subject: Fix some translations X-Git-Tag: v2.3.2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bde5073dcc2e5ddd3f1fb2de08f26009cac925dc;p=thirdparty%2Fsarg.git Fix some translations The messages were produced through strings manipulations that are incompatibles with the translation process. --- diff --git a/email.c b/email.c index c103da5..fec895c 100644 --- a/email.c +++ b/email.c @@ -46,6 +46,7 @@ int geramail(const char *dirname, int debug, const char *outdir, const char *ema char strip1[MAXLEN], strip2[MAXLEN], strip3[MAXLEN], strip4[MAXLEN], strip5[MAXLEN], strip6[MAXLEN], strip7[MAXLEN]; char *buf; char warea[MAXLEN]; + char Subject[100]; int totuser=0; time_t t; struct tm *local; @@ -272,7 +273,8 @@ int geramail(const char *dirname, int debug, const char *outdir, const char *ema while(fgets(warea,sizeof(warea),fp_top3)!=NULL) fputs(warea,stdout); } else { - snprintf(warea,sizeof(warea),"%s -s \"SARG %s, %s\" \"%s\" <\"%s\"",MailUtility,_("Report"),asctime(local),email,top3); + snprintf(Subject,sizeof(Subject),_("SARG report, %s"),asctime(local)); + snprintf(warea,sizeof(warea),"%s -s \"%s\" \"%s\" <\"%s\"",MailUtility,Subject,email,top3); cstatus=system(warea); if (!WIFEXITED(cstatus) || WEXITSTATUS(cstatus)) { debuga(_("command return status %d\n"),WEXITSTATUS(cstatus)); diff --git a/report.c b/report.c index 6dcee29..b393359 100644 --- a/report.c +++ b/report.c @@ -59,7 +59,6 @@ void gerarel(void) char *oldurltt=NULL; char oldaccdiatt[11],oldacchoratt[9]; char tmp3[MAXLEN]; - char tmp4[5]; char u2[MAX_USER_LEN]; long long int nbytes=0; long long int nelap=0; @@ -272,9 +271,7 @@ void gerarel(void) close_html_header(fp_tt); fputs("
\n",fp_tt); - strncpy(tmp4,_("DATE/TIME"),4); - tmp4[4]='\0'; - fprintf(fp_tt,"\n",_("ACCESSED SITE"),tmp4,_("DATE/TIME")+5); + fprintf(fp_tt,"\n",_("ACCESSED SITE"),_("DATE"),_("TIME")); } fputs("\n",fp_ou); fputs("\n",fp_ou); fputs("\n",fp_ou); - fprintf(fp_ou,"\n",HeaderBgColor,FontSize,_("USERID"),HeaderBgColor,FontSize,_("IP/NAME"),HeaderBgColor,FontSize,_("DATE/TIME"),HeaderBgColor,FontSize,_("ACCESSED SITE"),HeaderBgColor,FontSize,smartheader); + fprintf(fp_ou,"\n",HeaderBgColor,FontSize,_("USERID"),HeaderBgColor,FontSize,_("IP/NAME"),HeaderBgColor,FontSize,_("DATE/TIME"),HeaderBgColor,FontSize,_("ACCESSED SITE"),HeaderBgColor,FontSize,_("SMARTFILTER")); while(fgets(buf,sizeof(buf),fp_in)!=NULL) { getword_start(&gwarea,buf); @@ -185,7 +180,7 @@ void smartfilter_report(void) fputs("\n",fp_user); fputs("\n",fp_user); fputs("\n",fp_user); - fprintf(fp_user,"\n",HeaderBgColor,FontSize,_("USERID"),HeaderBgColor,FontSize,_("IP/NAME"),HeaderBgColor,FontSize,_("DATE/TIME"),HeaderBgColor,FontSize,_("ACCESSED SITE"),HeaderBgColor,FontSize,smartheader); + fprintf(fp_user,"\n",HeaderBgColor,FontSize,_("USERID"),HeaderBgColor,FontSize,_("IP/NAME"),HeaderBgColor,FontSize,_("DATE/TIME"),HeaderBgColor,FontSize,_("ACCESSED SITE"),HeaderBgColor,FontSize,_("SMARTFILTER")); } fprintf(fp_user,"\n",TxBgColor,FontSize,uinfo->label,TxBgColor,FontSize,ip,TxBgColor,FontSize,data,hora,TxBgColor,FontSize,url,TxBgColor,FontSize,smartcat);
%s%s%s
%s%s%s
",fp_tt); diff --git a/smartfilter.c b/smartfilter.c index a4372d5..4538d70 100644 --- a/smartfilter.c +++ b/smartfilter.c @@ -44,7 +44,6 @@ void smartfilter_report(void) char data[15]; char hora[15]; char smartcat[256]; - char smartheader[50]; char ftime[128]; char smartuser[MAXLEN]; int fuser=0; @@ -54,10 +53,6 @@ void smartfilter_report(void) ouser[0]='\0'; - strncpy(smartheader,_("SmartFilter"),sizeof(smartheader)-1); - smartheader[sizeof(smartheader)-1]='\0'; - strup(smartheader); - if (snprintf(smart_in,sizeof(smart_in),"%s/smartfilter.unsort",outdirname)>=sizeof(smart_in)) { debuga(_("File name too long: %s/smartfilter.unsort"),outdirname); exit(EXIT_FAILURE); @@ -118,7 +113,7 @@ void smartfilter_report(void) fputs("
%s%s%s%s%s
%s%s%s%s%s
%s%s%s%s%s
%s%s%s%s%s
%s%s%s-%s%s%s