Changeset 4239 for branches/2.0/wp-admin/import/mt.php
- Timestamp:
- 09/25/2006 02:38:55 AM (19 years ago)
- File:
-
- 1 edited
-
branches/2.0/wp-admin/import/mt.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-admin/import/mt.php
r3786 r4239 12 12 function header() { 13 13 echo '<div class="wrap">'; 14 echo '<h2>'.__('Import Movable Type ').'</h2>';14 echo '<h2>'.__('Import Movable Type and Typepad').'</h2>'; 15 15 } 16 16 … … 33 33 $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY ID"); 34 34 ?><select name="userselect[<?php echo $n; ?>]"> 35 <option value="#NONE#"> - Select -</option>35 <option value="#NONE#"><?php _e('- Select -') ?></option> 36 36 <?php 37 37 … … 135 135 function mt_authors_form() { 136 136 ?> 137 <div class="wrap"> 138 <h2><?php _e('Assign Authors'); ?></h2> 137 139 <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> 138 140 <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> … … 147 149 foreach ($authors as $author) { 148 150 ++ $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 />'); 150 152 $this->users_form($j); 151 153 echo '</li>'; 152 154 } 153 155 154 echo '<input type="submit" value=" Submit">'.'<br/>';156 echo '<input type="submit" value="'.__('Submit').'">'.'<br/>'; 155 157 echo '</form>'; 156 echo '</ol>'; 157 158 flush(); 158 echo '</ol></div>'; 159 159 160 } 160 161 … … 162 163 $file = wp_import_handle_upload(); 163 164 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(); 165 169 return; 166 170 } … … 175 179 global $wpdb; 176 180 $i = -1; 177 echo "< ol>";181 echo "<div class='wrap'><ol>"; 178 182 foreach ($this->posts as $post) { 179 183 if ('' != trim($post)) { … … 331 335 } 332 336 if ( $num_comments ) 333 printf( __('(%s comments)'), $num_comments);337 printf(' '.__('(%s comments)'), $num_comments); 334 338 335 339 // Finally the pings … … 379 383 } 380 384 if ( $num_pings ) 381 printf( __('(%s pings)'), $num_pings);382 385 printf(' '.__('(%s pings)'), $num_pings); 386 383 387 echo "</li>"; 384 388 } 385 flush();386 389 } 387 390 … … 390 393 wp_import_cleanup($this->id); 391 394 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>'; 393 396 } 394 397 395 398 function import() { 396 399 $this->id = (int) $_GET['id']; 400 397 401 $this->file = get_attached_file($this->id); 398 402 $this->get_authors_from_post(); … … 421 425 422 426 function MT_Import() { 423 // Nothing. 427 // Nothing. 424 428 } 425 429 } … … 427 431 $mt_import = new MT_Import(); 428 432 429 register_importer('mt', 'Movable Type', __('Import posts and comments from your Movable Typeblog'), array ($mt_import, 'dispatch'));433 register_importer('mt', __('Movable Type and Typepad'), __('Imports <strong>posts and comments</strong> from your Movable Type or Typepad blog'), array ($mt_import, 'dispatch')); 430 434 ?>
Note: See TracChangeset
for help on using the changeset viewer.