Changeset 4915

Show
Ignore:
Timestamp:
10/29/09 02:59:11 (4 weeks ago)
Author:
auno
Message:

Translate label and label_description properly. BugzID#102916

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/greyhound/plugins/StyleCatcher/lib/StyleCatcher/CMS.pm

    r4914 r4915  
    3333        $entry{key} = $k; 
    3434        delete $entry{plugin}; 
    35         $entry{label} = $entry{label}->() if ref($entry{label}); 
    36         $entry{description_label} = $entry{description_label}->() if ref($entry{description_label}); 
     35        if ( ref( $entry{label} ) ) { 
     36            $entry{label} = $entry{label}->(); 
     37        } 
     38        else { 
     39            $entry{label} = MT->translate( $entry{label} ); 
     40        } 
     41        if ( ref( $entry{description_label} ) ) { 
     42            $entry{description_label} = $entry{description_label}->(); 
     43        } 
     44        else { 
     45            $entry{description_label} 
     46                = MT->translate( $entry{description_label} ); 
     47        } 
    3748        push @list, \%entry; 
    3849    }