WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/25/2006 02:38:55 AM (15 years ago)
Author:
ryan
Message:

i18n fixes from nbachiyski. fixes #3109

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-admin/import/mt.php

    r3786 r4239  
    1212    function header() {
    1313        echo '<div class="wrap">';
    14         echo '<h2>'.__('Import Movable Type').'</h2>';
     14        echo '<h2>'.__('Import Movable Type and Typepad').'</h2>';
    1515    }
    1616
     
    3333        $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY ID");
    3434?><select name="userselect[<?php echo $n; ?>]">
    35     <option value="#NONE#">- Select -</option>
     35    <option value="#NONE#"><?php _e('- Select -') ?></option>
    3636    <?php
    3737
     
    135135    function mt_authors_form() {
    136136?>
     137<div class="wrap">
     138<h2><?php _e('Assign Authors'); ?></h2>
    137139<p><?php _e('To make it easier for you to edit and save the imported posts and drafts, you may want to change the name of the author of the posts. For example, you may want to import all the entries as <code>admin</code>s entries.'); ?></p>
    138140<p><?php _e('Below, you can see the names of the authors of the MovableType posts in <i>italics</i>. For each of these names, you can either pick an author in your WordPress installation from the menu, or enter a name for the author in the textbox.'); ?></p>
     
    147149        foreach ($authors as $author) {
    148150            ++ $j;
    149             echo '<li><i>'.$author.'</i><br />'.'<input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30">';
     151            echo '<li>'.__('Current author:').' <strong>'.$author.'</strong><br />'.sprintf(__('Create user %1$s or map to existing'), ' <input type="text" value="'.$author.'" name="'.'user[]'.'" maxlength="30"> <br />');
    150152            $this->users_form($j);
    151153            echo '</li>';
    152154        }
    153155
    154         echo '<input type="submit" value="Submit">'.'<br/>';
     156        echo '<input type="submit" value="'.__('Submit').'">'.'<br/>';
    155157        echo '</form>';
    156         echo '</ol>';
    157 
    158         flush();
     158        echo '</ol></div>';
     159
    159160    }
    160161
     
    162163        $file = wp_import_handle_upload();
    163164        if ( isset($file['error']) ) {
    164             echo $file['error'];
     165            $this->header();
     166            echo '<p>'.__('Sorry, there has been an error').'.</p>';
     167            echo '<p><strong>' . $file['error'] . '</strong></p>';
     168            $this->footer();
    165169            return;
    166170        }
     
    175179        global $wpdb;
    176180        $i = -1;
    177         echo "<ol>";
     181        echo "<div class='wrap'><ol>";
    178182        foreach ($this->posts as $post) {
    179183            if ('' != trim($post)) {
     
    331335                }
    332336                if ( $num_comments )
    333                     printf(__('(%s comments)'), $num_comments);
     337                    printf(' '.__('(%s comments)'), $num_comments);
    334338
    335339                // Finally the pings
     
    379383                }
    380384                if ( $num_pings )
    381                     printf(__('(%s pings)'), $num_pings);
    382                
     385                    printf(' '.__('(%s pings)'), $num_pings);
     386
    383387                echo "</li>";
    384388            }
    385             flush();
    386389        }
    387390
     
    390393        wp_import_cleanup($this->id);
    391394
    392         echo '<h3>'.sprintf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')).'</h3>';
     395        echo '<h3>'.sprintf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')).'</h3></div>';
    393396    }
    394397
    395398    function import() {
    396399        $this->id = (int) $_GET['id'];
     400       
    397401        $this->file = get_attached_file($this->id);
    398402        $this->get_authors_from_post();
     
    421425
    422426    function MT_Import() {
    423         // Nothing. 
     427        // Nothing.
    424428    }
    425429}
     
    427431$mt_import = new MT_Import();
    428432
    429 register_importer('mt', 'Movable Type', __('Import posts and comments from your Movable Type blog'), array ($mt_import, 'dispatch'));
     433register_importer('mt', __('Movable Type and Typepad'), __('Imports <strong>posts and comments</strong> from your Movable Type or Typepad blog'), array ($mt_import, 'dispatch'));
    430434?>
Note: See TracChangeset for help on using the changeset viewer.