Make WordPress Core

Ticket #6007: 6007.r7098.diff

File 6007.r7098.diff, 1.7 KB (added by hansengel, 17 years ago)

Translates file descriptions before showing in theme editor

  • wp-admin/theme-editor.php

     
    8585 <div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div>
    8686<?php endif;
    8787
    88 $description = get_file_description($file);
     88$description = __(get_file_description($file));
    8989$desc_header = ( $description != $file_show ) ? "$description</strong> (%s)" : "%s";
    9090?>
    9191<div class="wrap">
     
    124124        <h4 style="margin-bottom: 0px;"><?php _e('Templates'); ?></h4>
    125125        <ul>
    126126<?php foreach($themes[$theme]['Template Files'] as $template_file) :
    127                 $description = get_file_description($template_file);
     127                $description = __(get_file_description($template_file));
    128128                $template_show = basename($template_file);
    129129                $filedesc = ( $description != $template_file ) ? "$description <span class='nonessential'>($template_show)</span>" : "$description";
    130130                $filedesc = ( $template_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($template_show)</span></span>" : $filedesc;
     
    135135        <h4 style="margin-bottom: 0px;"><?php _e('Styles'); ?></h4>
    136136        <ul>
    137137<?php foreach($themes[$theme]['Stylesheet Files'] as $style_file) :
    138                 $description = get_file_description($style_file);
     138                $description = __(get_file_description($style_file));
    139139                $style_show = basename($style_file);
    140140                $filedesc = ( $description != $style_file ) ? "$description <span class='nonessential'>($style_show)</span>" : "$description";
    141141                $filedesc = ( $style_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($style_show)</span></span>" : $filedesc;