Changeset 3259
- Timestamp:
- 12/02/2005 05:39:36 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/import/blogger.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/blogger.php
r3062 r3259 223 223 // The user must provide a Blogger username and password. 224 224 if ( ! ( $_POST['user'] && $_POST['pass'] ) ) { 225 $this->login_form(__('The script will log into your Blogger account, change some settings so it can read your blog, and restore the original settings when it\'s done. Here\'s what you do: </p><ol><li>Back up your Blogger template.</li><li>Back up any other Blogger settings you might need later.</li><li>Log out of Blogger</li><li>Log in <em>here</em> with your Blogger username and password.</li><li>On the next screen, click one of your Blogger blogs.</li><li>Do not close this window or navigate away until the process is complete.</li></ol>'));225 $this->login_form(__('The script will log into your Blogger account, change some settings so it can read your blog, and restore the original settings when it\'s done. Here\'s what you do:').'</p><ol><li>'.__('Back up your Blogger template.').'</li><li>'.__('Back up any other Blogger settings you might need later.').'</li><li>'.__('Log out of Blogger').'</li><li>'.__('Log in <em>here</em> with your Blogger username and password.').'</li><li>'.__('On the next screen, click one of your Blogger blogs.').'</li><li>'.__('Do not close this window or navigate away until the process is complete.').'</li></ol>'); 226 226 } 227 227 … … 229 229 $this->import['cookies'] = $this->login_blogger($_POST['user'], $_POST['pass']); 230 230 if ( !is_array( $this->import['cookies'] ) ) { 231 $this->login_form( "Login failed. Please enter your credentials again.");231 $this->login_form(__('Login failed. Please enter your credentials again.')); 232 232 } 233 233 … … 238 238 // Get the Blogger welcome page and scrape the blog numbers and names from it 239 239 $response = $this->get_blogger('http://www.blogger.com/home', $this->import['cookies']); 240 if (! stristr($response['body'], 'signed in as') ) $this->login_form( "Login failed. Please re-enter your username and password.");240 if (! stristr($response['body'], 'signed in as') ) $this->login_form(__('Login failed. Please re-enter your username and password.')); 241 241 $blogsary = array(); 242 242 preg_match_all('#posts\.g\?blogID=(\d+)">([^<]+)</a>#U', $response['body'], $blogsary); … … 291 291 // Step 2: Backup the Blogger options pages, updating some of them. 292 292 function backup_settings() { 293 $output.= "<h1>Backing up Blogger options</h1>\n";293 $output.= '<h1>'.__('Backing up Blogger options')."</h1>\n"; 294 294 $form = false; 295 295 foreach ($this->import['blogs'][$_GET['blog']]['options'] as $blog_opt => $optary) { … … 421 421 $user_password = substr(md5(uniqid(microtime())), 0, 6); 422 422 $result = wp_create_user( $user_login, $user_password, $user_email ); 423 $status.= "Registered user <strong>$user_login</strong>. ";423 $status.= sprintf('Registered user <strong>%s</strong>.', $user_login); 424 424 $this->import['blogs'][$_GET['blog']]['newusers'][] = $user_login; 425 425 } … … 509 509 } 510 510 } 511 $status = "$postcount ".__('post(s) parsed,')." $skippedpostcount ".__('skipped...')." $commentcount ".__('comment(s) parsed,')." $skippedcommentcount ".__('skipped...').' <strong>'.__('Done').'</strong>'; 511 $status = sprintf(__('%s post(s) parsed, %s skipped...'), $postcount, $skippedpostcount).' '. 512 sprintf(__('%s comment(s) parsed, %s skipped...'), $commentcoun, $skippedcommentcount).' '. 513 ' <strong>'.__('Done').'</strong>'; 512 514 $import = $this->import; 513 515 $import['blogs'][$_GET['blog']]['archives']["$url"] = $status; … … 553 555 $this->import['blogs'][$_GET['blog']]['options']["$blog_opt"]['error'] = true; 554 556 update_option('import-blogger', $this->import); 555 $output .= "<p><strong>$blog_opt</strong> ".__('failed. Trying again.').'</p>';557 $output .= sprintf(__('%s failed. Trying again.'), "<p><strong>$blog_opt</strong> ").'</p>'; 556 558 } else { 557 559 $this->import['blogs'][$_GET['blog']]['options']["$blog_opt"]['restored'] = true; 558 560 update_option('import-blogger', $this->import); 559 $output .= "<p><strong>$blog_opt</strong> ".__('restored.').'</p>';561 $output .= sprintf(__('%s restored.'), "<p><strong>$blog_opt</strong> ").'</p>'; 560 562 } 561 563 } … … 586 588 echo '<li>'.__('In case you haven\'t done it already, you can import the posts from your other blogs:'). $this->show_blogs() . '</li>'; 587 589 if ( $n = count($this->import['blogs'][$_GET['blog']]['newusers']) ) 588 echo '<li>'. __('Go to <a href="users.php" target="_parent">Authors & Users</a>, where you can modify the new user(s) or delete them. If you want to make all of the imported posts yours, you will be given that option when you delete the new authors.').'</li>';590 echo '<li>'.sptintf(__('Go to <a href="%s" target="%s">Authors & Users</a>, where you can modify the new user(s) or delete them. If you want to make all of the imported posts yours, you will be given that option when you delete the new authors.'), 'users.php', '_parent').'</li>'; 589 591 echo '<li>'.__('For security, click the link below to reset this importer. That will clear your Blogger credentials and options from the database.').'</li>'; 590 592 echo '</ul>';
Note: See TracChangeset
for help on using the changeset viewer.