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/blogger.php

    r3937 r4239  
    136136        if ($header) curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
    137137        $response = curl_exec ($ch);
    138    
     138
    139139        if ($parse) {
    140140            $response = $this->parse_response($response);
     
    142142            return $response;
    143143        }
    144    
     144
    145145        return $response;
    146146    }
     
    211211        update_option('import-blogger', $this->import);
    212212    }
    213    
     213
    214214    // Redirects to next step
    215215    function do_next_step() {
     
    225225                $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>');
    226226            }
    227        
    228             // Try logging in. If we get an array of cookies back, we at least connected.       
     227
     228            // Try logging in. If we get an array of cookies back, we at least connected.
    229229            $this->import['cookies'] = $this->login_blogger($_POST['user'], $_POST['pass']);
    230230            if ( !is_array( $this->import['cookies'] ) ) {
    231231                $this->login_form(__('Login failed. Please enter your credentials again.'));
    232232            }
    233            
     233
    234234            // Save the password so we can log the browser in when it's time to publish.
    235235            $this->import['pass'] = $_POST['pass'];
     
    342342                $form.= $body;
    343343                $form.= "</div><script type='text/javascript'>forms=document.getElementsByTagName('form');for(i=0;i<forms.length;i++){if(forms[i].action.search('{$blog_opt}')){forms[i].submit();break;}}</script>";
    344                 $output.= '<p>'.sprintf('<strong>%s</strong> in progress, please wait...', $blog_opt)."</p>\n";
     344                $output.= '<p>'.sprintf(__('<strong>%s</strong> in progress, please wait...'), $blog_opt)."</p>\n";
    345345            } else {
    346346                $output.= "<p>$blog_opt</p>\n";
     
    396396                $archive = $this->get_blogger($url);
    397397                if ( $archive['code'] > 200 )
    398                     continue;   
     398                    continue;
    399399                $posts = explode('<wordpresspost>', $archive['body']);
    400400                for ($i = 1; $i < count($posts); $i = $i + 1) {
     
    410410                    $post_author_name = $wpdb->escape(trim($postinfo[1]));
    411411                    $post_author_email = $postinfo[5] ? $postinfo[5] : 'user@wordpress.org';
    412    
     412
    413413                    if ( $this->lump_authors ) {
    414414                        // Ignore Blogger authors. Use the current user_ID for all posts imported.
     
    421421                            $user_password = substr(md5(uniqid(microtime())), 0, 6);
    422422                            $result = wp_create_user( $user_login, $user_password, $user_email );
    423                             $status.= sprintf('Registered user <strong>%s</strong>.', $user_login);
     423                            $status.= sprintf(__('Registered user <strong>%s</strong>.'), $user_login);
    424424                            $this->import['blogs'][$_GET['blog']]['newusers'][] = $user_login;
    425425                        }
     
    436436                    $postminute = zeroise($post_date_His[1], 2);
    437437                    $postsecond = zeroise($post_date_His[2], 2);
    438    
     438
    439439                    if (($post_date[2] == 'PM') && ($posthour != '12'))
    440440                        $posthour = $posthour + 12;
    441441                    else if (($post_date[2] == 'AM') && ($posthour == '12'))
    442442                        $posthour = '00';
    443    
     443
    444444                    $post_date = "$postyear-$postmonth-$postday $posthour:$postminute:$postsecond";
    445    
     445
    446446                    $post_content = addslashes($post_content);
    447447                    $post_content = str_replace(array('<br>','<BR>','<br/>','<BR/>','<br />','<BR />'), "\n", $post_content); // the XHTML touch... ;)
    448    
     448
    449449                    $post_title = addslashes($post_title);
    450            
     450
    451451                    $post_status = 'publish';
    452    
     452
    453453                    if ( $ID = post_exists($post_title, '', $post_date) ) {
    454454                        $post_array[$i]['ID'] = $ID;
     
    510510                }
    511511                $status = sprintf(__('%s post(s) parsed, %s skipped...'), $postcount,  $skippedpostcount).' '.
    512                     sprintf(__('%s comment(s) parsed, %s skipped...'), $commentcoun, $skippedcommentcount).' '.
     512                    sprintf(__('%s comment(s) parsed, %s skipped...'), $commentcount, $skippedcommentcount).' '.
    513513                    ' <strong>'.__('Done').'</strong>';
    514514                $import = $this->import;
     
    547547                        sleep(2);
    548548                        if ( $response['code'] >= 400 )
    549                             die('<h1>Error restoring publishMode.</h1><p>Please tell the devs.</p>' . addslashes(print_r($response, 1)) );
     549                            die('<h1>'.__('Error restoring publishMode').'</h1><p>'.__('Please tell the devs.').'</p>' . addslashes(print_r($response, 1)) );
    550550                    }
    551551                }
     
    598598            $this->restart();
    599599        }
    600        
     600
    601601        if ( isset($_GET['noheader']) ) {
    602602            header('Content-Type: text/html; charset=utf-8');
    603603
    604             $this->import = get_settings('import-blogger');
     604            $this->import = get_option('import-blogger');
    605605
    606606            if ( false === $this->import ) {
     
    650650            }
    651651            die;
    652            
     652
    653653        } else {
    654654            $this->greet();
     
    663663$blogger_import = new Blogger_Import();
    664664
    665 register_importer('blogger', 'Blogger', __('Import posts and comments from a Blogger account'), array ($blogger_import, 'start'));
     665register_importer('blogger', __('Blogger and Blogspot'), __('Import <strong>posts and comments</strong> from your Blogger account'), array ($blogger_import, 'start'));
    666666
    667667?>
Note: See TracChangeset for help on using the changeset viewer.