Package: webalizer
Version: 2.01.10-32

Using webalizer with french locales for example, month names are still output in english:

$ export LANG=fr_FR.utf8
$ export LC_ALL=fr_FR.utf8
$ webalizer -o . access.log
...

When viewing Month statistics, I get the following ouput:

        Période du résumé: March 2009

instead of:

        Période du résumé: Mars 2009

Looks like the bug comes from the intl_strip_context function provided in the debian/patches/17_gettext.dpatch file. The function is used to skip data before a pipe, but if no pipe is found, msgid is returned instead of the gettext string. Here goes a patch in order to fix this function.

# diff -u webalizer.c.ori webalizer.c
--- webalizer.c.ori     2009-03-19 11:26:04.133398000 +0100
+++ webalizer.c 2009-03-19 13:52:51.702928667 +0100
@@ -2158,11 +2158,12 @@
 char *intl_strip_context (const char *msgid)
 {
    char *msgval = gettext (msgid);
+   char *pipe;

-   msgval = strchr(msgval, '|');
-   if (msgval != NULL)
-      return (char*)(msgval + 1);
+   pipe = strchr(msgval, '|');
+   if (pipe != NULL)
+      return (char*)(pipe + 1);

-   return (char*)msgid;
+   return (char*)msgval;
 }

I'm using debian etch, kernel 2.6.18.5, libc6 2.3.6.ds1-13etch5.

--
Gerome Fournier
Infomaniak Network SA
http://infomaniak.ch



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to