This change feels like it's giving I18N too much knowledge of the internals of a current_user->user_object.
Maybe we should give current_user some sort of API for this? But I'd like I18N not to go poking around in user objects. On Wed 18.Nov'09 at 3:16:01 -0500, Jifty commits wrote: > Author: sunnavy > Date: Wed Nov 18 03:16:00 2009 > New Revision: 7630 > > Modified: > jifty/trunk/lib/Jifty/I18N.pm > > Log: > try to find user's lang pref from db too > > Modified: jifty/trunk/lib/Jifty/I18N.pm > ============================================================================== > --- jifty/trunk/lib/Jifty/I18N.pm (original) > +++ jifty/trunk/lib/Jifty/I18N.pm Wed Nov 18 03:16:00 2009 > @@ -184,6 +184,20 @@ > # optional argument makes it easy to disable I18N > # while comparing test strings (without loading session) > my $lang = shift || Jifty->web->session->get('jifty_lang'); > + > + if ( !$lang > + && Jifty->web->current_user > + && Jifty->web->current_user->id ) > + { > + my $user = Jifty->web->current_user->user_object; > + for my $column (qw/language lang/) { > + if ( $user->can($column) ) { > + $lang = $user->$column; > + last; > + } > + } > + } > + > $$DynamicLH = $self->get_handle($lang ? $lang : ()) if $DynamicLH; > } > > _______________________________________________ > Jifty-commit mailing list > jifty-com...@lists.jifty.org > http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-commit > _______________________________________________ jifty-devel mailing list jifty-devel@lists.jifty.org http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel