Merge branch 'master' of https://github.com/jgoodman/Freeside
[freeside.git] / rt / share / html / Admin / Global / MyRT.html
index 3dca78f..d31aa44 100644 (file)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
 <%init>
 my @actions;
 
-my @items = map { [ "component-$_", $_ ] } sort @{ RT->Config->Get('HomepageComponents') };
+my @items = map { [ "component-$_", loc($_) ] } sort @{ RT->Config->Get('HomepageComponents') };
 my $sys = RT::System->new( $session{'CurrentUser'} );
 # XXX: put this in savedsearches_to_portlet_items
 for ( $m->comp( "/Search/Elements/SearchesForObject",
                 Object => $sys )) {
-    my ( $desc, $search ) = @$_;
+    my ( $desc, $loc_desc, $search ) = @$_;
     my $SearchType = $search->Content->{'SearchType'} || 'Ticket';
     if ( $SearchType eq 'Ticket' ) {
-        push @items, [ "system-$desc", $desc ];
+        push @items, [ "system-$desc", $loc_desc ];
     } else {
         my $oid = ref($sys) . '-' . $sys->Id . '-SavedSearch-' . $search->Id;
-        my $type =
-            ( $SearchType eq 'Ticket' )
-            ? 'Saved Search' : $SearchType;    # loc
-        push @items, [ "saved-$oid", loc($type) . ": $desc" ];
+        my $type = ( $SearchType eq 'Ticket' )
+          ? 'Saved Search'    # loc
+          : $SearchType;
+        push @items, [ "saved-$oid", loc($type) . ": $loc_desc" ];
     }
 }