]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fix some translations
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Sun, 30 Oct 2011 19:03:41 +0000 (19:03 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Sun, 30 Oct 2011 19:03:41 +0000 (19:03 +0000)
The messages were produced through strings manipulations that are
incompatibles with the translation process.

email.c
report.c
smartfilter.c

diff --git a/email.c b/email.c
index c103da5d63c4437dbbf3723d073bd7f2f964c3b4..fec895c104623629e8346428c387bbec824a38ca 100644 (file)
--- 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));
index 6dcee293339443187e43d3ec69ccd22e14607570..b39335940fa141ad3100024468fcea0f72023dbc 100644 (file)
--- 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("<div class=\"report\"><table cellpadding=\"0\" cellspacing=\"2\">\n",fp_tt);
-                                       strncpy(tmp4,_("DATE/TIME"),4);
-                                       tmp4[4]='\0';
-                                       fprintf(fp_tt,"<tr><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th></tr>\n",_("ACCESSED SITE"),tmp4,_("DATE/TIME")+5);
+                                       fprintf(fp_tt,"<tr><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th></tr>\n",_("ACCESSED SITE"),_("DATE"),_("TIME"));
                                }
 
                                fputs("<tr><td class=\"data\">",fp_tt);
index a4372d5bd17c0fc8ac29e61810f64f2738344d95..4538d7003178a13f746296542b2eba2bc32ff55e 100644 (file)
@@ -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("<tr><td></td></tr>\n",fp_ou);
        fputs("<tr><td></td></tr>\n",fp_ou);
        fputs("<tr><td></td></tr>\n",fp_ou);
-       fprintf(fp_ou,"<tr><th bgcolor=%s><font size=\"%s\">%s</font></th><th bgcolor=\"%s\"><font size=\"%s\">%s</font></th><th bgcolor=\"%s\"><font size=\"%s\">%s</font></th><th bgcolor=\"%s\"><font size=\"%s\">%s</font></th><th bgcolor=\"%s\"><font size=\"%s\">%s</font></th></tr>\n",HeaderBgColor,FontSize,_("USERID"),HeaderBgColor,FontSize,_("IP/NAME"),HeaderBgColor,FontSize,_("DATE/TIME"),HeaderBgColor,FontSize,_("ACCESSED SITE"),HeaderBgColor,FontSize,smartheader);
+       fprintf(fp_ou,"<tr><th bgcolor=%s><font size=\"%s\">%s</font></th><th bgcolor=\"%s\"><font size=\"%s\">%s</font></th><th bgcolor=\"%s\"><font size=\"%s\">%s</font></th><th bgcolor=\"%s\"><font size=\"%s\">%s</font></th><th bgcolor=\"%s\"><font size=\"%s\">%s</font></th></tr>\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("<tr><td></td></tr>\n",fp_user);
                        fputs("<tr><td></td></tr>\n",fp_user);
                        fputs("<tr><td></td></tr>\n",fp_user);
-                       fprintf(fp_user,"<tr><th bgcolor=%s><font size=%s>%s</font></th><th bgcolor=%s><font size=%s>%s</font></th><th bgcolor=%s><font size=%s>%s</font></th><th bgcolor=%s><font size=%s>%s</font></th><th bgcolor=%s><font size=%s>%s</font></th></tr>\n",HeaderBgColor,FontSize,_("USERID"),HeaderBgColor,FontSize,_("IP/NAME"),HeaderBgColor,FontSize,_("DATE/TIME"),HeaderBgColor,FontSize,_("ACCESSED SITE"),HeaderBgColor,FontSize,smartheader);
+                       fprintf(fp_user,"<tr><th bgcolor=%s><font size=%s>%s</font></th><th bgcolor=%s><font size=%s>%s</font></th><th bgcolor=%s><font size=%s>%s</font></th><th bgcolor=%s><font size=%s>%s</font></th><th bgcolor=%s><font size=%s>%s</font></th></tr>\n",HeaderBgColor,FontSize,_("USERID"),HeaderBgColor,FontSize,_("IP/NAME"),HeaderBgColor,FontSize,_("DATE/TIME"),HeaderBgColor,FontSize,_("ACCESSED SITE"),HeaderBgColor,FontSize,_("SMARTFILTER"));
                }
                fprintf(fp_user,"<tr><td bgcolor=%s align=center><font size=%s>%s</font></td><td bgcolor=%s align=center><font size=%s>%s</font></td><td bgcolor=%s align=center><font size=%s>%s-%s</font></td><td bgcolor=%s><font size=%s>%s</font></td><td bgcolor=%s><font size=%s>%s</font></td></th>\n",TxBgColor,FontSize,uinfo->label,TxBgColor,FontSize,ip,TxBgColor,FontSize,data,hora,TxBgColor,FontSize,url,TxBgColor,FontSize,smartcat);