[rt-devel] RT-3.0.9 overview.

Ruslan U. Zakirov cubic at acronis.ru
Mon Mar 15 12:59:45 EST 2004


Jesse Vincent wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> On Mar 15, 2004, at 11:07 AM, Autrijus Tang wrote:
> 
>> On Mon, Mar 15, 2004 at 10:36:34AM -0500, Jesse Vincent wrote:
>>
>>> I think that the templates should probably default to English, _not_
>>> the language of the currently logged in user.
>>> The problem is that the RT_System user object that's being used for
>>> ticket creation is picking up the current user's language information.
>>> Autrijus, what do you think of hardcoding the language handle code to
>>> _not_ loc for RT_SystemUser?
>>
>>
>> Sure, it's consistent, and will make Ruslan happy, so I'm not against it.
>>
> 
> Ruslan:
> 
> 
> Does replacing RT::CurrentUser's 'LanguageHandle' routine with the 
> following fix the loc problems you're seeing in email?
> 
> sub LanguageHandle {
>     my $self = shift;
>     if (   ( !defined $self->{'LangHandle'} )
>         || ( !UNIVERSAL::can( $self->{'LangHandle'}, 'maketext' ) )
>         || (@_) ) {
> 
>         if ( $self->id == $RT::SystemUser->id() ) {
>             @_ = qw(en-US);
>         }
> 
>         elsif ( $self->Lang ) {
>             push @_, $self->Lang;
>         }
>         $self->{'LangHandle'} = RT::I18N->get_handle(@_);
>     }
> 
>     # Fall back to english.
>     unless ( $self->{'LangHandle'} ) {
>         die "We couldn't get a dictionary. Nye mogu naidti slovar. No 
> puedo encontrar dictionario.";
>     }
>     return ( $self->{'LangHandle'} );
> }
Didn't try it.
I think that this patch incomplete.
select count(1) from Users where Lang is null or Lang = '';
+----------+
| count(1) |
+----------+
|    31274 |
+----------+
What language setting do they get?
IMHO
1) we should introduce RT::DefaultLang. That admins who support only one 
lang with RT could select local lang.
2) and/or try too guess lang from EmailAddress if lang is undef.

I also could guess by domain on which user write requests(.com, .de, 
.ru...) and automate filling.

But I've tested another approach: update Users set Lang = 'en' where id 
= 1 or id = 10;

It's fixed messages for RT_SystemUser and Nobody :)
> 
> 
> 
> If it does, it'll be in 3.0.10
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (Darwin)
> 
> iD8DBQFAVdhfQaM/s3DrrJARAgWTAKDG/gWhVL8sIVXVnGKaQxmPB4YR3ACgvPfv
> qnxWcHqq6+yq6tP28Ltn4js=
> =Pado
> -----END PGP SIGNATURE-----
> 



More information about the Rt-devel mailing list