Make WordPress Core

Ticket #2069: num-i18n-cleanups.diff

File num-i18n-cleanups.diff, 13.6 KB (added by nbachiyski, 20 years ago)
  • inline-uploading.php

     
    244244</div>
    245245";
    246246                        $popups .= "<div id='popup{$ID}' class='popup'>
    247         <div class='filetype'>File Type: ".str_replace('/',"/\n",$attachment['post_mime_type'])."</div>
     247        <div class='filetype'>".__('File Type:').' '.str_replace('/',"/\n",$attachment['post_mime_type'])."</div>
    248248        <a id=\"L{$ID}\" onclick=\"toggleOtherLink({$ID});return false;\" href=\"javascript:void()\">$__linked_to_file</a>
    249249        {$send_delete_cancel}
    250250</div>
  • update-links.php

     
    33require_once( ABSPATH . 'wp-includes/class-snoopy.php');
    44
    55if ( !get_option('use_linksupdate') )
    6         die('Feature disabled.');
     6        die(__('Feature disabled.'));
    77
    88$link_uris = $wpdb->get_col("SELECT link_url FROM $wpdb->links");
    99
     
    4141                $wpdb->query("UPDATE $wpdb->links SET link_updated = '$time' WHERE link_url = '$uri'");
    4242        endforeach;
    4343}
    44 ?>
    45  No newline at end of file
     44?>
  • users.php

     
    9595        foreach ($userids as $id) {
    9696                $user = new WP_User($id);
    9797                if ($id == $current_user->id) {
    98                         echo "<li>" . sprintf('ID #%1s: %2s <strong>The current user will not be deleted.</strong>', $id, $user->user_login) . "</li>\n";
     98                        echo "<li>" . sprintf(__('ID #%1s: %2s <strong>The current user will not be deleted.</strong>'), $id, $user->user_login) . "</li>\n";
    9999                } else {
    100                         echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf('ID #%1s: %2s', $id, $user->user_login) . "</li>\n";
     100                        echo "<li><input type=\"hidden\" name=\"users[]\" value=\"{$id}\" />" . sprintf(__('ID #%1s: %2s'), $id, $user->user_login) . "</li>\n";
    101101                        $go_delete = true;
    102102                }
    103103        }
  • link-import.php

     
    108108                        $query = "INSERT INTO $wpdb->links (link_url, link_name, link_target, link_category, link_description, link_owner, link_rss)
    109109                                VALUES('{$urls[$i]}', '".$wpdb->escape($names[$i])."', '', $cat_id, '".$wpdb->escape($descriptions[$i])."', $user_ID, '{$feeds[$i]}')\n";
    110110                        $result = $wpdb->query($query);
    111                         echo sprintf(__("<p>Inserted <strong>%s</strong></p>"), $names[$i]);
     111                                                echo sprintf('<p>'.__('Inserted <strong>%s</strong>').'</p>', $names[$i]);
    112112                    }
    113113?>
    114114     <p><?php printf(__('Inserted %1$d links into category %2$s. All done! Go <a href="%3$s">manage those links</a>.'), $link_count, $cat_id, 'link-manager.php') ?></p>
  • admin-header.php

     
    133133        newcatSub.type = 'button';
    134134        newcatSub.name = 'Button';
    135135        newcatSub.id = 'catadd';
    136         newcatSub.value = '<?php _e('Add'); ?>';
     136        newcatSub.value = '<?php echo addslashes(__('Add')); ?>';
    137137        newcatSub.onclick = ajaxNewCat;
    138138
    139139        ajaxcat.appendChild(newcat);
     
    141141        document.getElementById('jaxcat').appendChild(ajaxcat);
    142142
    143143        howto = document.createElement('span');
    144         howto.innerHTML = '<?php _e('Separate multiple categories with commas.'); ?>';
     144        howto.innerHTML = '<?php echo addslashes(__('Separate multiple categories with commas.')); ?>';
    145145        howto.id = 'howto';
    146146        ajaxcat.appendChild(howto);
    147147}
     
    160160
    161161function newCatLoading() {
    162162        var p = getResponseElement();
    163         p.innerHTML = 'Sending Data...';
     163        p.innerHTML = '<?php echo addslashes(__('Sending Data...')); ?>';
    164164}
    165165
    166166function newCatLoaded() {
    167167        var p = getResponseElement();
    168         p.innerHTML = 'Data Sent...';
     168        p.innerHTML = '<?php echo addslashes(__('Data Sent...')); ?>';
    169169}
    170170
    171171function newCatInteractive() {
    172172        var p = getResponseElement();
    173         p.innerHTML = 'Processing Request...';
     173        p.innerHTML = '<?php echo addslashes(__('Processing Request...')); ?>';
    174174}
    175175
    176176function newCatCompletion() {
     
    186186                id = ids[i];
    187187//              alert(id);
    188188                if ( id == '-1' ) {
    189                         p.innerHTML = "You don't have permission to do that.";
     189                        p.innerHTML = "<?php echo addslashes(__("You don't have permission to do that.")); ?>";
    190190                        return;
    191191                }
    192192                if ( id == '0' ) {
    193                         p.innerHTML = "That category name is invalid.  Try something else.";
     193                        p.innerHTML = "<?php echo addslashes(__('That category name is invalid.  Try something else.')); ?>";
    194194                        return;
    195195                }
    196196               
  • link-categories.php

     
    444444</div>
    445445<div class="wrap">
    446446    <h3><?php _e('Note:') ?></h3>
    447     <?php printf(__('<p>Deleting a link category does not delete links from that category.<br />It will just set them back to the default category <b>%s</b>.'), get_linkcatname(1)) ?></p>
     447        <p><?php printf(__('Deleting a link category does not delete links from that category.<br />It will just set them back to the default category <strong>%s</strong>.'), get_linkcatname(1)) ?></p>
    448448</div>
    449449<?php
    450450    break;
  • plugins.php

     
    7272$plugins = get_plugins();
    7373
    7474if (empty($plugins)) {
    75         _e("<p>Couldn't open plugins directory or there are no plugins available.</p>"); // TODO: make more helpful
     75        echo '<p>';
     76        _e("Couldn't open plugins directory or there are no plugins available."); // TODO: make more helpful
     77        echo '</p>';
    7678} else {
    7779?>
    7880<table width="100%" cellpadding="3" cellspacing="3">
     
    100102        <tr $style>
    101103                <td class='name'>{$plugin_data['Title']}</td>
    102104                <td class='vers'>{$plugin_data['Version']}</td>
    103                 <td class='desc'>{$plugin_data['Description']} <cite>By {$plugin_data['Author']}.</cite></td>
     105                <td class='desc'>{$plugin_data['Description']} <cite>".sprintf(__('By %s'), $plugin_data['Author']).".</cite></td>
    104106                <td class='togl'>$action</td>
    105107        </tr>";
    106108        }
  • theme-editor.php

     
    4848case 'update':
    4949
    5050        if ( !current_user_can('edit_themes') )
    51                 die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
     51        die('<p>'.__('You have do not have sufficient permissions to edit templates for this blog.').'</p>');
    5252
    5353        $newcontent = stripslashes($_POST['newcontent']);
    5454        $theme = urlencode($theme);
     
    6969       
    7070        require_once('admin-header.php');
    7171        if ( !current_user_can('edit_themes') )
    72                 die(__('<p>You have do not have sufficient permissions to edit themes for this blog.</p>'));
     72        die('<p>'.__('You have do not have sufficient permissions to edit themes for this blog.').'</p>');
    7373
    7474        update_recently_edited($file);
    7575       
  • admin-functions.php

     
    17541754        // Move the file to the uploads dir
    17551755        $new_file = $uploads['path'] . "/$filename";
    17561756        if ( false === move_uploaded_file($file['tmp_name'], $new_file) )
    1757                 die('The uploaded file could not be moved to $file.');
     1757                die(__('The uploaded file could not be moved to $file.'));
    17581758
    17591759        // Set correct file permissions
    17601760        $stat = stat(dirname($new_file));
  • templates.php

     
    3737case 'update':
    3838
    3939        if ( ! current_user_can('edit_files') )
    40                 die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
     40        die('<p>'.__('You have do not have sufficient permissions to edit templates for this blog.').'</p>');
    4141
    4242        $newcontent = stripslashes($_POST['newcontent']);
    4343        if (is_writeable($real_file)) {
     
    5858        require_once('./admin-header.php');
    5959       
    6060        if ( ! current_user_can('edit_files') )
    61                 die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
     61        die('<p>'.__('You have do not have sufficient permissions to edit templates for this blog.').'</p>');
    6262
    6363        if ( strstr( $file, 'wp-config.php' ) )
    64                 die( __('<p>The config file cannot be edited or viewed through the web interface. Sorry!</p>') );
     64        die('<p>'.__('The config file cannot be edited or viewed through the web interface. Sorry!').'</p>');
    6565
    6666        update_recently_edited($file);
    6767
     
    152152}
    153153
    154154include("admin-footer.php");
    155 ?>
    156  No newline at end of file
     155?>
  • moderation.php

     
    3232case 'update':
    3333
    3434        if ( ! current_user_can('moderate_comments') )
    35                 die(__('<p>Your level is not high enough to moderate comments.</p>'));
     35        die('<p>'.__('Your level is not high enough to moderate comments.').'</p>');
    3636
    3737        $item_ignored = 0;
    3838        $item_deleted = 0;
     
    8484        $spam     = (int) $_GET['spam'];
    8585        if ($approved) {
    8686                if ('1' == $approved) {
    87                  echo __("1 comment approved <br />") . "\n";
     87                        echo __("1 comment approved") . " <br/>\n";
    8888                } else {
    8989                 echo sprintf(__("%s comments approved <br />"), $approved) . "\n";
    9090                }
    9191        }
    9292        if ($deleted) {
    9393                if ('1' == $deleted) {
    94                 echo __("1 comment deleted <br />") . "\n";
     94                        echo __("1 comment deleted") . " <br/>\n";
    9595                } else {
    96                 echo sprintf(__("%s comments deleted <br />"), $deleted) . "\n";
     96                        echo sprintf(__("%s comments deleted"), $deleted) . " <br/>\n";
    9797                }
    9898        }
    9999        if ($spam) {
    100100                if ('1' == $spam) {
    101                 echo __("1 comment marked as spam <br />") . "\n";
     101                        echo __("1 comment marked as spam") . " <br/>\n";
    102102                } else {
    103                 echo sprintf(__("%s comments marked as spam <br />"), $spam) . "\n";
     103                        echo sprintf(__("%s comments marked as spam"), $spam) . " <br/>\n";
    104104                }
    105105        }
    106106        if ($ignored) {
    107107                if ('1' == $ignored) {
    108                 echo __("1 comment unchanged <br />") . "\n";
     108                        echo __("1 comment unchanged") . " <br/>\n";
    109109                } else {
    110                 echo sprintf(__("%s comments unchanged <br />"), $ignored) . "\n";
     110                        echo sprintf(__("%s comments unchanged"), $ignored) . " <br/>\n";
    111111                }
    112112        }
    113113        echo "</p></div>\n";
     
    206206<?php
    207207} else {
    208208    // nothing to approve
    209     echo __("<p>Currently there are no comments for you to moderate.</p>") . "\n";
     209        echo '<p>'.__("Currently there are no comments for you to moderate.") . "</p>\n";
    210210}
    211211?>
    212212
  • link-manager.php

     
    291291        echo " selected='selected'";
    292292        echo ">".$row->cat_id.": ".wp_specialchars($row->cat_name);
    293293        if ($row->auto_toggle == 'Y')
    294             echo ' (auto toggle)';
     294            echo ' '.__('(auto toggle)');
    295295        echo "</option>\n";
    296296    }
    297297    echo "        </select>\n";
  • index.php

     
    129129$rss = @fetch_rss('http://wordpress.org/development/feed/');
    130130if ( isset($rss->items) && 0 != count($rss->items) ) {
    131131?>
    132 <h3>WordPress Development Blog</h3>
     132<h3><?php _e('WordPress Development Blog'); ?></h3>
    133133<?php
    134134$rss->items = array_slice($rss->items, 0, 3);
    135135foreach ($rss->items as $item ) {
     
    169169
    170170<?php
    171171require('./admin-footer.php');
    172 ?>
    173  No newline at end of file
     172?>
  • link-parse-opml.php

     
    5555xml_set_element_handler($xml_parser, "startElement", "endElement");
    5656
    5757if (!xml_parse($xml_parser, $opml, true)) {
    58     echo(sprintf("XML error: %s at line %d",
     58    echo(sprintf(__('XML error: %1$s at line %2$s'),
    5959                   xml_error_string(xml_get_error_code($xml_parser)),
    6060                   xml_get_current_line_number($xml_parser)));
    6161}
    6262
    6363// Free up memory used by the XML parser
    6464xml_parser_free($xml_parser);
    65 ?>
    66  No newline at end of file
     65?>
  • execute-pings.php

     
    22require_once('admin.php');
    33
    44if ( ! current_user_can('edit_posts') )
    5         die ("Cheatin' uh?");
     5        die (__("Cheatin' uh?"));
    66
    77echo '/* No Styles Here */';
    88register_shutdown_function('execute_all_pings');
  • plugin-editor.php

     
    3535case 'update':
    3636
    3737        if ( !current_user_can('edit_plugins') )
    38                 die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
     38        die('<p>'.__('You have do not have sufficient permissions to edit templates for this blog.').'</p>');
    3939
    4040        $newcontent = stripslashes($_POST['newcontent']);
    4141        if (is_writeable($real_file)) {
     
    5555       
    5656        require_once('admin-header.php');
    5757        if ( !current_user_can('edit_plugins') )
    58                 die(__('<p>You have do not have sufficient permissions to edit plugins for this blog.</p>'));
     58        die('<p>'.__('You have do not have sufficient permissions to edit plugins for this blog.').'</p>');
    5959
    6060        update_recently_edited("wp-content/plugins/$file");
    6161