Rt-3-0-3pre4 - Language Guessing

Hi!

I upgrader earlier this morning to 3.0.3pre4 to help me with my utf-8
problems (works great, but headers are sometimes still messed up).

Anyways, after this upgrade, if a browser is set to Language=Swedish, rt
guesses that the user want to view rt in Norwegian(!). This is not the
behaviour we want (default to english, please). How can we change this
behaviour?

Anyways, after this upgrade, if a browser is set to Language=Swedish, rt
guesses that the user want to view rt in Norwegian(!). This is not the
behaviour we want (default to english, please). How can we change this
behaviour?

You can add this line to your RT_SiteConfig.pm:

@LexiconLanguages = qw(en);

That will turn it into an English-only system.

Thanks,
/Autrijus/

By adding that line, I get the following when I start apache:

Use of uninitialized value in -e at
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
line 304.
[Tue Jun 17 08:33:18 2003] [error] cannot find
/service/rt3/local/po/*/en.po (called by RT::I18N) in @INC at
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
line 304.
Compilation failed in require at (eval 6) line 1.

Syntax error on line 245 of /service/rt3/conf/httpd.conf:
cannot find /service/rt3/local/po/*/en.po (called by RT::I18N) in @INC
at
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
line 304.
Compilation failed in require at (eval 6) line 1.

Autrijus Tang wrote:> On Mon, Jun 16, 2003 at 01:56:55PM +0200, Jonas Lincoln wrote:

Anyways, after this upgrade, if a browser is set to Language=Swedish, rt
guesses that the user want to view rt in Norwegian(!). This is not the
behaviour we want (default to english, please). How can we change this
behaviour?

You can add this line to your RT_SiteConfig.pm:

@LexiconLanguages = qw(en);

That will turn it into an English-only system.

Thanks,
/Autrijus/

By adding that line, I get the following when I start apache:

Can you help me to confirm that this problem does go away if you patch
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
with the diff below and restart apache?

Thanks,
/Autrijus/

— //member/autrijus/Locale-Maketext-Lexicon/lib/Locale/Maketext/Lexicon.pm 2003/05/20 07:46:12
+++ //member/autrijus/Locale-Maketext-Lexicon/lib/Locale/Maketext/Lexicon.pm 2003/06/17 12:40:19
@@ -189,6 +189,7 @@
$file =~ /$pattern/ or next;
push @{$entries{$1}}, ($format => $file) if $1;
}

  •   delete $entries{$1} unless exists $entries{$1} and @{$entries{$1}};
    
    }
    }

With the patch suggested, I get
Use of uninitialized value in exists at
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
line 192.
Use of uninitialized value in delete at
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
line 192.
Use of uninitialized value in exists at
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
line 192.
Use of uninitialized value in delete at
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
line 192.

and (the standard)

Use of uninitialized value in -e at
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
line 305.
[Tue Jun 17 15:31:35 2003] [error] cannot find
/service/rt3/local/po/*/en.po (called by RT::I18N) in @INC at
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
line 305.
Compilation failed in require at (eval 6) line 1.

Syntax error on line 245 of /service/rt3/conf/httpd.conf:
cannot find /service/rt3/local/po/*/en.po (called by RT::I18N) in @INC
at
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
line 305.
Compilation failed in require at (eval 6) line 1.

Cheers,
Jonas

Autrijus Tang wrote:> On Tue, Jun 17, 2003 at 08:36:24AM +0200, Jonas Lincoln wrote:

By adding that line, I get the following when I start apache:

Can you help me to confirm that this problem does go away if you patch
/service/perl+5.8/arch/linux-intel/lib/perl5/site_perl/5.8.0/Locale/Maketext/Lexicon.pm
with the diff below and restart apache?

Thanks,
/Autrijus/

— //member/autrijus/Locale-Maketext-Lexicon/lib/Locale/Maketext/Lexicon.pm 2003/05/20 07:46:12
+++ //member/autrijus/Locale-Maketext-Lexicon/lib/Locale/Maketext/Lexicon.pm 2003/06/17 12:40:19
@@ -189,6 +189,7 @@
$file =~ /$pattern/ or next;
push @{$entries{$1}}, ($format => $file) if $1;
}

  • delete $entries{$1} unless exists $entries{$1} and @{$entries{$1}};
    
    }
    }