[rt-devel] RT-3.0.9 overview.

Jesse Vincent jesse at bestpractical.com
Mon Mar 15 11:22:55 EST 2004


-----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'} );
}



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