You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Morten Isaksen <mi...@gmail.com> on 2004/09/01 16:18:38 UTC

How do I use the localized reports

How do I use the localized reports in rules/30_text_<lang>.cf ? I have
looked for a configurations settings but I could not find any.

-- 
Morten Isaksen
http://www.aub.dk/~misak/

Re: How do I use the localized reports

Posted by Morten Isaksen <mi...@gmail.com>.
On Wed, 01 Sep 2004 10:58:50 -0400, Matt Kettler
<mk...@comcast.net> wrote:
> At 04:53 PM 9/1/2004 +0200, Morten Isaksen wrote:
> >Hmm. Then it is a per server setting and not a per user setting.
> >Right?
> 
> Um.. no. Each process has it's own environment, there's not one LANG
> environment variable, but one per process.

But how do you set this on a mail server where the users do not have a
shell acount?

-- 
Morten Isaksen
http://www.aub.dk/~misak/

Fwd: How do I use the localized reports

Posted by Morten Isaksen <mi...@gmail.com>.
I am trying to implement this (it seemed like a good way to start
developing on SA).

The strait forward way was to just update the $lang variable in
Parser.pm, but the $lang is obeviously set before the parsing of
$self->{config_text} begins. There is also a nother problem. The
userprefs file is parsed as the last one which makes it hard to select
the right "lang xx" configuration lines.

The problem could be solved by parsing the 30_text_xx.cf files last,
but I dont if that creates other problems.

---------- Forwarded message ----------
From: Theo Van Dinter <fe...@kluge.net>
Date: Wed, 1 Sep 2004 11:04:13 -0400
Subject: Re: How do I use the localized reports
To: users@spamassassin.apache.org

On Wed, Sep 01, 2004 at 10:58:50AM -0400, Matt Kettler wrote:
> I for one disagree since nearly every other unix application in the world
> uses LANG it makes sense to be consistent with the defacto standards.
> Creating our own setting merely breaks expected behavior.

Yes, but what if people use spamd?  LANG for spamc is irrelevent, and the LANG
for spamd is a global default.

What I would guess is that the code should use LANG, but a configuration
option "use_language" (or something) would reset LANG appropriately.
Therefore "spamassassin" and "sa-learn" can do the right thing, and spamd
would have an option to change LANG at run-time.

--
Randomly Generated Tagline:
"On the big starship of life, I think I'd be the morale officer..." - Theo





-- 
Morten Isaksen
http://www.aub.dk/~misak/

Re: How do I use the localized reports

Posted by Matt Kettler <mk...@evi-inc.com>.
At 11:04 AM 9/1/2004, Theo Van Dinter wrote:
>Yes, but what if people use spamd?  LANG for spamc is irrelevent, and the LANG
>for spamd is a global default.

Hmm, good point.. For some reason I was thinking when you did a setuid you 
picked up the .profile for the user you setuid'ed to, but that's clearly 
not the case (and I should know better).



>What I would guess is that the code should use LANG, but a configuration
>option "use_language" (or something) would reset LANG appropriately.
>Therefore "spamassassin" and "sa-learn" can do the right thing, and spamd
>would have an option to change LANG at run-time.

That seems quite reasonable.  


Re: How do I use the localized reports

Posted by Theo Van Dinter <fe...@kluge.net>.
On Wed, Sep 01, 2004 at 10:58:50AM -0400, Matt Kettler wrote:
> I for one disagree since nearly every other unix application in the world 
> uses LANG it makes sense to be consistent with the defacto standards.
> Creating our own setting merely breaks expected behavior.

Yes, but what if people use spamd?  LANG for spamc is irrelevent, and the LANG
for spamd is a global default.

What I would guess is that the code should use LANG, but a configuration
option "use_language" (or something) would reset LANG appropriately.
Therefore "spamassassin" and "sa-learn" can do the right thing, and spamd
would have an option to change LANG at run-time.

-- 
Randomly Generated Tagline:
"On the big starship of life, I think I'd be the morale officer..." - Theo

Re: How do I use the localized reports

Posted by Matt Kettler <mk...@comcast.net>.
At 04:53 PM 9/1/2004 +0200, Morten Isaksen wrote:
>Hmm. Then it is a per server setting and not a per user setting.
>Right?

Um.. no. Each process has it's own environment, there's not one LANG 
environment variable, but one per process.

>It should in my opinion be a normal SA configuration settings.

I for one disagree since nearly every other unix application in the world 
uses LANG it makes sense to be consistent with the defacto standards.

Creating our own setting merely breaks expected behavior.


Re: How do I use the localized reports

Posted by Morten Isaksen <mi...@gmail.com>.
On Wed, 01 Sep 2004 10:46:43 -0400, Matt Kettler
<mk...@comcast.net> wrote:
> >How do I use the localized reports in rules/30_text_<lang>.cf ? I have
> >looked for a configurations settings but I could not find any.
> 
> Set your LANG environment variable.

Hmm. Then it is a per server setting and not a per user setting.
Right? This is a problem if you have users with different nationality
on the same server.

It should in my opinion be a normal SA configuration settings.

I will enter this bugzilla.

-- 
Morten Isaksen
http://www.aub.dk/~misak/

Re: How do I use the localized reports

Posted by Matt Kettler <mk...@comcast.net>.
At 04:18 PM 9/1/2004 +0200, Morten Isaksen wrote:
>How do I use the localized reports in rules/30_text_<lang>.cf ? I have
>looked for a configurations settings but I could not find any.

Set your LANG environment variable.

Details are typicaly in man environ.

One online site that has a reference on this (crudely found with google):
         http://hp.vector.co.jp/authors/VA000199/os2/i18n.html